[Toybox] Fwd: build help please with toybox

Rob Landley rob at landley.net
Sun Nov 24 05:47:19 PST 2019



On 11/23/19 9:03 PM, scsijon wrote:
> On 24/11/19 03:45, Rob Landley wrote:
>> On 11/22/19 7:22 PM, scsijon wrote:
>>> On 23/11/19 09:56, scsijon wrote:
>>>> thanks for the help
>>>>
>>>> On 23/11/19 09:18, Denys Nykula wrote:
>>>>>> scripts/kconfig/lex.zconf.c:890:16: error: ‘EINTR’ undeclared (first use
>>>>>> in this function)
>>>>>
>>>>> What's your host libc and where are its headers? In apt that's libc6-dev.
>>>>>
>>>> and i'm in a Quirky named Xenial Xerus (Ubuntu 16.04 LTS).
>>>> libc and libc6 both v2.23 at /lib/x86_64-gnu-linux and
>>>> /usr/include/x86_64-gnu-linux;
>>>> linux headers and kernel are v4.4.44 if of interest;
>>>> ?maybe to old?
>>>
>>> And trying with Open Embeded fails with an error relating to gcc being too old
>>> at 6.3.0!
>>
>> I built toybox with gcc 4.2.1 earlier this week.
>>
> 
> There was a note from Denys relating to ubuntu not including gcc headers and he
> couldn't find them in other related packages, so that may explain the problems
> from that point. OE is moot and with a similar although better output I expect
> it's the same sort of problem.
> 
>>> I'm trying a deb buster with a 8.3.0 next, my last alternative, damn I
>>> wanted one of these to work (preferably the first),beginning to think this may
>>> be a bust of a way to build something simple and very minimal from scratch.
>>
>> You've seen scripts/mkroot.sh?
>>
> 
> I have now, sorry too complex for what I'm thinking at present,

It's 511 lines of bash that works. If you can't learn from that example, I
probably can't help you.

I vaguely plan to move the environment sanitization and airlock stuff into a
wrapper, but for the moment if you're not cross compiling and don't care about
running on a wide range of hosts, you can skip to line 60, "Create files and
directories".

>From there it's a big mkdir and chmod to create the new directory tree, writes
the init script and /etc/passwd and /etc/group files, builds toybox (working
around musl breakage), builds a Linux kernel (for several different targets),
creates a qemu launch script, and packages the root filesystem for initramfs.

That's what the 511 lines do.

> but may use it
> after i've started to sort out what I "really want it to do", rather than "I
> think I would like it to be able to do it this way".
> 
> Got 3 projects 'floating in the air' at present, (sound familiar anyone,) and
> this is the 'new' one and it's very airy-fairy at this point. It's come out of
> my musl/clang/llvm-no_gcc_etc project in a fourth dimension direction, not even
> talkable to myself at the moment, just a hash of ideas.

It'd be nice if a modern https://ellcc.org happened. :(

Rob



More information about the Toybox mailing list