[PATCH 00/27] sparc32: sunset sun4m and sun4d

Andreas Larsson andreas at gaisler.com
Fri Dec 22 15:27:19 UTC 2023


On 2023-12-20 18:25, John Paul Adrian Glaubitz wrote:
> Hi Sam,
> 
> On Wed, 2023-12-20 at 16:22 +0100, Sam Ravnborg wrote:
>>> The leon3_generic machine is maintained by different people so I'd suggest
>>> contacting them: see [1] for their contact details. I see there is an
>>> avocado boot test for the leon3_generic machine included within the QEMU
>>> source tree, but it uses a downloadable image of HelenOS rather than Linux.
>>
>> Thanks for the pointer, I will try to reach out to them when I have
>> something a bit more solid than "it does not work".
>>
>> I tried to hack around a little in qemu and I have an idea where things
>> goes wrong. The leon_generic assumes another address layout than what is
>> used by the kernel, so the very first jump to a kernel address fails.

The MKLINUXIMG second stage bootloader sets up MMU tables and the SPARC
OPENPROM interface for LEON systems, so you need to run the vmlinux
image through that. You can find it (and our other Linux related
releases) via https://gaisler.com/index.php/downloads/linux. The manual
is at https://www.gaisler.com/doc/mklinuximg.pdf and the latest release at
https://gaisler.com/anonftp/linux/linux-2.6/kernel/mklinuximg-2.0.15.tar.bz2

With a sparc-linux-gcc in the PATH (or using CROSS_COMPILE to point out
a toolchain stem) you can do:

mklinuximg vmlinux image.ram

and then run the resulting image.ram in e.g. QEMU 8.2.0 with

qemu-system-sparc -nographic -M leon3_generic -m 256 -kernel image.ram

This at least boots the kernel and let me log in when quickly testing a
few images with root filesystems in initramfs, admittedly with our
kernel patches in place.


> I would argue that before we start introducing larger changes to arch/sparc,
> we should settle the maintainership question first. Once we have an active
> maintainer again, we can have a more extended discussion about what to keep
> and how to name things.
I agree.

Cheers,
Andreas



More information about the dri-devel mailing list