Update U-Boot to 2024.10
This commit is contained in:
parent
e68f2f8d4d
commit
1ccbb8877d
@ -13,17 +13,17 @@ image nor-flash.img {
|
||||
|
||||
partition u-boot {
|
||||
image = "u-boot-sunxi-with-spl.bin"
|
||||
size = 512K
|
||||
size = 1M
|
||||
}
|
||||
|
||||
partition u-boot-env1 {
|
||||
image = "/dev/zero"
|
||||
size = 256K
|
||||
size = 512K
|
||||
}
|
||||
|
||||
partition u-boot-env2 {
|
||||
image = "/dev/zero"
|
||||
size = 256K
|
||||
size = 512K
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,4 +35,4 @@ image sdcard.img {
|
||||
bootable = "true"
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,24 @@
|
||||
From db24b593e45ff3af3859fc1e6a7da634fea77bc6 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Schmid <cubecraft15@gmail.com>
|
||||
Date: Tue, 23 Apr 2024 11:08:40 +0200
|
||||
From b651bd630e8514714fcf145980bd41ef974fe670 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Schmid <lukas.schmid@netcube.li>
|
||||
Date: Wed, 1 Jan 2025 20:51:08 +0100
|
||||
Subject: [PATCH] eth: sunxi: board-init: Try to load macaddr from eeprom
|
||||
|
||||
Upstream: N/A
|
||||
|
||||
Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li>
|
||||
|
||||
---
|
||||
board/sunxi/board.c | 77 ++++++++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 59 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||
index 8c12c8de..050b8f75 100644
|
||||
index 961cdcd..5f20324 100644
|
||||
--- a/board/sunxi/board.c
|
||||
+++ b/board/sunxi/board.c
|
||||
@@ -186,6 +186,43 @@ enum env_location env_get_location(enum env_operation op, int prio)
|
||||
@@ -185,6 +185,43 @@ enum env_location env_get_location(enum env_operation op, int prio)
|
||||
return ENVL_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
+#define EEPROM_BUS_ADDR 0
|
||||
+#define EEPROM_ADDR 0x50
|
||||
+
|
||||
@ -52,39 +56,36 @@ index 8c12c8de..050b8f75 100644
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* add board specific code here */
|
||||
/* called only from U-Boot proper */
|
||||
int board_init(void)
|
||||
{
|
||||
@@ -775,28 +812,32 @@ static void setup_environment(const void *fdt)
|
||||
@@ -767,28 +804,32 @@ static void setup_environment(const void *fdt)
|
||||
if (!get_unique_sid(sid))
|
||||
return;
|
||||
|
||||
|
||||
- for (i = 0; i < 4; i++) {
|
||||
- sprintf(ethaddr, "ethernet%d", i);
|
||||
- if (!fdt_get_alias(fdt, ethaddr))
|
||||
- continue;
|
||||
+ /* Try to load the macaddr from eeprom, but fallback to sid based macaddr if failed */
|
||||
+ if (eth_addr_init() != 0) {
|
||||
+
|
||||
+ for (i = 0; i < 4; i++) {
|
||||
+ sprintf(ethaddr, "ethernet%d", i);
|
||||
+ if (!fdt_get_alias(fdt, ethaddr))
|
||||
+ continue;
|
||||
|
||||
|
||||
- if (i == 0)
|
||||
- strcpy(ethaddr, "ethaddr");
|
||||
- else
|
||||
- sprintf(ethaddr, "eth%daddr", i);
|
||||
+ for (i = 0; i < 4; i++) {
|
||||
+ sprintf(ethaddr, "ethernet%d", i);
|
||||
+ if (!fdt_get_alias(fdt, ethaddr))
|
||||
+ continue;
|
||||
|
||||
- if (env_get(ethaddr))
|
||||
- continue;
|
||||
+ if (i == 0)
|
||||
+ strcpy(ethaddr, "ethaddr");
|
||||
+ else
|
||||
+ sprintf(ethaddr, "eth%daddr", i);
|
||||
|
||||
- if (env_get(ethaddr))
|
||||
- continue;
|
||||
+ if (env_get(ethaddr))
|
||||
+ continue;
|
||||
|
||||
|
||||
- /* Non OUI / registered MAC address */
|
||||
- mac_addr[0] = (i << 4) | 0x02;
|
||||
- mac_addr[1] = (sid[0] >> 0) & 0xff;
|
||||
@ -92,6 +93,10 @@ index 8c12c8de..050b8f75 100644
|
||||
- mac_addr[3] = (sid[3] >> 16) & 0xff;
|
||||
- mac_addr[4] = (sid[3] >> 8) & 0xff;
|
||||
- mac_addr[5] = (sid[3] >> 0) & 0xff;
|
||||
+ if (env_get(ethaddr))
|
||||
+ continue;
|
||||
|
||||
- eth_env_set_enetaddr(ethaddr, mac_addr);
|
||||
+ /* Non OUI / registered MAC address */
|
||||
+ mac_addr[0] = (i << 4) | 0x02;
|
||||
+ mac_addr[1] = (sid[0] >> 0) & 0xff;
|
||||
@ -99,13 +104,11 @@ index 8c12c8de..050b8f75 100644
|
||||
+ mac_addr[3] = (sid[3] >> 16) & 0xff;
|
||||
+ mac_addr[4] = (sid[3] >> 8) & 0xff;
|
||||
+ mac_addr[5] = (sid[3] >> 0) & 0xff;
|
||||
|
||||
- eth_env_set_enetaddr(ethaddr, mac_addr);
|
||||
+
|
||||
+ eth_env_set_enetaddr(ethaddr, mac_addr);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!env_get("serial#")) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
if (!env_get("serial#")) {
|
||||
--
|
||||
2.46.1
|
@ -1,25 +0,0 @@
|
||||
From c0f338391533a5c29f84defe6433c7303cae3d40 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Schmid <cubecraft15@gmail.com>
|
||||
Date: Thu, 18 Apr 2024 12:29:56 +0200
|
||||
Subject: [PATCH] spi: sunxi: v3s: Make SPL_SPI_SUNXI also available for SUN8I_V3S
|
||||
|
||||
---
|
||||
arch/arm/mach-sunxi/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
|
||||
index fe89aec6..dd32128f 100644
|
||||
--- a/arch/arm/mach-sunxi/Kconfig
|
||||
+++ b/arch/arm/mach-sunxi/Kconfig
|
||||
@@ -1078,7 +1078,7 @@ config SPL_STACK_R_ADDR
|
||||
|
||||
config SPL_SPI_SUNXI
|
||||
bool "Support for SPI Flash on Allwinner SoCs in SPL"
|
||||
- depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I || MACH_SUN8I_R40 || SUN50I_GEN_H6 || MACH_SUNIV
|
||||
+ depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I || MACH_SUN8I_R40 || SUN50I_GEN_H6 || MACH_SUNIV || MACH_SUN8I_V3S
|
||||
help
|
||||
Enable support for SPI Flash. This option allows SPL to read from
|
||||
sunxi SPI Flash. It uses the same method as the boot ROM, so does
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_SF_DEFAULT_SPEED=40000000
|
||||
CONFIG_ENV_SIZE=0x40000
|
||||
CONFIG_ENV_OFFSET=0x80000
|
||||
CONFIG_ENV_SIZE=0x80000
|
||||
CONFIG_ENV_OFFSET=0x100000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun8i-v3s-netcube-kumquat"
|
||||
CONFIG_SPL=y
|
||||
CONFIG_ENV_OFFSET_REDUND=0xc0000
|
||||
CONFIG_ENV_OFFSET_REDUND=0x180000
|
||||
CONFIG_MACH_SUN8I_V3S=y
|
||||
CONFIG_DRAM_CLK=360
|
||||
CONFIG_SPL_SPI_SUNXI=y
|
||||
@ -13,6 +13,8 @@ CONFIG_SPL_SPI_SUNXI=y
|
||||
# CONFIG_TIMESTAMP is not set
|
||||
CONFIG_SPI_BOOT=y
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_PREBOOT=""
|
||||
# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||||
CONFIG_SPL_MTD=y
|
||||
CONFIG_SYS_PROMPT="Kumquat> "
|
||||
CONFIG_CMD_EEPROM=y
|
||||
@ -20,7 +22,7 @@ CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MTD=y
|
||||
CONFIG_CMD_RTC=y
|
||||
CONFIG_MTDIDS_DEFAULT="nor0=firmware"
|
||||
CONFIG_MTDPARTS_DEFAULT="mtdparts=firmware:512k(u-boot)ro,256k(u-boot-env1),256k(u-boot-env2),-(user)"
|
||||
CONFIG_MTDPARTS_DEFAULT="mtdparts=firmware:1M(u-boot)ro,512k(u-boot-env1),512k(u-boot-env2),-(user)"
|
||||
CONFIG_CMD_DIAG=y
|
||||
# CONFIG_ENV_IS_IN_FAT is not set
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
@ -28,7 +30,7 @@ CONFIG_ENV_SPI_MAX_HZ=1000000
|
||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_VERSION_VARIABLE=y
|
||||
# CONFIG_NET is not set
|
||||
# CONFIG_USB_FUNCTION_FASTBOOT is not set
|
||||
CONFIG_SYS_I2C_MVTWSI=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_NVMEM=y
|
||||
@ -38,6 +40,17 @@ CONFIG_MTD=y
|
||||
CONFIG_SPI_FLASH_BAR=y
|
||||
CONFIG_SPI_FLASH_WINBOND=y
|
||||
CONFIG_SPI_FLASH_MTD=y
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_PHY_SUN4I_USB=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_DS3232=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_USB_MUSB_HOST=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
CONFIG_USB_HOST_ETHER=y
|
||||
CONFIG_USB_ETHER_ASIX=y
|
||||
CONFIG_USB_ETHER_ASIX88179=y
|
||||
CONFIG_USB_ETHER_MCS7830=y
|
||||
CONFIG_USB_ETHER_RTL8152=y
|
||||
CONFIG_USB_ETHER_SMSC95XX=y
|
||||
# CONFIG_USB_ETHER is not set
|
||||
|
@ -1,7 +1,6 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_KERNEL_HEADERS_6_8=y
|
||||
BR2_SYSTEM_DHCP="eth0"
|
||||
BR2_ROOTFS_OVERLAY="board/netcube/kumquat/rootfs"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
|
||||
@ -18,14 +17,15 @@ BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INSTALL_TARGET=y
|
||||
BR2_PACKAGE_ESP_HOSTED=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_LIBGPIOD=y
|
||||
BR2_PACKAGE_LIBGPIOD_TOOLS=y
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="60M"
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.04"
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.10"
|
||||
BR2_TARGET_UBOOT_PATCH="board/netcube/kumquat/uboot-patches"
|
||||
BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE="board/netcube/kumquat/uboot_defconfig"
|
||||
|
Loading…
Reference in New Issue
Block a user