diff --git a/Makefile b/Makefile index ae61036..d1da337 100644 --- a/Makefile +++ b/Makefile @@ -280,8 +280,8 @@ $(vmlinux): linux $(linux_image): linux @echo "Linux image is generated $@" -initrd: $(initramfs) - @echo "initramfs cpio file is generated into $<" +$(initramfs): initrd + @echo "initramfs cpio file is generated into $@" linux: $(linux_wrkdir)/.config $(MAKE) -C $(linux_srcdir) O=$(linux_wrkdir) \ @@ -292,11 +292,13 @@ linux: $(linux_wrkdir)/.config PATH=$(RVPATH) \ vmlinux Image -$(initramfs): $(buildroot_initramfs_sysroot) $(linux_image) +initrd: $(buildroot_initramfs_sysroot) $(linux_image) $(INITRAMFS_PRECMD) + # Copy files required for xec network startup + [ -f $(confdir)/S03net ] && cp -af $(confdir)/S03net $(buildroot_initramfs_sysroot)/etc/init.d/ || true cd $(linux_wrkdir) && \ $(linux_gen_initramfs) \ - -o $@ -u $(shell id -u) -g $(shell id -g) \ + -o $(initramfs) -u $(shell id -u) -g $(shell id -g) \ $(confdir)/initramfs.txt \ $(buildroot_initramfs_sysroot)