diff options
author | Francis Rowe <info@gluglug.org.uk> | 2014-11-22 05:07:55 +0000 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2014-11-22 05:07:55 +0000 |
commit | 4b969d30504cc56f12022b5be467886807e95dab (patch) | |
tree | aa10eb31dc871b4eb32479e419656c03b9e6a6e7 | |
parent | 766bed257fbbfabf5f66c7665031d66bbc58b128 (diff) |
build and buildrom-withgrub: Only dd twice for each i945 target.
This is done before creating the copies, so all images are dd'd.
Buliding should take less time now.
-rwxr-xr-x | build | 22 | ||||
-rwxr-xr-x | buildrom-withgrub | 9 |
2 files changed, 12 insertions, 19 deletions
@@ -26,27 +26,11 @@ set -u -e -v # 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 +# Build ROM images for supported boards +for board in x60 t60 x60t macbook21 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 ../../ + ./buildrom-withgrub $board done -# build macbook21 rom -./buildrom-withgrub macbook21 - # ------------------- DONE ---------------------- diff --git a/buildrom-withgrub b/buildrom-withgrub index b86bbe9..c7f9f03 100755 --- a/buildrom-withgrub +++ b/buildrom-withgrub @@ -61,6 +61,15 @@ do # .config no longer needed rm -rf .config + # Needed on i945 systems for the bucts/dd trick (documented) + # This enables the ROM to be flashed over the lenovo bios firmware + if [ "$1" = "x60" ] || [ "$1" = "x60t" ] || [ "$1" = "t60" ] + then + dd if="$1"_"$romtype".rom of=top64k.bin bs=1 skip=$[$(stat -c %s "$1"_"$romtype".rom) - 0x10000] count=64k + dd if=top64k.bin of="$1"_"$romtype".rom bs=1 seek=$[$(stat -c %s "$1"_"$romtype".rom) - 0x20000] count=64k conv=notrunc + rm -rf top64k.bin + fi + # Generate each type of GRUB configuration for this type of ROM image for keymap in $(ls ../resources/utilities/grub-assemble/keymap/original) do |