<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 7, 2021 at 12:19 PM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/6/21 2:02 PM, enh via Toybox wrote:<br>
> +Josh Gao <mailto:<a href="mailto:jmgao@google.com" target="_blank">jmgao@google.com</a>> tried to build toybox on darwin/arm64, but<br>
> the last i heard he was at the "you need to install GNU sed to bootstrap" step...<br>
<br>
I need to teach toybox to build toybox sed standalone and then do the rest of<br>
the build with it. That's been on my todo list for a while. (Possibly as a<br>
separate target.) And the question is what ELSE the build needs?<br></blockquote><div><br></div><div>note that sed is the only thing we *need* in the sense of "the default one is insufficient". so although "all the dependencies" would be nice, just sed would be enough to get past the point where anyone would notice the extra hermeticity.</div><div><br></div><div>(i did wonder if that sed usage could be rewritten in a way that would work for the BSD sed too, but since my sed skills start and end at s///, i made no progress.)</div><div><br></div><div>making `make defconfig` just do the right thing for darwin would be more useful, but iirc i didn't get that working either, though i don't remember why.</div><div><br></div><div>feel free to prod me now and then to update macos_defconfig btw. so far i've only really worried about stuff that AOSP uses, but that seems silly and we should probably include "everything in the regular defconfig that passes the tests on macOS".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
$ scripts/record-commands make distclean defconfig toybox<br>
...<br>
$ awk '{print $1}' log.txt | sort -u | tr '\n' ' '<br>
as basename cat cc chmod cmp dirname echo egrep find git grep head ld ln ls make<br>
mkdir nproc rm sed sort strip tail tee tr uname wc xargs<br>
<br>
Plus #!/bin/bash is called via absolute path and should probably be called out<br>
of the $PATH so toysh can pretend to be bash. (No, the #!/usr/bin/env trick<br>
doesn't eliminate an absolute path dependency, it just substitutes another one.)<br>
<br>
$ awk '{print $1}' log.txt | sort -u | while read i; do toybox | grep -qw $i ||<br>
echo $i; done<br>
as<br>
cc<br>
git<br>
ld<br>
make<br>
strip<br>
tr<br>
<br>
I see why you're poking me about tr, the rest are all toolchain commands. (And<br>
the "git --describe" silently falls back to the tarball version #define.)<br>
<br>
Ok, so a "make build_airlock" would need to fill generated/build_airlock with:<br>
<br>
basename cat chmod cmp dirname echo egrep find grep head ln ls mkdir nproc rm<br>
sed sort tail tee tr uname wc xargs<br>
<br>
> (fwiw, i *did* test on Raspberry Pi 400 just before the break, but that's<br>
> linux/arm32 which is sufficiently close to "Android" that there really shouldn't<br>
> be any surprises that the only issues i found were test suite assumptions about<br>
> what users/groups a Unix install always has. [those fixes were merged in December.])<br>
<br>
I need a test container, but I've been aiming for qemu/mkroot because that can<br>
run without root access...<br>
<br>
Rob<br>
</blockquote></div></div>