From 52564e65d592cc691f7e93eeaa839785b5363e22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Tue, 3 Jan 2023 12:44:51 +0100 Subject: [PATCH] at91: sama7: fix racy SD card image generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We've few low spec (make -j3) build workers attached to the 22.03 buildbot instance which from time to time exhibit following build failure during image generation: + dd bs=512 if=root.ext4 of=openwrt-22.03-snapshot-r20028-43d71ad93e-at91-sama7-microchip_sama7g5-ek-ext4-sdcard.img.gz.img seek=135168 conv=notrunc dd: failed to open 'root.ext4': No such file or directory Thats likely due to the fact, that on buildbots we've `TARGET_PER_DEVICE_ROOTFS=y` which produces differently named filesystem image in the SD card image target dependency chain: make_ext4fs -L rootfs ... root.ext4+pkg=68b329da and that hardcoded root.ext4 becomes available from other target in the later stages. So lets fix this issue by using IMAGE_ROOTFS Make variable which should contain proper path to the root filesystem image. Signed-off-by: Petr Å tetiar (cherry picked from commit 5c3679e39b615ff29c9315f810e8e15775cc2d01) --- target/linux/at91/image/sama7.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/at91/image/sama7.mk b/target/linux/at91/image/sama7.mk index bf1704dfb3..8d6f67d80e 100644 --- a/target/linux/at91/image/sama7.mk +++ b/target/linux/at91/image/sama7.mk @@ -35,7 +35,7 @@ define Build/at91-sdcard ./gen_at91_sdcard_img.sh \ $@.img \ $@.boot \ - $(KDIR)/root.ext4 \ + $(IMAGE_ROOTFS) \ $(AT91_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) -- 2.30.2