1 2obj-y := initramfs_data.o 3 4hostprogs-y := gen_init_cpio 5 6clean-files := initramfs_data.cpio.gz 7 8# initramfs_data.o contains the initramfs_data.cpio.gz image. 9# The image is included using .incbin, a dependency which is not 10# tracked automatically. 11$(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz FORCE 12 13# initramfs-y are the programs which will be copied into the CPIO 14# archive. Currently, the filenames are hardcoded in gen_init_cpio, 15# but we need the information for the build as well, so it's duplicated 16# here. 17 18# Commented out for now 19# initramfs-y := $(obj)/root/hello 20 21quiet_cmd_cpio = CPIO $@ 22 cmd_cpio = ./$< > $@ 23 24$(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio $(initramfs-y) FORCE 25 $(call if_changed,cpio) 26 27targets += initramfs_data.cpio 28 29$(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE 30 $(call if_changed,gzip) 31 32targets += initramfs_data.cpio.gz 33 34

