#!/bin/bash # helper script: downloads coreboot and patches/deblobs it # # Copyright (C) 2014, 2015 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 . # # This script assumes that the working directory is the # root of libreboot_src or libreboot git. [ "x${DEBUG+set}" = 'xset' ] && set -v set -u -e printf "Downloading coreboot, patching coreboot and deblobbing coreboot\n" # This grabs current base used, and applies patches # This is also used to run the deblob scripts. # Remove the old version that may exist # ------------------------------------------------------------------------------ rm -rf coreboot # Get latest coreboot: # ------------------------------------------------------------------------------ # download it using git git clone http://review.coreboot.org/coreboot # there are modifications required cd coreboot/ # reset to previously tested revision git reset --hard 8e3da749ed912834ddf9b78bff956a2b7d269945 # Get patches from review.coreboot.org # ------------------------------------------------------------------------------ printf "Text mode patch for X60 native graphics (main patch already merged in coreboot. See 6723 on coreboot gerrit)\n" git fetch http://review.coreboot.org/coreboot refs/changes/25/6725/3 && git cherry-pick FETCH_HEAD printf "lenovo/x60: Enable legacy brightness controls (native graphics)\n" git fetch http://review.coreboot.org/coreboot refs/changes/48/7048/4 && git cherry-pick FETCH_HEAD printf "Enable T60 native graphics\n" git fetch http://review.coreboot.org/coreboot refs/changes/45/5345/9 && git cherry-pick FETCH_HEAD printf "Enable text-mode graphics for T60\n" git fetch http://review.coreboot.org/coreboot refs/changes/50/7050/2 && git cherry-pick FETCH_HEAD printf "lenovo/t60: Enable legacy brightness controls (native graphics)\n" git fetch http://review.coreboot.org/coreboot refs/changes/51/7051/1 && git cherry-pick FETCH_HEAD printf "ec/lenovo/h8: permanently enable wifi/trackpoint/touchpad/bluetooth/wwan\n" git fetch http://review.coreboot.org/coreboot refs/changes/58/7058/7 && git cherry-pick FETCH_HEAD printf "i945: permanently set tft_brightness to 0xff. this fixes the issue with X60 and 'scrolling' backlight\n" # git fetch http://review.coreboot.org/coreboot refs/changes/61/7561/2 && git cherry-pick FETCH_HEAD # The patch was accidentally merged in coreboot. See # http://review.coreboot.org/#/c/8697/ for the revert commit. rebase 7561 and re-include it in # libreboot, once 8697 is merged in coreboot. printf "northbridge/gm45/raminit.c: enable GS45 high-perf (i.e. add X200S support to libreboot)\n" git fetch http://review.coreboot.org/coreboot refs/changes/86/7786/1 && git cherry-pick FETCH_HEAD printf "fix uneven backlight on X200 (when setting brightness low)\n" git fetch http://review.coreboot.org/coreboot refs/changes/79/7979/1 && git cherry-pick FETCH_HEAD printf "ThinkPad R400 support\n" git fetch http://review.coreboot.org/coreboot refs/changes/93/8393/2 && git cherry-pick FETCH_HEAD printf "ThinkPad T400 (depends on R400 patch)\n" git fetch http://review.coreboot.org/coreboot refs/changes/14/8714/4 && git cherry-pick FETCH_HEAD printf "ThinkPad T500 (depends on T400 patch)\n" git fetch http://review.coreboot.org/coreboot refs/changes/81/9181/1 && git cherry-pick FETCH_HEAD # Run coreboot-libre deblob scripts # ------------------------------------------------------------------------------ printf "Deleting .git* in coreboot/ (history inside .git contains the blobs that were deleted)\n" rm -rf .git rm -f .gitreview rm -f .gitmodules rm -f .gitignore cd ../ printf "Deblobbing coreboot\n" ./resources/utilities/coreboot-libre/deblob printf "\n\n" # ------------------- DONE ----------------------