nuttx-apps icon indicating copy to clipboard operation
nuttx-apps copied to clipboard

apps: decouple signal support

Open extinguish opened this issue 2 months ago • 9 comments

Summary

Depencies: https://github.com/apache/nuttx/pull/17352.

Added support for signal decoupling, primarily involving modifications to the following modules in the apps: ostest, nsh/tools, netutils, and the cu tool.

  1. ostest: When CONFIG_DISABLE_SIGNALS=y, certain tests that rely on signal functionality need to be disabled.
  2. nsh/tools: Functionalities dependent on the signal module have been made configurable, allowing most parts of nsh to remain usable even when CONFIG_DISABLE_SIGNALS=y.
  3. netutils: Ensures basic usability of certain network functionalities when signals are disabled.
  4. cu tool: Refactored portions of the cu module implementation to maintain its usability under signal-disabled conditions.

Impact

No adjustments were made to the functional logic; support was only added for when CONFIG_DISABLE_SIGNALS=y.

Testing

  1. has passed the ostest

extinguish avatar Nov 20 '25 13:11 extinguish

Thank you @extinguish great work!

This PR is a prototype for testing and goes in pair with apache/nuttx#17352. Needs careful review and testing. When parent PR is merged this one goes in pair :-)

I am just marking RC here not to merge by accident :-)

@cederom this patch need be merged first to unlock ci error on https://github.com/apache/nuttx/pull/17352. If the community accept to add DISABLE_SIGNALS option, it's better to merge this simple pr first, so we can ensure the kernel side change don't break any build.

xiaoxiang781216 avatar Nov 24 '25 08:11 xiaoxiang781216

@xiaoxiang781216 Do you know if @extinguish is doing it coordinated with @wangchdo ? Otherwise we will have many issues.

acassis avatar Nov 24 '25 10:11 acassis

@xiaoxiang781216 Do you know if @extinguish is doing it coordinated with @wangchdo ? Otherwise we will have many issues.

@extinguish 's userspace change is the subset of @wangchdo 's since @wangchdo disable the full signal feature.

xiaoxiang781216 avatar Nov 24 '25 11:11 xiaoxiang781216

If the community agree to disable signal with option, it's better to merge this pr first, so both @extinguish and @wangchdo 's change can move forward and verify with ci. @cederom @acassis

xiaoxiang781216 avatar Nov 25 '25 02:11 xiaoxiang781216

@extinguish there are some errors, i.e.:

Configuration/Tool: lm3s6965-ek/qemu-protected,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2025-11-25 09:18:02
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Building NuttX...
arm-none-eabi-ld: /github/workspace/sources/nuttx/staging//libapps.a(test_symtab.o):(.rodata.g_elf_exports+0xe4): undefined reference to `register_driver'
arm-none-eabi-ld: /github/workspace/sources/nuttx/staging//libapps.a(test_symtab.o):(.rodata.g_elf_exports+0x15c): undefined reference to `unregister_driver'
make[1]: *** [Makefile:61: nuttx_user.elf] Error 1
make[1]: Target 'all' not remade because of errors.
make: *** [tools/Unix.mk:541: nuttx] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory

acassis avatar Nov 25 '25 10:11 acassis

@extinguish there are some errors, i.e.:

Configuration/Tool: lm3s6965-ek/qemu-protected,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2025-11-25 09:18:02
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Building NuttX...
arm-none-eabi-ld: /github/workspace/sources/nuttx/staging//libapps.a(test_symtab.o):(.rodata.g_elf_exports+0xe4): undefined reference to `register_driver'
arm-none-eabi-ld: /github/workspace/sources/nuttx/staging//libapps.a(test_symtab.o):(.rodata.g_elf_exports+0x15c): undefined reference to `unregister_driver'
make[1]: *** [Makefile:61: nuttx_user.elf] Error 1
make[1]: Target 'all' not remade because of errors.
make: *** [tools/Unix.mk:541: nuttx] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory

this is fixed in updated pull request

extinguish avatar Nov 25 '25 13:11 extinguish

@extinguish but the same error still report.

xiaoxiang781216 avatar Nov 25 '25 15:11 xiaoxiang781216

@extinguish but the same error still report.

Got it, I'm fixing it now, this is a new issue introduced by supporting the protect build process for mksym_tab.c.

extinguish avatar Nov 26 '25 01:11 extinguish

@extinguish but the same error still report.

the "examples/elf project refactor and disable signal procedure" is separate to a new pull request, and the new pull request is based on https://github.com/apache/nuttx-apps/pull/3223, after https://github.com/apache/nuttx-apps/pull/3223 is review passed and merged, the examples/elf refactor pull request will upstreaming

extinguish avatar Nov 27 '25 01:11 extinguish