aboutsummaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2004-10-27 04:07:03 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2004-10-27 04:07:03 +0200
commit298039e7b2dc1bd12cb2944707ede23c8af770c4 (patch)
tree2a5e7c2b681f7c97d64c276c91184bcc7406fadf /usr
parent6a7cb7739139cd5994a2be73e9c4088a70a568c2 (diff)
downloadhistory-298039e7b2dc1bd12cb2944707ede23c8af770c4.tar.gz
kbuild/usr: initramfs list fixed and simplified
Moving logic to scripts/gen_initramfs_list.sh make a nice cleanup in usr/Makefile. A new initramfs image will be generated if the initramfs_list file changes. This patch also fixes the bug with make O=.. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'usr')
-rw-r--r--usr/Makefile29
-rw-r--r--usr/initramfs_list5
2 files changed, 9 insertions, 25 deletions
diff --git a/usr/Makefile b/usr/Makefile
index 96fe2c336da837..f269a5f7701f5a 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -3,7 +3,7 @@ obj-y := initramfs_data.o
hostprogs-y := gen_init_cpio
-clean-files := initramfs_data.cpio.gz
+clean-files := initramfs_data.cpio.gz initramfs_list
# If you want a different list of files in the initramfs_data.cpio
# then you can either overwrite the cpio_list in this directory
@@ -23,28 +23,17 @@ $(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz FORCE
# Commented out for now
# initramfs-y := $(obj)/root/hello
-quiet_cmd_gen_list = GEN_INITRAMFS_LIST $@
- cmd_gen_list = $(shell \
- if test -f $(CONFIG_INITRAMFS_SOURCE); then \
- if [ $(CONFIG_INITRAMFS_SOURCE) != $@ ]; then \
- echo 'cp -f $(CONFIG_INITRAMFS_SOURCE) $@'; \
- else \
- echo 'echo Using shipped $@'; \
- fi; \
- elif test -d $(CONFIG_INITRAMFS_SOURCE); then \
- echo 'scripts/gen_initramfs_list.sh $(CONFIG_INITRAMFS_SOURCE) > $@'; \
- else \
- echo 'echo Using shipped $@'; \
- fi)
-
-
-$(INITRAMFS_LIST): FORCE
- $(call cmd,gen_list)
+filechk_initramfs_list = $(CONFIG_SHELL) \
+ $(srctree)/scripts/gen_initramfs_list.sh $(CONFIG_INITRAMFS_SOURCE)
+
+$(obj)/initramfs_list: FORCE
+ $(call filechk,initramfs_list)
quiet_cmd_cpio = CPIO $@
- cmd_cpio = ./$< $(INITRAMFS_LIST) > $@
+ cmd_cpio = ./$< $(obj)/initramfs_list > $@
-$(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio $(initramfs-y) $(INITRAMFS_LIST) FORCE
+$(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio \
+ $(initramfs-y) $(obj)/initramfs_list FORCE
$(call if_changed,cpio)
targets += initramfs_data.cpio
diff --git a/usr/initramfs_list b/usr/initramfs_list
deleted file mode 100644
index e631e61191b4cd..00000000000000
--- a/usr/initramfs_list
+++ /dev/null
@@ -1,5 +0,0 @@
-# This is a very simple initramfs - mostly preliminary for future expansion
-
-dir /dev 0755 0 0
-nod /dev/console 0600 0 0 c 5 1
-dir /root 0700 0 0