Skip to contentSkip to conversation

vexpress64: Fix bootargs when building without NET

PATCH In review Chanho Park 3 participants 3 messages Jan 15, 2025 – Jan 22, 2025 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vexpress64: Fix bootargs when building without NET

When building without DHCP/PXE configurations (NET disabled), compilation errors may occur due to mismatched bootargs. Ensure bootargs related to DHCP/PXE are not enabled if the corresponding commands are disabled.

include/config_distro_bootcmd.h:443:9: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’

  443 |         BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 include/configs/vexpress_aemv8.h | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)
include/configs/vexpress_aemv8.h +18 -6
index 8020689e39ee..b5a17f93efca 100644
@@ -154,6 +154,18 @@
 #define FUNC_MMC(func)
 #endif
 
+#if CONFIG_IS_ENABLED(CMD_PXE)
+#define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
+#else
+#define BOOT_TARGET_PXE(func)
+#endif
+
+#if CONFIG_IS_ENABLED(CMD_DHCP)
+#define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
+#else
+#define BOOT_TARGET_DHCP(func)
+#endif
+
 /*
  * Boot by loading an Android image, or kernel, initrd and FDT through
  * semihosting into DRAM.
@@ -188,8 +200,8 @@
 	func(SATA, sata, 0)		\
 	func(SATA, sata, 1)		\
 	FUNC_VIRTIO(func)		\
-	func(PXE, pxe, na)		\
-	func(DHCP, dhcp, na)		\
+	BOOT_TARGET_PXE(func)		\
+	BOOT_TARGET_DHCP(func)		\
 	func(AFS, afs, na)
 
 #define VEXPRESS_KERNEL_ADDR		0x80080000
@@ -212,8 +224,8 @@
 	func(MEM, mem, na)		\
 	FUNC_VIRTIO(func)		\
 	FUNC_MMC(func)			\
-	func(PXE, pxe, na)		\
-	func(DHCP, dhcp, na)
+	BOOT_TARGET_PXE(func)		\
+	BOOT_TARGET_DHCP(func)
 
 #define VEXPRESS_KERNEL_ADDR		0x80080000
 #define VEXPRESS_PXEFILE_ADDR		0x8fa00000
@@ -234,8 +246,8 @@
 #define BOOT_TARGET_DEVICES(func)	\
 	func(MEM, mem, na)		\
 	FUNC_VIRTIO(func)		\
-	func(PXE, pxe, na)		\
-	func(DHCP, dhcp, na)
+	BOOT_TARGET_PXE(func)		\
+	BOOT_TARGET_DHCP(func)
 
 #define VEXPRESS_KERNEL_ADDR		0x00200000
 #define VEXPRESS_PXEFILE_ADDR		0x0fb00000
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Chanho Park

When building without DHCP/PXE configurations (NET disabled), compilation errors may occur due to mismatched bootargs. Ensure bootargs related to DHCP/PXE are not enabled if the corresponding commands are disabled.

include/config_distro_bootcmd.h:443:9: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’

  443 |         BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Makes sense to me:

Maybe expand the commit message to show how the current config strings for PXE or DHCP boot will be passed on to the actual strings landing on the target.

Can we enable both PXE and DHCP at the same time? I hope not because then the result will be a mishmash.

Yours,
Linus Walleij

#2 lore raw
In reply to Chanho Park
Quoted 11 lines · Chanho Park

When building without DHCP/PXE configurations (NET disabled), compilation errors may occur due to mismatched bootargs. Ensure bootargs related to DHCP/PXE are not enabled if the corresponding commands are disabled.

include/config_distro_bootcmd.h:443:9: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’

  443 |         BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom