aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:29 +0000
commita7c0ef0c987f94d1542f4dafc96159513eb248ce (patch)
tree4565a5976b4d7753d898e2970320107d3bcab022 /include
parent9e60a331bc8796c3ba5d41be7400bdc066dc73f1 (diff)
downloadupstream-a7c0ef0c987f94d1542f4dafc96159513eb248ce.tar.gz
upstream-a7c0ef0c987f94d1542f4dafc96159513eb248ce.tar.bz2
upstream-a7c0ef0c987f94d1542f4dafc96159513eb248ce.zip
Allow targets to specify extra initramfs source files
The CONFIG_INITRAMFS_SOURCE Kconfig variable can be a space-separated list of source files (or directories). This allows a platform to add extra components to the initramfs image, by defining the INITRAMFS_EXTRA_FILES make var. By default, we add a simple initramfs extra file for the generic-2.6 platform, which specifies a few device nodes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9410 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/kernel-defaults.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index cab8352994..4b25f544a2 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -40,6 +40,8 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
ARCH="$(LINUX_KARCH)" \
CONFIG_SHELL="$(BASH)"
+INITRAMFS_EXTRA_FILES ?= $(GENERIC_PLATFORM_DIR)/image/initramfs-base-files.txt
+
ifneq (,$(KERNEL_CC))
KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
endif
@@ -78,7 +80,7 @@ ifeq ($(KERNEL),2.6)
define Kernel/SetInitramfs
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
- echo 'CONFIG_INITRAMFS_SOURCE="$(TARGET_DIR)"' >> $(LINUX_DIR)/.config
+ echo 'CONFIG_INITRAMFS_SOURCE="$(strip $(TARGET_DIR) $(INITRAMFS_EXTRA_FILES))"' >> $(LINUX_DIR)/.config
echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
endef