Skip to content

system/toybox: Add toybox a tool box similar to busybox - #3722

Merged
cederom merged 1 commit into
apache:masterfrom
acassis:toybox
Aug 15, 2026
Merged

system/toybox: Add toybox a tool box similar to busybox#3722
cederom merged 1 commit into
apache:masterfrom
acassis:toybox

Conversation

@acassis

@acassis acassis commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Toybox is the tool box used on Android by default. Adding it to NuttX allows to have more advanced features from Linux, even better support for shell scripts.

Required: apache/nuttx#19818

Impact

User could use a shell more similar to Linux and even use real shell scripts from Linux

Testing

$ ./nuttx 

Toybox 0.8.14-nuttx for NuttX -- 'help' lists commands, 'exit' leaves the prompt.

toybox> help
[ base64 basename cal cat chgrp chmod chown cksum clear cmp comm cp
cpio cut date dd df diff dirname dos2unix du echo egrep env expand
expr fallocate false fgrep file find fmt free fsync getopt grep groups
gunzip gzip head help hostname id kill killall ln logname ls md5sum
mkdir mkfifo mktemp mv nice nl nohup nproc od paste pgrep pidof pkill
printenv printf prlimit ps pwd readlink realpath renice rev rm rmdir
sed seq setsid sha1sum sha224sum sha256sum sha384sum sha512sum sleep
sort split stat strings sync tac tail tar tee test time timeout touch
tr true truncate ulimit uname uniq unix2dos unlink uptime usleep uudecode
uuencode uuidgen wc which whoami xargs xxd yes zcat 

toybox> uname -a
NuttX  0.0.0 6c5a59b1-dirty Aug 12 2026 14:38:48 sim Toybox

toybox> ls /dev
console  gpio1  gpio3  null     ram0  rtc0
gpio0    gpio2  loop   oneshot  ram1  zero
toybox> 

@cederom

cederom commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Thank you @acassis amazing feature!! :-)

There are more patches than code.. do you think it would be possible to patch the upstream or not really possible and we need to perform all these patches downstream? :-)

I found documentation PR here apache/nuttx#19818 and updated the PR description :-)

@acassis

acassis commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @acassis amazing feature!! :-)

There are more patches than code.. do you think it would be possible to patch the upstream or not really possible and we need to perform all these patches downstream? :-)

I found documentation PR here apache/nuttx#19818 and updated the PR description :-)

Yes, I think many of these PR could be submitted upstream, but I don't know how opened they are to add NuttX support. So getting it working on NuttX and letting more people testing at same time is better.

Oh, I think we update the title at the same time

cederom
cederom previously approved these changes Aug 12, 2026

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @acassis amazing feature and great work!! :-)

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31626309080

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31732743952

jerpelea
jerpelea previously approved these changes Aug 15, 2026
@jerpelea

Copy link
Copy Markdown
Contributor

master depends on it github.com/apache/nuttx/pull/19843

@github-actions

Copy link
Copy Markdown

❌ Cross-repo dependency could not be applied

The Build report says the declared dependency PR(s) could not be applied, so CI did not run against the combined code:

Reason: cherry-pick failed (if your PR has merge commits, rebase instead)

CI run: https://github.com/apache/nuttx-apps/actions/runs/31867055241

@jerpelea

Copy link
Copy Markdown
Contributor

CI Error
File "/usr/local/lib/python3.10/dist-packages/ntfc/device/host.py", line 139, in host_open
raise TimeoutError("device boot timeout")
TimeoutError: device boot timeout

@raiden00pl

Copy link
Copy Markdown
Member

@jerpelea we have two broken things in CI at once: toybox defconfig and NTFC. NTFC should be fixed by #3727

Toybox is the toolbox used on Android by default. Adding it to NuttX
allows to have more advanced features from Linux, even better support
for shell scripts.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
@acassis

acassis commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

CI Error File "/usr/local/lib/python3.10/dist-packages/ntfc/device/host.py", line 139, in host_open raise TimeoutError("device boot timeout") TimeoutError: device boot timeout

I just rebased to follow the CI suggested fix

@cederom
cederom merged commit 84ffa84 into apache:master Aug 15, 2026
42 checks passed
@cederom

cederom commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

This merge is needed to unbrick the CI lets move any further updates to dedicated PRs when needed, thank you again @acassis for this amazing new feature! :-)

@xiaoxiang781216

xiaoxiang781216 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

This merge is needed to unbrick the CI lets move any further updates to dedicated PRs when needed, thank you again @acassis for this amazing new feature! :-)

@acassis there still has many hacks, let's refine these patches by either:

  1. upstream to toybox
  2. improve NuttX kernel/libc

to reduce these patches as small as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants