[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compiling a bootable kernel for ia64 (itanium2, mckinley, rx2620)



Hi Frank,

On Mon, 5 Feb 2018, Frank Scheiner wrote:

The same applies to testing. We are able
 to test it here. Anyway, thanks for your messages, Frank and Daniel! The
 remaining useful tasks which I see are:

 1) learn how to compile a bootable kernel for this machine and apply this
 knowledge to compile a fresh current kernel;

 2) understand what goes wrong (by bisecting gcc), suggest a fix. (Before
 we understand it, we can't be sure what should be fixed: it's not
 necessarily abug in gcc).

Just to be sure, is your goal to get a working kernel for your specific machines (e.g. rx2620 w/Madison CPUs and possibly others)?

Or is it to get a general kernel that can be used for Debian Sid on IA64 at its current state?

We wanted to use this machine for a bit of free software development and testing on ia64, and one of the requirements is running the currently released upstream kernel. So we started looking for ways to get bootable kernels.

And then, as the problem with other kernels (other than the one from squeeze) appeared, I got interested in fixing the relevant free software, so that the fixes or at least the experience in working around the problem will be available to any other people with such machines (as part of standard releases of the relevant projects). And anyway, until we understand the reason we don't know this, but the fix might be a correction for ia64 in general, not just these specific machines,

Because on Gentoo Linux v4.9.x and v4.12.x (compiled with gcc 5.x and possibly 6.x - but I'm not sure for the latter) work with the machines I tested, i.e. currently only the rx2620 w/Montecito and a rx2660 w/Montvale. I haven't yet had the opportunity to test Gentoo on the rx4640 though.

For a quick test with a recent kernel on your machine you could try to boot kernel and initramfs from the current Gentoo Minimal Installation CD ([1]), with the elilo from Debian Wheezy ([2]). In the ISO I downloaded end of last year these were in `/gentoo.efimg.mountPoint/efi/boot` as `gentoo` (kernel) and `gentoo.igz` (initramfs).

[1]: http://distfiles.gentoo.org/releases/ia64/autobuilds/20180201T031003Z/install-ia64-minimal-20180201T031003Z.iso

[2]: http://ftp.debian.org/debian/dists/wheezy/main/installer-ia64/current/images/netboot/debian-installer/ia64/elilo.efi

Thanks for the hints! The Gentoo kernel image doesn't boot on our machine either; actually, Gleb arranged a similar setup already: Debian elilo via network boot (lanboot in EFI shell). The tested one must be a 4.12.x one:

$ file gentoo_ia64/*
gentoo_ia64/gentoo:     gzip compressed data, max compression, from Unix
gentoo_ia64/gentoo.igz: gzip compressed data, was "initramfs-4.12.12-gentoo", last modified: Thu Dec 7 20:23:05 2017, max compression, from Unix
$

All the successful and failed attempts can be seen from our elilo.conf which I'm attaching.

--
Best regards,
Ivan
## elilo configuration file generated by elilo 3.12-4

# install=/usr/lib/elilo/elilo.efi
# boot=/dev/sdc1
delay=20
# default=2.6.32-5-mckinley
#default=3.2.0-4-itanium
# default=3.2.0-4-mckinley
# default=gentoo-serial
#default=experiment-squeeze
#default=experiment-wheezy
#default=fallback-wheezy
default=jrtc27-wheezy

#relocatable
prompt
timeout=10

# this kernel is the only working
image=debian_ia64/vmlinuz-2.6.32-5-mckinley
	label=2.6.32-5-mckinley
	# root=/dev/sda2
	root=/dev/sdb3
	read-only
	initrd=debian_ia64/initrd.img-2.6.32-5-mckinley

image=debian_ia64/vmlinuz-3.2.0-4-itanium
	label=3.2.0-4-itanium
	root=/dev/sda2
	read-only
	initrd=debian_ia64/initrd.img-3.2.0-4-itanium
	append="debug panic=10"

image=debian_ia64/vmlinuz-3.2.0-4-mckinley
	label=3.2.0-4-mckinley
	root=/dev/sda2
	read-only
	initrd=debian_ia64/initrd.img-3.2.0-4-mckinley
	append="debug"

image=gentoo_ia64/gentoo
	label=gentoo-serial
	initrd=gentoo_ia64/gentoo.igz
	append="initrd=gentoo.igz root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot console=tty0 console=ttyS0,9600"

#image=alt_ia64/vmlinux-v2.6.32.71
#image=alt_ia64/vmlinux-v2.6.32
#image=alt_ia64/vmlinuz-2.6.32-5-mckinley
#image=ia64-debian-rebuilt/imz/with-gcc-4.6.3-O1_wheezy/boot/vmlinuz-2.6.32-5-mckinley
#image=alt_ia64/vmlinux-v4.15-rc9-54-ge9b16d420569
# now the next one works too
#image=ia64-debian-rebuilt/glebfm/with-gcc-4.3.5_squeeze/boot/vmlinuz-2.6.32-5-mckinley
# this one is bootable, too (but initrd doesn't match; then it reboots after 30 sec)
image=ia64-debian-rebuilt/imz/with-gcc-4.4.5_squeeze/boot/vmlinuz-2.6.32-5-mckinley
#image=ia64-debian-rebuilt/imz/with-gcc-4.4.5-O1_squeeze/boot/vmlinuz-2.6.32-5-mckinley
# this one is bootable, too (but initrd doesn't match; then it reboots after 30 sec)
#image=ia64-debian-rebuilt/imz/with-gcc-4.4.7_wheezy/boot/vmlinuz-2.6.32-5-mckinley
#image=ia64-debian-rebuilt/imz/with-gcc-4.4.7-O1_wheezy/boot/vmlinuz-2.6.32-5-mckinley
# this one is bootable, too (but initrd doesn't match; then it reboots after 30 sec)
#image=ia64-debian-rebuilt/imz/with-gcc-4.5.3_wheezy/boot/vmlinuz-2.6.32-5-mckinley
# this one is bootable, too (but hangs on udev; there are no modules for this version)
# -- use experiment-wheezy to boot this
#image=ia64-debian-rebuilt/imz/with-gcc-4.4.7_wheezy/boot/vmlinuz-3.2.0-4-mckinley
	label=experiment-squeeze
	root=/dev/sdb3
	read-only
	initrd=debian_ia64/initrd.img-2.6.32-5-mckinley
	append="debug panic=10"
	# append="debug console=ttyS0,9600 earlycon=uart8250,mmio,0xff5e0000,9600n8"

#[    0.000000] Early serial console at MMIO 0xff5e0000 (options '9600n8')
#[    8.092215] 00:04: ttyS0 at MMIO 0xff5e0000 (irq = 49) is a 16550A
#[    8.309574] 00:05: ttyS1 at MMIO 0xff5e2000 (irq = 50) is a 16550A

image=ia64-debian-rebuilt/glebfm/with-gcc-4.3.5_squeeze/boot/vmlinuz-2.6.32-5-mckinley
	label=fallback-wheezy
	root=/dev/sda2
	read-only
	initrd=debian_ia64/initrd.img-2.6.32-5-mckinley
	append="debug panic=10"
	# append="debug console=ttyS0,9600 earlycon=uart8250,mmio,0xff5e0000,9600n8"

# doesn't boot (the original wheezy kernel?)
#image=debian_ia64/vmlinuz-3.2.0-4-mckinley
# boots, too:
image=ia64-debian-rebuilt/imz/with-gcc-4.4.7_wheezy/boot/vmlinuz-3.2.0-4-mckinley
#image=ia64-debian-rebuilt/imz/with-gcc-4.5.3_wheezy/boot/vmlinuz-3.2.0-4-mckinley
#image=ia64-debian-rebuilt/imz/with-gcc-4.5.3-O1_wheezy/boot/vmlinuz-3.2.0-4-mckinley
	label=experiment-wheezy
	root=/dev/sda2
	read-only
	# created after installing the rebuilt pkg
	initrd=ia64-debian-rebuilt/imz/with-gcc-4.4.7_wheezy/boot/initrd.img-3.2.0-4-mckinley
	append="debug panic=10"

# this boots, too; from https://people.debian.org/~jrtc27/wheezy-backports-ia64/linux-image-3.16.0-0.bpo.4-mckinley_3.16.39-1+deb8u1~bpo70+1+gcc4.4_ia64.deb
image=ia64-debian-rebuilt/jrtc27/linux-image-3.16.0-0.bpo.4-mckinley_3.16.39-1+deb8u1~bpo70+1+gcc4.4_ia64.deb/boot/vmlinuz-3.16.0-0.bpo.4-mckinley
	label=jrtc27-wheezy
	root=/dev/sda2
	read-only
	initrd=ia64-debian-rebuilt/jrtc27/linux-image-3.16.0-0.bpo.4-mckinley_3.16.39-1+deb8u1~bpo70+1+gcc4.4_ia64.deb/boot/initrd.img-3.16.0-0.bpo.4-mckinley
	append="debug panic=10"
	# append="debug console=ttyS0,9600 earlycon=uart8250,mmio,0xff5e0000,9600n8"


Reply to: