malta: build either gzipped or plain rootfs images

Currently malta defines both `rootfs.img` and `rootfs.img.gz` as IMAGES.
With CONFIG_TARGET_IMAGES_GZIP enabled (the default), the ext4 rootfs.img
is gzipped to the same name, resulting in two recipes for the same file.
Make merges the prerequisites and the `cp` fails, which is hidden by
`.IGNORE`:

    cp: target '...squashfs-rootfs.img.gz': No such file or directory
    make[4]: [Makefile:32: ...squashfs-rootfs.img.gz] Error 1 (ignored)

Since the JSON info is created from $(KDIR)/tmp, the profiles.json lists
images which don't exist on the download server.

Fix this by selecting either the gzipped or plain image based on
CONFIG_TARGET_IMAGES_GZIP, like it's done for armsr and loongarch64.

Link: https://github.com/openwrt/openwrt/pull/25658
Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
Paul Spooren committed 2026-10-06 11:32:34 +02:00
1 parent 9890755cdd
commit 1b4099f7b8
1 file changed
+5 -1
+5 -1
View File
@@ -14,9 +14,13 @@ define Device/Default
KERNEL := kernel-bin
KERNEL_INSTALL := 1
FILESYSTEMS := ext4 squashfs
IMAGES := rootfs.img rootfs.img.gz
IMAGE/rootfs.img := append-rootfs | pad-to $(ROOTFS_PARTSIZE)
IMAGE/rootfs.img.gz := append-rootfs | pad-to $(ROOTFS_PARTSIZE) | gzip
ifeq ($(CONFIG_TARGET_IMAGES_GZIP),y)
IMAGES := rootfs.img.gz
else
IMAGES := rootfs.img
endif
ARTIFACTS := uImage-lzma uImage-gzip
ARTIFACT/uImage-lzma := kernel-bin | lzma | uImage lzma
ARTIFACT/uImage-gzip := kernel-bin | gzip | uImage gzip