2 obj-y := initramfs_data.o
4 hostprogs-y := gen_init_cpio
6 clean-files := initramfs_data.cpio.gz initramfs_list
8 # If you want a different list of files in the initramfs_data.cpio
9 # then you can either overwrite the cpio_list in this directory
10 # or set INITRAMFS_LIST to another filename.
11 INITRAMFS_LIST := $(obj)/initramfs_list
13 # initramfs_data.o contains the initramfs_data.cpio.gz image.
14 # The image is included using .incbin, a dependency which is not
15 # tracked automatically.
16 $(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz FORCE
18 # initramfs-y are the programs which will be copied into the CPIO
19 # archive. Currently, the filenames are hardcoded in gen_init_cpio,
20 # but we need the information for the build as well, so it's duplicated
23 # Commented out for now
24 # initramfs-y := $(obj)/root/hello
26 filechk_initramfs_list = $(CONFIG_SHELL) \
27 $(srctree)/scripts/gen_initramfs_list.sh $(CONFIG_INITRAMFS_SOURCE)
29 $(obj)/initramfs_list: FORCE
30 $(call filechk,initramfs_list)
32 quiet_cmd_cpio = CPIO $@
33 cmd_cpio = ./$< $(obj)/initramfs_list > $@
35 $(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio \
36 $(initramfs-y) $(obj)/initramfs_list FORCE
37 $(call if_changed,cpio)
39 targets += initramfs_data.cpio
41 $(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE
42 $(call if_changed,gzip)
44 targets += initramfs_data.cpio.gz