ramips: dna_valokuitu-plus-ex400: clean-up image creation

Code cleanup. Simplify and unify how kernel image is passed to
Build/dna-bootfs

Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/16811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit ec839c786ca56c6143257b89f146aeafbb6cfd3a)
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
Mauri Sandberg 2024-10-28 22:13:04 +02:00 committed by Petr Štetiar
parent 0a0950614b
commit fd7b1f60ea
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -94,18 +94,9 @@ endef
define Build/dna-bootfs define Build/dna-bootfs
mkdir -p $@.ubifs-dir/boot mkdir -p $@.ubifs-dir/boot
# populate the boot fs with the dtb and with either initramfs kernel or # populate the boot fs with the dtb and the kernel image
# the normal kernel
$(CP) $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@.ubifs-dir/boot/dtb $(CP) $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@.ubifs-dir/boot/dtb
$(CP) $@ $@.ubifs-dir/boot/uImage
$(if $(findstring with-initrd,$(word 1,$(1))),\
( \
$(CP) $@ $@.ubifs-dir/boot/uImage \
) , \
( \
$(CP) $(IMAGE_KERNEL) $@.ubifs-dir/boot/uImage \
) \
)
# create ubifs # create ubifs
$(STAGING_DIR_HOST)/bin/mkfs.ubifs ${MKUBIFS_OPTS} -r $@.ubifs-dir/ -o $@.new $(STAGING_DIR_HOST)/bin/mkfs.ubifs ${MKUBIFS_OPTS} -r $@.ubifs-dir/ -o $@.new
@ -1060,17 +1051,16 @@ define Device/dna_valokuitu-plus-ex400
IMAGE_SIZE := 117m IMAGE_SIZE := 117m
PAGESIZE := 2048 PAGESIZE := 2048
MKUBIFS_OPTS := --min-io-size=$$(PAGESIZE) --leb-size=124KiB --max-leb-cnt=96 \ MKUBIFS_OPTS := --min-io-size=$$(PAGESIZE) --leb-size=124KiB --max-leb-cnt=96 \
--log-lebs=2 --space-fixup --squash-uids --log-lebs=2 --space-fixup --squash-uids
DEVICE_VENDOR := DNA DEVICE_VENDOR := DNA
DEVICE_MODEL := Valokuitu Plus EX400 DEVICE_MODEL := Valokuitu Plus EX400
KERNEL := kernel-bin | lzma | uImage lzma KERNEL := kernel-bin | lzma | uImage lzma
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
IMAGES += factory.bin IMAGES += factory.bin
IMAGE/factory.bin := append-image-stage initramfs-kernel.bin | \ IMAGE/factory.bin := append-image-stage initramfs-kernel.bin | \
dna-bootfs with-initrd | dna-header | \ dna-bootfs | dna-header | append-md5sum-ascii-salted
append-md5sum-ascii-salted IMAGE/sysupgrade.bin := append-kernel | dna-bootfs | \
IMAGE/sysupgrade.bin := dna-bootfs | sysupgrade-tar kernel=$$$$@ | check-size | \ sysupgrade-tar kernel=$$$$@ | check-size | append-metadata
append-metadata
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2) DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3
endef endef