[mkroot] [Aboriginal] Building a floppy rescue set like BG did? + "Android self-hosting" idea

Rob Landley rob at landley.net
Mon Mar 5 14:55:48 PST 2018


On 03/04/2018 11:53 PM, Philip Rhoades wrote:
> Rob,
> 
> I am just replying to something from a year ago for a potential restart - it
> appears that things are making slow progress with mkroot? - is it worth me
> testing this stuff out again from scratch?
> 
> Regards,
> 
> Phil.

I hope mkroot just got unblocked. I switched jobs to something with more defined
hours (so I have evenings and weekends when I'm NOT working) in January, and
migrated the aboriginal mailing list to mkroot this past weekend.

The restart from aboriginal to mkroot happened because somebody did an external
toolchain builder that actually gives usable native compilers, which is the
missing part of bootlin/buildroot/crosstool/ellcc/android ndk...

The old last gplv2 releases were getting progressively more out of date even
before the kernel moved its compiler requirements (the last gplv2 release was
4.2.1, now it's gcc 4.5 ala
http://lkml.iu.edu/hypermail/linux/kernel/1802.1/02253.html) Making the old
tools build new software was constant work, which I didn't have time to keep up
with.

I'm still spread thinner than I like, but moving forward again.

Rob

> On 2017-03-25 04:56, Philip Rhoades wrote:
>> Rob,
>>
>>
>> On 2017-03-25 03:54, Rob Landley wrote:
>>> On 03/24/2017 09:36 AM, Philip Rhoades wrote:
>>>> Rob,
>>>> On 2017-03-24 06:56, Rob Landley wrote:
>>>>> On 03/14/2017 06:11 PM, Philip Rhoades wrote:
>>>>>> Even if netcat works - I am still interested in building a floppy-booted
>>>>>> AL system!
>>>>>
>>>>> You're not fitting the native toolchain on a floppy (the /usr/include
>>>>> headers alone _compress_ to multiple megabytes), and if you skip the
>>>>> native toolchain you might as well use the much simpler
>>>>> https://github.com/landley/mkroot build.
>>>>
>>>>
>>>> Thanks for that but see output below - although running make in the
>>>> ./build/toybox-0.7.3 dir worked OK . .
>>>
>>> Let's see, that would be...
>>>
>>>> Error output:
>>>>
>>>> scripts/make.sh
>>>> Generate headers from toys/*/*.c...
>>>> Make generated/config.h from .config.
>>>> generated/flags.h Compile
>>>>
>>> toybox......................................................................................................................................................../home/floppy_booted/toybox/airlock/ld:
>>>
>>>> cannot find -lselinux
>>>> /home/floppy_booted/toybox/airlock/ld: cannot find -lcrypto
>>>
>>> Huh. What distro are you building this on?
>>
>>
>> Fedora 25 x86_64
>>
>>
>>> I'd like to try to reproduce
>>> it here. In scripts/make.sh toybox does test builds to see which
>>> libraries are there, and only adds the ones it can find to the link.
>>> This implies that it's seeing different libraries at probe time than it
>>> is at build time.
>>
>>
>> Right.
>>
>>
>>> When I build here, I get:
>>>
>>> scripts/make.sh
>>> Generate headers from toys/*/*.c...
>>> generated/newtoys.h Library probe.........
>>> Make generated/config.h from .config.
>>> generated/flags.h generated/globals.h generated/tags.h generated/help.h
>>>
>>> Which is 3 more headers being generated at the end than yours showed.
>>> This implies that something did a build in build/toybox-0.7.3 (filling
>>> it with temporary files) and _then_ ran mkroot.sh?
>>
>>
>> I just deleted the created dirs and ran the script again to be sure
>> that it wasn't a different result from manually running the make in
>> between running the script twice but I got the same problem . . so I
>> am definitely just running "mkroot.sh" in an otherwise empty
>> directory.
>>
>>
>>> Also, you deleted context: is this the airlock build or is it the target
>>> build you're seeing this one? (It says "airlock" before the airlock
>>> build.) Did you speciry a cross compiler? (Guessing no since the page of
>>> "glibc doesn't support static linking!" warnings shouldn't happen with
>>> basically any cross compiler, since none of them use glibc.)
>>
>>
>> Attached is the full output - does that help?
>>
>>
>>> (The airlock step is basically a smaller host-tools from aboriginal, I
>>> merged it into toybox as "make install_airlock".)
>>
>>
>> Right.
>>
>>
>>>>> I need to finish implementing the various targets' kernel builds, do a
>>>>> proper release of that, write up better documentation for it (probably a
>>>>> big README since github displays that), and get the control images to
>>>>> run under it.
>>>>
>>>> Right.
>>>
>>> That's basically my todo list before I have big announcements, I've just
>>> been distracted by a half-dozen other things. (Bug reports from toybox
>>> in android, j-core.org stuff, so far this year I've had to fly to
>>> portland, tasmania, tokyo, and san francisco. Add december and I was in
>>> minneapolis and san diego.)
>>
>>
>> Tasmania!  If I had known you were in Oz it would have been good to catch up . .
>>
>>
>>>>> I also need to update the aboriginal linux website to say that the
>>>>> project's concluded and mkroot is the successor. I keep starting a
>>>>> writeup and it goes off into long explanations of the history and what I
>>>>> was trying to accomplish and so on... I should just finish
>>>>> http://landley.net/aboriginal/history.html
>>>>
>>>> I think I have read that before but I will have another look to see if
>>>> there is an updated version.
>>>
>>> There is but it's not uploaded yet since it _also_ trails off
>>> midsentence. :)
>>
>>
>> No worries . .
>>
>>
>>>> Also, have you thought about updating your comments in a blog or
>>>> something re Android from the "Embedded Linux Conference 2013"?  I find
>>>> your "Android self-hosting" argument very compelling and interesting and
>>>> wonder how you feel about the situation now after a few years have
>>>> passed since you made that talk.
>>>
>>> Android merged toybox at the start of 2015, it first shipped in Marshmallow:
>>>
>>>   https://lwn.net/Articles/629362/
>>
>>
>> Will check it out.
>>
>>
>>> The #2 contributor to toybox is Elliott Hughes, Android's toolbox and
>>> bionic maintainer, who has committed to replacing toolbox entirely with
>>> toybox:
>>>
>>> http://lists.landley.net/pipermail/toybox-landley.net/2016-June/008484.html
>>
>>
>> Ditto.
>>
>>
>>> He updates the toybox roadmap more often than I do:
>>>
>>>   https://github.com/landley/toybox/commits/master/www/roadmap.html
>>
>>
>> Ditto again . .
>>
>>
>>> Alas, I'm the bottleneck on finishing off toolbox, $DAYJOB and life have
>>> been hugely distracting for the past ~8 months. (Trying to dig out of
>>> that, but I need to be in San Diego again a week from monday...)
>>
>>
>> No worries . .
>>
>>
>>> Still, let's try to track down the failure you're seeing with mkroot. I
>>> want that to work for everybody. I haven't moved over the environment
>>> variable whitelisting yet, although it's basically something like:
>>>
>>>   [ ! -z "$TERM" ] && exec env -i "PATH=$PATH" "$0"
>>
>>
>> Aha!  Before I was running the script in a tmux tab and getting the
>> results that I have attached.  I just tried running the line above in
>> the tmux tab and the tab disappeared! - so I tried opening a new xterm
>> with no tmux and running the script from there and got a different
>> result:
>>
>> toybox-0.7.3/www/
>> toybox-0.7.3/www/about.html
>> toybox-0.7.3/www/cleanup.html
>> toybox-0.7.3/www/code.html
>> toybox-0.7.3/www/design.html
>> toybox-0.7.3/www/ext2.html
>> toybox-0.7.3/www/faq.html
>> toybox-0.7.3/www/footer.html
>> toybox-0.7.3/www/header.html
>> toybox-0.7.3/www/index.html
>> toybox-0.7.3/www/license.html
>> toybox-0.7.3/www/news.html
>> toybox-0.7.3/www/oldnews.html
>> toybox-0.7.3/www/roadmap.html
>> toybox-0.7.3/www/status.html
>> toybox-0.7.3/www/toycans.png
>> cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
>>     -DPROJECT_NAME=\"ToyBox\"
>> ccache: error: Could not find compiler "cc" in PATH
>> kconfig/Makefile:65: recipe for target 'kconfig/conf' failed
>> make: *** [kconfig/conf] Error 1
>>
>>
>>> (Modulo "$TERM" being reliably set in the host environment and NOT set
>>> by magic /etc/profile stuff that runs even for shell scripts. I dunno,
>>> maybe $USER would be better? Tested to work with my bash on ubuntu !=
>>> and this won't screw up on some obscure distro like RHELL 9...)
>>
>>
>> Well not exactly RHELL 9 but still Fedora 25 . . I think the last RH I
>> used was 5.2 (ie a still "free" version before RHE).
>>
>>
>>> P.S. I'm not sure if I should get mkroot a new list, or move this one
>>> over to a new name. At the moment there's not enough to see to take
>>> action on either way. Working on it, but juggling 9 other things at the
>>> same time...
>>
>>
>> I am in a similar position but I am interested in making more progress
>> with this stuff whenever I can so I will just try things whenever you
>> have time to look at it and can suggest something.
>>
>> Regards,
>>
>> Phil.
>> _______________________________________________
>> Aboriginal mailing list
>> Aboriginal at lists.landley.net
>> http://lists.landley.net/listinfo.cgi/aboriginal-landley.net
> 


More information about the mkroot mailing list