mediatek: filogic: bpi-r3-mini: fix generating ubinized image
authorDaniel Golle <daniel@makrotopia.org>
Fri, 16 Feb 2024 05:36:26 +0000 (05:36 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 16 Feb 2024 05:40:17 +0000 (05:40 +0000)
Generate ubinized image as ARTIFACT and make use of now available
generic 'ubinize-image' build step intended for that purpose.

Fixes: b03d3644cf ("mediatek: filogic: add BananaPi BPi-R3 mini")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/image/filogic.mk

index 1dfa547fdc13d9b84db6d1b480c600d1faaf4dad..0863791056d7bd8021b712893dcd1017b0ad0ac2 100644 (file)
@@ -295,16 +295,20 @@ define Device/bananapi_bpi-r3-mini
 ifeq ($(DUMP),)
   IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m
 endif
-  IMAGE/snand-factory.bin := append-ubi fit
   IMAGE/sysupgrade.itb := append-kernel | \
     fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | \
     pad-rootfs | append-metadata
   ARTIFACTS := \
        emmc-gpt.bin emmc-preloader.bin emmc-bl31-uboot.fip \
-       snand-preloader.bin snand-bl31-uboot.fip
+       snand-factory.bin snand-preloader.bin snand-bl31-uboot.fip
   ARTIFACT/emmc-gpt.bin := mt798x-gpt emmc
   ARTIFACT/emmc-preloader.bin := mt7986-bl2 emmc-ddr4
   ARTIFACT/emmc-bl31-uboot.fip := mt7986-bl31-uboot bananapi_bpi-r3-mini-emmc
+  ARTIFACT/snand-factory.bin := mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 256k | \
+                               mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 512k | \
+                               mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 768k | \
+                               mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 2048k | \
+                               ubinize-image fit squashfs-sysupgrade.itb
   ARTIFACT/snand-preloader.bin := mt7986-bl2 spim-nand-ubi-ddr4
   ARTIFACT/snand-bl31-uboot.fip := mt7986-bl31-uboot bananapi_bpi-r3-mini-snand
   UBINIZE_PARTS := fip=:$(STAGING_DIR_IMAGE)/mt7986_bananapi_bpi-r3-mini-snand-u-boot.fip