summaryrefslogtreecommitdiffstats
path: root/builddeps-flashrom
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-12-29 21:13:49 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-12-29 21:30:36 (EST)
commit3e60ad76e2cef38bc59f6055c677ea2d890e10fe (patch)
tree782a8a0bb988aae3db5847aae9d56e832e480056 /builddeps-flashrom
parent05d821cecb953efd2cbc2d7cb21278a33a59000b (diff)
downloadlibreboot-3e60ad76e2cef38bc59f6055c677ea2d890e10fe.zip
libreboot-3e60ad76e2cef38bc59f6055c677ea2d890e10fe.tar.gz
libreboot-3e60ad76e2cef38bc59f6055c677ea2d890e10fe.tar.bz2
Removed redundant flashchip definitions in flashrom
For X200 owners with one of the Macronix flash chips. There are multiple definitions for almost the same chip, and they are all detected at once. Normally the user has to use the -c argument in flashrom to select a flash chip. With this modification, they can run flashrom without the argument. Deletion of redundant flash chip definitions is now also handled by getflashrom instead of builddeps-flashrom. builddeps-flashrom now only patches for i945 lenovo bios sst/macronix.
Diffstat (limited to 'builddeps-flashrom')
-rwxr-xr-xbuilddeps-flashrom21
1 files changed, 15 insertions, 6 deletions
diff --git a/builddeps-flashrom b/builddeps-flashrom
index 1765e4b..4ae96bc 100755
--- a/builddeps-flashrom
+++ b/builddeps-flashrom
@@ -27,13 +27,22 @@ set -u -e -v
cd flashrom/
-# build patched binary for libreboot X60/T60 (MX25L1605D chip)
-# - this patch removes redundant definitions from flashchips.c
-# - this patch removes the need to use the -c parameter in flashrom
+# build regular flashrom (redundant flash chip definitions removed)
+make clean
+if (( $# != 1 )); then
+ # build it dynamically linked
+ make
+else
+ # build it statically linked
+ make SHARED=0 CC='gcc -static'
+fi
+
+mv flashrom flashrom_normal
+
# build patched binaries for MX25L1605D and SST25VF016B flash chips
# - these patches are needed for initial installation on an X60 or T60
# - these patches are for people who have lenovo bios running
-for patchname in "normal" "lenovobios_macronix" "lenovobios_sst"
+for patchname in "lenovobios_macronix" "lenovobios_sst"
do
# first remove the existing build
make clean
@@ -42,7 +51,7 @@ do
# backup the unpatched flashchips.c (it will be patched)
cp flashchips.c flashchips.c_
# patch flashchips.c
- patch flashchips.c < ../resources/flashrom/patch/flashchips.c.diff."$patchname"
+ patch flashchips.c < ../resources/flashrom/patch/"$patchname".diff
if (( $# != 1 )); then
# build it dynamically linked
@@ -59,7 +68,7 @@ do
rm -f flashchips.c
mv flashchips.c_ flashchips.c
done
-# flashrom normal should actually be considered the default
+
mv flashrom_normal flashrom
cd ../