Discussion:
[Toybox] CI for toybox
Roger Meier
2012-02-10 10:52:24 UTC
Permalink
Hello

I've added toybox to my build environment:
http://www.bufferoverflow.ch/jenkins/job/toybox/

Might be of interest for you.

-roger
Rob Landley
2012-02-14 04:55:12 UTC
Permalink
Post by Roger Meier
Hello
http://www.bufferoverflow.ch/jenkins/job/toybox/
Might be of interest for you.
Um, yay? What does your build environment do?

I'm feeding toybox into my aboriginal linux build, which creates the
smallest/simplest native development environment capable of rebuilding
itself under itself:

http://landley.net/aboriginal/FAQ.html

It actually builds the same system for a dozen different targets (arm,
mips, powerpc, sparc, sh4, etc) and then boots most of them under qemu
so you have a native build environment without having to buy special
hardware.

The current version uses busybox to provide all the command line tools
(the whole thing is 7 packages: linux, gcc, binutils, make, bash,
busybox, and uClibc). What I'm doing is installing toybox right after I
install busybox, overwriting the busybox tools with defconfig toybox and
seeing if the result can A) rebuild itself, B) build Linux From Scratch 6.8.

This is how I became busybox maintainer in the first place, way back
when: by extending busybox to replace everything but libc and the
toolchain from the Linux From Scratch build, I was more active than any
other developer, including Erik, so he handed it over when he got busy
with other things. (His 1.0 release still didn't remotely do what I
needed it to for my use case.)

It took a _lot_ of work to make that happen, but I eventually did. Now
I'm doing the same thing with toybox, adding one command at a time until
aboriginal no longer needs busybox installed to build itself or LFS.
(And if you can build LFS, you can build anything natively by
building/installing your prerequisite packages first.)

I documented this in the roadmap wiki page:

http://elinux.org/Busybox_replacement#Use_case:_provide_a_self-hosting_development_environment

The delay in the recent 0.2.0 release was me making sure that at least
the i686 target built the basic aboriginal linux system image using
toybox defconfig in place of the appropriate busybox commands.
Aboriginal also builds arm, mips, powerpc, sparc, sh4, and so on, so I
have to test endianness and alignment issues, but my netbook is kinda
slow and I think my upstairs server has something wrong with it. (I run
a test three times and get two different answers. I'd say "bad memory"
but it's been like that ever since I installed Gentoo on it...)

Rob

P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for the
first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to add
"make" to toybox, but it _is_ in the SUSv4 utility list. No point until
I get a non-gcc/binutils compiler, though...)
roger
2012-02-15 20:54:43 UTC
Permalink
Post by Rob Landley
Post by Roger Meier
Hello
http://www.bufferoverflow.ch/jenkins/job/toybox/
Might be of interest for you.
Um, yay? What does your build environment do?
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Post by Rob Landley
I'm feeding toybox into my aboriginal linux build, which creates the
smallest/simplest native development environment capable of rebuilding
http://landley.net/aboriginal/FAQ.html
It actually builds the same system for a dozen different targets (arm,
mips, powerpc, sparc, sh4, etc) and then boots most of them under qemu
so you have a native build environment without having to buy special
hardware.
I will definatly have a look on that!
Post by Rob Landley
The current version uses busybox to provide all the command line tools
(the whole thing is 7 packages: linux, gcc, binutils, make, bash,
busybox, and uClibc). What I'm doing is installing toybox right after I
install busybox, overwriting the busybox tools with defconfig toybox and
seeing if the result can A) rebuild itself, B) build Linux From Scratch 6.8.
This is how I became busybox maintainer in the first place, way back
when: by extending busybox to replace everything but libc and the
toolchain from the Linux From Scratch build, I was more active than any
other developer, including Erik, so he handed it over when he got busy
with other things. (His 1.0 release still didn't remotely do what I
needed it to for my use case.)
It took a _lot_ of work to make that happen, but I eventually did. Now
I'm doing the same thing with toybox, adding one command at a time until
aboriginal no longer needs busybox installed to build itself or LFS.
(And if you can build LFS, you can build anything natively by
building/installing your prerequisite packages first.)
http://elinux.org/Busybox_replacement#Use_case:_provide_a_self-hosting_development_environment
The delay in the recent 0.2.0 release was me making sure that at least
the i686 target built the basic aboriginal linux system image using
toybox defconfig in place of the appropriate busybox commands.
Aboriginal also builds arm, mips, powerpc, sparc, sh4, and so on, so I
have to test endianness and alignment issues, but my netbook is kinda
slow and I think my upstairs server has something wrong with it. (I run
a test three times and get two different answers. I'd say "bad memory"
but it's been like that ever since I installed Gentoo on it...)
Rob
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for the
first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to add
"make" to toybox, but it _is_ in the SUSv4 utility list. No point until
I get a non-gcc/binutils compiler, though...)
That's the same I look for, at the moment I have the following
components in mind:

compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/

I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)

-roger


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Paul Onyschuk
2012-02-15 21:30:18 UTC
Permalink
On Wed, 15 Feb 2012 21:54:43 +0100
Post by roger
libc http://www.sourceware.org/newlib/
What license newlib uses? I'm bit confused about all those COPYING
files, especially in cvs repository.
roger
2012-02-15 21:48:32 UTC
Permalink
the README
http://sourceware.org/git/?p=newlib.git;a=blob;f=newlib/README
point's to
http://sourceware.org/git/?p=newlib.git;a=blob;f=COPYING.NEWLIB
=> all BSD/MIT style

however configure scripts, etc. are GPL2, GPL3 and LGPL

-roger
Post by Paul Onyschuk
On Wed, 15 Feb 2012 21:54:43 +0100
Post by roger
libc http://www.sourceware.org/newlib/
What license newlib uses? I'm bit confused about all those COPYING
files, especially in cvs repository.
_______________________________________________
Toybox mailing list
Toybox at lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Rob Landley
2012-02-17 11:41:09 UTC
Permalink
Post by roger
the README
http://sourceware.org/git/?p=newlib.git;a=blob;f=newlib/README
point's to
http://sourceware.org/git/?p=newlib.git;a=blob;f=COPYING.NEWLIB
=> all BSD/MIT style
however configure scripts, etc. are GPL2, GPL3 and LGPL
We've got a similar problem here with the menuconfig infrastructure
being copied from the kernel (and thus GPL). I vaguely intend to
rewrite it at some point, but it's not an immediate priority since it
doesn't affect the resulting binary. (It just generates a .config file,
and then that's all the build uses.)

Still: not having any GPL source in the tarball at all is much cleaner,
and a worthy goal...

Rob
Rob Landley
2012-02-17 11:41:09 UTC
Permalink
Post by roger
the README
http://sourceware.org/git/?p=newlib.git;a=blob;f=newlib/README
point's to
http://sourceware.org/git/?p=newlib.git;a=blob;f=COPYING.NEWLIB
=> all BSD/MIT style
however configure scripts, etc. are GPL2, GPL3 and LGPL
We've got a similar problem here with the menuconfig infrastructure
being copied from the kernel (and thus GPL). I vaguely intend to
rewrite it at some point, but it's not an immediate priority since it
doesn't affect the resulting binary. (It just generates a .config file,
and then that's all the build uses.)

Still: not having any GPL source in the tarball at all is much cleaner,
and a worthy goal...

Rob
roger
2012-02-15 21:48:32 UTC
Permalink
the README
http://sourceware.org/git/?p=newlib.git;a=blob;f=newlib/README
point's to
http://sourceware.org/git/?p=newlib.git;a=blob;f=COPYING.NEWLIB
=> all BSD/MIT style

however configure scripts, etc. are GPL2, GPL3 and LGPL

-roger
Post by Paul Onyschuk
On Wed, 15 Feb 2012 21:54:43 +0100
Post by roger
libc http://www.sourceware.org/newlib/
What license newlib uses? I'm bit confused about all those COPYING
files, especially in cvs repository.
_______________________________________________
Toybox mailing list
Toybox at lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Rob Landley
2012-02-17 11:53:25 UTC
Permalink
Post by roger
Post by Rob Landley
What does your build environment do?
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Cool. Does it build ok with clang? I haven't got that set up here. (I
might finally get a bionic build environment set up this weekend.
Fingers crossed...)
Post by roger
Post by Rob Landley
I'm feeding toybox into my aboriginal linux build, which creates the
smallest/simplest native development environment capable of rebuilding
http://landley.net/aboriginal/FAQ.html
It actually builds the same system for a dozen different targets (arm,
mips, powerpc, sparc, sh4, etc) and then boots most of them under qemu
so you have a native build environment without having to buy special
hardware.
I will definatly have a look on that!
I need to write up better documentation for it, but every time I sit
down and try... there are 8 gazillion different things it _could_ be
used for. Hard to summarize. (Even my email in this thread describing
it was kinda long...)

The most comprehensive I've come up with is the giant presentation, 260
slides available online or a giant (90 meg) PDF:

http://speakerdeck.com/u/mirell/p/developing-for-non-x86-targets-using-qemu
http://landley.net/aboriginal/downloads/presentation.pdf
Post by roger
Post by Rob Landley
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for the
first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to add
"make" to toybox, but it _is_ in the SUSv4 utility list. No point until
I get a non-gcc/binutils compiler, though...)
That's the same I look for, at the moment I have the following
compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/
llvm being implemented in C++ sets my teeth on edge, but since I haven't
got a better alternative...
Post by roger
I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)
Um, the BSDs exist?

(I'm fairly certain of this, haven't particularly used them since a
couple quick boots in the 90's where I went "yup, the gui sucks, no
drivers for any of my hardware, why are there no loopback mounts, ps is
not liking the flags I have memorized, I haven't really got spare disk
space for this..." I tried opendarwin and solaris indiana a couple
years back, but neither of them liked qemu's emulated keyboard
controller for some reason...)

Rob
Paul Onyschuk
2012-02-17 12:16:56 UTC
Permalink
On Fri, 17 Feb 2012 05:53:25 -0600
Post by Rob Landley
Um, the BSDs exist?
After watching some talks about progress of using LLVM and other things
in FreeBSD, I found that there is general feeling that FreeBSD base
system could be GPL-free by end of the year.

One of the last missing parts is linker, but some work has begun [1].
I don't think that it is yet functional, but we will see more in future
I think.

[1] http://sourceforge.net/apps/trac/elftoolchain
Rob Landley
2012-02-17 18:35:25 UTC
Permalink
Post by Paul Onyschuk
On Fri, 17 Feb 2012 05:53:25 -0600
Post by Rob Landley
Um, the BSDs exist?
After watching some talks about progress of using LLVM and other things
in FreeBSD, I found that there is general feeling that FreeBSD base
system could be GPL-free by end of the year.
One of the last missing parts is linker, but some work has begun [1].
I don't think that it is yet functional, but we will see more in future
I think.
[1] http://sourceforge.net/apps/trac/elftoolchain
Cool.

I was attracted to tinycc because it's _simple_, and because you could
do the swiss-army-knife binary thing with it and have a cc and ld and as
and strip and so on pretty easily.

Unfortunately, the Zombie Project was handed off to a windows developer
and I'm waiting for it to properly _die_ before poking at that again.
Plus I'm kinda busy these days with other things... :)

Rob
Rob Landley
2012-02-17 18:35:25 UTC
Permalink
Post by Paul Onyschuk
On Fri, 17 Feb 2012 05:53:25 -0600
Post by Rob Landley
Um, the BSDs exist?
After watching some talks about progress of using LLVM and other things
in FreeBSD, I found that there is general feeling that FreeBSD base
system could be GPL-free by end of the year.
One of the last missing parts is linker, but some work has begun [1].
I don't think that it is yet functional, but we will see more in future
I think.
[1] http://sourceforge.net/apps/trac/elftoolchain
Cool.

I was attracted to tinycc because it's _simple_, and because you could
do the swiss-army-knife binary thing with it and have a cc and ld and as
and strip and so on pretty easily.

Unfortunately, the Zombie Project was handed off to a windows developer
and I'm waiting for it to properly _die_ before poking at that again.
Plus I'm kinda busy these days with other things... :)

Rob
Roger Meier
2012-02-18 19:38:19 UTC
Permalink
Post by Rob Landley
Post by roger
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Cool. Does it build ok with clang? I haven't got that set up here. (I
might
Post by Rob Landley
finally get a bionic build environment set up this weekend.
Fingers crossed...)
Yes, it builds with clang!
Please have a look here: http://www.bufferoverflow.ch/jenkins/job/toybox/
I added also a task scanner, looking for FIXME, HACK, TODO and sprintf
usage.
Post by Rob Landley
From my perspective, CI is an essential part for building and improving
software.
Post by Rob Landley
The most comprehensive I've come up with is the giant presentation, 260
http://speakerdeck.com/u/mirell/p/developing-for-non-x86-targets-using-
qemu
http://landley.net/aboriginal/downloads/presentation.pdf
Yes, qemu is a great thing!
I just studied this: http://www.elinux.org/Virtual_Development_Board
Post by Rob Landley
Post by roger
Post by Rob Landley
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for
the first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to
add "make" to toybox, but it _is_ in the SUSv4 utility list. No
point until I get a non-gcc/binutils compiler, though...)
I prefer llvm.
Post by Rob Landley
Post by roger
That's the same I look for, at the moment I have the following
compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/
llvm being implemented in C++ sets my teeth on edge, but since I haven't
got
Post by Rob Landley
a better alternative...
llvm is already part of FreeBSD 9:
http://wiki.freebsd.org/BuildingFreeBSDWithClang
http://wiki.freebsd.org/PortsAndClang
Post by Rob Landley
Post by roger
I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)
Um, the BSDs exist?
Linux Kernel supports a wider range of CPU's or SOC's and peripherals => the
world needs this
BSD on embedded? Ok, some are supported(e.g. AT91).
What's the future? What do Chip Vendors?
Is there a BSD Kernel <=>Linux Kernel compatibility layer?
Rob Landley
2012-02-20 04:38:01 UTC
Permalink
Post by Roger Meier
Post by Rob Landley
Post by roger
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Cool. Does it build ok with clang? I haven't got that set up here. (I
might
Post by Rob Landley
finally get a bionic build environment set up this weekend.
Fingers crossed...)
Yes, it builds with clang!
clang -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
-DPROJECT_NAME=\"ToyBox\"
/tmp/cc-Kb5fjX.o: In function `zconfparse':
kconfig/zconf.tab.c:(.text+0xb94): undefined reference to `kconf_id_lookup'
/tmp/cc-Kb5fjX.o: In function `zconflex':
kconfig/zconf.tab.c:(.text+0x1d85): undefined reference to `kconf_id_lookup'
kconfig/zconf.tab.c:(.text+0x1f0b): undefined reference to `kconf_id_lookup'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [kconfig/conf] Error 1

Apparently not with the one in ubuntu 10.04?

(It works with CC=clang but not HOSTCC=clang.)
Post by Roger Meier
Please have a look here: http://www.bufferoverflow.ch/jenkins/job/toybox/
I added also a task scanner, looking for FIXME, HACK, TODO and sprintf
usage.
Why do you object to sprintf()?
Post by Roger Meier
Post by Rob Landley
From my perspective, CI is an essential part for building and improving
software.
Never heard of it, but I suppose the first ~40 years of unix and the
decades of software before that didn't count...
Post by Roger Meier
Post by Rob Landley
Post by roger
Post by Rob Landley
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for
the first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to
add "make" to toybox, but it _is_ in the SUSv4 utility list. No
point until I get a non-gcc/binutils compiler, though...)
I prefer llvm.
Implemented in C++. A C compiler that isn't implemented in C.
Post by Roger Meier
Post by Rob Landley
Post by roger
That's the same I look for, at the moment I have the following
compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/
llvm being implemented in C++ sets my teeth on edge, but since I haven't
got
Post by Rob Landley
a better alternative...
http://wiki.freebsd.org/BuildingFreeBSDWithClang
http://wiki.freebsd.org/PortsAndClang
Lua is available in there too, I'm not sure that counts as "a part of".

I understand everyone screaming in terror as they flee from GPLv3.
There's likely to be a certain amount of "out of the frying pan, into
the fire" along the way...
Post by Roger Meier
Post by Rob Landley
Post by roger
I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)
Um, the BSDs exist?
Linux Kernel supports a wider range of CPU's or SOC's and peripherals => the
world needs this
BSD on embedded? Ok, some are supported(e.g. AT91).
What's the future? What do Chip Vendors?
Is there a BSD Kernel <=>Linux Kernel compatibility layer?
A) I'm not a fan of the BSDs, I'm just saying that striving to reinvent
them, and then somehow expecting a different result, requries further
explanation.

B) MacOS X forked a BSD, and deployed more seats than Linux has.
(Whether or not iPhone is outselling Android is one of those conflicting
claims things.) Not a sign of quality, just claiming "the world needs"
sounds to me a bit like "information wants a pony"...

Rob
Rob Landley
2012-02-20 04:38:01 UTC
Permalink
Post by Roger Meier
Post by Rob Landley
Post by roger
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Cool. Does it build ok with clang? I haven't got that set up here. (I
might
Post by Rob Landley
finally get a bionic build environment set up this weekend.
Fingers crossed...)
Yes, it builds with clang!
clang -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
-DPROJECT_NAME=\"ToyBox\"
/tmp/cc-Kb5fjX.o: In function `zconfparse':
kconfig/zconf.tab.c:(.text+0xb94): undefined reference to `kconf_id_lookup'
/tmp/cc-Kb5fjX.o: In function `zconflex':
kconfig/zconf.tab.c:(.text+0x1d85): undefined reference to `kconf_id_lookup'
kconfig/zconf.tab.c:(.text+0x1f0b): undefined reference to `kconf_id_lookup'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [kconfig/conf] Error 1

Apparently not with the one in ubuntu 10.04?

(It works with CC=clang but not HOSTCC=clang.)
Post by Roger Meier
Please have a look here: http://www.bufferoverflow.ch/jenkins/job/toybox/
I added also a task scanner, looking for FIXME, HACK, TODO and sprintf
usage.
Why do you object to sprintf()?
Post by Roger Meier
Post by Rob Landley
From my perspective, CI is an essential part for building and improving
software.
Never heard of it, but I suppose the first ~40 years of unix and the
decades of software before that didn't count...
Post by Roger Meier
Post by Rob Landley
Post by roger
Post by Rob Landley
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for
the first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to
add "make" to toybox, but it _is_ in the SUSv4 utility list. No
point until I get a non-gcc/binutils compiler, though...)
I prefer llvm.
Implemented in C++. A C compiler that isn't implemented in C.
Post by Roger Meier
Post by Rob Landley
Post by roger
That's the same I look for, at the moment I have the following
compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/
llvm being implemented in C++ sets my teeth on edge, but since I haven't
got
Post by Rob Landley
a better alternative...
http://wiki.freebsd.org/BuildingFreeBSDWithClang
http://wiki.freebsd.org/PortsAndClang
Lua is available in there too, I'm not sure that counts as "a part of".

I understand everyone screaming in terror as they flee from GPLv3.
There's likely to be a certain amount of "out of the frying pan, into
the fire" along the way...
Post by Roger Meier
Post by Rob Landley
Post by roger
I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)
Um, the BSDs exist?
Linux Kernel supports a wider range of CPU's or SOC's and peripherals => the
world needs this
BSD on embedded? Ok, some are supported(e.g. AT91).
What's the future? What do Chip Vendors?
Is there a BSD Kernel <=>Linux Kernel compatibility layer?
A) I'm not a fan of the BSDs, I'm just saying that striving to reinvent
them, and then somehow expecting a different result, requries further
explanation.

B) MacOS X forked a BSD, and deployed more seats than Linux has.
(Whether or not iPhone is outselling Android is one of those conflicting
claims things.) Not a sign of quality, just claiming "the world needs"
sounds to me a bit like "information wants a pony"...

Rob

Paul Onyschuk
2012-02-17 12:16:56 UTC
Permalink
On Fri, 17 Feb 2012 05:53:25 -0600
Post by Rob Landley
Um, the BSDs exist?
After watching some talks about progress of using LLVM and other things
in FreeBSD, I found that there is general feeling that FreeBSD base
system could be GPL-free by end of the year.

One of the last missing parts is linker, but some work has begun [1].
I don't think that it is yet functional, but we will see more in future
I think.

[1] http://sourceforge.net/apps/trac/elftoolchain
Roger Meier
2012-02-18 19:38:19 UTC
Permalink
Post by Rob Landley
Post by roger
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Cool. Does it build ok with clang? I haven't got that set up here. (I
might
Post by Rob Landley
finally get a bionic build environment set up this weekend.
Fingers crossed...)
Yes, it builds with clang!
Please have a look here: http://www.bufferoverflow.ch/jenkins/job/toybox/
I added also a task scanner, looking for FIXME, HACK, TODO and sprintf
usage.
Post by Rob Landley
From my perspective, CI is an essential part for building and improving
software.
Post by Rob Landley
The most comprehensive I've come up with is the giant presentation, 260
http://speakerdeck.com/u/mirell/p/developing-for-non-x86-targets-using-
qemu
http://landley.net/aboriginal/downloads/presentation.pdf
Yes, qemu is a great thing!
I just studied this: http://www.elinux.org/Virtual_Development_Board
Post by Rob Landley
Post by roger
Post by Rob Landley
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for
the first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to
add "make" to toybox, but it _is_ in the SUSv4 utility list. No
point until I get a non-gcc/binutils compiler, though...)
I prefer llvm.
Post by Rob Landley
Post by roger
That's the same I look for, at the moment I have the following
compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/
llvm being implemented in C++ sets my teeth on edge, but since I haven't
got
Post by Rob Landley
a better alternative...
llvm is already part of FreeBSD 9:
http://wiki.freebsd.org/BuildingFreeBSDWithClang
http://wiki.freebsd.org/PortsAndClang
Post by Rob Landley
Post by roger
I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)
Um, the BSDs exist?
Linux Kernel supports a wider range of CPU's or SOC's and peripherals => the
world needs this
BSD on embedded? Ok, some are supported(e.g. AT91).
What's the future? What do Chip Vendors?
Is there a BSD Kernel <=>Linux Kernel compatibility layer?
Paul Onyschuk
2012-02-15 21:30:18 UTC
Permalink
On Wed, 15 Feb 2012 21:54:43 +0100
Post by roger
libc http://www.sourceware.org/newlib/
What license newlib uses? I'm bit confused about all those COPYING
files, especially in cvs repository.
Rob Landley
2012-02-17 11:53:25 UTC
Permalink
Post by roger
Post by Rob Landley
What does your build environment do?
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Cool. Does it build ok with clang? I haven't got that set up here. (I
might finally get a bionic build environment set up this weekend.
Fingers crossed...)
Post by roger
Post by Rob Landley
I'm feeding toybox into my aboriginal linux build, which creates the
smallest/simplest native development environment capable of rebuilding
http://landley.net/aboriginal/FAQ.html
It actually builds the same system for a dozen different targets (arm,
mips, powerpc, sparc, sh4, etc) and then boots most of them under qemu
so you have a native build environment without having to buy special
hardware.
I will definatly have a look on that!
I need to write up better documentation for it, but every time I sit
down and try... there are 8 gazillion different things it _could_ be
used for. Hard to summarize. (Even my email in this thread describing
it was kinda long...)

The most comprehensive I've come up with is the giant presentation, 260
slides available online or a giant (90 meg) PDF:

http://speakerdeck.com/u/mirell/p/developing-for-non-x86-targets-using-qemu
http://landley.net/aboriginal/downloads/presentation.pdf
Post by roger
Post by Rob Landley
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for the
first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to add
"make" to toybox, but it _is_ in the SUSv4 utility list. No point until
I get a non-gcc/binutils compiler, though...)
That's the same I look for, at the moment I have the following
compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/
llvm being implemented in C++ sets my teeth on edge, but since I haven't
got a better alternative...
Post by roger
I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)
Um, the BSDs exist?

(I'm fairly certain of this, haven't particularly used them since a
couple quick boots in the 90's where I went "yup, the gui sucks, no
drivers for any of my hardware, why are there no loopback mounts, ps is
not liking the flags I have memorized, I haven't really got spare disk
space for this..." I tried opendarwin and solaris indiana a couple
years back, but neither of them liked qemu's emulated keyboard
controller for some reason...)

Rob
roger
2012-02-15 20:54:43 UTC
Permalink
Post by Rob Landley
Post by Roger Meier
Hello
http://www.bufferoverflow.ch/jenkins/job/toybox/
Might be of interest for you.
Um, yay? What does your build environment do?
At the moment I do
- sloccount
- cppcheck, probably splint as a future option
- build with gcc, clang and arm-none-linux-gnueabi-gcc
- run testsuite for gcc and clang built binaries
Post by Rob Landley
I'm feeding toybox into my aboriginal linux build, which creates the
smallest/simplest native development environment capable of rebuilding
http://landley.net/aboriginal/FAQ.html
It actually builds the same system for a dozen different targets (arm,
mips, powerpc, sparc, sh4, etc) and then boots most of them under qemu
so you have a native build environment without having to buy special
hardware.
I will definatly have a look on that!
Post by Rob Landley
The current version uses busybox to provide all the command line tools
(the whole thing is 7 packages: linux, gcc, binutils, make, bash,
busybox, and uClibc). What I'm doing is installing toybox right after I
install busybox, overwriting the busybox tools with defconfig toybox and
seeing if the result can A) rebuild itself, B) build Linux From Scratch 6.8.
This is how I became busybox maintainer in the first place, way back
when: by extending busybox to replace everything but libc and the
toolchain from the Linux From Scratch build, I was more active than any
other developer, including Erik, so he handed it over when he got busy
with other things. (His 1.0 release still didn't remotely do what I
needed it to for my use case.)
It took a _lot_ of work to make that happen, but I eventually did. Now
I'm doing the same thing with toybox, adding one command at a time until
aboriginal no longer needs busybox installed to build itself or LFS.
(And if you can build LFS, you can build anything natively by
building/installing your prerequisite packages first.)
http://elinux.org/Busybox_replacement#Use_case:_provide_a_self-hosting_development_environment
The delay in the recent 0.2.0 release was me making sure that at least
the i686 target built the basic aboriginal linux system image using
toybox defconfig in place of the appropriate busybox commands.
Aboriginal also builds arm, mips, powerpc, sparc, sh4, and so on, so I
have to test endianness and alignment issues, but my netbook is kinda
slow and I think my upstairs server has something wrong with it. (I run
a test three times and get two different answers. I'd say "bad memory"
but it's been like that ever since I installed Gentoo on it...)
Rob
P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for the
first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to add
"make" to toybox, but it _is_ in the SUSv4 utility list. No point until
I get a non-gcc/binutils compiler, though...)
That's the same I look for, at the moment I have the following
components in mind:

compiler http://llvm.org/
kernel http://www.kernel.org/
libc http://www.sourceware.org/newlib/
libc++ http://libcxx.llvm.org/
coreutils++ http://landley.net/code/toybox/

I would like to have a *liberal OS* where the user or distributor can
define most parts of what free is;-)

-roger


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Roger Meier
2012-02-10 10:52:24 UTC
Permalink
Hello

I've added toybox to my build environment:
http://www.bufferoverflow.ch/jenkins/job/toybox/

Might be of interest for you.

-roger
Rob Landley
2012-02-14 04:55:12 UTC
Permalink
Post by Roger Meier
Hello
http://www.bufferoverflow.ch/jenkins/job/toybox/
Might be of interest for you.
Um, yay? What does your build environment do?

I'm feeding toybox into my aboriginal linux build, which creates the
smallest/simplest native development environment capable of rebuilding
itself under itself:

http://landley.net/aboriginal/FAQ.html

It actually builds the same system for a dozen different targets (arm,
mips, powerpc, sparc, sh4, etc) and then boots most of them under qemu
so you have a native build environment without having to buy special
hardware.

The current version uses busybox to provide all the command line tools
(the whole thing is 7 packages: linux, gcc, binutils, make, bash,
busybox, and uClibc). What I'm doing is installing toybox right after I
install busybox, overwriting the busybox tools with defconfig toybox and
seeing if the result can A) rebuild itself, B) build Linux From Scratch 6.8.

This is how I became busybox maintainer in the first place, way back
when: by extending busybox to replace everything but libc and the
toolchain from the Linux From Scratch build, I was more active than any
other developer, including Erik, so he handed it over when he got busy
with other things. (His 1.0 release still didn't remotely do what I
needed it to for my use case.)

It took a _lot_ of work to make that happen, but I eventually did. Now
I'm doing the same thing with toybox, adding one command at a time until
aboriginal no longer needs busybox installed to build itself or LFS.
(And if you can build LFS, you can build anything natively by
building/installing your prerequisite packages first.)

I documented this in the roadmap wiki page:

http://elinux.org/Busybox_replacement#Use_case:_provide_a_self-hosting_development_environment

The delay in the recent 0.2.0 release was me making sure that at least
the i686 target built the basic aboriginal linux system image using
toybox defconfig in place of the appropriate busybox commands.
Aboriginal also builds arm, mips, powerpc, sparc, sh4, and so on, so I
have to test endianness and alignment issues, but my netbook is kinda
slow and I think my upstairs server has something wrong with it. (I run
a test three times and get two different answers. I'd say "bad memory"
but it's been like that ever since I installed Gentoo on it...)

Rob

P.S. I still vaguely want to get the package list down to four
packages: "compiler, libc, kernel, toybox". I had a tinycc fork for the
first (http://landley.net/code/tinycc and
http://landley.net/code/tinycc/qcc), and yes this means I'd need to add
"make" to toybox, but it _is_ in the SUSv4 utility list. No point until
I get a non-gcc/binutils compiler, though...)
Loading...