From 40fe5eae21fca449809d1223cf4048a26f028227 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Tue, 16 Sep 2014 13:12:04 -0400 Subject: ROM images no longer include SeaBIOS Instead, the user adds it afterwards. Documentation and scripts updated. --- diff --git a/addseabios b/addseabios new file mode 100755 index 0000000..57f716a --- /dev/null +++ b/addseabios @@ -0,0 +1,65 @@ +#!/bin/bash + +# addseabios script: add SeaBIOS to the ROM images. +# This also adds SeaVGABIOS, SeaBIOS's free/libre video bios "wrapper" for coreboot native graphics +# +# Copyright (C) 2014 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +echo "Adding SeaBIOS and SeaVGABIOS to the ROM's" + +# Because the DEBLOB script isn't included in the binary archives. +# This is how we know. +if [ -f "DEBLOB" ]; then + echo "Do not run this in meta/src directory. Do it in binary archive, either with libreboot-supplied ROM images or your own binary archive created with 'build-release'." + exit +fi + +if [ ! -f "cbfstool" ]; then + echo "cbfstool not found. Please run ./builddeps-cbfstool first. Check the docs for how to get build dependencies." + exit +fi + +# Add SeaBIOS and SeaVGABIOS to *all* ROM's +cd bin/ +for rom in $(find -type f) +do + # Add them + ../cbfstool $rom add -f ../vgabios.bin -n vgaroms/vgabios.bin -t raw + ../cbfstool $rom add -f ../bios.bin.elf -n bios.bin.elf -t raw + + # Modify the GRUB configuration + for config in grub.cfg grubtest.cfg + do + # Extract (dump) the config + ../cbfstool $rom extract -n $config -f $config + + # Delete it from the ROM + ../cbfstool $rom remove -n $config + + # Add the menuentry for loading SeaBIOS + cat ../resources/grub/config/seabios.cfg >> $config + + # Re-add the newly modified GRUB configuration to the ROM + ../cbfstool $rom add -f $config -n $config -t raw + + # The GRUB configuration is no longer needed + rm -rf $config + done +done +cd ../ + +echo "DONE! All of the ROM's under bin/ have been modified to include SeaBIOS/SeaVGABIOS and include a GRUB menuentry for it." diff --git a/build-release b/build-release index 36453e9..84e3575 100755 --- a/build-release +++ b/build-release @@ -112,6 +112,12 @@ mkdir libreboot_bin # Include the ROM's in the binary archive cp -r bin libreboot_bin/ +# Include SeaBIOS and SeaVGABIOS option ROM in the binary archive +cp seabios/out/vgabios.bin libreboot_bin/ +cp seabios/out/bios.bin.elf libreboot_bin/ +# Add the script for it +cp addseabios libreboot_bin/ + # Include flashrom utility in binary archive # (source only, no binaries. To eliminate cross-distro dependency issue) cp -r libreboot_src/flashrom libreboot_bin/ diff --git a/builddeps-cbfstool b/builddeps-cbfstool index 515a21b..c9c07e3 100755 --- a/builddeps-cbfstool +++ b/builddeps-cbfstool @@ -21,6 +21,13 @@ # DO NOT RUN THIS IN libreboot_src OR libreboot_meta # THIS IS FOR libreboot_bin +# Because the DEBLOB script isn't included in the binary archives. +# This is how we know. +if [ -f "DEBLOB" ]; then + echo "Do not run this in meta/src directory. Do it in binary archive, either with libreboot-supplied ROM images or your own binary archive created with 'build-release'." + exit +fi + cd cbfstool_standalone make clean make diff --git a/buildrom-withgrub b/buildrom-withgrub index 6ff7e2d..117051f 100755 --- a/buildrom-withgrub +++ b/buildrom-withgrub @@ -65,12 +65,10 @@ rm -rf .config config_txtmode # Insert files/configurations and perform operations that are common on all images # --------------------------------------------------------------------------------------------------------------- -for rom in libreboot_vesafb.rom libreboot_txtmode.rom -do - # Add SeaBIOS and SeaVGABIOS - ./cbfstool $rom add -f ../seabios/out/vgabios.bin -n vgaroms/vgabios.bin -t raw - ./cbfstool $rom add -f ../seabios/out/bios.bin.elf -n bios.bin.elf -t raw -done +# for rom in libreboot_vesafb.rom libreboot_txtmode.rom +# do + # Nothing to do here +# done # Insert files/configurations and perform operations that are common on libreboot_vesafb.rom (coreboot framebuffer configuration) # --------------------------------------------------------------------------------------------------------------- diff --git a/docs/index.html b/docs/index.html index d6d68e5..e703df9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -66,6 +66,7 @@
  • How to build your ROM's
  • +
  • Add SeaBIOS to your ROM's
  • Supported hardware

    @@ -602,6 +603,44 @@
    +

    How to add SeaBIOS to your ROM's

    + +

    + SeaBIOS isn't really needed since libreboot uses the GRUB payload which + is much better (for several reasons), so it is no longer included in the ROM + images by default. Instead, you can add it afterwards. +

    + +

    + In the supplied binary archives, or in your own (if you did 'build-release') you can add SeaBIOS + to the ROM images, along with SeaVGABIOS which is a free/libre Video BIOS implementation that wraps + around the 'native graphics initializitation' code in coreboot, for boards that have support for it. +

    + +

    + First, install the build dependencies. +

    + +

    + Build cbfstool:
    + $ ./builddeps-cbfstool +

    + +

    + Now:
    + $ ./addseabios +

    + +

    + SeaBIOS and SeaVGABIOS (which the build scripts created, and the build-release script put - compiled - + inside the binary archive) have now been added to all of the ROM images under ./bin/. A GRUB menuentry will show + up when you boot your machine, allowing you to use SeaBIOS. +

    + +

    Back to top of page

    + +
    +

    List of supported hardware

    diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg index ec476fd..e8a32e1 100644 --- a/resources/grub/config/menuentries/common.cfg +++ b/resources/grub/config/menuentries/common.cfg @@ -11,10 +11,6 @@ menuentry 'Parse ISOLINUX menu (CD)' { set root='ata0' syslinux_configfile -i (ata0)/isolinux/isolinux.cfg } -menuentry 'Load SeaBIOS' { - set root='cbfsdisk' - chainloader /bios.bin.elf -} menuentry 'Switch to grubtest.cfg' { set root='cbfsdisk' configfile (cbfsdisk)/grubtest.cfg diff --git a/resources/grub/config/seabios.cfg b/resources/grub/config/seabios.cfg new file mode 100644 index 0000000..8c27be0 --- /dev/null +++ b/resources/grub/config/seabios.cfg @@ -0,0 +1,4 @@ +menuentry 'Load SeaBIOS' { + set root='cbfsdisk' + chainloader /bios.bin.elf +} -- cgit v0.9.1