Re: New Debian sparc64 test kernel for stack corruption issue

Gregor Riepl <[email protected]> Fri, 14 Nov 2025 00:38:45 +0100
Newsgroups gmane.linux.debian.ports.sparc
Message-ID <[email protected]>
> I think the problem was that the generated kernel image is compressed which is why it
> won't work with GRUB unless to decompress it first on the target machine.

Huh, you're right!

At first glance, I thought there was a build option for this.
And there is, in fact, but it gets autoremoved if you try to set it on sparc64.
This thread[1] hints that setting HAVE_KERNEL_UNCOMPRESSED helps, so I added "select HAVE_KERNEL_UNCOMPRESSED=y" to arch/sparc/Kconfig helped, but this didn't work.
I still ended up with a gzip-compressed /boot/vmlinuz. :(

But no worries, decompressing it manually isn't a big deal.

>> apt install gcc-sparc64-linux-gnu libdw-dev:native libssl-dev:sparc64
> 
> What's libssl-dev needed for?
I have no idea... the build process seems to use some Debian functionality, and it complains if the package isn't installed.
Oh, and I forgot... you still need to force cross-compilation, but you can use the Debian compiler instead:

export CROSS_COMPILE=sparc64-linux-gnu-
export ARCH=sparc

And I can confirm that the resulting kernel boots fine.

However... I can't seem to get KGDB to work. :(
This kernel has it enabled:
grep KGDB .config
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_HONOUR_BLOCKLIST=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
CONFIG_KGDB_KDB=y

But when I try to configure it, I get:
echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc
bash: echo: write error: No such device

Configuring through the kernel command line doesn't work either.

The only KGDB-related message I see in dmesg is:
platform kgdboc: deferred probe pending: (reason unknown)

Any ideas?

[1] https://forums.gentoo.org/viewtopic-p-8773246.html