[LinuxBIOS] buildrom: add support for tyan s2891

Ward Vandewege ward at gnu.org
Mon Sep 24 23:57:43 CEST 2007


On Mon, Sep 24, 2007 at 03:40:57PM -0600, Jordan Crouse wrote:
> On 24/09/07 17:36 -0400, Ward Vandewege wrote:
> > This was tested on real hardware.
> 
> ACK  even the secret !tyan related diff in the first chunk.. :)

Ah, yes, sorry about that, I should have explained. Basically I moved the LAB
'config' file to /lab.conf on the first partition (that's an improvement, see
next paragraph). The kexec binary is now also expected to live in /kexec on
the first partition. The patch also makes sure that specifying an initrd in
the LAB config file would actually be respected (that was a bug).

The reason for putting the LAB config file and kexec binary in / on partition
1 rather than /etc and /sbin respectively, is that often (at least in our
setups) /boot is the first partition, and is a simple software raid-1 across
however many disks there are in the system. The rest of the system can be
software raid-5, lvm on sw raid, etc. We do things this way because GRUB does
not understand sw-raid nor LVM.

Not needing MD or LVM drivers in the kernel that lives in rom makes it
smaller, which is better. Putting a static kexec there means that it will not
be managed by a package manager, which could overwrite it with a dynamic
version one day, which would break the next boot...

> Acked-by: Jordan Crouse <jordan.crouse at amd.com>

Thanks, I'll commit, and I'll separate out the !tyan related stuff with the
above comment.

Thanks,
Ward.

> > This patch adds Tyan s2891 support to buildrom. This makes booting from SATA
> > easier, as the CK804 chipset on this board can not emulate SATA disks as IDE
> > devices.
> > 
> > Signed-off-by: Ward Vandewege <ward at gnu.org>
> > 
> > Index: skeleton/bin/boot.functions
> > ===================================================================
> > --- skeleton/bin/boot.functions	(revision 37)
> > +++ skeleton/bin/boot.functions	(working copy)
> > @@ -5,8 +5,8 @@
> >  # The best solution is to use olpc-boot.sh
> >  
> >  CMDLINE="root=/dev/sda1 ro console=tty0 console=ttyS0,115200"
> > -KERNEL="/boot/vmlinuz"
> > -INITRD="/boot/initrd.img"
> > +KERNEL="vmlinuz"
> > +INITRD="initrd.img"
> >  VT="1"
> >  
> >  message() {
> > @@ -20,14 +20,19 @@
> >  	# Switch to the mounted directory to make life easier for the script
> >  	cd $DIR 
> >  
> > -	# Any of the above can be over-ridden by /boot.conf
> > +	# Any of the above can be over-ridden by /lab.conf
> >  
> > -	if [ -f $DIR/etc/boot.conf ]; then
> > -		. $DIR/etc/boot.conf
> > +	if [ -f $DIR/lab.conf ]; then
> > +		. $DIR/lab.conf
> >  	fi
> >  
> > -	$DIR/sbin/kexec -l $DIR/$KERNEL --command-line="$CMDLINE"
> > -	$DIR/sbin/kexec -e
> > +	if [ "$INITRD" = "" ]; then
> > +		$DIR/kexec -l $DIR/$KERNEL --command-line="$CMDLINE"
> > +	else
> > +		$DIR/kexec -l $DIR/$KERNEL --initrd=$DIR/$INITRD --command-line="$CMDLINE"
> > +	fi
> >  
> > -	message "ERROR: can't run kexec $DIR$KERNEL $CMDLINE $INITRD"
> > +	$DIR/kexec -e
> > +
> > +	message "ERROR: can't run kexec $DIR/$KERNEL $CMDLINE $INITRD"
> >  }

-- 
Ward Vandewege <ward at fsf.org>
Free Software Foundation - Senior System Administrator




More information about the coreboot mailing list