summaryrefslogtreecommitdiffstats
path: root/fs/initramfs/initramfs.mk
diff options
context:
space:
mode:
Diffstat (limited to 'fs/initramfs/initramfs.mk')
-rw-r--r--fs/initramfs/initramfs.mk35
1 files changed, 11 insertions, 24 deletions
diff --git a/fs/initramfs/initramfs.mk b/fs/initramfs/initramfs.mk
index 1cd48b6c8..f1eb8b6e6 100644
--- a/fs/initramfs/initramfs.mk
+++ b/fs/initramfs/initramfs.mk
@@ -1,36 +1,23 @@
#############################################################
#
-# Make a initramfs_list file to be used by gen_init_cpio
-# gen_init_cpio is part of the 2.6 linux kernels to build an
-# initial ramdisk filesystem based on cpio
+# Build a kernel with an integrated initial ramdisk
+# filesystem based on cpio.
#
#############################################################
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
+ROOTFS_INITRAMFS_DEPENDENCIES += rootfs-cpio
-define ROOTFS_INITRAMFS_ADD_INIT
- if [ ! -e $(TARGET_DIR)/init ]; then \
- ln -sf sbin/init $(TARGET_DIR)/init; \
- fi
-endef
+ROOTFS_INITRAMFS_POST_TARGETS += linux26-rebuild-with-initramfs
-else
-# devtmpfs does not get automounted when initramfs is used.
-# Add a pre-init script to mount it before running init
-define ROOTFS_INITRAMFS_ADD_INIT
- if [ ! -e $(TARGET_DIR)/init ]; then \
- $(INSTALL) -m 0755 fs/initramfs/init $(TARGET_DIR)/init; \
- fi
-endef
-endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
+# The generic fs infrastructure isn't very useful here.
-ROOTFS_INITRAMFS_PRE_GEN_HOOKS += ROOTFS_INITRAMFS_ADD_INIT
+rootfs-initramfs: $(ROOTFS_INITRAMFS_DEPENDENCIES) $(ROOTFS_INITRAMFS_POST_TARGETS)
-define ROOTFS_INITRAMFS_CMD
- $(SHELL) fs/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $$@
-endef
+rootfs-initramfs-show-depends:
+ @echo $(ROOTFS_INITRAMFS_DEPENDENCIES)
-ROOTFS_INITRAMFS_POST_TARGETS += linux26-rebuild-with-initramfs
+ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
+TARGETS += rootfs-initramfs
+endif
-$(eval $(call ROOTFS_TARGET,initramfs))