From: John Crispin Date: Thu, 16 Jul 2020 07:16:34 +0000 (+0200) Subject: mediatek: generate UBI images for the rev board X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5a5031e70b3eefc4d4bf1be4f4529e2cfa159f98;p=openwrt%2Fstaging%2Fansuel.git mediatek: generate UBI images for the rev board Signed-off-by: John Crispin --- diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk index 218bf0dc93..dee340accf 100644 --- a/target/linux/mediatek/image/mt7622.mk +++ b/target/linux/mediatek/image/mt7622.mk @@ -1,4 +1,4 @@ -KERNEL_LOADADDR := 0x41080000 +KERNEL_LOADADDR := 0x44080000 define Device/bpi_bananapi-r64 DEVICE_VENDOR := Bpi @@ -40,3 +40,21 @@ define Device/mediatek_mt7622-rfb1 DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk endef TARGET_DEVICES += mediatek_mt7622-rfb1 + +define Device/mediatek_mt7622-ubi + DEVICE_VENDOR := MediaTek + DEVICE_MODEL := MTK7622 AP (UBI) + DEVICE_DTS := mt7622-rfb1-ubi + DEVICE_DTS_DIR := $(DTS_DIR)/mediatek + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 4194304 + IMAGE_SIZE := 32768k + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ + check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar + DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk +endef +TARGET_DEVICES += mediatek_mt7622-ubi diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index 24b71ece63..8144476943 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -7,6 +7,9 @@ platform_do_upgrade() { #of eMMC and to the location of the kernel get_image "$1" | dd of=/dev/mmcblk0 bs=2097152 seek=1 conv=fsync ;; + mediatek,mt7622,ubi) + nand_do_upgrade "$1" + ;; *) default_do_upgrade "$1" ;; diff --git a/target/linux/mediatek/mt7622/config-5.4 b/target/linux/mediatek/mt7622/config-5.4 index 02a8d5eaeb..92da879a82 100755 --- a/target/linux/mediatek/mt7622/config-5.4 +++ b/target/linux/mediatek/mt7622/config-5.4 @@ -197,9 +197,11 @@ CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_RMAP=y CONFIG_CPU_THERMAL=y CONFIG_CRC16=y +CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y @@ -208,11 +210,13 @@ CONFIG_CRYPTO_ECC=y CONFIG_CRYPTO_ECDH=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_LIB_SHA256=y +CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_NULL2=y @@ -277,6 +281,7 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y CONFIG_GPIOLIB=y +CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y @@ -340,6 +345,9 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_UID16=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HOLES_IN_ZONE=y +# CONFIG_HW_NAT is not set +CONFIG_HZ=250 +CONFIG_HZ_250=y CONFIG_ICPLUS_PHY=y CONFIG_IIO=y CONFIG_IKCONFIG=y @@ -378,10 +386,13 @@ CONFIG_JUMP_LABEL=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y CONFIG_MAGIC_SYSRQ=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MEDIATEK_MT6577_AUXADC=y +# CONFIG_MEDIATEK_NETSYS_V2 is not set CONFIG_MEDIATEK_WATCHDOG=y CONFIG_MEDIA_SUPPORT=y CONFIG_MEMFD_CREATE=y @@ -393,7 +404,7 @@ CONFIG_MMC_MTK=y # CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_RELA=y -# CONFIG_MT753X_GSW is not set +CONFIG_MT753X_GSW=y CONFIG_MTD_NAND_CORE=y CONFIG_MTD_NAND_ECC_SW_HAMMING=y CONFIG_MTD_NAND_MTK=y @@ -402,6 +413,12 @@ CONFIG_MTD_SPI_NAND=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_FIT_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +CONFIG_MTD_UBI_WL_THRESHOLD=4096 # CONFIG_MTK_CMDQ is not set # CONFIG_MTK_CQDMA is not set CONFIG_MTK_EFUSE=y @@ -515,6 +532,7 @@ CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_CTRL_TTYPORT=y CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SGL_ALLOC=y CONFIG_SG_POOL=y CONFIG_SMP=y CONFIG_SPARSEMEM=y @@ -553,6 +571,11 @@ CONFIG_TIMER_OF=y CONFIG_TIMER_PROBE=y CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +# CONFIG_UBIFS_FS_ZSTD is not set # CONFIG_UCLAMP_TASK is not set # CONFIG_UNMAP_KERNEL_AT_EL0 is not set CONFIG_USB=y @@ -570,4 +593,6 @@ CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y CONFIG_WATCHDOG_PRETIMEOUT_GOV_SEL=m CONFIG_WATCHDOG_SYSFS=y CONFIG_XPS=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y CONFIG_ZONE_DMA32=y