Difference between revisions of "Board:gigabyte/m57sli"

From coreboot
Jump to navigation Jump to search
(add buildrom instructions)
Line 44: Line 44:
If you want to boot from an IDE drive, SATA drive, USB stick or CDROM, you can use [[FILO]].
If you want to boot from an IDE drive, SATA drive, USB stick or CDROM, you can use [[FILO]].


===Building the payload===
Another possible payload is 'linux-as-a-bootloader' (LAB). You will need a 1MB rom chip (the m57sli-s4 comes with a 512KB rom chip) for this payload. It consists of a (stripped down) kernel + busybox, which can then be used to kexec a kernel from disk. If your disks are playing up, you will still have a busybox environment on boot, which could be useful for debugging.
 
=== buildrom vs manual build ===
 
You can build a linuxBIOS image with a kconfig-style configuration tool (buildrom) if you want to use FILO or LAB. This is by far the easiest way to build a rom image. Continue to the <strong>Buildrom</strong> section.
 
If you want another payload or would like to get closer to the metal, you can use the manual build method outlined below under <strong>Manual build</strong>.
 
===Buildrom===
 
Skip this section if you want to do a manual build.
 
Check out buildrom:
 
  svn co svn://linuxbios.org/buildrom
 
Now configure buildrom:
 
  cd buildrom/buildrom-devel
  make menuconfig
 
Configure to your liking. If you use the LAB payload, make sure to exclude the kexec binary and boot menu from the initramfs, otherwise your image will be too big. Please note that currently only the FILO and LAB payloads have been tested. The other payloads likely require some more work before they will be useable. Patches are welcome, of course.
 
  make
 
If all goes well, you should now have a rom image file
 
  deploy/gigabyte-m57sli.rom
 
If you are building a FILO payload, it will be exactly 512KB in size. If you are building an LAB payload, the image will be 1MB.
 
====FILO payload====
 
Skip this section if you use the LAB payload.
 
When using FILO in GRUB emulation mode, it's important to get a few details right in your GRUB boot stanza. This is what mine looks like:
 
<pre>
title  Ubuntu LB, kernel 2.6.21-rc3
root    (hd4,0)
kernel    /boot/vmlinuz-2.6.21-rc3 root=/dev/sda1 ro acpi_use_timer_override console=tty0 console=ttyS0,115200
savedefault
boot
</pre>
 
Note the root device - FILO sees the first sata device as hd4.
 
In order to get serial output from GRUB, you will also need to add something like this to your menu.lst:
 
  # serial port 0
  serial --unit=0 --speed=115200
  terminal --timeout=15 serial console
 
====LAB payload====
 
Skip this section if you use the FILO payload.
 
The LAB payload expects a file /etc/boot.conf with contents like this:
 
  CMDLINE="root=/dev/sda1 ro console=tty0 console=ttyS0,115200"
  KERNEL="/boot/vmlinuz-2.6.22.1"
  INITRD=""
  VT="1"
 
This is the kernel that you will be running after boot. It will be kexec'ed by the kernel that is burned into your rom chip.
 
You will also need a statically linked copy of kexec, which the LAB payload expects to reside at
 
  /sbin/kexec
 
If you are on a Debian-based system, you can easily recompile your kexec package to be statically linked by following these instructions:
 
  cd /usr/src
  apt-get source kexec-tools
  export LDFLAGS="-static"
  edit kexec-tools-1.101-kdump10/kexec-tools-1.101/kexec/Makefile, change line 53 to
 
    $(CC) $(LDFLAGS) $(KCFLAGS) -o $@ $(KEXEC_OBJS) $(UTIL_LIB) $(LIBS)
 
    (you're adding the LDFLAGS variable)
 
  cd kexec-tools-1.101-kdump10
  dpkg-buildpackage -rfakeroot -b
  cd ..
  dpkg -i kexec-tools_1.101-kdump10-2ubuntu2_i386.deb
 
Adjust the package name as necessary for your distribution. You can tell if your copy of kexec is statically linked by running 'file' on it:
 
  file /sbin/kexec
 
If all is well, you will see something like this:
 
  /sbin/kexec: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, statically linked, for GNU/Linux 2.2.0, stripped
 
The binary will also be considerably larger than its dynamically linked cousin.
 
===Manual build===
 
Skip this section if you used buildrom; in that case jump to 'burning LinuxBIOS' below.
 
====Building the payload====


In order to boot from a SATA disk, we use FILO.
In order to boot from a SATA disk, we use FILO.
Line 111: Line 211:
Now execute 'make', which will generate a filo.elf file that will be your payload. You will need to refer to this file to build LinuxBIOS as explained below, because it gets included in the LinuxBIOS ROM image.
Now execute 'make', which will generate a filo.elf file that will be your payload. You will need to refer to this file to build LinuxBIOS as explained below, because it gets included in the LinuxBIOS ROM image.


===Your menu.list entry===
====Your menu.list entry====


When using FILO in GRUB emulation mode, it's important to get a few details right in your GRUB boot stanza. This is what mine looks like:
When using FILO in GRUB emulation mode, it's important to get a few details right in your GRUB boot stanza. This is what mine looks like:
Line 127: Line 227:
Also, the m57sli-s4 will not boot unless you add acpi_use_timer_override as a kernel option - and use a modern kernel (tested on 2.6.20.1 and up). Hopefully this will be fixed in newer kernels. If you have a somewhat older kernel (tested with 2.6.16 and up), add these options: apic=debug acpi_dbg_level=0xffffffff pci=noacpi,routeirq snd-hda-intel.enable_msi=1.
Also, the m57sli-s4 will not boot unless you add acpi_use_timer_override as a kernel option - and use a modern kernel (tested on 2.6.20.1 and up). Hopefully this will be fixed in newer kernels. If you have a somewhat older kernel (tested with 2.6.16 and up), add these options: apic=debug acpi_dbg_level=0xffffffff pci=noacpi,routeirq snd-hda-intel.enable_msi=1.


===Current status of the LBv2 tree===
====Current status of the LBv2 tree====


Use revision 2619 or higher.
Use revision 2619 or higher.


===Building LinuxBIOS===
====Building LinuxBIOS====


Make sure that the path to your payload is correct, by editing  
Make sure that the path to your payload is correct, by editing  
Line 162: Line 262:


   util/flashrom/flashrom -v -w linuxbios.rom
   util/flashrom/flashrom -v -w linuxbios.rom
(that's assuming the image is called linuxbios.rom; if you used buildrom it would be called gigabyte-m57sli.rom and live in the 'deploy' subdirectory).


===TODO===
===TODO===

Revision as of 22:26, 12 September 2007