[Toybox] [PATCH] Pass cflags and hostcc in mkroot.

Denys Nykula nykula at ukr.net
Sun Oct 27 08:08:58 PDT 2019


On Sat, Oct 26, 2019 at 07:06:54PM -0500, Rob Landley wrote:
> On 10/16/19 6:19 PM, Denys Nykula wrote:
> > Yes, NetBSD package repository appears to be easier to bootstrap on Linux than
> > those of GNU/distros. Package recipes are an independent layer from toolchain and
> > core utils flavor, no init system enforced etc.
> 
> Is there a walkthrough on doing this or a URL I could follow it at? More build
> environments to test against is good...

Script master is acme.js.org/world, comment at the beginning is example
how to run. In empty dir, drop a musl.cc native toolchain tgz for your
arch, and run the script. After hours, in $PWD/toybox/root/*/*-fs there's
complete root. Chroot there /bin/su -, for a login shell. To list which of
my top netbook packages you built successfully, pkg_info -u. See complete
pkgsrc doc with lynx /usr/src/doc/pkgsrc.html, and just ls /usr/src and
generally ls around to learn what's available or not. Export
MANPATH=/usr/pkg/man if my profile fails to set it.

Presence of /usr/src/*/*/work/ means its parent dir package failed. One
such package, xinit, I expect to err. Others mean I need to debug and
don't know that yet.

Please run only in virtual machine, as root from some livecd. I stay in
$PWD but I assume git clone, gmake root, cd, tar x, rm -r, chroot and
mount succeed, and then I do ln and mv with relative paths. Tested on
arch, gentoo and itself; with glibc and musl; bash and mksh; coreutils,
busybox and toybox; armv7l and x86_64.

Both make and gmake in your path have to point at gmake, mkroot-specific.
Packages mostly accept a MAKE argument with a path to make or explicit
the g prefix. Base system doesn't ln unprefixed make in path here. There
exists after all a variable I'd like mkroot to use (:

This should be enough to see how to automate a pkgsrc build for use as a
regressive integration test for toybox.



More information about the Toybox mailing list