[J-core] How crazy would a nommu debian port be?

Rob Landley rob at landley.net
Wed Aug 10 20:15:22 EDT 2016

On 08/10/2016 07:03 PM, Rob Landley wrote:
> On 08/10/2016 05:51 PM, Brian Bartholomew wrote:
>>> I'm just wondering how much interest there would be out there for
>>> something like that. The numato board only has 64M ram and nommu
>>> means no swap. I'm not sure how interesting modern debian is to run
>>> there?
>> If you build it, I will demonstrate it in my hackerspace.
> Alas building it isn't trivial. Just getting a musl-based x86 debian is
> a bit of a challenge. Debian only builds from source under Debian, which
> means under an existing glibc-based debian. They have decent support for
> populating a chroot directory from existing _binaries_, but their source
> build environment is a lot less well documented.
> Closest I've found to a debian source build guide is the "new package
> maintainer's guide":
>   https://www.debian.org/doc/manuals/maint-guide/
> Which shows how to turn a source build into a debian package build,
> under an existing debian system.
> (Still easier with Debian than other distros I've looked at, though.)

P.S. The general theory I'm using for doing this is a static linked
intermediate build. I.E. set up a debian chroot using debootstrap, get a
list of the packages in it, install musl-cross-make, create an empty
debian repo server, build a statically linked version of each debian
package using  that toolchain, push each package to the repo server, do
a new debootstrap from that repo server,and see if it works.

(The static linking is so that if context leaks from host to target, it
shouldn't go as far. You can then create dynamically linked versions of
your libraries and such within the new debian system.)

That should be enough to switch from glibc to musl, but the hard part
here is a brand new target (sh2 big endian nommu) hasn't got an initial
debootstrap you can start with, so you have to fake it by building
packages from source by hand, and possibly installing them with cp and vi...


More information about the J-core mailing list