Problems with 'make menuconfig'

Hi guys, Bruno from Brazil here.

I’m newbie to PX4 and I’m trying to change some Nuttx configurations with make px4_configuration menuconfig. But when I exit the Nuttx menuconfig the build stops due to this Fatal error: Path ‘nuttx-configs/px4_configuration/nsh/defconfig’ does not exist in ‘HEAD’. Plese, could anyone here say what I am doing wrong?

Ps: I have already installed in my PC the kconfig-frontends in usr/local/bin and I already added this to $PATH.

When I was messing with some custom hardware configs last week I was getting exactly the same error, that the “defconfig” does not exist in “HEAD”. This error popped up when I used the ./configure.sh inside the directories.
The PX4 documented “make board_name menuconfig” doesn’t even build for me, just crashes, I don’t get to see the NuttX config UI.
I’ve installed the PX4 dev env with the script provided in their dev sections. My other post is about not linking issues but I would like to hope it’s a separate issues.
Replying so I get updates.

Rossos, last night I tryed to use ./configure.sh before make menuconfig, just as a regular Nuttx build, but the script complains about something like “There is no Make.defs file in the specified path”.
In my case, when I use make board_name menuconfig, the menu appears to me and I am able to interact with it, but when I exit I have this output in my terminal:

*** End of the configuration.
*** Execute ‘make’ to start the build or try ‘make help’.

nuttx-configs/px4nucleoF767ZI-v1/nsh/defconfig
fatal: Path ‘nuttx-configs/px4nucleoF767ZI-v1/nsh/defconfig’ does not exist in ‘HEAD’
Fix up Board Selection

After searching inside the project, I saw that this output is due to the script nuttx_defconf_tool.sh located in Firmware/platforms/nuttx/NuttX/tools. After some research, I discovered that HEAD variable belongs to Git and now I’m trying to find out how to modify it in order to avoid this Fatal Error.

I was also able to find these bash script:

rossos@abcxyz:/src/Firmware/platforms/nuttx$ NuttX/tools/nuttx_defconf_tool.sh
Usage: NuttX/tools/nuttx_defconf_tool.sh
rossos@abcxyz:/src/Firmware/platforms/nuttx$ NuttX/tools/nuttx_defconf_tool.sh nuttx-configs/px4-stm32f4ve/nsh/defconfig
nuttx-configs/px4-stm32f4ve/nsh/defconfig
fatal: Path ‘nuttx-configs/px4-stm32f4ve/nsh/defconfig’ does not exist in ‘HEAD’
Fix up Board Selection

$ locate configure.sh
/src/Firmware/platforms/nuttx/NuttX/apps/interpreters/ficl/configure.sh
/src/Firmware/platforms/nuttx/NuttX/nuttx/tools/configure.sh

rossos@abcxyz:/src/Firmware/platforms/nuttx$ NuttX/tools/new_nuttx_px_config.sh
BASEDIR="/src/Firmware/platforms/nuttx/NuttX"
NuttX/tools/new_nuttx_px_config.sh: ERROR: Failed to determine BASEDIR: ‘$BASEDIR/cmake/posix/px4_impl_posix.cmake’ is not a regular file.

(paths have been shortened to start only at /src/Firmware)