rebootstrap

rebootstrap is a crude hack to test the bootstrappability of Debian architectures. In this context bootstrapping refers to building binaries for an architecture from source without using any pre-built binaries for that architecture. In the past 20 years about 20 architectures have been bootstrapped for Debian. At all times this has been a manual and non-repeatable process. rebootstrap is trying to address the very early bootstrap phase involving the gcc/eglibc dance.

The source can be obtained using git:

git clone git://anonscm.debian.org/users/helmutg/rebootstrap.git
# or
git clone git.debian.org:/git/users/helmutg/rebootstrap.git

One of rebootstraps major goals is to highlight bugs.

rebootstrap on jenkins.d.n

Contact Helmut Grohne or stop by #debian-bootstrap on OFTC if you have any questions.

DebConf15 Slides

Occasionally, rebootstrap works around limitations of packages by carrying patches locally. This raises the question of which patches are acceptable. Rules are:

  1. Patches must be intended for inclusion into the patched package and therefore should be filed as a bug against the relevant package.
  2. Patches beyond a couple of hundred lines are simply too long atm.

Thanks

Without the following (non-exhaustive list of) people rebootstrap would not be where it is today. Thanks!

Issues

Below is a non-exhaustive list of unsolved problems. Patches welcome.

alpha

libc6.1-dev:alpha conflicts with libc6-dev:amd64. Thus eglibc stage1 is not installable.

dpkg: regarding libc6.1-dev_2.18-4_alpha.deb containing libc6.1-dev:alpha:
 libc6.1-dev conflicts with libc6-dev
  libc6-dev:amd64 (version 2.18-4) is present and installed.

Wookey: It's correct for libc6.1:alpha to conflict with libc6-dev:i386 (because they have the same linux loader path: /lib/ld-linux.so.2

arm

OABI is dead. There is no support for arm in linux (no target binary-libc-dev_arm), gcc-4.9 (target not supported) or glibc anymore.

ia64

Same as alpha.

dpkg: regarding libc6.1-dev_2.18-4_ia64.deb containing libc6.1-dev:ia64:
 libc6.1-dev conflicts with libc6-dev
  libc6-dev:amd64 (version 2.18-4) is present and installed.

Wookey: This makes no obvious sense as ia64 has a unique loader path: /lib/ld-linux-ia64.so.2. Is some other file conflicting?

In addition Debian's glibc dropped support for ia64.

lm32

binutils and gcc both support lm32 in trunk.

Blocker is no up-to-date linux port to the platform (an old port can be found at https://github.com/m-labs/linux-milkymist). The lm32 normally doesn't have a mmu, so needs ucLinux. Potentially more useful stuff at http://m-labs.hk/milkymist-wiki/wiki/index.php%3Ftitle=Milkymist_Linux_cheat_sheet.html and http://m-labs.hk/milkymist-wiki/wiki/index.php%3Ftitle=Linux.html

(The lm32 is a softcore created by Lattice for FPGA boards - see https://en.wikipedia.org/wiki/LatticeMico32.)

or1k

gcc as found in Debian sid for version 4.8 and 4.9 do not support or1k as a target. Thus gcc stage1 fails to configure. It is expected that this issue vanishes with future gcc upstream releases.

s390

eglibc does not support this architecture:

dh_gencontrol -plibc6-dev
dpkg-gencontrol: error: current host architecture 's390' does not appear in package's architecture list (amd64 arm arm64 armel armhf hppa i386 m68k mips mipsel powerpc powerpcspe ppc64 ppc64el sparc sparc64 s390x sh4 x32)

musl-linux-any

All architectures beyond mips and mipsel fail to build the cross compiler due to wrong search paths.

datefudge: datefudge.c:77:5: error: conflicting types for 'gettimeofday'

libbsd: ../include/bsd/sys/cdefs.h:28:28: fatal error: sys/cdefs.h: No such file or directory

libelf: checking host system type... Invalid configuration 'mips-linux-musl': system 'musl' not recognized

libsigsegv: fault-linux-mips.h:30:70: error: 'mcontext_t {aka struct <anonymous>}' has no member named 'gregs'

libunistring: fseterr.c:72:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."