Re: Serial Console Support in Kernel
New images for amiga and atari are here:
http://people.debian.org/~cts/debian-m68k/linux-image/
All other arches had SERIAL_CONSOLE already enabled, it seems.
On Thu, Jun 12, 2008 at 12:02:29PM +0200, Ingo Juergensmann wrote:
> On Thu, Jun 12, 2008 at 11:42:41AM +0200, Christian T. Steigies wrote:
>
> > I wrote a couple of scripts which are now used on crest and kullervo to
> > switch betwen different kernels, taking into account if the last kernel booted
> > successfully or not. There are not very pretty, but they seem to do the job.
> > You should be able to see them on crest/kullervo.
>
> No, I cannot... because DSA once thought it would be a nice idea to close my
> account on Crest. ;)
user-startup calls autoboot (it seems I do not need any 060 commands or
libraries, at least on kullervo).
;--- schnipp ---
;c:setpatch
;c:cpu060
EXECUTE s:autoboot
;--- schnapp ---
autoboot looks like this:
;--- schnipp ---
IF exists SYS:linux/boot-2.6.24-1
ECHO "Booting kernel 2.6.24-1"
WAIT 10
DELETE SYS:linux/boot-2.6.24-1
EXECUTE SYS:linux/Linuxstart-2.6.24-1
ELSE
ECHO "no kernel 2.6.24-1"
ENDIF
IF exists SYS:linux/boot-2.6.22
ECHO "Booting kernel 2.6.22"
WAIT 10
DELETE SYS:linux/boot-2.6.22
EXECUTE SYS:linux/Linuxstart-2.6.22
ELSE
ECHO "no kernel 2.6.22"
ENDIF
IF exists SYS:linux/boot-2.6.18-4
ECHO "Booting kernel 2.6.18-4"
WAIT 10
DELETE SYS:linux/boot-2.6.18-4
EXECUTE SYS:linux/Linuxstart-2.6.18-4
ELSE
ECHO "Booting fallback kernel"
WAIT 5
EXECUTE c:Linuxstart
ENDIF
c:Linuxstart-2.4.31
;--- schnapp ---
linux/Linuxstart-2.6.24-1 is created by a script, looks like this:
;--- schnipp ---
sys:bin/amiboot-5.6 -k sys:linux/vmlinux-2.6.24-1-amiga root=/dev/sdb4
video=amifb debug-mem
;--- schnapp ---
to /etc/crontab I added this
;--- schnipp ---
@reboot root /usr/local/sbin/select-kernelversion boot
;--- schnapp ---
select-kernelversion is this script (which is slightly different on crest
and kullervo for the ADOS and ROOT variables)
;--- schnipp ---
#! /bin/bash
# select kernelversion
# install: copy uncompressed vmlinux to Amiga DOS partition, create boot
# script
# boot: create AmigaOS file to select default boot kernel
#VER=2.6.18-4
VER=2.6.24-1
ARCH=amiga
ADOS=/dev/sda1
ROOT=/dev/sdb4
echo "kernel version vmlinux-$VER-$ARCH"
case "$1" in
install)
if [ -e "/boot/vmlinuz-$VER-$ARCH" ]; then
mount $ADOS /mnt
gunzip -cd /boot/vmlinuz-$VER-$ARCH > /mnt/linux/vmlinux-$VER-$ARCH
echo \
"sys:bin/amiboot-5.6 -k sys:linux/vmlinux-$VER-$ARCH root=$ROOT video=amifb debug-mem" > /mnt/linux/Linuxstart-$VER
echo "yes"> /mnt/linux/boot-$VER
ls -l /mnt/linux/
umount /mnt
fi
;;
boot)
if [ -e "/boot/vmlinuz-$VER-$ARCH" ]; then
mount $ADOS /mnt
echo "yes"> /mnt/linux/boot-$VER
ls -l /mnt/linux/
umount /mnt
fi
;;
*)
echo "Usage: select-kernelversion {install|boot}"
exit 1
;;
esac
exit 0
;--- schnapp ---
When a new kernel is installed, the script should be called with the install
option, after VER has been updated. This kernel needs to be added (manually)
to the top of the autoboot script, so it will be tried first. If that kernel
fails to boot, on the next reboot, an older version will be tried, until one
boots. If the new kernel failed, on the next reboot it will be activated
again for autoboot, so this needs to be fixed manually as well. So a few
things could be made better, but it has been working fine so far and there
are several fallback kernels on the machine.
> Maybe it's a good idea to test again? You're in front of aahz and can do
> things, whileas I'm currently in Berlin whereas Spice is in Rostock and it's
> still building packages.
> A crashing bootblock does less harm on aahz at the moment than on spice. ;)
> (I know: missing time ;)
Since I need to reinstall, it can not hurt. But you guessed where the real
problem is...
Christian
Reply to: