1 ################################################################################
3 # cpio to archive target filesystem
5 ################################################################################
7 ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC
),y
)
9 define ROOTFS_CPIO_ADD_INIT
10 if
[ ! -e
$(TARGET_DIR
)/init
]; then \
11 ln
-sf sbin
/init
$(TARGET_DIR
)/init
; \
16 # devtmpfs does not get automounted when initramfs is used.
17 # Add a pre-init script to mount it before running init
18 define ROOTFS_CPIO_ADD_INIT
19 if
[ ! -e
$(TARGET_DIR
)/init
]; then \
20 $(INSTALL
) -m
0755 fs
/cpio
/init
$(TARGET_DIR
)/init
; \
24 PACKAGES_PERMISSIONS_TABLE
+= /dev
/console c
622 0 0 5 1 - - -$(sep
)
26 endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
28 ROOTFS_CPIO_PRE_GEN_HOOKS
+= ROOTFS_CPIO_ADD_INIT
30 define ROOTFS_CPIO_CMD
31 cd
$(TARGET_DIR
) && find . | cpio
--quiet
-o
-H newc
> $@
34 $(BINARIES_DIR
)/rootfs.cpio.uboot
: $(BINARIES_DIR
)/rootfs.cpio host-uboot-tools
35 $(MKIMAGE
) -A
$(MKIMAGE_ARCH
) -T ramdisk \
36 -C none
-d
$<$(ROOTFS_CPIO_COMPRESS_EXT
) $@
38 ifeq ($(BR2_TARGET_ROOTFS_CPIO_UIMAGE
),y
)
39 ROOTFS_CPIO_POST_TARGETS
+= $(BINARIES_DIR
)/rootfs.cpio.uboot
42 $(eval
$(call ROOTFS_TARGET
,cpio
))