2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2007-07-08 21:22:18 +02:00
|
|
|
#
|
2011-09-06 23:16:09 +02:00
|
|
|
# Build a kernel with an integrated initial ramdisk
|
|
|
|
# filesystem based on cpio.
|
2007-07-08 21:22:18 +02:00
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2007-07-08 21:22:18 +02:00
|
|
|
|
2011-09-06 23:16:09 +02:00
|
|
|
# The generic fs infrastructure isn't very useful here.
|
2017-11-12 18:45:42 +01:00
|
|
|
#
|
|
|
|
# The initramfs image does not actually build an image; its only purpose is:
|
|
|
|
# 1- to ensure rootfs.cpio is generated,
|
|
|
|
# 2- to then rebuild the kernel with rootfs.cpio as initramfs
|
|
|
|
#
|
|
|
|
# Note: ordering of the dependencies is not guaranteed here, but in
|
|
|
|
# linux/linux.mk, via the linux-rebuild-with-initramfs rule, which depends
|
|
|
|
# on the rootfs-cpio filesystem rule.
|
|
|
|
#
|
|
|
|
# Note: the trick here is that we directly depend on rebuilding the Linux
|
|
|
|
# kernel image (which itself depends on the rootfs-cpio rule), while we
|
|
|
|
# advertise that our dependency is on the rootfs-cpio rule, which is
|
|
|
|
# cleaner in the dependency graph.
|
2011-07-20 16:30:14 +02:00
|
|
|
|
2017-11-12 18:45:42 +01:00
|
|
|
rootfs-initramfs: linux-rebuild-with-initramfs
|
2010-04-20 16:31:01 +02:00
|
|
|
|
2011-09-06 23:16:09 +02:00
|
|
|
rootfs-initramfs-show-depends:
|
2017-11-12 18:45:42 +01:00
|
|
|
@echo rootfs-cpio
|
2007-07-08 21:22:18 +02:00
|
|
|
|
2015-04-12 18:37:46 +02:00
|
|
|
.PHONY: rootfs-initramfs rootfs-initramfs-show-depends
|
|
|
|
|
2011-09-06 23:16:09 +02:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
|
2014-03-06 21:55:34 +01:00
|
|
|
TARGETS_ROOTFS += rootfs-initramfs
|
2011-09-06 23:16:09 +02:00
|
|
|
endif
|