#!/bin/bash # getcb script: downloads coreboot and patches/deblobs it # # 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 # This grabs current base used, and applies patches # This is also used to run deblob scripts. # (the idea is that this script will reproduce the coreboot directory included with this version of libreboot) # Remove the old version that may exist # ---------------------------------------------------------------------------------- echo "DOWNLOADING AND PATCHING COREBOOT" 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 c637a887dde1c63bf3863e70cbe19dedf5f6ca02 # Get patches from review.coreboot.org # ---------------------------------------------------------------------------------- # Text mode patch for X60 native graphics (main patch already merged in coreboot. See 6723 on coreboot gerrit) git fetch http://review.coreboot.org/coreboot refs/changes/25/6725/3 && git cherry-pick FETCH_HEAD # lenovo/x60: Enable legacy brightness controls (native graphics) git fetch http://review.coreboot.org/coreboot refs/changes/48/7048/4 && git cherry-pick FETCH_HEAD # Enable T60 native graphics git fetch http://review.coreboot.org/coreboot refs/changes/45/5345/9 && git cherry-pick FETCH_HEAD # Enable text-mode graphics for T60 git fetch http://review.coreboot.org/coreboot refs/changes/50/7050/2 && git cherry-pick FETCH_HEAD # lenovo/t60: Enable legacy brightness controls (native graphics) git fetch http://review.coreboot.org/coreboot refs/changes/51/7051/1 && git cherry-pick FETCH_HEAD # Note: macbook21 already has backlight control. # ec/lenovo/h8: permanently enable wifi/trackpoint/touchpad/bluetooth/wwan git fetch http://review.coreboot.org/coreboot refs/changes/58/7058/7 && git cherry-pick FETCH_HEAD # i945: permanently set tft_brightness to 0xff. this fixes the issue with X60 and "scrolling" backlight git fetch http://review.coreboot.org/coreboot refs/changes/61/7561/2 && git cherry-pick FETCH_HEAD # Run coreboot-libre deblob scripts # --------------------------------------------------------------------------------- # Deblobbing was done manually for this pre-release (will re-tool linux-libre deblob scripts later): cd ../ echo "deblobbing coreboot" ./DEBLOB # The git history (git diff command) shows what blobs were deleted (including the blobs themselves) which is a freedom issue. Just delete .git altogether: cd coreboot rm -rf .git rm -f .gitreview rm -f .gitmodules rm -f .gitignore cd ../ echo "finished deblobbing coreboot" # we're done echo "FINISHED DOWNLOADING AND PATCHING COREBOOT" # ------------------- DONE ----------------------