]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: mt7623: rename gen_banana_pi_img.sh → gen_mtk_mmc_img.sh
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 21 Jul 2020 18:14:18 +0000 (19:14 +0100)
committerChuanhong Guo <gch981213@gmail.com>
Sun, 26 Jul 2020 09:08:21 +0000 (17:08 +0800)
As I buy more hardware and continue to work on consolidation, This will
apply to a lot of MediaTek platforms; rename it accordingly.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
target/linux/mediatek/image/Config.in
target/linux/mediatek/image/gen_mtk_mmc_img.sh [moved from target/linux/mediatek/image/gen_banana_pi_img.sh with 97% similarity]
target/linux/mediatek/image/mt7623.mk

index 0e5449e2f963f69b08c56fd7fcd5ceae601ce47f..12d47d77b995c96a2a18b4e1c72d231feb338c9d 100644 (file)
@@ -1,4 +1,4 @@
-config BANANA_PI_BOOT_PARTSIZE
-       int "Boot (SD Card) filesystem partition size (in MiB)"
+config MTK_BOOT_PARTSIZE
+       int "Boot (SD Card/eMMC) filesystem partition size (in MiB)"
        depends on TARGET_mediatek_mt7623_DEVICE_bpi_bananapi-r2 || TARGET_DEVICE_mediatek_mt7623_DEVICE_bpi_bananapi-r2
        default 32
similarity index 97%
rename from target/linux/mediatek/image/gen_banana_pi_img.sh
rename to target/linux/mediatek/image/gen_mtk_mmc_img.sh
index 611a17edff2ef2f0afa2bf92d25dd657b57488a2..ea8a9c63a18de9139b3947eae890e7b4c0280fcd 100755 (executable)
@@ -27,7 +27,7 @@
 # The second partition is a FAT file system containing the kernel
 # image and a uboot.env file, which is provided to this script as
 # $4 (bootfs image). Its size is configurable with the
-# CONFIG_BANANA_PI_BOOT_PARTSIZE option; by default 32MiB.
+# CONFIG_MTK_BOOT_PARTSIZE option; by default 32MiB.
 #
 # The root filesystem comes next in the third partition.
 #
@@ -56,7 +56,7 @@
 #   |----------------------|
 #   |   MBR partition #2   |
 #   |                      |
-#   |    FAT partition     |   ( BANANA_PI_BOOT_PARTSIZE
+#   |    FAT partition     |   ( MTK_BOOT_PARTSIZE
 #   .                      .     default 32MiB )
 #   .    (kernel, uEnv)    .
 #   |                      |
index 1061a0d281525b0d7e8c4877d6833428b8321fb8..881092f4784da01860bf3f46726c250a414d9a17 100644 (file)
@@ -1,30 +1,30 @@
 KERNEL_LOADADDR := 0x80008000
 DEVICE_VARS += UBOOT_TARGET UBOOT_OFFSET UBOOT_ENVSIZE
 
-ifneq ($(CONFIG_BANANA_PI_BOOT_PARTSIZE),)
+ifneq ($(CONFIG_MTK_BOOT_PARTSIZE),)
 BOOTFS_BLOCK_SIZE := 1024
-BOOTFS_BLOCKS := $(shell echo $$(($(CONFIG_BANANA_PI_BOOT_PARTSIZE)*1024*1024/$(BOOTFS_BLOCK_SIZE))))
+BOOTFS_BLOCKS := $(shell echo $$(($(CONFIG_MTK_BOOT_PARTSIZE)*1024*1024/$(BOOTFS_BLOCK_SIZE))))
 endif
 
-define Build/banana-pi-sdcard
+define Build/mtk-mmc-img
        rm -f $@.boot
        mkfs.fat -C $@.boot $(BOOTFS_BLOCKS)
 
        if [ -r $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin ]; then \
-               ./gen_banana_pi_img.sh emmc $@.emmc \
+               ./gen_mtk_mmc_img.sh emmc $@.emmc \
                        $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin; \
                mcopy -i $@.boot $@.emmc ::eMMCboot.bin; \
        fi
        mkenvimage -s $(UBOOT_ENVSIZE) -o $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env $(UBOOT_TARGET)-uEnv.txt
        mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env ::uboot.env
        mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage
-       ./gen_banana_pi_img.sh sd $@ \
+       ./gen_mtk_mmc_img.sh sd $@ \
                $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin \
                $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-u-boot*.bin \
                $(UBOOT_OFFSET) \
                $@.boot \
                $(IMAGE_ROOTFS) \
-               $(CONFIG_BANANA_PI_BOOT_PARTSIZE) \
+               $(CONFIG_MTK_BOOT_PARTSIZE) \
                $(CONFIG_TARGET_ROOTFS_PARTSIZE)
 endef
 
@@ -47,7 +47,7 @@ define Device/bpi_bananapi-r2
   UBOOT_OFFSET := 320k
   UBOOT_TARGET := mt7623n_bpir2
   IMAGES := img.gz
-  IMAGE/img.gz := banana-pi-sdcard | gzip | append-metadata
+  IMAGE/img.gz := mtk-mmc-img | gzip | append-metadata
   ARTIFACT/preloader.bin := preloader $$(UBOOT_TARGET)
   ARTIFACT/scatter.txt := scatterfile $$(firstword $$(FILESYSTEMS))-$$(firstword $$(IMAGES))
   ARTIFACTS = preloader.bin scatter.txt