blob: 58a915ee7fe551d82590ad17a8807a2901583be0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
obj-y := initramfs_data.o
host-progs := gen_init_cpio
clean-files := initramfs_data.cpio.gz
LDFLAGS_initramfs_data.o := $(LDFLAGS_BLOB) -r -T
$(obj)/initramfs_data.o: $(src)/initramfs_data.scr \
$(obj)/initramfs_data.cpio.gz FORCE
$(call if_changed,ld)
# initramfs-y are the programs which will be copied into the CPIO
# archive. Currently, the filenames are hardcoded in gen_init_cpio,
# but we need the information for the build as well, so it's duplicated
# here.
# Commented out for now
# initramfs-y := $(obj)/root/hello
quiet_cmd_cpio = CPIO $@
cmd_cpio = ./$< > $@
$(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio $(initramfs-y) FORCE
$(call if_changed,cpio)
targets += initramfs_data.cpio
$(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE
$(call if_changed,gzip)
targets += initramfs_data.cpio.gz
|