[OpenWrt-Devel] [PATCH 2/3] build: use options to add kernels/dtbs in rootfs
Luka Perkov
luka at openwrt.org
Mon Aug 11 04:47:41 EDT 2014
Use support for options to enable targets and profiles select kernel or dtb
inclusion by default.
Signed-off-by: Luka Perkov <luka at openwrt.org>
---
config/Config-images.in | 49 ++++++++++++++++++++++++--------
target/linux/mxs/profiles/01-duckbill.mk | 5 +++-
2 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/config/Config-images.in b/config/Config-images.in
index 39e51e4..2509e09 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -274,44 +274,69 @@ menu "Target Images"
you probably want the default (/dev/sda2).
+ config HAVE_TARGET_ROOTFS_INCLUDE_KERNEL
+ bool
+ default n
+
menuconfig TARGET_ROOTFS_INCLUDE_KERNEL
bool "Include kernel in root filesystem"
depends on TARGET_ROOTFS_UBIFS || TARGET_ROOTFS_EXT4FS
- default n
+ default y if HAVE_TARGET_ROOTFS_INCLUDE_KERNEL
help
- Include the kernel image in the rootfs. Typically the image is placed
- below /boot.
+ Include the kernel image in the rootfs. Typically the image
+ is placed below /boot.
+
+
+ if TARGET_ROOTFS_INCLUDE_KERNEL
+
+ config HAVE_TARGET_ROOTFS_INCLUDE_UIMAGE
+ bool
+ default n
config TARGET_ROOTFS_INCLUDE_UIMAGE
- bool "include uImage" if TARGET_ROOTFS_INCLUDE_KERNEL
- default y
+ bool "include uImage"
+ default y if HAVE_TARGET_ROOTFS_INCLUDE_UIMAGE
help
This option might not apply to all targets. Make sure
to check target/linux/<your_target>/image/Makefile to
see if this option will have any effect.
+ config HAVE_TARGET_ROOTFS_INCLUDE_ZIMAGE
+ bool
+ default n
+
config TARGET_ROOTFS_INCLUDE_ZIMAGE
- bool "include zImage" if TARGET_ROOTFS_INCLUDE_KERNEL
- default y
+ bool "include zImage"
+ default y if HAVE_TARGET_ROOTFS_INCLUDE_ZIMAGE
help
This option might not apply to all targets. Make sure
to check target/linux/<your_target>/image/Makefile to
see if this option will have any effect.
+ config HAVE_TARGET_ROOTFS_INCLUDE_FIT
+ bool
+ default n
+
config TARGET_ROOTFS_INCLUDE_FIT
- bool "include FIT" if TARGET_ROOTFS_INCLUDE_KERNEL
- default y
+ bool "include FIT"
+ default y if HAVE_TARGET_ROOTFS_INCLUDE_FIT
help
This option might not apply to all targets. Make sure
to check target/linux/<your_target>/image/Makefile to
see if this option will have any effect.
+ endif # TARGET_ROOTFS_INCLUDE_KERNEL
+
+ config HAVE_TARGET_ROOTFS_INCLUDE_DTB
+ bool
+ default n
+
config TARGET_ROOTFS_INCLUDE_DTB
bool "Include DTB in root filesystem"
depends on USES_DEVICETREE && (TARGET_ROOTFS_UBIFS || TARGET_ROOTFS_EXT4FS)
- default n
+ default y if HAVE_TARGET_ROOTFS_INCLUDE_DTB
help
- Include the device tree blob file(s) in the rootfs. Typically the DTBs
- are placed below /boot.
+ Include the device tree blob file(s) in the rootfs. Typically
+ the DTBs are placed below /boot.
endmenu
diff --git a/target/linux/mxs/profiles/01-duckbill.mk b/target/linux/mxs/profiles/01-duckbill.mk
index 3f75a7a..ac3206d 100644
--- a/target/linux/mxs/profiles/01-duckbill.mk
+++ b/target/linux/mxs/profiles/01-duckbill.mk
@@ -7,8 +7,11 @@
define Profile/duckbill
NAME:=I2SE Duckbill boards
- DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_DTB
FEATURES+=usbgadget
+ OPTIONS:= \
+ HAVE_TARGET_ROOTFS_INCLUDE_KERNEL \
+ HAVE_TARGET_ROOTFS_INCLUDE_ZIMAGE \
+ HAVE_TARGET_ROOTFS_INCLUDE_DTB
PACKAGES+= \
-dnsmasq -firewall -ppp -ip6tables -iptables -6relayd -mtd uboot-envtools \
kmod-leds-gpio kmod-ledtrig-timer kmod-usb-mxs-phy -kmod-ipt-nathelper
--
2.0.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list