aboutsummaryrefslogtreecommitdiff
path: root/addseabios
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-25 02:32:35 +0000
committerFrancis Rowe <info@gluglug.org.uk>2014-11-25 03:26:53 +0000
commit7ff25fd1932471a23827ef821be97fc4969910e1 (patch)
treeee1fb3803d66cdd4d07209b7b273a1f1252bd6aa /addseabios
parent62d4eaaaf4b87629b37e6d16d4b4020499207d73 (diff)
downloadlibrebootfr-7ff25fd1932471a23827ef821be97fc4969910e1.tar.gz
librebootfr-7ff25fd1932471a23827ef821be97fc4969910e1.zip
libreboot_bin.tar.xz: Include utils as statically linked binaries
This means that the user does not have to install build dependency or build from source anymore.
Diffstat (limited to 'addseabios')
-rwxr-xr-xaddseabios32
1 files changed, 24 insertions, 8 deletions
diff --git a/addseabios b/addseabios
index 1d9147ee..1cc1aad3 100755
--- a/addseabios
+++ b/addseabios
@@ -30,8 +30,24 @@ if [ -f "DEBLOB" ]; then
exit 1
fi
-if [ ! -f "cbfstool" ]; then
- echo "cbfstool not found. Please run ./builddeps-cbfstool first. Check the docs for how to get build dependencies."
+if [ $(uname -i) = "i686" ] || [ $(uname -i) = "i686" ]
+ then
+ echo "You are on an i686 host"
+ if [ ! -f "cbfstool/i686/cbfstool" ]; then
+ echo "cbfstool binary not found. You will need to build it from source and put it in cbfstool/i686/"
+ exit 1
+ fi
+ $cbfstool = "../cbfstool/i686/cbfstool"
+elif [ $(uname -i) = "x86_64" ] || [ $(uname -i) = "x86_64" ]
+ then
+ echo "You are on an x86_64 host"
+ if [ ! -f "cbfstool/x86_64/cbfstool" ]; then
+ echo "cbfstool binary not found. You will need to build it from source and put it in cbfstool/x86_64/"
+ exit 1
+ fi
+ $cbfstool = "../cbfstool/x86_64/cbfstool"
+else
+ echo "You need to run this script on an i686 or x86_64 host"
exit 1
fi
@@ -40,23 +56,23 @@ 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
+ $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
+ $cbfstool $rom extract -n $config -f $config
# Delete it from the ROM
- ../cbfstool $rom remove -n $config
+ $cbfstool $rom remove -n $config
# Add the menuentry for loading SeaBIOS
- cat ../resources/grub/config/seabios.cfg >> $config
+ cat seabios.cfg >> $config
# Re-add the newly modified GRUB configuration to the ROM
- ../cbfstool $rom add -f $config -n $config -t raw
+ $cbfstool $rom add -f $config -n $config -t raw
# The GRUB configuration is no longer needed
rm -rf $config