#!/bin/bash # # build script: builds the ROM images and puts them in ./bin/ # # 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 . # set -u -e -v # Build the ROM's # MAKE SURE THAT YOU RAN "buildall" OR "builddeps" *AT LEAST ONCE* # BEFORE RUNNING THIS! # ROM images for supported Thinkpads # (x60 also means x60s) for i945lenovoboard in x60 t60 x60t do # Build the ROM (with GRUB payload) ./buildrom-withgrub $i945lenovoboard # These are needed for the 'bucts' workarounds on X60/T60 cd bin/$i945lenovoboard for rom in $(find -type f) do dd if=$rom of=top64k.bin bs=1 skip=$[$(stat -c %s $rom) - 0x10000] count=64k dd if=$rom bs=1 skip=$[$(stat -c %s $rom) - 0x20000] count=64k | hexdump dd if=top64k.bin of=$rom bs=1 seek=$[$(stat -c %s $rom) - 0x20000] count=64k conv=notrunc rm -rf top64k.bin done cd ../../ done # build macbook21 rom ./buildrom-withgrub macbook21 # ------------------- DONE ----------------------