From 30c193e1472b3c8ddc6383233c3dcdf216656e4e Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 8 Aug 2024 11:44:13 +0300 Subject: [PATCH] build/bin: Remove nsh from the final ROMFS nsh is the init process, which resides in sbin/init. The user should not have rights to execute nsh. --- platforms/nuttx/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index dc4a97f59ca3..d26daa5f699f 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -254,7 +254,7 @@ if (CONFIG_BUILD_KERNEL) # Create the initial boot ROMFS (which contains nsh) add_custom_target(boot_bins - COMMAND cp ${PX4_BINARY_DIR}/bin/nsh ${PX4_BINARY_DIR}/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 nuttx_app_bins