From: Daniel Golle Date: Mon, 7 Oct 2024 17:31:58 +0000 (+0100) Subject: uboot-mediatek: update to U-Boot 2024.10 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f8c22c9bff559c826026801aab3c5c3e6b4c4eee;p=openwrt%2Fstaging%2Fxback.git uboot-mediatek: update to U-Boot 2024.10 Update to latest U-Boot release. Patches refreshed and fixed when needed. Signed-off-by: Daniel Golle --- diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index d6e9be913c..e5a0a393fe 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2024.07 -PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f +PKG_VERSION:=2024.10 +PKG_HASH:=b28daf4ac17e43156363078bf510297584137f6df50fced9b12df34f61a92fb0 PKG_BUILD_DEPENDS:=!(TARGET_ramips||TARGET_mediatek_mt7623):arm-trusted-firmware-tools/host UBOOT_USE_INTREE_DTC:=1 @@ -830,7 +830,8 @@ UBOOT_TARGETS := \ UBOOT_CUSTOMIZE_CONFIG := \ --disable TOOLS_KWBIMAGE \ - --disable TOOLS_LIBCRYPTO + --disable TOOLS_LIBCRYPTO \ + --disable TOOLS_MKEFICAPSULE ifdef CONFIG_TARGET_mediatek UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE:.fip=.bin) diff --git a/package/boot/uboot-mediatek/patches/100-02-drivers-mtd-add-support-for-MediaTek-SPI-NAND-flash-.patch b/package/boot/uboot-mediatek/patches/100-02-drivers-mtd-add-support-for-MediaTek-SPI-NAND-flash-.patch index 0e63b1e2d3..e57c88c295 100644 --- a/package/boot/uboot-mediatek/patches/100-02-drivers-mtd-add-support-for-MediaTek-SPI-NAND-flash-.patch +++ b/package/boot/uboot-mediatek/patches/100-02-drivers-mtd-add-support-for-MediaTek-SPI-NAND-flash-.patch @@ -38,7 +38,7 @@ Signed-off-by: Weijie Gao --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig -@@ -238,6 +238,8 @@ config SYS_MAX_FLASH_BANKS_DETECT +@@ -246,6 +246,8 @@ config SYS_MAX_FLASH_BANKS_DETECT to reduce the effective number of flash bank, between 0 and CONFIG_SYS_MAX_FLASH_BANKS @@ -49,7 +49,7 @@ Signed-off-by: Weijie Gao config SYS_NAND_MAX_OOBFREE --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile -@@ -39,3 +39,5 @@ obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPOR +@@ -40,3 +40,5 @@ obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPOR obj-$(CONFIG_SPL_UBI) += ubispl/ endif @@ -1313,7 +1313,7 @@ Signed-off-by: Weijie Gao + * Author: Weijie Gao + */ + -+#include ++#include +#include +#include +#include @@ -1896,7 +1896,7 @@ Signed-off-by: Weijie Gao +#ifndef _MTK_SNAND_OS_H_ +#define _MTK_SNAND_OS_H_ + -+#include ++#include +#include +#include +#include diff --git a/package/boot/uboot-mediatek/patches/100-03-mtd-mtk-snand-add-support-for-SPL.patch b/package/boot/uboot-mediatek/patches/100-03-mtd-mtk-snand-add-support-for-SPL.patch index 3d7c4a9bf6..27b56f7bd3 100644 --- a/package/boot/uboot-mediatek/patches/100-03-mtd-mtk-snand-add-support-for-SPL.patch +++ b/package/boot/uboot-mediatek/patches/100-03-mtd-mtk-snand-add-support-for-SPL.patch @@ -47,7 +47,7 @@ Signed-off-by: Weijie Gao + * Author: Weijie Gao + */ + -+#include ++#include +#include +#include +#include diff --git a/package/boot/uboot-mediatek/patches/100-04-env-add-support-for-generic-MTD-device.patch b/package/boot/uboot-mediatek/patches/100-04-env-add-support-for-generic-MTD-device.patch index 2f070005d6..8f0a50bd98 100644 --- a/package/boot/uboot-mediatek/patches/100-04-env-add-support-for-generic-MTD-device.patch +++ b/package/boot/uboot-mediatek/patches/100-04-env-add-support-for-generic-MTD-device.patch @@ -370,7 +370,7 @@ Signed-off-by: Weijie Gao +}; --- a/include/env_internal.h +++ b/include/env_internal.h -@@ -108,6 +108,7 @@ enum env_location { +@@ -107,6 +107,7 @@ enum env_location { ENVL_FAT, ENVL_FLASH, ENVL_MMC, diff --git a/package/boot/uboot-mediatek/patches/100-05-mtd-add-a-new-mtd-device-type-for-NMBM.patch b/package/boot/uboot-mediatek/patches/100-05-mtd-add-a-new-mtd-device-type-for-NMBM.patch index d90ca64704..aa19a11587 100644 --- a/package/boot/uboot-mediatek/patches/100-05-mtd-add-a-new-mtd-device-type-for-NMBM.patch +++ b/package/boot/uboot-mediatek/patches/100-05-mtd-add-a-new-mtd-device-type-for-NMBM.patch @@ -15,7 +15,7 @@ Signed-off-by: Weijie Gao --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c -@@ -1057,6 +1057,9 @@ int mtd_id_parse(const char *id, const c +@@ -1054,6 +1054,9 @@ int mtd_id_parse(const char *id, const c } else if (strncmp(p, "spi-nand", 8) == 0) { *dev_type = MTD_DEV_TYPE_SPINAND; p += 8; @@ -27,7 +27,7 @@ Signed-off-by: Weijie Gao return 1; --- a/include/jffs2/load_kernel.h +++ b/include/jffs2/load_kernel.h -@@ -16,11 +16,13 @@ +@@ -17,11 +17,13 @@ #define MTD_DEV_TYPE_NAND 0x0002 #define MTD_DEV_TYPE_ONENAND 0x0004 #define MTD_DEV_TYPE_SPINAND 0x0008 diff --git a/package/boot/uboot-mediatek/patches/100-06-mtd-add-core-facility-code-of-NMBM.patch b/package/boot/uboot-mediatek/patches/100-06-mtd-add-core-facility-code-of-NMBM.patch index 997d07867b..30d21b0e49 100644 --- a/package/boot/uboot-mediatek/patches/100-06-mtd-add-core-facility-code-of-NMBM.patch +++ b/package/boot/uboot-mediatek/patches/100-06-mtd-add-core-facility-code-of-NMBM.patch @@ -31,7 +31,7 @@ Signed-off-by: Weijie Gao --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig -@@ -274,6 +274,8 @@ source "drivers/mtd/ubi/Kconfig" +@@ -282,6 +282,8 @@ source "drivers/mtd/ubi/Kconfig" source "drivers/mtd/nvmxip/Kconfig" @@ -42,7 +42,7 @@ Signed-off-by: Weijie Gao endmenu --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile -@@ -41,3 +41,4 @@ obj-$(CONFIG_SPL_UBI) += ubispl/ +@@ -42,3 +42,4 @@ obj-$(CONFIG_SPL_UBI) += ubispl/ endif obj-$(CONFIG_MTK_SPI_NAND) += mtk-snand/ diff --git a/package/boot/uboot-mediatek/patches/100-08-common-board_r-add-support-to-initialize-NMBM-after-.patch b/package/boot/uboot-mediatek/patches/100-08-common-board_r-add-support-to-initialize-NMBM-after-.patch index 6a7912e64a..176b215b52 100644 --- a/package/boot/uboot-mediatek/patches/100-08-common-board_r-add-support-to-initialize-NMBM-after-.patch +++ b/package/boot/uboot-mediatek/patches/100-08-common-board_r-add-support-to-initialize-NMBM-after-.patch @@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao --- a/common/board_r.c +++ b/common/board_r.c -@@ -373,6 +373,20 @@ static int initr_nand(void) +@@ -372,6 +372,20 @@ static int initr_nand(void) } #endif @@ -34,7 +34,7 @@ Signed-off-by: Weijie Gao #if defined(CONFIG_CMD_ONENAND) /* go init the NAND */ static int initr_onenand(void) -@@ -664,6 +678,9 @@ static init_fnc_t init_sequence_r[] = { +@@ -663,6 +677,9 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_CMD_ONENAND initr_onenand, #endif diff --git a/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch b/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch index cd41581006..f988219b6d 100644 --- a/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch +++ b/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch @@ -15,7 +15,7 @@ Signed-off-by: Weijie Gao --- a/cmd/Kconfig +++ b/cmd/Kconfig -@@ -1450,6 +1450,12 @@ config CMD_NAND_TORTURE +@@ -1465,6 +1465,12 @@ config CMD_NAND_TORTURE endif # CMD_NAND diff --git a/package/boot/uboot-mediatek/patches/100-10-cmd-mtd-add-markbad-subcommand-for-NMBM-testing.patch b/package/boot/uboot-mediatek/patches/100-10-cmd-mtd-add-markbad-subcommand-for-NMBM-testing.patch index 34f7fba960..b2a9235cdb 100644 --- a/package/boot/uboot-mediatek/patches/100-10-cmd-mtd-add-markbad-subcommand-for-NMBM-testing.patch +++ b/package/boot/uboot-mediatek/patches/100-10-cmd-mtd-add-markbad-subcommand-for-NMBM-testing.patch @@ -20,7 +20,7 @@ Signed-off-by: SkyLake.Huang --- a/cmd/mtd.c +++ b/cmd/mtd.c -@@ -722,6 +722,42 @@ out_put_mtd: +@@ -721,6 +721,42 @@ out_put_mtd: return CMD_RET_SUCCESS; } @@ -63,7 +63,7 @@ Signed-off-by: SkyLake.Huang #ifdef CONFIG_AUTO_COMPLETE static int mtd_name_complete(int argc, char *const argv[], char last_char, int maxv, char *cmdv[]) -@@ -769,6 +805,7 @@ U_BOOT_LONGHELP(mtd, +@@ -768,6 +804,7 @@ U_BOOT_LONGHELP(mtd, "\n" "Specific functions:\n" "mtd bad \n" @@ -71,7 +71,7 @@ Signed-off-by: SkyLake.Huang #if CONFIG_IS_ENABLED(CMD_MTD_OTP) "mtd otpread [u|f] \n" "mtd otpwrite \n" -@@ -809,4 +846,6 @@ U_BOOT_CMD_WITH_SUBCMDS(mtd, "MTD utils" +@@ -808,4 +845,6 @@ U_BOOT_CMD_WITH_SUBCMDS(mtd, "MTD utils" U_BOOT_SUBCMD_MKENT_COMPLETE(erase, 4, 0, do_mtd_erase, mtd_name_complete), U_BOOT_SUBCMD_MKENT_COMPLETE(bad, 2, 1, do_mtd_bad, diff --git a/package/boot/uboot-mediatek/patches/100-11-env-add-support-for-NMBM-upper-MTD-layer.patch b/package/boot/uboot-mediatek/patches/100-11-env-add-support-for-NMBM-upper-MTD-layer.patch index 0930ace26a..a5f9586b91 100644 --- a/package/boot/uboot-mediatek/patches/100-11-env-add-support-for-NMBM-upper-MTD-layer.patch +++ b/package/boot/uboot-mediatek/patches/100-11-env-add-support-for-NMBM-upper-MTD-layer.patch @@ -240,7 +240,7 @@ Signed-off-by: Weijie Gao +}; --- a/include/env_internal.h +++ b/include/env_internal.h -@@ -110,6 +110,7 @@ enum env_location { +@@ -109,6 +109,7 @@ enum env_location { ENVL_MMC, ENVL_MTD, ENVL_NAND, diff --git a/package/boot/uboot-mediatek/patches/100-13-cmd-add-a-new-command-for-NAND-flash-debugging.patch b/package/boot/uboot-mediatek/patches/100-13-cmd-add-a-new-command-for-NAND-flash-debugging.patch index 97cb1088a0..c16f63fdb3 100644 --- a/package/boot/uboot-mediatek/patches/100-13-cmd-add-a-new-command-for-NAND-flash-debugging.patch +++ b/package/boot/uboot-mediatek/patches/100-13-cmd-add-a-new-command-for-NAND-flash-debugging.patch @@ -26,7 +26,7 @@ Signed-off-by: Weijie Gao --- a/cmd/Kconfig +++ b/cmd/Kconfig -@@ -1450,6 +1450,14 @@ config CMD_NAND_TORTURE +@@ -1465,6 +1465,14 @@ config CMD_NAND_TORTURE endif # CMD_NAND diff --git a/package/boot/uboot-mediatek/patches/100-14-mtd-spi-nor-add-support-to-read-flash-unique-ID.patch b/package/boot/uboot-mediatek/patches/100-14-mtd-spi-nor-add-support-to-read-flash-unique-ID.patch index 8db02ddf6a..82839033a3 100644 --- a/package/boot/uboot-mediatek/patches/100-14-mtd-spi-nor-add-support-to-read-flash-unique-ID.patch +++ b/package/boot/uboot-mediatek/patches/100-14-mtd-spi-nor-add-support-to-read-flash-unique-ID.patch @@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c -@@ -2908,6 +2908,100 @@ static int spi_nor_init_params(struct sp +@@ -2958,6 +2958,100 @@ static int spi_nor_init_params(struct sp return 0; } @@ -114,7 +114,7 @@ Signed-off-by: Weijie Gao static int spi_nor_hwcaps2cmd(u32 hwcaps, const int table[][2], size_t size) { size_t i; -@@ -4027,6 +4121,7 @@ int spi_nor_scan(struct spi_nor *nor) +@@ -4077,6 +4171,7 @@ int spi_nor_scan(struct spi_nor *nor) nor->write = spi_nor_write_data; nor->read_reg = spi_nor_read_reg; nor->write_reg = spi_nor_write_reg; diff --git a/package/boot/uboot-mediatek/patches/100-16-cmd-bootmenu-add-ability-to-select-item-by-shortkey.patch b/package/boot/uboot-mediatek/patches/100-16-cmd-bootmenu-add-ability-to-select-item-by-shortkey.patch index 701acddd78..4aa4318493 100644 --- a/package/boot/uboot-mediatek/patches/100-16-cmd-bootmenu-add-ability-to-select-item-by-shortkey.patch +++ b/package/boot/uboot-mediatek/patches/100-16-cmd-bootmenu-add-ability-to-select-item-by-shortkey.patch @@ -14,7 +14,7 @@ Signed-off-by: Weijie Gao --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c -@@ -89,6 +89,7 @@ static char *bootmenu_choice_entry(void +@@ -88,6 +88,7 @@ static char *bootmenu_choice_entry(void struct bootmenu_data *menu = data; struct bootmenu_entry *iter; enum bootmenu_key key = BKEY_NONE; @@ -22,7 +22,7 @@ Signed-off-by: Weijie Gao int i; cli_ch_init(cch); -@@ -96,10 +97,10 @@ static char *bootmenu_choice_entry(void +@@ -95,10 +96,10 @@ static char *bootmenu_choice_entry(void while (1) { if (menu->delay >= 0) { /* Autoboot was not stopped */ @@ -35,7 +35,7 @@ Signed-off-by: Weijie Gao } switch (key) { -@@ -113,6 +114,12 @@ static char *bootmenu_choice_entry(void +@@ -112,6 +113,12 @@ static char *bootmenu_choice_entry(void ++menu->active; /* no menu key selected, regenerate menu */ return NULL; @@ -48,7 +48,7 @@ Signed-off-by: Weijie Gao case BKEY_SELECT: iter = menu->first; for (i = 0; i < menu->active; ++i) -@@ -170,6 +177,9 @@ static int prepare_bootmenu_entry(struct +@@ -169,6 +176,9 @@ static int prepare_bootmenu_entry(struct unsigned short int i = *index; struct bootmenu_entry *entry = NULL; struct bootmenu_entry *iter = *current; @@ -58,7 +58,7 @@ Signed-off-by: Weijie Gao while ((option = bootmenu_getoption(i))) { -@@ -184,11 +194,24 @@ static int prepare_bootmenu_entry(struct +@@ -183,11 +193,24 @@ static int prepare_bootmenu_entry(struct if (!entry) return -ENOMEM; @@ -84,7 +84,7 @@ Signed-off-by: Weijie Gao entry->command = strdup(sep + 1); if (!entry->command) { -@@ -334,6 +357,7 @@ static struct bootmenu_data *bootmenu_cr +@@ -333,6 +356,7 @@ static struct bootmenu_data *bootmenu_cr menu->delay = delay; menu->active = 0; menu->first = NULL; @@ -92,7 +92,7 @@ Signed-off-by: Weijie Gao default_str = env_get("bootmenu_default"); if (default_str) -@@ -369,9 +393,9 @@ static struct bootmenu_data *bootmenu_cr +@@ -368,9 +392,9 @@ static struct bootmenu_data *bootmenu_cr /* Add Quit entry if exiting bootmenu is disabled */ if (!IS_ENABLED(CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE)) @@ -106,7 +106,7 @@ Signed-off-by: Weijie Gao free(entry); --- a/common/menu.c +++ b/common/menu.c -@@ -49,6 +49,33 @@ struct menu { +@@ -48,6 +48,33 @@ struct menu { int item_cnt; }; @@ -140,7 +140,7 @@ Signed-off-by: Weijie Gao /* * An iterator function for menu items. callback will be called for each item * in m, with m, a pointer to the item, and extra being passed to callback. If -@@ -428,7 +455,7 @@ int menu_destroy(struct menu *m) +@@ -426,7 +453,7 @@ int menu_destroy(struct menu *m) } enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu, @@ -149,7 +149,7 @@ Signed-off-by: Weijie Gao { enum bootmenu_key key = BKEY_NONE; int i, c; -@@ -463,6 +490,19 @@ enum bootmenu_key bootmenu_autoboot_loop +@@ -461,6 +488,19 @@ enum bootmenu_key bootmenu_autoboot_loop break; default: key = BKEY_NONE; @@ -169,7 +169,7 @@ Signed-off-by: Weijie Gao break; } break; -@@ -483,7 +523,8 @@ enum bootmenu_key bootmenu_autoboot_loop +@@ -481,7 +521,8 @@ enum bootmenu_key bootmenu_autoboot_loop return key; } @@ -179,7 +179,7 @@ Signed-off-by: Weijie Gao { enum bootmenu_key key; -@@ -515,6 +556,20 @@ enum bootmenu_key bootmenu_conv_key(int +@@ -513,6 +554,20 @@ enum bootmenu_key bootmenu_conv_key(int case ' ': key = BKEY_SPACE; break; @@ -200,7 +200,7 @@ Signed-off-by: Weijie Gao default: key = BKEY_NONE; break; -@@ -524,11 +579,16 @@ enum bootmenu_key bootmenu_conv_key(int +@@ -522,11 +577,16 @@ enum bootmenu_key bootmenu_conv_key(int } enum bootmenu_key bootmenu_loop(struct bootmenu_data *menu, @@ -218,7 +218,7 @@ Signed-off-by: Weijie Gao c = cli_ch_process(cch, 0); if (!c) { while (!c && !tstc()) { -@@ -542,7 +602,7 @@ enum bootmenu_key bootmenu_loop(struct b +@@ -540,7 +600,7 @@ enum bootmenu_key bootmenu_loop(struct b } } @@ -301,7 +301,7 @@ Signed-off-by: Weijie Gao switch (key) { case BKEY_UP: -@@ -1839,7 +1839,7 @@ char *eficonfig_choice_change_boot_order +@@ -1881,7 +1881,7 @@ char *eficonfig_choice_change_boot_order cli_ch_init(cch); while (1) { @@ -312,7 +312,7 @@ Signed-off-by: Weijie Gao case BKEY_PLUS: --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c -@@ -234,7 +234,7 @@ int bootflow_menu_run(struct bootstd_pri +@@ -240,7 +240,7 @@ int bootflow_menu_run(struct bootstd_pri key = 0; if (ichar) { diff --git a/package/boot/uboot-mediatek/patches/100-17-common-spl-spl_nand-enable-CONFIG_SYS_NAND_U_BOOT_OF.patch b/package/boot/uboot-mediatek/patches/100-17-common-spl-spl_nand-enable-CONFIG_SYS_NAND_U_BOOT_OF.patch index c65a118b89..8501105863 100644 --- a/package/boot/uboot-mediatek/patches/100-17-common-spl-spl_nand-enable-CONFIG_SYS_NAND_U_BOOT_OF.patch +++ b/package/boot/uboot-mediatek/patches/100-17-common-spl-spl_nand-enable-CONFIG_SYS_NAND_U_BOOT_OF.patch @@ -14,7 +14,7 @@ Signed-off-by: Weijie Gao --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c -@@ -19,7 +19,11 @@ +@@ -18,7 +18,11 @@ uint32_t __weak spl_nand_get_uboot_raw_page(void) { diff --git a/package/boot/uboot-mediatek/patches/100-18-board-mt7629-add-support-for-booting-from-SPI-NAND.patch b/package/boot/uboot-mediatek/patches/100-18-board-mt7629-add-support-for-booting-from-SPI-NAND.patch index bc5f68cd1e..8c2bcd5437 100644 --- a/package/boot/uboot-mediatek/patches/100-18-board-mt7629-add-support-for-booting-from-SPI-NAND.patch +++ b/package/boot/uboot-mediatek/patches/100-18-board-mt7629-add-support-for-booting-from-SPI-NAND.patch @@ -89,7 +89,7 @@ Signed-off-by: Weijie Gao reg = <0x11014000 0x1000>; --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig -@@ -147,9 +147,11 @@ config SYS_CONFIG_NAME +@@ -148,9 +148,11 @@ config SYS_CONFIG_NAME config MTK_BROM_HEADER_INFO string diff --git a/package/boot/uboot-mediatek/patches/100-20-board-mt7981-add-reference-board-using-new-spi-nand-.patch b/package/boot/uboot-mediatek/patches/100-20-board-mt7981-add-reference-board-using-new-spi-nand-.patch index caedea7315..bfeaf07f04 100644 --- a/package/boot/uboot-mediatek/patches/100-20-board-mt7981-add-reference-board-using-new-spi-nand-.patch +++ b/package/boot/uboot-mediatek/patches/100-20-board-mt7981-add-reference-board-using-new-spi-nand-.patch @@ -18,7 +18,7 @@ Signed-off-by: Weijie Gao --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -1225,6 +1225,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ +@@ -1190,6 +1190,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7623n-bananapi-bpi-r2.dtb \ mt7629-rfb.dtb \ mt7981-rfb.dtb \ diff --git a/package/boot/uboot-mediatek/patches/100-21-mtd-spi-nor-add-more-flash-ids.patch b/package/boot/uboot-mediatek/patches/100-21-mtd-spi-nor-add-more-flash-ids.patch index adcaadf654..578b6e62b8 100644 --- a/package/boot/uboot-mediatek/patches/100-21-mtd-spi-nor-add-more-flash-ids.patch +++ b/package/boot/uboot-mediatek/patches/100-21-mtd-spi-nor-add-more-flash-ids.patch @@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c -@@ -698,6 +698,7 @@ static int set_4byte(struct spi_nor *nor +@@ -697,6 +697,7 @@ static int set_4byte(struct spi_nor *nor case SNOR_MFR_ISSI: case SNOR_MFR_MACRONIX: case SNOR_MFR_WINBOND: @@ -23,7 +23,7 @@ Signed-off-by: Weijie Gao --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c -@@ -84,7 +84,8 @@ const struct flash_info spi_nor_ids[] = +@@ -83,7 +83,8 @@ const struct flash_info spi_nor_ids[] = { INFO("en25q32b", 0x1c3016, 0, 64 * 1024, 64, 0) }, { INFO("en25q64", 0x1c3017, 0, 64 * 1024, 128, SECT_4K) }, { INFO("en25q128b", 0x1c3018, 0, 64 * 1024, 256, 0) }, @@ -33,7 +33,7 @@ Signed-off-by: Weijie Gao { INFO("en25s64", 0x1c3817, 0, 64 * 1024, 128, SECT_4K) }, #endif #ifdef CONFIG_SPI_FLASH_GIGADEVICE /* GIGADEVICE */ -@@ -150,6 +151,11 @@ const struct flash_info spi_nor_ids[] = +@@ -149,6 +150,11 @@ const struct flash_info spi_nor_ids[] = {INFO("gd55x02g", 0xc8481C, 0, 64 * 1024, 4096, SECT_4K | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES)}, { @@ -45,7 +45,7 @@ Signed-off-by: Weijie Gao INFO("gd25lq128", 0xc86018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) -@@ -489,6 +495,16 @@ const struct flash_info spi_nor_ids[] = +@@ -490,6 +496,16 @@ const struct flash_info spi_nor_ids[] = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, { @@ -62,7 +62,7 @@ Signed-off-by: Weijie Gao INFO("w25q128jw", 0xef8018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) -@@ -548,6 +564,11 @@ const struct flash_info spi_nor_ids[] = +@@ -549,6 +565,11 @@ const struct flash_info spi_nor_ids[] = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, { INFO("w25q256", 0xef4019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, diff --git a/package/boot/uboot-mediatek/patches/100-22-mtd-spi-nand-backport-from-upstream-kernel.patch b/package/boot/uboot-mediatek/patches/100-22-mtd-spi-nand-backport-from-upstream-kernel.patch index ddfb7577ef..aa03c9b3b9 100644 --- a/package/boot/uboot-mediatek/patches/100-22-mtd-spi-nand-backport-from-upstream-kernel.patch +++ b/package/boot/uboot-mediatek/patches/100-22-mtd-spi-nand-backport-from-upstream-kernel.patch @@ -31,7 +31,7 @@ Signed-off-by: Weijie Gao obj-$(CONFIG_MTD_SPI_NAND) += spinand.o --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c -@@ -822,6 +822,7 @@ static const struct nand_ops spinand_ops +@@ -826,6 +826,7 @@ static const struct nand_ops spinand_ops }; static const struct spinand_manufacturer *spinand_manufacturers[] = { diff --git a/package/boot/uboot-mediatek/patches/100-23-mmc-mtk-sd-add-support-to-display-verbose-error-log.patch b/package/boot/uboot-mediatek/patches/100-23-mmc-mtk-sd-add-support-to-display-verbose-error-log.patch index d33ab0b284..7ab2b6d0ce 100644 --- a/package/boot/uboot-mediatek/patches/100-23-mmc-mtk-sd-add-support-to-display-verbose-error-log.patch +++ b/package/boot/uboot-mediatek/patches/100-23-mmc-mtk-sd-add-support-to-display-verbose-error-log.patch @@ -15,7 +15,7 @@ Signed-off-by: Weijie Gao --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig -@@ -855,6 +855,14 @@ config MMC_MTK +@@ -864,6 +864,14 @@ config MMC_MTK This is needed if support for any SD/SDIO/MMC devices is required. If unsure, say N. @@ -42,7 +42,7 @@ Signed-off-by: Weijie Gao +endif --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c -@@ -779,18 +779,24 @@ static int msdc_ops_send_cmd(struct udev +@@ -783,18 +783,24 @@ static int msdc_ops_send_cmd(struct udev if (cmd_ret && !(cmd_ret == -EIO && (cmd->cmdidx == MMC_CMD_SEND_TUNING_BLOCK || diff --git a/package/boot/uboot-mediatek/patches/100-24-cmd-ubi-make-volume-find-create-remove-APIs-public.patch b/package/boot/uboot-mediatek/patches/100-24-cmd-ubi-make-volume-find-create-remove-APIs-public.patch index 3362e0e57d..cba34fce3f 100644 --- a/package/boot/uboot-mediatek/patches/100-24-cmd-ubi-make-volume-find-create-remove-APIs-public.patch +++ b/package/boot/uboot-mediatek/patches/100-24-cmd-ubi-make-volume-find-create-remove-APIs-public.patch @@ -14,7 +14,7 @@ Signed-off-by: Weijie Gao --- a/cmd/ubi.c +++ b/cmd/ubi.c -@@ -213,8 +213,8 @@ bad: +@@ -212,8 +212,8 @@ bad: return err; } @@ -25,16 +25,16 @@ Signed-off-by: Weijie Gao { struct ubi_mkvol_req req; int err; -@@ -247,7 +247,7 @@ static int ubi_create_vol(char *volume, +@@ -246,7 +246,7 @@ static int ubi_create_vol(char *volume, return ubi_create_volume(ubi, &req); } -static struct ubi_volume *ubi_find_volume(char *volume) +struct ubi_volume *ubi_find_volume(char *volume) { - struct ubi_volume *vol = NULL; + struct ubi_volume *vol; int i; -@@ -262,7 +262,7 @@ static struct ubi_volume *ubi_find_volum +@@ -261,7 +261,7 @@ static struct ubi_volume *ubi_find_volum return NULL; } @@ -47,8 +47,8 @@ Signed-off-by: Weijie Gao +++ b/include/ubi_uboot.h @@ -50,6 +50,10 @@ extern void ubi_exit(void); extern int ubi_part(char *part_name, const char *vid_header_offset); - extern int ubi_volume_write(char *volume, void *buf, size_t size); - extern int ubi_volume_read(char *volume, char *buf, size_t size); + extern int ubi_volume_write(char *volume, void *buf, loff_t offset, size_t size); + extern int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size); +extern int ubi_create_vol(char *volume, int64_t size, int dynamic, int vol_id, + bool skipcheck); +extern struct ubi_volume *ubi_find_volume(char *volume); diff --git a/package/boot/uboot-mediatek/patches/100-25-cmd-ubi-allow-creating-volume-with-all-free-spaces.patch b/package/boot/uboot-mediatek/patches/100-25-cmd-ubi-allow-creating-volume-with-all-free-spaces.patch index d023b004f7..e61f5d1119 100644 --- a/package/boot/uboot-mediatek/patches/100-25-cmd-ubi-allow-creating-volume-with-all-free-spaces.patch +++ b/package/boot/uboot-mediatek/patches/100-25-cmd-ubi-allow-creating-volume-with-all-free-spaces.patch @@ -12,7 +12,7 @@ Signed-off-by: Weijie Gao --- a/cmd/ubi.c +++ b/cmd/ubi.c -@@ -226,7 +226,11 @@ int ubi_create_vol(char *volume, int64_t +@@ -225,7 +225,11 @@ int ubi_create_vol(char *volume, int64_t req.vol_id = vol_id; req.alignment = 1; diff --git a/package/boot/uboot-mediatek/patches/100-26-env-ubi-add-support-to-create-environment-volume-if-.patch b/package/boot/uboot-mediatek/patches/100-26-env-ubi-add-support-to-create-environment-volume-if-.patch index fb8d15ddf9..afc586ff1c 100644 --- a/package/boot/uboot-mediatek/patches/100-26-env-ubi-add-support-to-create-environment-volume-if-.patch +++ b/package/boot/uboot-mediatek/patches/100-26-env-ubi-add-support-to-create-environment-volume-if-.patch @@ -29,7 +29,7 @@ Signed-off-by: Weijie Gao depends on ENV_IS_IN_UBI --- a/env/ubi.c +++ b/env/ubi.c -@@ -106,6 +106,18 @@ static int env_ubi_save(void) +@@ -105,6 +105,18 @@ static int env_ubi_save(void) #endif /* CONFIG_SYS_REDUNDAND_ENVIRONMENT */ #endif /* CONFIG_CMD_SAVEENV */ @@ -48,7 +48,7 @@ Signed-off-by: Weijie Gao #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT static int env_ubi_load(void) { -@@ -135,6 +147,11 @@ static int env_ubi_load(void) +@@ -134,6 +146,10 @@ static int env_ubi_load(void) return -EIO; } @@ -56,17 +56,16 @@ Signed-off-by: Weijie Gao + env_ubi_volume_create(CONFIG_ENV_UBI_VOLUME); + env_ubi_volume_create(CONFIG_ENV_UBI_VOLUME_REDUND); + } -+ - read1_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)tmp_env1, + read1_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)tmp_env1, 0, CONFIG_ENV_SIZE); if (read1_fail) -@@ -172,6 +189,9 @@ static int env_ubi_load(void) +@@ -171,6 +187,9 @@ static int env_ubi_load(void) return -EIO; } + if (IS_ENABLED(CONFIG_ENV_UBI_VOLUME_CREATE)) + env_ubi_volume_create(CONFIG_ENV_UBI_VOLUME); + - if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, CONFIG_ENV_SIZE)) { + if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, 0, CONFIG_ENV_SIZE)) { printf("\n** Unable to read env from %s:%s **\n", CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME); diff --git a/package/boot/uboot-mediatek/patches/100-29-board-mediatek-wire-up-NMBM-support.patch b/package/boot/uboot-mediatek/patches/100-29-board-mediatek-wire-up-NMBM-support.patch index f22449ae76..aea82d898e 100644 --- a/package/boot/uboot-mediatek/patches/100-29-board-mediatek-wire-up-NMBM-support.patch +++ b/package/boot/uboot-mediatek/patches/100-29-board-mediatek-wire-up-NMBM-support.patch @@ -12,7 +12,7 @@ Subject: [PATCH] board: mediatek: wire-up NMBM support --- a/board/mediatek/mt7622/mt7622_rfb.c +++ b/board/mediatek/mt7622/mt7622_rfb.c -@@ -10,6 +10,11 @@ +@@ -9,6 +9,11 @@ #include #include @@ -24,7 +24,7 @@ Subject: [PATCH] board: mediatek: wire-up NMBM support DECLARE_GLOBAL_DATA_PTR; int board_init(void) -@@ -23,3 +28,36 @@ int board_late_init(void) +@@ -22,3 +27,36 @@ int board_late_init(void) env_relocate(); return 0; } @@ -64,7 +64,7 @@ Subject: [PATCH] board: mediatek: wire-up NMBM support --- a/board/mediatek/mt7629/mt7629_rfb.c +++ b/board/mediatek/mt7629/mt7629_rfb.c @@ -6,6 +6,11 @@ - #include + #include #include +#include @@ -114,11 +114,10 @@ Subject: [PATCH] board: mediatek: wire-up NMBM support +} --- a/board/mediatek/mt7981/mt7981_rfb.c +++ b/board/mediatek/mt7981/mt7981_rfb.c -@@ -4,7 +4,58 @@ +@@ -4,7 +4,57 @@ * Author: Sam Shih */ -+#include +#include +#include +#include @@ -175,11 +174,10 @@ Subject: [PATCH] board: mediatek: wire-up NMBM support +} --- a/board/mediatek/mt7986/mt7986_rfb.c +++ b/board/mediatek/mt7986/mt7986_rfb.c -@@ -4,7 +4,60 @@ +@@ -4,7 +4,59 @@ * Author: Sam Shih */ -+#include +#include +#include +#include diff --git a/package/boot/uboot-mediatek/patches/160-net-phy-add-support-for-Airoha-ethernet-PHY-driver.patch b/package/boot/uboot-mediatek/patches/160-net-phy-add-support-for-Airoha-ethernet-PHY-driver.patch index f8e8659952..2a71a4eb92 100644 --- a/package/boot/uboot-mediatek/patches/160-net-phy-add-support-for-Airoha-ethernet-PHY-driver.patch +++ b/package/boot/uboot-mediatek/patches/160-net-phy-add-support-for-Airoha-ethernet-PHY-driver.patch @@ -58,7 +58,7 @@ Signed-off-by: Weijie Gao --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -77,6 +77,37 @@ config PHY_ADIN +@@ -83,6 +83,37 @@ config PHY_ADIN help Add support for configuring RGMII on Analog Devices ADIN PHYs. @@ -122,7 +122,7 @@ Signed-off-by: Weijie Gao + +/* INCLUDE FILE DECLARATIONS + */ -+#include ++#include +#include +#include +#include @@ -1028,7 +1028,7 @@ Signed-off-by: Weijie Gao + +/* INCLUDE FILE DECLARATIONS +*/ -+#include ++#include +#include +#include +#include @@ -1421,7 +1421,7 @@ Signed-off-by: Weijie Gao + } + +#ifdef CONFIG_PHY_AIROHA_FW_IN_UBI -+ ret = ubi_volume_read("en8811h-fw", firmware_buf, EN8811H_MD32_DM_SIZE + EN8811H_MD32_DSP_SIZE); ++ ret = ubi_volume_read("en8811h-fw", firmware_buf, 0, EN8811H_MD32_DM_SIZE + EN8811H_MD32_DSP_SIZE); + if (ret) { + printf("[Airoha] read firmware from UBI failed.\n"); + free(firmware_buf); @@ -1909,7 +1909,7 @@ Signed-off-by: Weijie Gao + --- a/drivers/net/eth-phy-uclass.c +++ b/drivers/net/eth-phy-uclass.c -@@ -155,7 +155,7 @@ static int eth_phy_of_to_plat(struct ude +@@ -154,7 +154,7 @@ static int eth_phy_of_to_plat(struct ude return 0; } diff --git a/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch b/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch index d10391e8c6..81c24543e2 100644 --- a/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch +++ b/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch @@ -1,6 +1,6 @@ --- a/cmd/bootm.c +++ b/cmd/bootm.c -@@ -262,6 +262,67 @@ U_BOOT_CMD( +@@ -260,6 +260,67 @@ U_BOOT_CMD( /* iminfo - print header info for a requested image */ /*******************************************************************/ #if defined(CONFIG_CMD_IMI) @@ -70,7 +70,7 @@ { --- a/boot/image-fit.c +++ b/boot/image-fit.c -@@ -2051,6 +2051,47 @@ static const char *fit_get_image_type_pr +@@ -2046,6 +2046,47 @@ static const char *fit_get_image_type_pr return "unknown"; } @@ -120,7 +120,7 @@ int arch, int ph_type, int bootstage_id, --- a/include/image.h +++ b/include/image.h -@@ -1123,6 +1123,7 @@ int fit_parse_subimage(const char *spec, +@@ -1124,6 +1124,7 @@ int fit_parse_subimage(const char *spec, ulong *addr, const char **image_name); int fit_get_subimage_count(const void *fit, int images_noffset); diff --git a/package/boot/uboot-mediatek/patches/211-cmd-bootmenu-custom-title.patch b/package/boot/uboot-mediatek/patches/211-cmd-bootmenu-custom-title.patch index a99b77be08..76ff745e93 100644 --- a/package/boot/uboot-mediatek/patches/211-cmd-bootmenu-custom-title.patch +++ b/package/boot/uboot-mediatek/patches/211-cmd-bootmenu-custom-title.patch @@ -1,6 +1,6 @@ --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c -@@ -452,7 +452,11 @@ static void menu_display_statusline(stru +@@ -451,7 +451,11 @@ static void menu_display_statusline(stru printf(ANSI_CURSOR_POSITION, 1, 1); puts(ANSI_CLEAR_LINE); printf(ANSI_CURSOR_POSITION, 2, 3); @@ -13,7 +13,7 @@ puts(ANSI_CLEAR_LINE_TO_END); printf(ANSI_CURSOR_POSITION, 3, 1); puts(ANSI_CLEAR_LINE); -@@ -537,6 +541,7 @@ static enum bootmenu_ret bootmenu_show(i +@@ -536,6 +540,7 @@ static enum bootmenu_ret bootmenu_show(i return BOOTMENU_RET_FAIL; } diff --git a/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch b/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch index 6f5f5539ab..58f7d316a6 100644 --- a/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch +++ b/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch @@ -1,6 +1,6 @@ --- a/cmd/Kconfig +++ b/cmd/Kconfig -@@ -676,6 +676,12 @@ config CMD_ENV_EXISTS +@@ -683,6 +683,12 @@ config CMD_ENV_EXISTS Check if a variable is defined in the environment for use in shell scripting. diff --git a/package/boot/uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch b/package/boot/uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch index fd5fdd814b..e03b212a74 100644 --- a/package/boot/uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch +++ b/package/boot/uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch @@ -1,6 +1,6 @@ --- a/drivers/mmc/mmc_write.c +++ b/drivers/mmc/mmc_write.c -@@ -80,7 +80,7 @@ ulong mmc_berase(struct blk_desc *block_ +@@ -79,7 +79,7 @@ ulong mmc_berase(struct blk_desc *block_ u32 start_rem, blkcnt_rem, erase_args = 0; struct mmc *mmc = find_mmc_device(dev_num); lbaint_t blk = 0, blk_r = 0; diff --git a/package/boot/uboot-mediatek/patches/280-image-fdt-save-name-of-FIT-configuration-in-chosen-node.patch b/package/boot/uboot-mediatek/patches/280-image-fdt-save-name-of-FIT-configuration-in-chosen-node.patch index 6755f614a9..419ee4adb8 100644 --- a/package/boot/uboot-mediatek/patches/280-image-fdt-save-name-of-FIT-configuration-in-chosen-node.patch +++ b/package/boot/uboot-mediatek/patches/280-image-fdt-save-name-of-FIT-configuration-in-chosen-node.patch @@ -16,7 +16,7 @@ Reviewed-by: Tom Rini --- a/boot/image-fdt.c +++ b/boot/image-fdt.c -@@ -618,6 +618,12 @@ int image_setup_libfdt(struct bootm_head +@@ -617,6 +617,12 @@ int image_setup_libfdt(struct bootm_head images->fit_uname_cfg, strlen(images->fit_uname_cfg) + 1, 1); diff --git a/package/boot/uboot-mediatek/patches/300-mt7623-fix-mmc-get-env-dev.patch b/package/boot/uboot-mediatek/patches/300-mt7623-fix-mmc-get-env-dev.patch index 86c48badda..5fc3d0a344 100644 --- a/package/boot/uboot-mediatek/patches/300-mt7623-fix-mmc-get-env-dev.patch +++ b/package/boot/uboot-mediatek/patches/300-mt7623-fix-mmc-get-env-dev.patch @@ -2,7 +2,7 @@ +++ b/board/mediatek/mt7623/mt7623_rfb.c @@ -5,6 +5,7 @@ - #include + #include #include +#include #include diff --git a/package/boot/uboot-mediatek/patches/301-mt7622-generic-reset-button-ignore-env.patch b/package/boot/uboot-mediatek/patches/301-mt7622-generic-reset-button-ignore-env.patch index 47c92a85bd..57a119bd39 100644 --- a/package/boot/uboot-mediatek/patches/301-mt7622-generic-reset-button-ignore-env.patch +++ b/package/boot/uboot-mediatek/patches/301-mt7622-generic-reset-button-ignore-env.patch @@ -1,8 +1,8 @@ --- a/board/mediatek/mt7622/mt7622_rfb.c +++ b/board/mediatek/mt7622/mt7622_rfb.c -@@ -6,9 +6,16 @@ +@@ -5,9 +5,16 @@ + */ - #include #include +#include +#include @@ -17,7 +17,7 @@ #include #include -@@ -24,7 +31,22 @@ int board_init(void) +@@ -23,7 +30,22 @@ int board_init(void) int board_late_init(void) { @@ -43,7 +43,7 @@ } --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig -@@ -154,4 +154,11 @@ config MTK_BROM_HEADER_INFO +@@ -155,4 +155,11 @@ config MTK_BROM_HEADER_INFO source "board/mediatek/mt7629/Kconfig" diff --git a/package/boot/uboot-mediatek/patches/302-mt7623-generic-reset-button-ignore-env.patch b/package/boot/uboot-mediatek/patches/302-mt7623-generic-reset-button-ignore-env.patch index b8d89058a2..a6e4229dd5 100644 --- a/package/boot/uboot-mediatek/patches/302-mt7623-generic-reset-button-ignore-env.patch +++ b/package/boot/uboot-mediatek/patches/302-mt7623-generic-reset-button-ignore-env.patch @@ -3,7 +3,7 @@ @@ -4,9 +4,18 @@ */ - #include + #include +#include +#include +#include diff --git a/package/boot/uboot-mediatek/patches/303-mt7986-generic-reset-button-ignore-env.patch b/package/boot/uboot-mediatek/patches/303-mt7986-generic-reset-button-ignore-env.patch index 45290149f3..01b4b52952 100644 --- a/package/boot/uboot-mediatek/patches/303-mt7986-generic-reset-button-ignore-env.patch +++ b/package/boot/uboot-mediatek/patches/303-mt7986-generic-reset-button-ignore-env.patch @@ -1,8 +1,8 @@ --- a/board/mediatek/mt7986/mt7986_rfb.c +++ b/board/mediatek/mt7986/mt7986_rfb.c -@@ -6,9 +6,16 @@ +@@ -5,9 +5,16 @@ + */ - #include #include +#include +#include @@ -17,7 +17,7 @@ #include #include -@@ -24,7 +31,22 @@ int board_init(void) +@@ -23,7 +30,22 @@ int board_init(void) int board_late_init(void) { diff --git a/package/boot/uboot-mediatek/patches/304-mt7981-generic-reset-button-ignore-env.patch b/package/boot/uboot-mediatek/patches/304-mt7981-generic-reset-button-ignore-env.patch index fc44334982..b3ac2aa27f 100644 --- a/package/boot/uboot-mediatek/patches/304-mt7981-generic-reset-button-ignore-env.patch +++ b/package/boot/uboot-mediatek/patches/304-mt7981-generic-reset-button-ignore-env.patch @@ -1,8 +1,8 @@ --- a/board/mediatek/mt7981/mt7981_rfb.c +++ b/board/mediatek/mt7981/mt7981_rfb.c -@@ -6,9 +6,16 @@ +@@ -5,9 +5,16 @@ + */ - #include #include +#include +#include @@ -17,7 +17,7 @@ #include #include -@@ -24,7 +31,22 @@ int board_init(void) +@@ -23,7 +30,22 @@ int board_init(void) int board_late_init(void) { diff --git a/package/boot/uboot-mediatek/patches/305-mt7988-generic-reset-button-ignore-env.patch b/package/boot/uboot-mediatek/patches/305-mt7988-generic-reset-button-ignore-env.patch index 2bbc5c1005..3f239c984a 100644 --- a/package/boot/uboot-mediatek/patches/305-mt7988-generic-reset-button-ignore-env.patch +++ b/package/boot/uboot-mediatek/patches/305-mt7988-generic-reset-button-ignore-env.patch @@ -1,10 +1,9 @@ --- a/board/mediatek/mt7988/mt7988_rfb.c +++ b/board/mediatek/mt7988/mt7988_rfb.c -@@ -4,7 +4,43 @@ +@@ -4,7 +4,42 @@ * Author: Sam Shih */ -+#include +#include +#include +#include diff --git a/package/boot/uboot-mediatek/patches/310-mt7988-select-rootdisk.patch b/package/boot/uboot-mediatek/patches/310-mt7988-select-rootdisk.patch index 28d7e0a3f6..308108e621 100644 --- a/package/boot/uboot-mediatek/patches/310-mt7988-select-rootdisk.patch +++ b/package/boot/uboot-mediatek/patches/310-mt7988-select-rootdisk.patch @@ -1,6 +1,6 @@ --- a/board/mediatek/mt7988/mt7988_rfb.c +++ b/board/mediatek/mt7988/mt7988_rfb.c -@@ -11,7 +11,9 @@ +@@ -10,7 +10,9 @@ #include #include #include @@ -10,7 +10,7 @@ #ifndef CONFIG_RESET_BUTTON_LABEL #define CONFIG_RESET_BUTTON_LABEL "reset" -@@ -44,3 +46,54 @@ int board_late_init(void) +@@ -43,3 +45,54 @@ int board_late_init(void) env_relocate(); return 0; } diff --git a/package/boot/uboot-mediatek/patches/311-mt7986-select-rootdisk.patch b/package/boot/uboot-mediatek/patches/311-mt7986-select-rootdisk.patch index 3312162765..3588dc2a88 100644 --- a/package/boot/uboot-mediatek/patches/311-mt7986-select-rootdisk.patch +++ b/package/boot/uboot-mediatek/patches/311-mt7986-select-rootdisk.patch @@ -1,6 +1,6 @@ --- a/board/mediatek/mt7986/mt7986_rfb.c +++ b/board/mediatek/mt7986/mt7986_rfb.c -@@ -11,7 +11,9 @@ +@@ -10,7 +10,9 @@ #include #include #include @@ -10,7 +10,7 @@ #ifndef CONFIG_RESET_BUTTON_LABEL #define CONFIG_RESET_BUTTON_LABEL "reset" -@@ -83,3 +85,54 @@ int board_nmbm_init(void) +@@ -82,3 +84,54 @@ int board_nmbm_init(void) return 0; } diff --git a/package/boot/uboot-mediatek/patches/312-mt7622-select-rootdisk.patch b/package/boot/uboot-mediatek/patches/312-mt7622-select-rootdisk.patch index 70cbf6b463..44caf8465c 100644 --- a/package/boot/uboot-mediatek/patches/312-mt7622-select-rootdisk.patch +++ b/package/boot/uboot-mediatek/patches/312-mt7622-select-rootdisk.patch @@ -1,6 +1,6 @@ --- a/board/mediatek/mt7622/mt7622_rfb.c +++ b/board/mediatek/mt7622/mt7622_rfb.c -@@ -11,7 +11,9 @@ +@@ -10,7 +10,9 @@ #include #include #include @@ -10,7 +10,7 @@ #ifndef CONFIG_RESET_BUTTON_LABEL #define CONFIG_RESET_BUTTON_LABEL "reset" -@@ -22,10 +24,43 @@ +@@ -21,10 +23,43 @@ #include #include @@ -54,7 +54,7 @@ return 0; } -@@ -83,3 +118,84 @@ int board_nmbm_init(void) +@@ -82,3 +117,84 @@ int board_nmbm_init(void) return 0; } diff --git a/package/boot/uboot-mediatek/patches/314-mt7981-select-rootdisk.patch b/package/boot/uboot-mediatek/patches/314-mt7981-select-rootdisk.patch index 05b620a276..8c13a70468 100644 --- a/package/boot/uboot-mediatek/patches/314-mt7981-select-rootdisk.patch +++ b/package/boot/uboot-mediatek/patches/314-mt7981-select-rootdisk.patch @@ -1,6 +1,6 @@ --- a/board/mediatek/mt7981/mt7981_rfb.c +++ b/board/mediatek/mt7981/mt7981_rfb.c -@@ -11,7 +11,9 @@ +@@ -10,7 +10,9 @@ #include #include #include @@ -10,7 +10,7 @@ #ifndef CONFIG_RESET_BUTTON_LABEL #define CONFIG_RESET_BUTTON_LABEL "reset" -@@ -81,3 +83,54 @@ int board_nmbm_init(void) +@@ -80,3 +82,54 @@ int board_nmbm_init(void) return 0; } @@ -81,9 +81,9 @@ +CONFIG_OF_SYSTEM_SETUP=y --- a/configs/mt7981_rfb_defconfig +++ b/configs/mt7981_rfb_defconfig -@@ -134,3 +134,4 @@ CONFIG_DM_SPI=y - CONFIG_MTK_SPIM=y +@@ -135,3 +135,4 @@ CONFIG_MTK_SPIM=y CONFIG_HEXDUMP=y + # CONFIG_EFI_LOADER is not set CONFIG_LMB_MAX_REGIONS=64 +CONFIG_OF_SYSTEM_SETUP=y --- a/configs/mt7981_sd_rfb_defconfig diff --git a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch index a4cb75b277..8768879d94 100644 --- a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch +++ b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch @@ -332,7 +332,7 @@ +}; --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -1222,6 +1222,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ +@@ -1187,6 +1187,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-rfb.dtb \ mt7623a-unielec-u7623-02-emmc.dtb \ mt7622-bananapi-bpi-r64.dtb \ diff --git a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch index 3a743384af..e41562e90b 100644 --- a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch +++ b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch @@ -739,7 +739,7 @@ +}; --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -1223,6 +1223,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ +@@ -1188,6 +1188,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7623a-unielec-u7623-02-emmc.dtb \ mt7622-bananapi-bpi-r64.dtb \ mt7622-linksys-e8450-ubi.dtb \ @@ -917,7 +917,7 @@ DECLARE_GLOBAL_DATA_PTR; -@@ -397,6 +398,20 @@ static int initr_onenand(void) +@@ -396,6 +397,20 @@ static int initr_onenand(void) } #endif @@ -938,7 +938,7 @@ #ifdef CONFIG_MMC static int initr_mmc(void) { -@@ -681,6 +696,9 @@ static init_fnc_t init_sequence_r[] = { +@@ -680,6 +695,9 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_NMBM_MTD initr_nmbm, #endif diff --git a/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch b/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch index 95c9bec731..ad556b7d82 100644 --- a/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch +++ b/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch @@ -149,7 +149,7 @@ +CONFIG_LMB_MAX_REGIONS=64 --- /dev/null +++ b/configs/mt7986a_bpi-r3-mini-snand_defconfig -@@ -0,0 +1,139 @@ +@@ -0,0 +1,140 @@ +CONFIG_ARM=y +CONFIG_SYS_HAS_NONCACHED_MEMORY=y +CONFIG_POSITION_INDEPENDENT=y @@ -256,6 +256,7 @@ +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_PHY_AIROHA=y +CONFIG_PHY_AIROHA_EN8811H=y ++CONFIG_PHY_AIROHA_FW_IN_UBI=y +CONFIG_PHY_ETHERNET_ID=y +CONFIG_PHY_FIXED=y +CONFIG_DM_MDIO=y diff --git a/package/boot/uboot-mediatek/patches/452-add-xiaomi-redmi-ax6s.patch b/package/boot/uboot-mediatek/patches/452-add-xiaomi-redmi-ax6s.patch index 06c866d840..003b20a0b7 100644 --- a/package/boot/uboot-mediatek/patches/452-add-xiaomi-redmi-ax6s.patch +++ b/package/boot/uboot-mediatek/patches/452-add-xiaomi-redmi-ax6s.patch @@ -15,7 +15,7 @@ Subject: [PATCH] add xiaomi redmi ax6s --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -1225,6 +1225,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ +@@ -1190,6 +1190,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-linksys-e8450-ubi.dtb \ mt7622-ubnt-unifi-6-lr.dtb \ mt7622-ubnt-unifi-6-lr-v3.dtb \ diff --git a/package/boot/uboot-mediatek/patches/454-add-glinet-x3000.patch b/package/boot/uboot-mediatek/patches/454-add-glinet-x3000.patch index 0cad80ed5a..069a240d49 100644 --- a/package/boot/uboot-mediatek/patches/454-add-glinet-x3000.patch +++ b/package/boot/uboot-mediatek/patches/454-add-glinet-x3000.patch @@ -1,6 +1,3 @@ -diff --git a/arch/arm/dts/mt7981-glinet-gl-x3000.dts b/arch/arm/dts/mt7981-glinet-gl-x3000.dts -new file mode 100644 -index 0000000..911a702 --- /dev/null +++ b/arch/arm/dts/mt7981-glinet-gl-x3000.dts @@ -0,0 +1,144 @@ @@ -148,9 +145,6 @@ index 0000000..911a702 +&uart0 { + status = "okay"; +}; -diff --git a/configs/mt7981_glinet_gl-x3000_defconfig b/configs/mt7981_glinet_gl-x3000_defconfig -new file mode 100644 -index 0000000..96ad96f --- /dev/null +++ b/configs/mt7981_glinet_gl-x3000_defconfig @@ -0,0 +1,100 @@ @@ -254,9 +248,6 @@ index 0000000..96ad96f +# CONFIG_EFI_LOADER is not set +CONFIG_LMB_MAX_REGIONS=64 +# CONFIG_TOOLS_LIBCRYPTO is not set -diff --git a/glinet_gl-x3000_env b/glinet_gl-x3000_env -new file mode 100644 -index 0000000..e624e41 --- /dev/null +++ b/glinet_gl-x3000_env @@ -0,0 +1,26 @@