aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers/fetch
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-02-14 08:34:31 +0000
committerFrancis Rowe <info@gluglug.org.uk>2015-02-14 10:10:24 +0000
commit50c4ca21103d6afcefda81833852c8f274398e20 (patch)
treeec043689b4ca8e0c6530383283d23c53180c5aa7 /resources/scripts/helpers/fetch
parentc742ec0ecb2f2c5b7cc4f6e67d66792695822a0c (diff)
downloadlibrebootfr-50c4ca21103d6afcefda81833852c8f274398e20.tar.gz
librebootfr-50c4ca21103d6afcefda81833852c8f274398e20.zip
Move the "get" scripts to resources/scripts/helpers/fetch/
Replace "getall" with "download", which takes as input an argument specifying which programme the user wants to download.
Diffstat (limited to 'resources/scripts/helpers/fetch')
-rwxr-xr-xresources/scripts/helpers/fetch/bucts55
-rwxr-xr-xresources/scripts/helpers/fetch/coreboot105
-rwxr-xr-xresources/scripts/helpers/fetch/flashrom57
-rwxr-xr-xresources/scripts/helpers/fetch/grub78
-rwxr-xr-xresources/scripts/helpers/fetch/memtest86plus70
5 files changed, 365 insertions, 0 deletions
diff --git a/resources/scripts/helpers/fetch/bucts b/resources/scripts/helpers/fetch/bucts
new file mode 100755
index 00000000..5d5e5d13
--- /dev/null
+++ b/resources/scripts/helpers/fetch/bucts
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+# helper script: downloads bucts and patches it
+#
+# Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+
+# This script assumes that the working directory is the
+# root of libreboot_src or libreboot git.
+
+set -u -e -v
+
+# Get bucts and checkout last revision used
+
+# Remove the old version that may exist
+# -----------------------------------------------------------
+
+echo "DOWNLOADING BUCTS"
+
+rm -rf bucts
+
+# Get bucts
+# -----------------------------------------------------------
+
+# download it using git
+git clone git://git.stuge.se/bucts.git
+
+# modifications are required
+cd bucts
+
+# Reset to the last commit that was tested
+# -----------------------------------------------------------
+
+git reset --hard dc27919d7a66a6e8685ce07c71aefa4f03ef7c07
+git am "../resources/bucts/patch/0001-Makefile-don-t-use-git.patch"
+
+# we're done
+cd ../
+
+echo "BUCTS DOWNLOAD COMPLETE"
+
+# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/fetch/coreboot b/resources/scripts/helpers/fetch/coreboot
new file mode 100755
index 00000000..d5c72579
--- /dev/null
+++ b/resources/scripts/helpers/fetch/coreboot
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+# helper script: downloads coreboot and patches/deblobs it
+#
+# Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+
+# This script assumes that the working directory is the
+# root of libreboot_src or libreboot git.
+
+set -u -e -v
+
+# 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 6532676f9328ca3bd197b714db4f1de23544cbde
+
+# 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
+
+# Enable cstates 1 and 2 on macbook21. This reduces heat / power usage when the system is idle
+git fetch http://review.coreboot.org/coreboot refs/changes/23/7923/2 && git cherry-pick FETCH_HEAD
+
+# 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
+
+# northbridge/gm45/raminit.c: enable GS45 high-perf (i.e. add X200S support to libreboot)
+git fetch http://review.coreboot.org/coreboot refs/changes/86/7786/1 && git cherry-pick FETCH_HEAD
+# fix uneven backlight on X200 (when setting brightness low)
+git fetch http://review.coreboot.org/coreboot refs/changes/79/7979/1 && git cherry-pick FETCH_HEAD
+
+# ThinkPad R400 support. Based on http://review.coreboot.org/#/c/8393/
+# This diff will be deleted later, and instead the patch will be fetched from coreboot gerrit
+# (and later, it won't even do that, once the R400 support is merged in coreboot)
+git am ../resources/libreboot/patch/r400.diff
+
+# Fix build issue when building coreboot without .git
+git fetch http://review.coreboot.org/coreboot refs/changes/23/8423/1 && git cherry-pick FETCH_HEAD
+# TODO: delete the above line, test these commits:
+# http://review.coreboot.org/#/c/8427/
+# http://review.coreboot.org/#/c/8428/
+
+# Run coreboot-libre deblob scripts
+# ---------------------------------------------------------------------------------
+
+# The git history (git diff command) shows what blobs were deleted
+# along with the contents of those blobs. This needs to be deleted
+# for libreboot's purposes.
+rm -rf .git
+rm -f .gitreview
+rm -f .gitmodules
+rm -f .gitignore
+
+cd ../
+
+# Deblob coreboot
+./DEBLOB
+
+# ------------------- DONE ----------------------
+
+
diff --git a/resources/scripts/helpers/fetch/flashrom b/resources/scripts/helpers/fetch/flashrom
new file mode 100755
index 00000000..45f7a341
--- /dev/null
+++ b/resources/scripts/helpers/fetch/flashrom
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# helper script: downloads flashrom and patches it
+#
+# Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+
+# This script assumes that the working directory is the
+# root of libreboot_src or libreboot git.
+
+set -u -e -v
+
+# Get flashrom at the last previously tested revision
+
+# Remove the old version that may still exist:
+# ---------------------------------------------------------------------
+
+echo "DOWNLOADING FLASHROM"
+
+rm -rf flashrom
+
+# Get flashrom
+# ---------------------------------------------------------------------
+
+# download it using subversion
+svn co -r 1858 svn://flashrom.org/flashrom/trunk flashrom
+
+# apply patches
+
+cd flashrom/
+
+# Add whitelist for X200:
+patch board_enable.c < ../resources/flashrom/patch/x200whitelist.diff
+
+# Remove redundant definitions for the flash chips that
+# supported libreboot machines use. This removes the need
+# for the user to run with the "-c" argument on these machines
+patch flashchips.c < ../resources/flashrom/patch/purged_chips.diff
+
+cd ../
+
+echo "FINISHED DOWNLOADING FLASHROM"
+
+# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/fetch/grub b/resources/scripts/helpers/fetch/grub
new file mode 100755
index 00000000..8dc512e4
--- /dev/null
+++ b/resources/scripts/helpers/fetch/grub
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+# helper script: Downloads GRUB and patches it.
+#
+# Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+
+# This script assumes that the working directory is the
+# root of libreboot_src or libreboot git.
+
+set -u -e -v
+
+# Get GRUB, revert to commit last used and apply patches.
+
+# Remove the old version that may still exist
+# -------------------------------------------------------------------------------
+
+echo "DOWNLOADING GRUB"
+
+rm -rf grub
+
+# Get latest GRUB
+# -------------------------------------------------------------------------------
+
+# download it using git
+git clone git://git.savannah.gnu.org/grub.git
+
+# modifications are required
+cd grub
+
+# Reset to the last commit that was tested
+# --------------------------------------------------------------------------------
+
+git reset --hard 32cd33bd19348afb77ab849846e0b6d6157ea308
+
+# Apply patches
+# --------------------------------------------------------------------------------
+
+# Replace "GNU GRUB version" in GRUB screen with "FREE AS IN FREEDOM"
+git am "../resources/grub/patch/0001-grub-core-normal-main.c-Display-FREE-AS-IN-FREEDOM-n.patch"
+
+## See these threads on grub-dev@gnu.org:
+## [bug #44238] Add support for menu.c32 and vesamenu.c32 in lib/syslinux_parse
+## [bug #44239] Behavior of syslinux_parse differs from SYSLINUX for initrd= option
+## These make vesamenu.c32 work (translation: Debian/Tails ISOLINUX) but they are
+## buggy at the moment; Trisquel ISOLINUX parsing fails with these patches, for instance:
+## "error: syntax error.", "error: Incorrect command."
+## The mailing list contains updated versions of the patches mentioned below
+## Work with Lunar^ on IRC on finishing the patch so that it fixes the issue
+## while not causing other regressions. Wait until this is merged in GRUB(upstream).
+# Add support for menu.c32 and vesamenu.c32 in lib/syslinux_parse
+# See https://savannah.gnu.org/bugs/index.php?44238
+# TODO: Remove this patch when it is upstreamed.
+# git am "../resources/grub/patch/0002-syslinux_parse-add-support-for-vesa-menu.c32.patch"
+# Behavior of syslinux_parse differs from SYSLINUX for initrd= option
+# See https://savannah.gnu.org/bugs/index.php?44239
+# TODO: Remove this patch when it is upstreamed.
+# git am "../resources/grub/patch/0003-syslinux_parse-keep-initrd-in-kernel-the-command-lin.patch"
+
+cd ../
+echo "FINISHED DOWNLOADING GRUB"
+
+# ------------------- DONE ----------------------
+
+
diff --git a/resources/scripts/helpers/fetch/memtest86plus b/resources/scripts/helpers/fetch/memtest86plus
new file mode 100755
index 00000000..37564ccf
--- /dev/null
+++ b/resources/scripts/helpers/fetch/memtest86plus
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+# helper script: Downloads MemTest86+ and patches it
+#
+# Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+
+# This script assumes that the working directory is the
+# root of libreboot_src or libreboot git.
+
+set -u -e -v
+
+# Get the last version of MemTest86+ used, apply patches, build it.
+
+# Remove the old version that may exist
+# ----------------------------------------------------------------------------------
+
+echo "DOWNLOADING MEMTEST86+"
+
+rm -rf "memtest86+-5.01"
+
+# Get latest memtest86+:
+# ----------------------------------------------------------------------------------
+
+# download it using wget
+wget http://www.memtest.org/download/5.01/memtest86+-5.01.tar.gz
+
+# extract it
+tar -xf "memtest86+-5.01.tar.gz"
+
+# delete the tar file (no longer needed)
+rm -f "memtest86+-5.01.tar.gz"
+
+# there are modifications required
+cd "memtest86+-5.01"/
+
+# Apply necessary patches
+# ---------------------------------------------------------------------------------
+
+# place the right config
+rm -f config.h
+cp ../resources/memtest86/patch/config.h .
+
+# place the right Makefile
+rm -f Makefile
+cp ../resources/memtest86/patch/Makefile .
+
+# (diff them with defaults to see what changed)
+
+# we're done
+cd ../
+
+echo "FINISHED DOWNLOADING MEMTEST86+"
+
+# ------------------- DONE ----------------------
+
+