Skip to content

Commit

Permalink
NuttX/CMakeLists: Fix rule for generating boot/init (aka sbin/init)
Browse files Browse the repository at this point in the history
- The rule was for the folder boot/ while it should have been for the file
  boot/init
- The rule for bin/ ROMFS depends on boot/init as well, since nsh is moved
  from the bin/ folder and generating the bin/ ROMFS cannot be done prior
  to this step
  • Loading branch information
pussuw committed Oct 9, 2024
1 parent 43fd79f commit f08fa0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platforms/nuttx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ if (CONFIG_BUILD_KERNEL)
list(APPEND nuttx_userlibs nuttx_crt0)

# Create the initial boot ROMFS (which contains nsh)
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/boot
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/boot/init
COMMAND mv ${PX4_BINARY_DIR}/bin/nsh ${PX4_BINARY_DIR}/init
COMMAND install -D ${PX4_BINARY_DIR}/init -t ${PX4_BINARY_DIR}/boot
COMMAND rm -f ${PX4_BINARY_DIR}/init
DEPENDS ${PX4_BINARY_DIR}/bin/nsh
)
add_custom_target(boot_bins DEPENDS ${PX4_BINARY_DIR}/boot)
add_custom_target(boot_bins DEPENDS ${PX4_BINARY_DIR}/boot/init)

make_bin_romfs(
BINDIR ${PX4_BINARY_DIR}/boot
Expand Down Expand Up @@ -350,7 +350,7 @@ if (CONFIG_BUILD_KERNEL)
OUTPREFIX bin
LABEL Px4BinVol
STRIPPED "y"
DEPS nuttx_app_bins ${px4_bins}
DEPS nuttx_app_bins boot_bins ${px4_bins}
)

add_custom_command(OUTPUT ${PX4_BINARY_OUTPUT}
Expand Down

0 comments on commit f08fa0a

Please sign in to comment.