-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
44 changed files
with
112 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 <[email protected]> | |
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 <[email protected]> | |
+ * Author: Weijie Gao <[email protected]> | ||
+ */ | ||
+ | ||
+#include <common.h> | ||
+#include <config.h> | ||
+#include <dm.h> | ||
+#include <malloc.h> | ||
+#include <mapmem.h> | ||
|
@@ -1896,7 +1896,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
+#ifndef _MTK_SNAND_OS_H_ | ||
+#define _MTK_SNAND_OS_H_ | ||
+ | ||
+#include <common.h> | ||
+#include <config.h> | ||
+#include <cpu_func.h> | ||
+#include <errno.h> | ||
+#include <div64.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
+ * Author: Weijie Gao <[email protected]> | ||
+ */ | ||
+ | ||
+#include <common.h> | ||
+#include <config.h> | ||
+#include <dm.h> | ||
+#include <dm/uclass.h> | ||
+#include <malloc.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -370,7 +370,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
+}; | ||
--- 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, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 <[email protected]> | |
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 <[email protected]> | |
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/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 <[email protected]> | |
#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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ Signed-off-by: SkyLake.Huang <[email protected]> | |
|
||
--- 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,15 +63,15 @@ Signed-off-by: SkyLake.Huang <[email protected]> | |
#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 <name>\n" | ||
+ "mtd markbad <name> <off>\n" | ||
#if CONFIG_IS_ENABLED(CMD_MTD_OTP) | ||
"mtd otpread <name> [u|f] <off> <size>\n" | ||
"mtd otpwrite <name> <off> <hex string>\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, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,7 +240,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
+}; | ||
--- 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, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 <[email protected]> | |
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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,15 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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; | ||
+ int choice = -1; | ||
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 <[email protected]> | |
} | ||
|
||
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 <[email protected]> | |
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 <[email protected]> | |
|
||
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,15 +84,15 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
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; | ||
+ menu->last_choiced = false; | ||
|
||
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 <[email protected]> | |
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 <[email protected]> | |
/* | ||
* 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 <[email protected]> | |
{ | ||
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 <[email protected]> | |
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 <[email protected]> | |
{ | ||
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 <[email protected]> | |
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 <[email protected]> | |
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 <[email protected]> | |
|
||
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 <[email protected]> | |
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) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ Signed-off-by: Weijie Gao <[email protected]> | |
|
||
--- 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 \ | ||
|
Oops, something went wrong.