Update to latest U-Boot release.
Patches refreshed and fixed when needed.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
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
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)
--- 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
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
+ * Author: Weijie Gao <weijie.gao@mediatek.com>
+ */
+
-+#include <common.h>
++#include <config.h>
+#include <dm.h>
+#include <malloc.h>
+#include <mapmem.h>
+#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>
+ * Author: Weijie Gao <weijie.gao@mediatek.com>
+ */
+
-+#include <common.h>
++#include <config.h>
+#include <dm.h>
+#include <dm/uclass.h>
+#include <malloc.h>
+};
--- 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,
--- 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;
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
--- 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"
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/
--- 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
#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
--- 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
--- 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;
}
#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"
#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,
+};
--- 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,
--- 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
--- 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;
}
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;
--- 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 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 */
}
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;
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;
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;
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;
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))
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;
};
/*
* 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,
{
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;
break;
}
break;
-@@ -483,7 +523,8 @@ enum bootmenu_key bootmenu_autoboot_loop
+@@ -481,7 +521,8 @@ enum bootmenu_key bootmenu_autoboot_loop
return key;
}
{
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;
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,
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
}
}
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) {
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) {
--- 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)
{
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
--- 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 \
--- 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:
--- 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) },
{ 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)},
{
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)
},
{
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) },
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[] = {
--- 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.
+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 ||
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
-@@ -213,8 +213,8 @@ bad:
+@@ -212,8 +212,8 @@ bad:
return err;
}
{
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;
}
+++ 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);
--- 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;
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 */
#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;
}
+ 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);
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
-@@ -10,6 +10,11 @@
+@@ -9,6 +9,11 @@
#include <init.h>
#include <asm/global_data.h>
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;
}
--- a/board/mediatek/mt7629/mt7629_rfb.c
+++ b/board/mediatek/mt7629/mt7629_rfb.c
@@ -6,6 +6,11 @@
- #include <common.h>
+ #include <config.h>
#include <asm/global_data.h>
+#include <mtd.h>
+}
--- 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 <sam.shih@mediatek.com>
*/
-+#include <common.h>
+#include <config.h>
+#include <env.h>
+#include <init.h>
+}
--- 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 <sam.shih@mediatek.com>
*/
-+#include <common.h>
+#include <config.h>
+#include <env.h>
+#include <init.h>
--- 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.
+
+/* INCLUDE FILE DECLARATIONS
+ */
-+#include <common.h>
++#include <config.h>
+#include <phy.h>
+#include <errno.h>
+#include <version.h>
+
+/* INCLUDE FILE DECLARATIONS
+*/
-+#include <common.h>
++#include <config.h>
+#include <eth_phy.h>
+#include <phy.h>
+#include <errno.h>
+ }
+
+#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);
+
--- 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;
}
--- 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)
{
--- 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";
}
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);
--- 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);
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;
}
--- 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.
--- 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;
--- 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);
+++ b/board/mediatek/mt7623/mt7623_rfb.c
@@ -5,6 +5,7 @@
- #include <common.h>
+ #include <config.h>
#include <mmc.h>
+#include <part.h>
#include <asm/global_data.h>
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
-@@ -6,9 +6,16 @@
+@@ -5,9 +5,16 @@
+ */
- #include <common.h>
#include <config.h>
+#include <dm.h>
+#include <button.h>
#include <mtd.h>
#include <linux/mtd/mtd.h>
-@@ -24,7 +31,22 @@ int board_init(void)
+@@ -23,7 +30,22 @@ int board_init(void)
int board_late_init(void)
{
}
--- 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"
@@ -4,9 +4,18 @@
*/
- #include <common.h>
+ #include <config.h>
+#include <dm.h>
+#include <button.h>
+#include <env.h>
--- a/board/mediatek/mt7986/mt7986_rfb.c
+++ b/board/mediatek/mt7986/mt7986_rfb.c
-@@ -6,9 +6,16 @@
+@@ -5,9 +5,16 @@
+ */
- #include <common.h>
#include <config.h>
+#include <dm.h>
+#include <button.h>
#include <mtd.h>
#include <linux/mtd/mtd.h>
-@@ -24,7 +31,22 @@ int board_init(void)
+@@ -23,7 +30,22 @@ int board_init(void)
int board_late_init(void)
{
--- a/board/mediatek/mt7981/mt7981_rfb.c
+++ b/board/mediatek/mt7981/mt7981_rfb.c
-@@ -6,9 +6,16 @@
+@@ -5,9 +5,16 @@
+ */
- #include <common.h>
#include <config.h>
+#include <dm.h>
+#include <button.h>
#include <mtd.h>
#include <linux/mtd/mtd.h>
-@@ -24,7 +31,22 @@ int board_init(void)
+@@ -23,7 +30,22 @@ int board_init(void)
int board_late_init(void)
{
--- 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 <sam.shih@mediatek.com>
*/
-+#include <common.h>
+#include <config.h>
+#include <dm.h>
+#include <button.h>
--- a/board/mediatek/mt7988/mt7988_rfb.c
+++ b/board/mediatek/mt7988/mt7988_rfb.c
-@@ -11,7 +11,9 @@
+@@ -10,7 +10,9 @@
#include <env.h>
#include <init.h>
#include <asm/global_data.h>
#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;
}
--- a/board/mediatek/mt7986/mt7986_rfb.c
+++ b/board/mediatek/mt7986/mt7986_rfb.c
-@@ -11,7 +11,9 @@
+@@ -10,7 +10,9 @@
#include <env.h>
#include <init.h>
#include <asm/global_data.h>
#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;
}
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
-@@ -11,7 +11,9 @@
+@@ -10,7 +10,9 @@
#include <env.h>
#include <init.h>
#include <asm/global_data.h>
#ifndef CONFIG_RESET_BUTTON_LABEL
#define CONFIG_RESET_BUTTON_LABEL "reset"
-@@ -22,10 +24,43 @@
+@@ -21,10 +23,43 @@
#include <nmbm/nmbm.h>
#include <nmbm/nmbm-mtd.h>
return 0;
}
-@@ -83,3 +118,84 @@ int board_nmbm_init(void)
+@@ -82,3 +117,84 @@ int board_nmbm_init(void)
return 0;
}
--- a/board/mediatek/mt7981/mt7981_rfb.c
+++ b/board/mediatek/mt7981/mt7981_rfb.c
-@@ -11,7 +11,9 @@
+@@ -10,7 +10,9 @@
#include <env.h>
#include <init.h>
#include <asm/global_data.h>
#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;
}
+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
+};
--- 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 \
+};
--- 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 \
DECLARE_GLOBAL_DATA_PTR;
-@@ -397,6 +398,20 @@ static int initr_onenand(void)
+@@ -396,6 +397,20 @@ static int initr_onenand(void)
}
#endif
#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
+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
+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
--- 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/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 @@
+&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 @@
+# 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 @@