Skip to contentSkip to conversation

poplar: use random mac address

PATCH In review Igor Opaniuk 3 participants 6 messages Nov 9, 2023 – Nov 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 poplar: use random mac address

Set CONFIG_NET_RANDOM_ETHADDR=y, which sets random eth address in case there is no configuration provided neither in CONFIG_ETHADDR nor in "ethaddr" env variable.

This fixes the problem:
poplar# dhcp
Error: ethernet@9841000 address not set.

---

 configs/poplar_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/poplar_defconfig +1 -0
index f0ab2319a4..b6e0c3166c 100644
@@ -22,6 +22,7 @@ CONFIG_CMD_USB=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x20000000
 CONFIG_FASTBOOT_BUF_SIZE=0x10000000
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 poplar: provide more space for kernel image

Adjust mem layout, providing more space for linux kernel image.

This fixes the problem:
ERROR: FDT image overlaps OS image (OS=0x30000000..0x32580000)

---

 include/configs/poplar.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/configs/poplar.h +4 -4
index 6e8adf9187..629b335f5d 100644
@@ -37,11 +37,11 @@
 			"env_mmc_blknum=0xf80\0"			\
 			"env_mmc_nblks=0x80\0"				\
 			"kernel_addr_r=0x30000000\0"			\
-			"pxefile_addr_r=0x32000000\0"			\
-			"scriptaddr=0x32000000\0"			\
-			"fdt_addr_r=0x32200000\0"			\
+			"pxefile_addr_r=0x33000000\0"			\
+			"scriptaddr=0x33000000\0"			\
+			"fdt_addr_r=0x33200000\0"			\
 			"fdtfile=hisilicon/hi3798cv200-poplar.dtb\0"	\
-			"ramdisk_addr_r=0x32400000\0"			\
+			"ramdisk_addr_r=0x33400000\0"			\
 			BOOTENV
 
 #endif /* _POPLAR_H_ */
Signature · 1 line
2.34.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH v1 2/2] poplar: provide more space for kernel image

Quoted 8 lines · Igor Opaniuk

Adjust mem layout, providing more space for linux kernel image.

This fixes the problem:
ERROR: FDT image overlaps OS image (OS=0x30000000..0x32580000)

---

Quoted 27 lines
 include/configs/poplar.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/configs/poplar.h +4 -5
index 6e8adf9187..629b335f5d 100644
@@ -37,11 +37,11 @@
                        "env_mmc_blknum=0xf80\0"                        \
                        "env_mmc_nblks=0x80\0"                          \
                        "kernel_addr_r=0x30000000\0"                    \
-                       "pxefile_addr_r=0x32000000\0"                   \
-                       "scriptaddr=0x32000000\0"                       \
-                       "fdt_addr_r=0x32200000\0"                       \
+                       "pxefile_addr_r=0x33000000\0"                   \
+                       "scriptaddr=0x33000000\0"                       \
+                       "fdt_addr_r=0x33200000\0"                       \
                        "fdtfile=hisilicon/hi3798cv200-poplar.dtb\0"    \
-                       "ramdisk_addr_r=0x32400000\0"                   \
+                       "ramdisk_addr_r=0x33400000\0"                   \
                        BOOTENV
 
 #endif /* _POPLAR_H_ */
--

2.34.1

Reviewed-by on v1 1/2
#4 lore raw
In reply to Igor Opaniuk
Quoted 11 lines · Igor Opaniuk

Set CONFIG_NET_RANDOM_ETHADDR=y, which sets random eth address in case there is no configuration provided neither in CONFIG_ETHADDR nor in "ethaddr" env variable.

This fixes the problem:
poplar# dhcp
Error: ethernet@9841000 address not set.

---

Quoted 19 lines
 configs/poplar_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/poplar_defconfig +1 -1
index f0ab2319a4..b6e0c3166c 100644
@@ -22,6 +22,7 @@ CONFIG_CMD_USB=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x20000000
 CONFIG_FASTBOOT_BUF_SIZE=0x10000000
--

2.34.1