openwrt/target/linux/malta/image/Makefile
Paul Spooren 8dfa38b82c malta: convert to Device macro image building
Convert the malta target from the legacy Image/BuildKernel and
Image/Build pattern to the modern Device macro system. This is the
last target still using the legacy pattern.

The Device macro system automatically generates per-image JSON
metadata files which get aggregated into profiles.json, enabling
firmware selector and other tooling support for all malta subtargets
(be, le, be64, le64).

The kernel ELF is produced via KERNEL_NAME := vmlinux.elf (matching
octeon), uImage artifacts are built using the standard Build/lzma,
Build/gzip and Build/uImage commands with the existing load address
0x80100000, and rootfs images use append-rootfs with optional gzip
compression.

The device is named 'generic' following the convention used by other
virtual/emulated targets (x86, armsr, octeon).

Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-02-11 00:08:34 +01:00

32 lines
875 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
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
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))