From 8c9377be65fb6c42b7618eb4cf27d34a431ac68e Mon Sep 17 00:00:00 2001 From: Tomaz Zaman Date: Wed, 12 Aug 2026 15:06:02 +0200 Subject: [PATCH 52/62] layerscape: ship mkfifo in the sysupgrade stage2 ramdisk platform_do_upgrade_mono streams each tar member to its partition through a fifo (mono_dd_member) to catch tar's exit code, not just dd's -- busybox ash has no PIPESTATUS. mkfifo is the one tool that path needs beyond stage2's base ramfs list (which already ships fwtool/gzip/hexdump/tar/dd), but RAMFS_COPY_BIN was empty, so mkfifo was "not found" in the upgrade ramdisk: every sysupgrade failed the boot-partition write, printed "Upgrade completed", and rebooted onto the OLD image. Confirmed on hardware over UART: with the gz sysupgrade image, stage2 hit `mkfifo: not found` -> `Boot partition write to /dev/mmcblk0p1 failed`, and the board stayed on the pre-flash build. Setting RAMFS_COPY_BIN="mkfifo" fixes it. The first deploy of the fix still needs the recovery dd path (the running image predates it); sysupgrade is self-sustaining from then on. Co-Authored-By: Claude Fable 5 --- .../linux/layerscape/base-files/lib/upgrade/platform.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index 0f37ae7ffd..2da826d66d 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -3,7 +3,13 @@ # Copyright 2020 NXP # -RAMFS_COPY_BIN="" +# platform_do_upgrade_mono streams each tar member to its partition through a fifo +# (mono_dd_member) so tar's exit status is checked, not just dd's - busybox ash has +# no PIPESTATUS. mkfifo is the ONLY tool that path needs beyond stage2's base ramfs +# list (which already ships busybox, fwtool, gzip, hexdump, tar and dd). Left out, +# mkfifo is "not found" in the upgrade ramdisk and EVERY flash silently fails at the +# boot-partition write, then reverts to the old image on reboot. +RAMFS_COPY_BIN="mkfifo" RAMFS_COPY_DATA="" REQUIRE_IMAGE_METADATA=1 -- 2.47.3