summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xaddseabios65
-rwxr-xr-xbuild-release6
-rwxr-xr-xbuilddeps-cbfstool7
-rwxr-xr-xbuildrom-withgrub10
-rw-r--r--docs/index.html39
-rw-r--r--resources/grub/config/menuentries/common.cfg4
-rw-r--r--resources/grub/config/seabios.cfg4
7 files changed, 125 insertions, 10 deletions
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 <info@gluglug.org.uk>
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+
+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 @@
</ul>
</li>
<li><a href="#build">How to build your ROM's</a></li>
+ <li><a href="#build_addseabios">Add SeaBIOS to your ROM's</a></li>
</ul>
<h2>Supported hardware</h2>
@@ -602,6 +603,44 @@
<hr/>
+ <h1 id="build_addseabios">How to add SeaBIOS to your ROM's</h1>
+
+ <p>
+ 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.
+ </p>
+
+ <p>
+ 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.
+ </p>
+
+ <p>
+ First, <a href="#build_dependencies">install the build dependencies</a>.
+ </p>
+
+ <p>
+ Build cbfstool:<br/>
+ $ <b>./builddeps-cbfstool</b>
+ </p>
+
+ <p>
+ Now:<br/>
+ $ <b>./addseabios</b>
+ </p>
+
+ <p>
+ 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.
+ </p>
+
+ <p><a href="#pagetop">Back to top of page</a></p>
+
+<hr/>
+
<h1 id="supported_list">List of supported hardware</h1>
<p>
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
+}