From a3280dc5795f3bdf597adef0d9f5917cbb0d466c Mon Sep 17 00:00:00 2001 From: Huaqi Fang <578567190@qq.com> Date: Thu, 5 Dec 2024 13:57:44 +0800 Subject: [PATCH] build: rootfs will be built at every bootimages and run_qemu This will cause the updated rootfs folder eg. work/evalsoc/buildroot_initramfs_sysroot content changes will be generated into work/evalsoc/boot/uInitrd.lz4 and S03net file copy also changed to initrd generation process Signed-off-by: Huaqi Fang <578567190@qq.com> --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)