summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild54
1 files changed, 33 insertions, 21 deletions
diff --git a/build b/build
index e210c48..4ef6fa0 100755
--- a/build
+++ b/build
@@ -40,8 +40,10 @@ echo "finished running 'make clean' in coreboot"
echo "generating grub.elf payload"
cd grub
+mv ../grub_memdisk_keymap .
# Build the GRUB2 payload (grub.elf)
-./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o grub.elf --modules='crypto cryptodisk ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs minix_be minix minix3_be minix3 minix2_be minix2 zfs ufs2 ufs1_be ufs1 udf squash4 romfs jfs reiserfs procfs odc ntfs nilfs2 newc iso9660 hfsplus cpio exfat cpio_be afs btrfs bfs hfs video_bochs password png keystatus sleep loopback gfxterm_background' --install-modules='syslinuxcfg bsd ls cat echo linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=../resources/grub/config/grub_memdisk.cfg /boot/grub/layouts/dvorak.gkb=../resources/grub/keymap/dvorak.gkb /boot/grub/layouts/ukdvorak.gkb=../resources/grub/keymap/ukdvorak.gkb /boot/grub/layouts/usqwerty.gkb=../resources/grub/keymap/usqwerty.gkb /boot/grub/layouts/ukqwerty.gkb=../resources/grub/keymap/ukqwerty.gkb
+./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o grub.elf --modules='crypto cryptodisk ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs minix_be minix minix3_be minix3 minix2_be minix2 zfs ufs2 ufs1_be ufs1 udf squash4 romfs jfs reiserfs procfs odc ntfs nilfs2 newc iso9660 hfsplus cpio exfat cpio_be afs btrfs bfs hfs video_bochs password png jpeg keystatus sleep loopback gfxterm_background' --install-modules='syslinuxcfg bsd ls cat echo linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=../resources/grub/config/grub_memdisk.cfg $(./grub_memdisk_keymap)
+mv grub_memdisk_keymap ../
# move those into coreboot directory:
mv grub.elf ../coreboot
@@ -54,25 +56,33 @@ echo "finished generating grub.elf payload"
# Build the ROM's (for flashing)
# ----------------------------------------------------------------------------------------------------------------------
-echo "building X60 ROM's"
-# Build the ROM's for ThinkPad X60
-./build-x60
-echo "finished building X60 ROM's"
-
-echo "building X60 Tablet ROM's"
-# Build the ROM's for ThinkPad X60 Tablet
-./build-x60t
-echo "finished building X60 Tablet ROM's"
-
-echo "building T60 ROM's"
-# Build the ROM's for ThinkPad T60 (Intel GPU)
-./build-t60
-echo "finished building T60 ROM's"
-
-echo "building MacBook2,1 ROM's"
-# Build the ROM's for MacBook2,1
-./build-macbook21
-echo "finished building MacBook2,1 ROM's"
+# ROM images for supported Thinkpads
+# (x60 also means x60s)
+for board in x60 t60 x60t
+do
+ # Build the ROM (with GRUB payload)
+ ./buildrom-withgrub $board
+
+ # These are needed for the 'bucts' workarounds on X60/T60
+ cd bin/$board
+ 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
+
+# macbook21 doesn't need grub_serial, but the buildrom-withgrub script expects it
+# (we will delete it later)
+cp resources/grub/config/macbook21/grub_usqwerty.cfg resources/grub/config/macbook21/grub_serial_usqwerty.cfg
+# build the ROM
+./buildrom-withgrub macbook21
+# delete the useless (nonsensical) files
+rm -rf bin/macbook21/libreboot_serial*rom
+rm -rf resources/grub/config/macbook21/grub_serial_usqwerty.cfg
# Now we prepare libreboot_bin archive ready for release
# ----------------------------------------------------------------------------------------------------------------------------
@@ -112,6 +122,9 @@ cp -r docs ../libreboot_bin
# X60/T60: BUC.TS utility is needed to flash libreboot while Lenovo BIOS is running
cp -r bucts ../libreboot_bin
+# Include a copy of nvramtool in libreboot_bin
+cp -r coreboot/util/nvramtool ../libreboot_bin
+
# X60/X60T/T60: Script for setting up powertop (kills high pitched noise)
cp powertop.trisquel6 ../libreboot_bin
cp powertop.trisquel6.init ../libreboot_bin
@@ -146,7 +159,6 @@ echo "finished generating ../libreboot_bin"
# Create "libreboot_meta"
# -------------------------------------------------------------------------------------------------------------------------------
-# and fast
echo "generating ../libreboot_meta"
# delete old one