diff options
author | Francis Rowe <info@gluglug.org.uk> | 2014-07-11 04:53:00 (EDT) |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2014-08-22 13:01:19 (EDT) |
commit | cee90ae0fce6d6aee8d78969b60c952c8890abd6 (patch) | |
tree | 6cbca259e213f5ffbc3927121e662c0377938cce /builddeps-flashrom | |
download | libreboot-fdf80693122a5d38d501437231a66d6b78c9ad69.zip libreboot-fdf80693122a5d38d501437231a66d6b78c9ad69.tar.gz libreboot-fdf80693122a5d38d501437231a66d6b78c9ad69.tar.bz2 |
Libreboot release 6 beta 1.r20140711
Diffstat (limited to 'builddeps-flashrom')
-rwxr-xr-x | builddeps-flashrom | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/builddeps-flashrom b/builddeps-flashrom new file mode 100755 index 0000000..38ad23a --- /dev/null +++ b/builddeps-flashrom @@ -0,0 +1,72 @@ +#!/bin/bash + +# builddeps-flashrom: builds flashrom source code +# +# 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 <http://www.gnu.org/licenses/>. +# + +# This script is used by the main "builddeps" script in libreboot src/meta archives. +# The reason it is seperated here is so that flashrom can be built separately aswell. + +# To build flashrom, you will need the dependencies in "builddeb". +# Run it, or adapt it if you do not use an "apt-get" distro. + +# Build "flashrom" (utility for flashing/dumping ROM's) +# -------------------------------------------------------------------- + +cd flashrom + +# clean it first +make clean +# remove modified binaries aswell +rm -rf flashrom_lenovobios_sst +rm -rf flashrom_lenovobios_macronix + +# patch flashchips.c to remove the useless Macronix entries (for X60/T60) +# makes flashrom work without having to use "-c" switch +mv flashchips.c flashchips.c_ +cp ../resources/flashrom/patch/flashchips.c . +# build flashrom +make +# restore default flashchips.c +rm -rf flashchips.c +mv flashchips.c_ flashchips.c + +# backup those files +mv flashrom flashrom_ +mv flashchips.c flashchips.c_ + +# build patched version for MX25L1605D flash chip on Lenovo BIOS X60/T60 +cp ../resources/flashrom/patch/flashchips.c_lenovobios_macronix flashchips.c +make +mv flashrom flashrom_lenovobios_macronix +rm -rf flashchips.c + +# build patched version for SST25VF016B flash chip on Lenovo BIOS X60/T60 +cp ../resources/flashrom/patch/flashchips.c_lenovobios_sst flashchips.c +make +mv flashrom flashrom_lenovobios_sst +rm -rf flashchips.c + +# restore default binary/source +mv flashchips.c_ flashchips.c +mv flashrom_ flashrom + +# done. go back to main directory +cd ../ + +# ------------------- DONE ---------------------- + |