[J-core] Bootstrapping Debian for sh3

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Fri Jan 20 19:32:47 EST 2017


I'm Debian's main SuperH porter at the moment and I'm in charge of the
sh4 port we have in Debian. The sh4 was originally maintained by people
from Renesas or people who were paid by Renesas and they also did the
original bootstrapping.

Initially, they worked on sh3 support but later on moved on to support
sh4 only which is why Debian currently has an sh4 port only which they
also left abandoned in 2014 when I took it over.

Since J-Core plans to release a SH-3-compatible design with the J-3
next, I have started looking into what needs to be done to bootstrap
Debian on sh3. Since Renesas already did some work on sh3 in packages
like glibc and gcc, the amount of work needed to get Debian ready for
an initial sh3 bootstrap can be done within a few days.

For the bootstrapping itself, I'm relying on the work of Helmut Grohne
who is another Debian Developer who created a project called rebootstrap
[1]. Rebootstrap is an effort to improve the bootstrappability of Debian
to a new architecture. In the past, all bootstrapping had to be done
manually. With rebootstrap, the process has been mostly automated with
a few notable exceptions like the perl package which still cannot
be cross-compiled.

The bootstrapping process already works so well that Helmut has set up
a Jenkins job [2] which periodically bootstraps Debian for every possible
architecture supported by the Debian sources. It even includes things
like tilegx or nios2 which have not been bootstrapped for Debian yet.

With all that being said, work to make Debian on sh3 bootstrappable is
underway and I have already got some patches like linux or glibc
fixed for sh3. Many additional packages have bug reports opened with
patches attached to the bug report.

Now, anyone can actually try rebootstrap themselves. All that is necessary
is a machine running a not too old release of Debian or Ubuntu with
an unstable schroot [3] environment configured. After that, bootstrapping
Debian for sh3 is as simple as running a single command:

	$ schroot -c sid ./bootstrap.sh HOST_ARCH=sh3

Since not all packages which need to be patched for sh3 have been updated
yet, I have added the necessary patches in a custom version of the bootstrap
script which I uploaded to my Debian webspace [4]. It would, of course, be
possible to merge all the patches required for sh3 into Helmut's git repository,
but I rather prefer the patches getting into the packages directly.

Either way, we should be able to bootstrap Debian for sh3 at the time
when J3 is available which means people will actually have a decent amount
of software they can run on their J3 machines. We will just need to set
up buildd infrastructure for sh3 then so that we can automatically build
packages for it once an updated source package is uploaded to the FTP
servers - like it's already being used for sh4.

The PDF linked in [5] shows the buildd farm consisting of SH7785LCR boards
like it was used back then for sh4 operated by Nobuhiro Iwamatsu [5].
Unfortunately, none of these boards is running anymore except for one
which I luckily obtained from Nobuhiro and which is now running in my
living room as a buildd. I have a couple of NextVoD boxes lined up which
will be set up as buildds for sh4 in the future once we have re-added
ST40 support to the Linux kernel.

If anyone has questions regarding Debian on SuperH, let me know.


> [1] https://wiki.debian.org/HelmutGrohne/rebootstrap
> [2] https://jenkins.debian.net/view/rebootstrap/
> [3] https://wiki.debian.org/Schroot
> [4] https://people.debian.org/~glaubitz/bootstrap-sh3.sh
> [5] http://oss.renesas.com/Documentations/Debian_SH4.pdf

 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

More information about the J-core mailing list