Skip to content

Commit

Permalink
nuttx/CMakeLists: Fix rule for renaming nsh -> init
Browse files Browse the repository at this point in the history
Only run the rule once i.e. if boot/init does not exist
  • Loading branch information
pussuw committed Aug 22, 2024
1 parent 237a46c commit 3496d25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platforms/nuttx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,13 @@ if (CONFIG_BUILD_KERNEL)
list(APPEND nuttx_userlibs nuttx_crt0)

# Create the initial boot ROMFS (which contains nsh)
add_custom_target(boot_bins
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/boot
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 nuttx_app_bins
)
add_custom_target(boot_bins DEPENDS ${PX4_BINARY_DIR}/boot)

make_bin_romfs(
BINDIR ${PX4_BINARY_DIR}/boot
Expand Down

0 comments on commit 3496d25

Please sign in to comment.