Skip to contentSkip to conversation

building u-boot without pxe, dhcp, etc.

DISCUSSION [email protected] 2 participants 3 messages Nov 1, 2025 – Nov 2, 2025

lore
Share & tools
lore
#0 lore raw

I want to build u-boot without a network stack (the target machine only needs to boot from usb, nvme and mmc devices) but disabling pxe causes a dependency problem. Does anyone know how to resolve this?

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/config_distro_bootcmd.h:475:9: note: in expansion of macro ‘BOOTENV_DEV_NAME_PXE’
  475 |         BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance, ## __VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~
include/configs/sifive-unmatched.h:24:9: note: in expansion of macro ‘BOOTENV_DEV_NAME’
   24 |         func(PXE, pxe, na) \
      |         ^~~~
include/config_distro_bootcmd.h:477:25: note: in expansion of macro ‘BOOT_TARGET_DEVICES’
  477 |         "boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0"
      |                         ^~~~~~~~~~~~~~~~~~~
include/config_distro_bootcmd.h:497:9: note: in expansion of macro ‘BOOTENV_BOOT_TARGETS’
  497 |         BOOTENV_BOOT_TARGETS \
      |         ^~~~~~~~~~~~~~~~~~~~
include/configs/sifive-unmatched.h:51:9: note: in expansion of macro ‘BOOTENV’
   51 |         BOOTENV
      |         ^~~~~~~
include/env_default.h:120:9: note: in expansion of macro ‘CFG_EXTRA_ENV_SETTINGS’
  120 |         CFG_EXTRA_ENV_SETTINGS
      |         ^~~~~~~~~~~~~~~~~~~~~~

In file included from env/common.c:32:
include/env_default.h:27:36: note: to match this ‘{’
27 | const char default_environment[] = {
| ^
make[1]: *** [scripts/Makefile.build:256: env/common.o] Error 1
make: *** [Makefile:1857: env] Error 2

Signature · 1 line
  [email protected]
#1 lore raw
Quoted 2 lines · On Sat, Nov 1, 2025 at 12:15 PM <[email protected]> wrote:

I want to build u-boot without a network stack (the target machine only needs to boot from usb, nvme and mmc devices) but disabling pxe causes a dependency problem. Does anyone know how to resolve this?

Try passing CONFIG_NO_NET=y in your defconfig file.

#2 lore raw

This seems to work for the latest u-boot but not the version I'm trying to build (v2023.10). I did figure it out though. "BOOT_TARGET_DEVICES" is defined in u-boot/include/configs/[board].h and I just had to remove the lines for PXE and DHCP. The comment at line 12 in config_distro_bootcmd.h explains the odd-looking error I was getting.

Signature · 1 line
  [email protected]
Quoted 5 lines · Fabio Estevam
Quoted 2 lines · On Sat, Nov 1, 2025 at 12:15 PM <[email protected]> wrote:

I want to build u-boot without a network stack (the target machine only needs to boot from usb, nvme and mmc devices) but disabling pxe causes a dependency problem. Does anyone know how to resolve this?

Try passing CONFIG_NO_NET=y in your defconfig file.