mediatek: mt7623: rename gen_banana_pi_img.sh → gen_mtk_mmc_img.sh

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>
This commit is contained in:
David Woodhouse 2020-07-21 19:14:18 +01:00 committed by Chuanhong Guo
parent f5cebbe2e4
commit 1113dcab05
3 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
config BANANA_PI_BOOT_PARTSIZE config MTK_BOOT_PARTSIZE
int "Boot (SD Card) filesystem partition size (in MiB)" 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 depends on TARGET_mediatek_mt7623_DEVICE_bpi_bananapi-r2 || TARGET_DEVICE_mediatek_mt7623_DEVICE_bpi_bananapi-r2
default 32 default 32

View File

@ -27,7 +27,7 @@
# The second partition is a FAT file system containing the kernel # The second partition is a FAT file system containing the kernel
# image and a uboot.env file, which is provided to this script as # image and a uboot.env file, which is provided to this script as
# $4 (bootfs image). Its size is configurable with the # $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. # The root filesystem comes next in the third partition.
# #
@ -56,7 +56,7 @@
# |----------------------| # |----------------------|
# | MBR partition #2 | # | MBR partition #2 |
# | | # | |
# | FAT partition | ( BANANA_PI_BOOT_PARTSIZE # | FAT partition | ( MTK_BOOT_PARTSIZE
# . . default 32MiB ) # . . default 32MiB )
# . (kernel, uEnv) . # . (kernel, uEnv) .
# | | # | |

View File

@ -1,30 +1,30 @@
KERNEL_LOADADDR := 0x80008000 KERNEL_LOADADDR := 0x80008000
DEVICE_VARS += UBOOT_TARGET UBOOT_OFFSET UBOOT_ENVSIZE DEVICE_VARS += UBOOT_TARGET UBOOT_OFFSET UBOOT_ENVSIZE
ifneq ($(CONFIG_BANANA_PI_BOOT_PARTSIZE),) ifneq ($(CONFIG_MTK_BOOT_PARTSIZE),)
BOOTFS_BLOCK_SIZE := 1024 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 endif
define Build/banana-pi-sdcard define Build/mtk-mmc-img
rm -f $@.boot rm -f $@.boot
mkfs.fat -C $@.boot $(BOOTFS_BLOCKS) mkfs.fat -C $@.boot $(BOOTFS_BLOCKS)
if [ -r $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin ]; then \ 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; \ $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin; \
mcopy -i $@.boot $@.emmc ::eMMCboot.bin; \ mcopy -i $@.boot $@.emmc ::eMMCboot.bin; \
fi fi
mkenvimage -s $(UBOOT_ENVSIZE) -o $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env $(UBOOT_TARGET)-uEnv.txt 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 $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env ::uboot.env
mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage 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)-preloader.bin \
$(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-u-boot*.bin \ $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-u-boot*.bin \
$(UBOOT_OFFSET) \ $(UBOOT_OFFSET) \
$@.boot \ $@.boot \
$(IMAGE_ROOTFS) \ $(IMAGE_ROOTFS) \
$(CONFIG_BANANA_PI_BOOT_PARTSIZE) \ $(CONFIG_MTK_BOOT_PARTSIZE) \
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
endef endef
@ -47,7 +47,7 @@ define Device/bpi_bananapi-r2
UBOOT_OFFSET := 320k UBOOT_OFFSET := 320k
UBOOT_TARGET := mt7623n_bpir2 UBOOT_TARGET := mt7623n_bpir2
IMAGES := img.gz 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/preloader.bin := preloader $$(UBOOT_TARGET)
ARTIFACT/scatter.txt := scatterfile $$(firstword $$(FILESYSTEMS))-$$(firstword $$(IMAGES)) ARTIFACT/scatter.txt := scatterfile $$(firstword $$(FILESYSTEMS))-$$(firstword $$(IMAGES))
ARTIFACTS = preloader.bin scatter.txt ARTIFACTS = preloader.bin scatter.txt