Re: Fwd: Debian on Linux-SH4
Robert Święcki <[email protected]> Tue, 11 Jan 2022 12:41:54 +0100
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.debian.ports.superh |
|---|---|
| Message-ID | <CAP145pjQJkgHx0AhGvDp9Rg0x0KfN1utxMaehrqp8sWNSR4x0g@mail.gmail.com> |
> On 1/11/22 12:23, Robert Święcki wrote: > > Recently I tried to create a working modern disk image for Linux-SH4. > > There were many problems, but I finally managed to pull it off. > > > > If anyone needs a working Debian (unstable/experimental) + kernel > > 5.15.0 - here're the images/kernels/scripts > > You could also create a Debian unstable environment for the sh4 architecture > using debootstrap: > > suse-laptop:/tmp # debootstrap --no-check-gpg --arch=sh4 --foreign unstable debian-sh4-root http://ftp.ports.debian.org/debian-ports > I: Retrieving InRelease > I: Retrieving Packages > I: Validating Packages > I: Resolving dependencies of required packages... > (...) > I: Extracting login... > I: Extracting logsave... > I: Extracting mawk... > I: Extracting mount... > I: Extracting ncurses-bin... > I: Extracting passwd... > I: Extracting perl-base... > I: Extracting sed... > I: Extracting sysvinit-utils... > I: Extracting tar... > I: Extracting util-linux... > I: Extracting zlib1g... > suse-laptop:/tmp # > > Then run "./debootstrap/debootstrap --second-stage" on the target system. > > If your qemu-user is properly set up to use binfmt (which is currently not the case on my > system), you can omit the "--foreign" option and get a ready-to-boot chroot for Debian sh4. Thanks, I guess I did it the hard way then (through the debian-installer) :) BTW: some problems I noticed during installation: - debian-installer for sh4 (probably one of the most recent ones) has tools compiled with glibc-2.33 but the version of glibc inside (initrd image) is glibc-2.32, so some tools like mount and part*something refuse to run with sth like "missing symbol GLIBC_2.33" - debian-installer comes with kernel version 5.13 or so, and the pool-sh4 has only 5.15.*-di kernels - I used custom kernel with custom kernel version (so it matches the -di kernel version) - older debian-installers for sh4 won't run on r2d with 64MB RAM due to OOOms. I added some ninja swap images to bypass that. I think newer installers have low-RAM mode, and it works better. PS: Many years ago I was solving a CTF (Capture The Flag) challenge - https://blog.dragonsector.pl/2014/12/seccon-2014-japanese-super-micro.html - which was using SH4 for Linux compiled in big-endian mode. I guess someone went through troubles to compile Linux kernel in big-endian, and then compiled some userland to big-endian too. Dunno.