aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/image/mt7623.mk
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2020-07-21 19:19:40 +0100
committerChuanhong Guo <gch981213@gmail.com>2020-07-26 17:08:31 +0800
commitb36422b914ef3fdc17827481b61ab7d03a1790ac (patch)
tree36785c02a97053ba1ed3b488294d453c16ab1035 /target/linux/mediatek/image/mt7623.mk
parent1113dcab05de31d52a91e99f7a63d0099415edad (diff)
downloadupstream-b36422b914ef3fdc17827481b61ab7d03a1790ac.tar.gz
upstream-b36422b914ef3fdc17827481b61ab7d03a1790ac.tar.bz2
upstream-b36422b914ef3fdc17827481b61ab7d03a1790ac.zip
mediatek: mt7623: add full system image for UniElec U7623
This adds a full eMMC image including U-Boot, which means that the kernel can inherit the true RAM size detected by the preloader. As implemented in previous commits, sysupgrade to this image from the legacy layout (and via that, from the vendor-installed image) is supported. Rename the legacy image for the 512MiB board, for clarity. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'target/linux/mediatek/image/mt7623.mk')
-rw-r--r--target/linux/mediatek/image/mt7623.mk30
1 files changed, 27 insertions, 3 deletions
diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk
index 881092f478..72758ddbaa 100644
--- a/target/linux/mediatek/image/mt7623.mk
+++ b/target/linux/mediatek/image/mt7623.mk
@@ -55,10 +55,33 @@ define Device/bpi_bananapi-r2
endef
TARGET_DEVICES += bpi_bananapi-r2
-define Device/unielec_u7623-02-emmc-512m
+# Full eMMC image including U-Boot and partition table
+define Device/unielec_u7623-emmc
+ DEVICE_VENDOR := UniElec
+ DEVICE_MODEL := U7623
+ DEVICE_VARIANT := eMMC
+ # When we use FIT images, U-Boot will populate the /memory node with the correct
+ # memory size discovered from the preloader, so we don't need separate builds.
+ DEVICE_DTS := mt7623a-unielec-u7623-02-emmc-512m
+ SUPPORTED_DEVICES := unielec,u7623-02-emmc-512m
+ UBOOT_ENVSIZE := 0x1000
+ UBOOT_OFFSET := 256k
+ UBOOT_TARGET := mt7623a_unielec_u7623
+ IMAGES := img.gz
+ IMAGE/img.gz := mtk-mmc-img | gzip | append-metadata
+ DEVICE_PACKAGES := kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 kmod-mmc \
+ mkf2fs e2fsprogs kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk
+ ARTIFACT/scatter.txt := scatterfile $$(firstword $$(FILESYSTEMS))-$$(firstword $$(IMAGES))
+ ARTIFACTS := scatter.txt
+endef
+TARGET_DEVICES += unielec_u7623-emmc
+
+# Legacy partial image for U7623
+# This preserves the vendor U-Boot and starts with a uImage at 0xA00
+define Device/unielec_u7623-02-emmc-512m-legacy
DEVICE_VENDOR := UniElec
DEVICE_MODEL := U7623-02
- DEVICE_VARIANT := eMMC/512MB RAM
+ DEVICE_VARIANT := eMMC/512MiB RAM (legacy image)
DEVICE_DTS := mt7623a-unielec-u7623-02-emmc-512m
KERNEL_NAME := zImage
KERNEL := kernel-bin | append-dtb | uImage none
@@ -67,5 +90,6 @@ define Device/unielec_u7623-02-emmc-512m
mkf2fs e2fsprogs kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk
IMAGES := sysupgrade-emmc.bin.gz
IMAGE/sysupgrade-emmc.bin.gz := sysupgrade-emmc | gzip | append-metadata
+ SUPPORTED_DEVICES := unielec,u7623-02-emmc-512m
endef
-TARGET_DEVICES += unielec_u7623-02-emmc-512m
+TARGET_DEVICES += unielec_u7623-02-emmc-512m-legacy