diff options
author | Daniel Golle <daniel@makrotopia.org> | 2023-05-26 10:26:49 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2023-05-29 13:04:14 +0100 |
commit | 912974cc15031acb3ccf8e1bf12c5809ce01464e (patch) | |
tree | 33474fac338c8539e4961704cab4936039e2a327 /target/linux/mediatek/image/mt7623.mk | |
parent | afe2722f6de70d6bbe91f2fd9adbe5f39ce550d2 (diff) | |
download | upstream-912974cc15031acb3ccf8e1bf12c5809ce01464e.tar.gz upstream-912974cc15031acb3ccf8e1bf12c5809ce01464e.tar.bz2 upstream-912974cc15031acb3ccf8e1bf12c5809ce01464e.zip |
mediatek: fix, clean and unify SD card image generation
Make sure sub-images on the SD card are size-checked, allow
generating SD card without squashfs and/or initramfs.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 43d27b02522c100b0c625d4b22f4bb6ad83c166f)
Diffstat (limited to 'target/linux/mediatek/image/mt7623.mk')
-rw-r--r-- | target/linux/mediatek/image/mt7623.mk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk index 1645ecd545..5828c4d763 100644 --- a/target/linux/mediatek/image/mt7623.mk +++ b/target/linux/mediatek/image/mt7623.mk @@ -96,6 +96,7 @@ define Device/bananapi_bpi-r2 KERNEL := kernel-bin | gzip KERNEL_INITRAMFS_SUFFIX := -recovery.itb KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb with-initrd + IMAGE_SIZE := $$(shell expr 48 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb external-static-with-rootfs | append-metadata ARTIFACT/preloader.bin := mt7623-mbr emmc |\ pad-to 2k | append-preloader $$(UBOOT_TARGET) @@ -105,10 +106,10 @@ define Device/bananapi_bpi-r2 pad-to $$(UBOOT_OFFSET) | append-bootloader $$(UBOOT_TARGET) |\ pad-to 4092k | mt7623-mbr emmc |\ $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),\ - pad-to 4M | append-image-stage initramfs-recovery.itb |\ + pad-to 4M | append-image-stage initramfs-recovery.itb | check-size 48m |\ ) \ $(if $(CONFIG_TARGET_ROOTFS_SQUASHFS),\ - pad-to 48M | append-image squashfs-sysupgrade.itb |\ + pad-to 48M | append-image squashfs-sysupgrade.itb | check-size |\ ) \ gzip ARTIFACTS := u-boot.bin preloader.bin sdcard.img.gz @@ -129,6 +130,7 @@ define Device/unielec_u7623-02 UBOOT_TARGET := mt7623a_unielec_u7623 UBOOT_IMAGE := u-boot-mtk.bin UBOOT_PATH := $(STAGING_DIR_IMAGE)/$$(UBOOT_TARGET)-$$(UBOOT_IMAGE) + IMAGE_SIZE := $$(shell expr 48 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m IMAGES := sysupgrade.itb KERNEL := kernel-bin | gzip KERNEL_INITRAMFS_SUFFIX := -recovery.itb @@ -140,10 +142,10 @@ define Device/unielec_u7623-02 ARTIFACT/emmc.img.gz := mt7623-mbr sdmmc |\ pad-to $$(UBOOT_OFFSET) | append-bootloader $$(UBOOT_TARGET) |\ $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),\ - pad-to 4M | append-image-stage initramfs-recovery.itb |\ + pad-to 4M | append-image-stage initramfs-recovery.itb | check-size 48m |\ ) \ $(if $(CONFIG_TARGET_ROOTFS_SQUASHFS),\ - pad-to 48M | append-image squashfs-sysupgrade.itb |\ + pad-to 48M | append-image squashfs-sysupgrade.itb | check-size |\ ) \ gzip | append-metadata ARTIFACT/scatter.txt := scatterfile emmc.img.gz |