ipq807x: image: fix eMMC flashing/recovery from within initramfs
authorPetr Štetiar <ynezz@true.cz>
Mon, 5 Jun 2023 12:10:44 +0000 (14:10 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 12 Jun 2023 20:10:30 +0000 (22:10 +0200)
Having initramfs image built with same config as on buildbots:

 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_ALL_PROFILES=y
 CONFIG_TARGET_PER_DEVICE_ROOTFS=y

Its currently impossible to flash/recover the device using that image as
losetup is missing:

 root@OpenWrt:/# sysupgrade -v /tmp/openwrt-ipq807x-generic-prpl_haze-squashfs-sysupgrade.bin
 ...
 /lib/upgrade/do_stage2: line 38: losetup: not found
 Failed to detach all loop devices. Skip this try.

So lets fix it by including the needed utils for sysupgrade in
DEFAULT_PACKAGES set.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 07fe8bc62a866e78e131c3f63a08554a94e931f8)

target/linux/ipq807x/Makefile
target/linux/ipq807x/image/generic.mk

index fdabf575d362c87b44f77fa81b892d6f0851d6c0..f423acd76c70d88ead0ad4995b2cc90188f5dfb0 100644 (file)
@@ -16,6 +16,7 @@ DEFAULT_PACKAGES += \
        kmod-leds-gpio kmod-gpio-button-hotplug \
        kmod-phy-aquantia kmod-qca-nss-dp \
        ath11k-firmware-ipq8074 kmod-ath11k-ahb \
-       wpad-basic-mbedtls uboot-envtools
+       wpad-basic-mbedtls uboot-envtools \
+       e2fsprogs kmod-fs-ext4 losetup
 
 $(eval $(call BuildTarget))
index 6eca67d11c681eb6be9db04d25e9f67514c9ce96..124cdfc3b2a54e985d1cd499edcc2da557b084f8 100644 (file)
@@ -14,7 +14,6 @@ define Device/EmmcImage
        IMAGES += factory.bin sysupgrade.bin
        IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k
        IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata
-       DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 losetup
 endef
 
 define Device/UbiFit