summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-20 09:40:04 -0500
committerTom Rini <trini@konsulko.com>2022-01-20 09:40:04 -0500
commit3918376e91dac7711cf04bd06f8de80e797edfea (patch)
treef1b151d3244c876c32764feccd6edd38400cc2aa
parent280db76f1526c2e3657c013ab679a120eed8e6b7 (diff)
parent09c2debab70271fdb3b1ff89e0e7d186502c548d (diff)
Merge tag 'u-boot-amlogic-20220120' of https://source.denx.de/u-boot/custodians/u-boot-amlogic
- Disable CONFIG_NET_RANDOM_ETHADDR for android configs - meson64_android: define raw parts for bootloader to permit flashing with fastboot - vim3: configure serial# from ethaddr to permit using fastboot like sei510/610
-rw-r--r--board/amlogic/vim3/vim3.c9
-rw-r--r--configs/khadas-vim3_android_ab_defconfig1
-rw-r--r--configs/khadas-vim3_android_defconfig1
-rw-r--r--configs/khadas-vim3l_android_ab_defconfig1
-rw-r--r--configs/khadas-vim3l_android_defconfig1
-rw-r--r--include/configs/meson64_android.h2
6 files changed, 11 insertions, 4 deletions
diff --git a/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c
index 5d9ac6458d6..fcd60ab1e05 100644
--- a/board/amlogic/vim3/vim3.c
+++ b/board/amlogic/vim3/vim3.c
@@ -153,6 +153,7 @@ int misc_init_r(void)
{
u8 mac_addr[MAC_ADDR_LEN];
char efuse_mac_addr[EFUSE_MAC_SIZE], tmp[3];
+ char serial_string[EFUSE_MAC_SIZE + 1];
ssize_t len;
if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
@@ -177,5 +178,13 @@ int misc_init_r(void)
eth_env_get_enetaddr("ethaddr", mac_addr);
}
+ if (!env_get("serial#")) {
+ eth_env_get_enetaddr("ethaddr", mac_addr);
+ sprintf(serial_string, "%02X%02X%02X%02X%02X%02X",
+ mac_addr[0], mac_addr[1], mac_addr[2],
+ mac_addr[3], mac_addr[4], mac_addr[5]);
+ env_set("serial#", serial_string);
+ }
+
return 0;
}
diff --git a/configs/khadas-vim3_android_ab_defconfig b/configs/khadas-vim3_android_ab_defconfig
index 88325c37db1..c5aaaf3ce74 100644
--- a/configs/khadas-vim3_android_ab_defconfig
+++ b/configs/khadas-vim3_android_ab_defconfig
@@ -39,7 +39,6 @@ CONFIG_CMD_REGULATOR=y
CONFIG_CMD_AVB=y
CONFIG_OF_CONTROL=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_ADC=y
CONFIG_SARADC_MESON=y
CONFIG_BUTTON=y
diff --git a/configs/khadas-vim3_android_defconfig b/configs/khadas-vim3_android_defconfig
index 9305a54b1b6..f0b2c205a79 100644
--- a/configs/khadas-vim3_android_defconfig
+++ b/configs/khadas-vim3_android_defconfig
@@ -37,7 +37,6 @@ CONFIG_CMD_REGULATOR=y
CONFIG_CMD_AVB=y
CONFIG_OF_CONTROL=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_ADC=y
CONFIG_SARADC_MESON=y
CONFIG_BUTTON=y
diff --git a/configs/khadas-vim3l_android_ab_defconfig b/configs/khadas-vim3l_android_ab_defconfig
index 608b54dca24..3401c51721e 100644
--- a/configs/khadas-vim3l_android_ab_defconfig
+++ b/configs/khadas-vim3l_android_ab_defconfig
@@ -39,7 +39,6 @@ CONFIG_CMD_REGULATOR=y
CONFIG_CMD_AVB=y
CONFIG_OF_CONTROL=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_ADC=y
CONFIG_SARADC_MESON=y
CONFIG_BUTTON=y
diff --git a/configs/khadas-vim3l_android_defconfig b/configs/khadas-vim3l_android_defconfig
index 5eed79b2639..429db2b344c 100644
--- a/configs/khadas-vim3l_android_defconfig
+++ b/configs/khadas-vim3l_android_defconfig
@@ -37,7 +37,6 @@ CONFIG_CMD_REGULATOR=y
CONFIG_CMD_AVB=y
CONFIG_OF_CONTROL=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_ADC=y
CONFIG_SARADC_MESON=y
CONFIG_BUTTON=y
diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h
index 0303d187dec..1266851196d 100644
--- a/include/configs/meson64_android.h
+++ b/include/configs/meson64_android.h
@@ -283,6 +283,8 @@
EXTRA_ANDROID_ENV_SETTINGS \
"partitions=" PARTS_DEFAULT "\0" \
"mmcdev=2\0" \
+ "fastboot_raw_partition_bootloader=0x1 0xfff mmcpart 1\0" \
+ "fastboot_raw_partition_bootenv=0x0 0xfff mmcpart 2\0" \
ANDROIDBOOT_GET_CURRENT_SLOT_CMD \
AVB_VERIFY_CMD \
"force_avb=0\0" \