Commit Graph

90 Commits

Author SHA1 Message Date
Elliott Hughes
9da52af5e8 Build mount(1)/umount(1)/unshare(1) for the Linux host.
Wanted for kernel testing.

Test: treehugger
Change-Id: Ibef936a0fda4e9e43e0666e30240035a0b88fd51
2024-05-01 17:04:17 +00:00
Elliott Hughes
f5dead2d15 Add a getopt symlink.
getopt was promoted out of "pending" recently.

Change-Id: I89deb9abe0fa8f0a3561be289fc0bb5e65d25201
2024-04-19 16:17:29 +00:00
Elliott Hughes
9a71c60d33 Upgrade toybox to 7768b83385
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update external/toybox
For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md

Test: TreeHugger
Change-Id: I0ffca3826218b34768e69bd65bbc782dde38eec3
2024-03-04 20:47:12 +00:00
ThiƩbaud Weksteen
43c7614637 Add symlinks for getfattr and setfattr
These toys are useful to inspect extended attributes, such as
security.sehash. They are already being built, simply add the symlinks.

Test: build, boot and `adb shell getfattr`
Change-Id: Ie3064ae5b07b37036d6a4ab63825f0f0e1a7c30a
2024-02-16 20:08:55 +11:00
Elliott Hughes
050f77fe64 memeater: add symlink.
Test: treehugger
Change-Id: I0731e875a527c9188f76b41119625291cd9a2008
2024-02-06 00:28:17 +00:00
Elliott Hughes
ada8fec3a2 bpfmt -w Android.bp.
Test: treehugger
Change-Id: I623227ceec538f02ed96f978eec224bb0a36d867
2024-01-30 17:14:35 +00:00
Elliott Hughes
debd8a7f27 Upgrade toybox to a60c1d84fa
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update toybox
For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md

Test: TreeHugger
Change-Id: Ib55be0f365e0ad687da601a6225b1c2975cd3773
2024-01-29 16:54:36 +00:00
Elliott Hughes
e1758224a3 Add an i2ctransfer symlink.
It's been in for a while, and people seem to be using it...

Test: treehugger
Change-Id: I9709a3daaabe2f55d001375be37dccd28a670864
2023-11-14 11:06:09 -08:00
Dan Willemsen
2131fe9b55 Remove old macos deployment version
We're bumping the default deployment version up to 10.14, so this is no longer increasing the minimum.

Bug: 191879468
Change-Id: Ibba6cf5f4ff3a18e6f648a3a8d4ab232e86d1742
2023-11-08 01:13:33 +00:00
Elliott Hughes
67acb57cd0 Upgrade toybox to f7998feebd
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update toybox
For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md

Test: TreeHugger
Change-Id: Ie2047f715753410a48e3bafa4567ac53d029b578
2023-11-06 15:41:27 +00:00
Elliott Hughes
88adf49686 Use static libz on the host too.
Rather than wait until dynamic libz causes trouble, just go straight to
the more hermetic choice...

Test: treehugger
Change-Id: Ib272fb0cce4e6657cd309259816b78725f1e5ab0
2023-11-01 23:54:29 +00:00
Elliott Hughes
b24d9b776f toybox host binary: avoid ODR violations.
We were seeing crashes with both /lib/x86_64-linux-gnu/libcrypto.so.1.1
and our hermetic /home/enh_google_com/bin/../lib64/libcrypto-host.so in
the stack trace. Let's just take one of those (and preferably, "our
one"!)...

Bug: http://b/307849291
Test: `./toybox id` on an affected host
Change-Id: I6da2c8b0a911ddb2c3ecf3fc8c40e16ee65265d4
2023-11-01 19:04:47 +00:00
Colin Cross
cf9e164fb5 Wrap the toybox test scripts in a gtest binary
The test infrastructure understands the output from gtests, but can
only handle a single pass/fail status from an sh_test.  Add a cc_test
that dynamically registers each tests/*.test file as a gtest that then
execs the toybox test shell scripts.

Test: atest toybox-gtests
Change-Id: I00de1bd3dd48724998866bcd17fe05597f351b50
2023-10-13 20:34:54 +00:00
Elliott Hughes
e827a9371f Upgrade toybox to f19d41bdce
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update toybox
For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md

Test: TreeHugger
Change-Id: I9dadf1366b36acf6a89e7a8c67442ed0122c217c
2023-08-02 11:01:05 -07:00
Elliott Hughes
02b8dd491f Build flock(1) for the linux host.
We only need this for kernel builds (and it's probably a bad idea in
general), so I've only enabled it for linux hosts for now.

Bug: http://b/289137454
Test: treehugger
Change-Id: Id3d166c54edc299fcf61e52e703e7bd1116fb566
2023-06-28 09:50:07 -07:00
Andrew Evans
8f3c0f04e3 Enable gpiodetect, gpiofind, gpioget, gpioinfo, gpioset
Change-Id: I88c0d03bdcb09bd1be64620db780dc7c49cbccf8
Test: `toybox gpiodetect` on device
2023-06-09 23:10:06 +00:00
Elliott Hughes
fca565f655 Fix the documentation for adding a new toy.
Test: N/A
Change-Id: Icd1f260330d7be9e3f257612bc73f465e36a5d46
2023-04-21 15:46:27 -07:00
Elliott Hughes
75da6e6f8e Add file(1) to the host toybox.
Desired for the hermetic rustc toolchain build.

Test: treehugger
Change-Id: I1777e00d10b106951507442b29ddadf2a7d5e81b
2023-04-14 22:23:02 +00:00
Elliott Hughes
d9909513e2 Upgrade toybox to 1e3b99ea2f.
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update toybox
For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md

Test: treehugger
Change-Id: I3a14a45f2ef47a489edb252a5530b482db1f3ece
2023-04-03 17:01:12 +00:00
Elliott Hughes
5bbc23bc4f Enable the POSIX logger(1) in addition to the Android-specific log.
Longer term, I should merge the implementations of these two.

Test: adb shell logger foo
Change-Id: I0f02c44ca5d263a636ddb454daed26c2aca51287
2023-03-01 20:37:52 +00:00
Elliott Hughes
c151a0cefd Add a vi symlink.
It's very unfinished, but it's usable in a pinch, and we've had a few
requests to just have the symlink anyway.

Bug: http://b/258420715
Test: treehugger
Change-Id: I9d744eb2b94ffe35d0d74fbbd8d4e7b94ddba526
2022-11-10 16:16:09 +00:00
Keith Mok
9432e9ec2e Build brctl for Android
Test: build and run btcrl on device
Change-Id: Ib8116a39a7c54bd3aa53b1ad5e81651aee07a03a
2022-06-02 20:24:39 +00:00
Colin Cross
5c9a086808 Tweak linux_glibc properties for musl builds in external/toybox
For convenience, builds against musl libc currently use the
linux_glibc properties because they are almost always linux-specific
and not glibc-specific.  In preparation for removing this hack,
tweak the linux_glibc properties by either moving them to host_linux,
which will apply to linux_glibc, linux_musl and linux_bionic, or
by setting appropriate musl or linux_musl properties.  Properties
that must not be repeated while musl uses linux_musl and also still
uses the linux_glibc properties are moved to glibc properties, which
don't apply to musl.  Whether these stay as glibc properties or get
moved back to linux_glibc later once the musl hack is removed is TBD.

Bug: 223257095
Test: m checkbuild
Test: m USE_HOST_MUSL=true host-native
Change-Id: Icaf82930ccb8c49d84938d627a8df0f8684a9444
2022-03-08 15:12:50 -08:00
Elliott Hughes
fd8933f540 Upgrade toybox to d9301d2b7e
Test: make
Change-Id: I5450ad049bd17e29fee7c9509ea7ca1d4842b7a9
2022-02-23 13:23:52 -08:00
Elliott Hughes
9defc2ecf4 Upgrade toybox to cfa8d336db
Test: make
Change-Id: I0bdc2a7ccab6dd2759f837cc57553fbe8add29cb
2022-02-07 14:30:03 -08:00
Elliott Hughes
e3ff87be6f Upgrade toybox to ea4748a7cb
Test: make
Change-Id: I0f170938a0061aef3ca701b4b81775bdfc379007
2021-12-13 16:33:55 -08:00
Elliott Hughes
e0ccc47a57 Reland "Upgrade toybox to 1986075975db4cdab08133f8299ad72dd5af4b23".
This reverts commit c135e01052, but adds the now-necessary `-Wl,-dead_strip` to the Darwin linker flags.

Test: treehugger
Change-Id: Ie75d29692c4aaf51d84a2ba148d62cbc176c8610
2021-10-07 17:27:35 -07:00
Elliott Hughes
f3ed4bcbd1 Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: Ideb39ea6994f554f54687326895d409544c84afb
2021-05-19 16:05:01 -07:00
Yi-Yo Chiang
2d03a5e677 Fix linux_bionic build
After adding "toybox" to cvd-host_package.tar.gz,
aosp_cf_arm64_phone-userdebug failed to build with error:

  In file included from external/toybox/lib/args.c:10:
  external/toybox/toys.h:8:10: fatal error: 'generated/config.h' file
  not found
  #include "generated/config.h"
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.

This is because toybox is not configured to be built on linux_bionic
host, and aosp_cf_arm64_phone is trying to build the HOST_CROSS variant
of toybox, which is arm64 linux_bionic.

Bug: 185883642
Test: lunch aosp_cf_arm64_phone-userdebug && m
Change-Id: I64418fb5f88f8a8b8b7e6905b58cc1f7e68ab2e8
2021-04-23 08:25:56 +00:00
Bob Badour
5d35ee244c Add LOCAL_LICENSE_KINDS to external/toybox
Added SPDX-license-identifier-0BSD SPDX-license-identifier-CC0-1.0
    SPDX-license-identifier-Unlicense legacy_unencumbered
to:
  Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Change-Id: I34ed16146d7c1f73ec73371a2a070c3b8d2a5621
2021-02-12 17:29:42 +00:00
Elliott Hughes
f4f0f69ef9 Add [ symlink.
Test: adb shell [
Change-Id: Icffa1a4c5f03ddac31d4b40cb67f1f697d9b632f
2021-02-03 10:34:13 -08:00
Elliott Hughes
f7d74aaad2 Add nl(1) to the host toybox.
Bug: https://issuetracker.google.com/172470458
Test: built and ran locally on Linux and macOS
Change-Id: Ibe426ac18dbc1e1b1cc8fd3133ccf28b8dba99e6
2020-11-12 16:15:49 -08:00
Yifan Hong
d0123d6092 Introduce toybox.vendor_ramdisk.
Test: pass
Bug: 156098440
Change-Id: I9faef7735730907f0ee619e0d521bd3f8c283e85
2020-10-27 17:07:57 -07:00
Elliott Hughes
3c9b6c5d80 Try to put the static toybox binaries in the SDK build instead.
Since "ndk" didn't put them in the NDK build.

Test: treehugger
Change-Id: I45057bb23604f6119e6777b2e60c8d30493d2bf2
2020-08-25 17:04:03 -07:00
Elliott Hughes
805e1ca6fe Does this put the static toybox binaries in the NDK build?
Test: treehugger
Change-Id: I37e0138c63a136808d7a205facc970bc2359fedb
2020-08-21 16:32:38 -07:00
frankfeng
ef80c62a6a Update toybox-tests to use test config auto-gen
Bug: 148805488
Test: atest toybox-tests

Change-Id: Iba904ee7cab67e65a7629c6babd1f52ce1f0fb39
2020-07-22 23:45:15 +00:00
Elliott Hughes
838baafd2f Add host printf(1).
Test: treehugger
Change-Id: I9a9888bfbb5ffecaee86486fbd85b681b5ed615e
2020-06-04 16:30:19 -07:00
Elliott Hughes
75f9086313 Build a static toybox for the device.
Test: builds
Change-Id: I788f95e618466da9603c8d6aaab83d9b8643d5c6
2020-05-14 16:28:47 -07:00
Elliott Hughes
d5501cf66e Remove our copyright headers from build files.
Stop confusing the licensing tool which then thinks that our Apache-2.0
trumps the upstream project's 0BSD.

Test: N/A
Change-Id: I07c8c66a15fb905d326e9ba6bd3165efff5cbcea
2020-04-29 07:56:03 -07:00
Elliott Hughes
00fed19ade Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: I46fcbd8f836377cd8c8d9a80cd6395628042b52e
2020-04-17 15:10:08 -07:00
Elliott Hughes
9d5ef4f7f8 Merge remote-tracking branch 'toybox/master' into HEAD
Also build rtcwake for the device.

Bug: http://b/152042947
Test: adb shell rtcwake -u -m on -s 2 -v
Test: treehugger
Change-Id: Icec631ca0d31b623f9e177790dc18a9c1a498315
2020-04-01 21:41:57 -07:00
Elliott Hughes
5fd364093f Build cpio for the host too.
Needed by the Linux kernel build.

Bug: http://b/152339525
Test: toybox cpio --help
Change-Id: I830cdc477b1fc6cd69a2c0d6916dbac4d60071ea
2020-03-24 14:58:22 -07:00
Elliott Hughes
f6317e0077 Revert "Revert "Merge remote-tracking branch 'toybox/master' into HEAD""
This reverts commit def9f9e199.
2020-03-12 10:46:38 -07:00
Elliott Hughes
def9f9e199 Revert "Merge remote-tracking branch 'toybox/master' into HEAD"
Revert submission 1255204

Reason for revert: breaks 32-bit devices
Reverted Changes:
I6027d726c:Merge remote-tracking branch 'toybox/master' into ...
Iff2e13471:vi: Rearrange functions, add o, O, I
I7bfa7e874:More shell tests.
Ica950bdc2:Fix a couple of shell tests.
I952b01a4e:Snapshot of variable resolution implementation. No...
I2cc427c3b:readelf: various fixes.
I6aef1e29d:Park Ju Hyung pointed out the fast path of fdlengt...
I4793780e9:Work around gcc trying to be "helpful" again.
I377462ccf:Merge realpath into readlink, use xabspath() inste...
I337089770:Switch to FLAG() macros.
I7edf4c55d:Update the LP64 section.
I46473d568:Say command name before test result with txpect to...
I48e9a1647:Check that cross compiler is there, not linker, be...
I649d16d1e:Move "scripts/cross.sh all" log files into root/lo...
I09b319fe2:More cross.sh tweaks.
I6deda1c06:Remove another command sub-option.
I0d0a482e8:Fix 'for i in one two three; do echo =$i=; done'
I9179c493f:Yet more shell tests.
I87c8778ad:cp: fix -D (--parents) (REWORK MINIMAL FIX)
Ic631d7c4c:Next round of shell plumbing: variable expansion w...
I7e8fbed1e:modinfo: various fixes.
I398780141:Fix Mac build.

Change-Id: I6090ec471899566c4f869fdff486f2bb9ce48b4f
2020-03-12 15:47:27 +00:00
Elliott Hughes
99cc82a51d Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: I6027d726ccf19f3d6c77fedcf844b240273f5d41
2020-03-11 09:55:37 -07:00
Elliott Hughes
bd94be156c Enable test(1) for device and host.
Test: treehugger
Change-Id: I83bea17f43580e5d063339b51bbd708de980e37f
2020-02-18 11:03:49 -08:00
Elliott Hughes
bcdcee2708 Add symlinks for chattr and lsattr.
Bug: http://b/147769529
Test: manual
Change-Id: I732892a9c0b141005f52731ab9a58101aeaf4f65
2020-02-01 19:17:37 +00:00
Elliott Hughes
c719d664df Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: If441e90859203ae41caf6c2206fcb984e126f31f
2020-01-22 19:46:32 -08:00
Elliott Hughes
f3f88ad0dc Build readelf for the device.
Test: treehugger
Change-Id: Ifea90d85517ea43ce856ae8a3368de61c8705af7
2020-01-14 19:35:30 -08:00
Elliott Hughes
f199e015cf Build vi.
I'm not sure this is ready for a symlink yet, but it is usable, and it's
the best editor we have available, and I have a long-outstanding bug
requesting vi that the machines are nagging me about.

Notably missing last time I used this vi: ZZ (have to :wq) and R/r (have
to insert and delete separately). But I did manage to make the edit
without using adb pull/push and editing on the host, so...

Bug: http://b/110170945
Change-Id: I0d400e5a52b07f3161d1be4c414480e84108ee35
2020-01-14 08:31:45 -08:00