mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 04:28:41 +04:00
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>
37 lines
946 B
Makefile
37 lines
946 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
KERNEL_LOADADDR := 0x80100000
|
|
|
|
define Device/Default
|
|
PROFILES := Default
|
|
KERNEL_NAME := vmlinux.elf
|
|
KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf
|
|
KERNEL := kernel-bin
|
|
KERNEL_INSTALL := 1
|
|
FILESYSTEMS := ext4 squashfs
|
|
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
|
|
SUPPORTED_DEVICES :=
|
|
endef
|
|
|
|
define Device/generic
|
|
DEVICE_VENDOR := MIPS
|
|
DEVICE_MODEL := Malta CoreLV board (QEMU)
|
|
endef
|
|
TARGET_DEVICES += generic
|
|
|
|
$(eval $(call BuildImage))
|