aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers
diff options
context:
space:
mode:
author4 of 7 (Leah Rowe) info@minifree.org <info@minifree.org>2017-01-22 03:18:10 +0000
committer4 of 7 (Leah Rowe) info@minifree.org <info@minifree.org>2017-01-22 03:25:50 +0000
commitcab47f3178db195d797db89486dc56383c28aace (patch)
treee515305d51c8220dda5c74e3c91de876fa4931f5 /resources/scripts/helpers
parentbae4652b291d4310c9ff105a874c009b3cdbaedc (diff)
downloadlibrebootfr-cab47f3178db195d797db89486dc56383c28aace.tar.gz
librebootfr-cab47f3178db195d797db89486dc56383c28aace.zip
remove CrOS boards/utils from old build system (new build system has them)
Diffstat (limited to 'resources/scripts/helpers')
-rwxr-xr-xresources/scripts/helpers/build/clean/depthcharge38
-rwxr-xr-xresources/scripts/helpers/build/config/dcmodify72
-rwxr-xr-xresources/scripts/helpers/build/config/dcreplace63
-rwxr-xr-xresources/scripts/helpers/build/config/dcupdate72
-rwxr-xr-xresources/scripts/helpers/build/release/src3
-rwxr-xr-xresources/scripts/helpers/build/roms/withdepthcharge207
-rwxr-xr-xresources/scripts/helpers/download/depthcharge75
7 files changed, 0 insertions, 530 deletions
diff --git a/resources/scripts/helpers/build/clean/depthcharge b/resources/scripts/helpers/build/clean/depthcharge
deleted file mode 100755
index 9751d924..00000000
--- a/resources/scripts/helpers/build/clean/depthcharge
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# helper script: clean the dependencies that were built in depthcharge
-#
-# Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr>
-#
-# 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 current working directory is the root
-# of libreboot_src or libreboot git
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
-
-# clean depthcharge
-# --------------------------------------------------------
-
-cd "depthcharge/"
-
-printf "Cleaning the previous build of depthcharge\n"
-make distclean
-
-# done. go back to main directoy
-cd "../"
-
-printf "\n\n"
diff --git a/resources/scripts/helpers/build/config/dcmodify b/resources/scripts/helpers/build/config/dcmodify
deleted file mode 100755
index 81e8756e..00000000
--- a/resources/scripts/helpers/build/config/dcmodify
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/bash
-
-#
-# helper script: run "make menuconfig" on config(s) to modify them
-#
-# Copyright (C) 2014, 2015, 2016 Leah Rowe <info@minifree.org>
-#
-# 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 git
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
-
-payload="depthcharge"
-configpath="resources/libreboot/config/${payload}"
-
-hackconfig () {
- board="${1}"
- cbrevision="$(cat ${configpath}/${board}/cbrevision)"
- vbootrevision="$(cat ${configpath}/${board}/vbootrevision)"
-(
- cd "coreboot/${cbrevision}/${cbrevision}/"
- git checkout ${payload}_${board}
- (
- cd "3rdparty/vboot/"
- git checkout ${payload}_${board}
- )
-
- printf "Modifying config for %s (%s payload)\n" "${board}" "${payload}"
- sleep 2
-
- if [ ! -d "../../../${configpath}/${board}/" ]; then
- printf "build/config/dcmodify WARNING: config '%s' does not exist. Skipping.\n" "${board}"
- git checkout master
- (
- cd "3rdparty/vboot/"
- git checkout master
- )
- return
- fi
-
- mv "../../../${configpath}/${board}/config" ".config"
- make menuconfig
- mv ".config" "../../../${configpath}/${board}/config"
-
- git checkout master
- (
- cd "3rdparty/vboot/"
- git checkout master
- )
-)
-}
-
-if [ $# -lt 1 ]; then
- for config in ${configpath}/*; do hackconfig "${config##*/}"; done
-else
- for config in "${@}"; do hackconfig "${config}"; done
-fi
diff --git a/resources/scripts/helpers/build/config/dcreplace b/resources/scripts/helpers/build/config/dcreplace
deleted file mode 100755
index d3265ae2..00000000
--- a/resources/scripts/helpers/build/config/dcreplace
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-#
-# helper script: run "make menuconfig" on config(s) to replace them
-#
-# Copyright (C) 2014, 2015, 2016 Leah Rowe <info@minifree.org>
-#
-# 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 git
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
-
-payload="depthcharge"
-configpath="resources/libreboot/config/${payload}"
-
-hackconfig () {
- board="${1}"
- cbrevision="$(cat ${configpath}/${board}/cbrevision)"
- vbootrevision="$(cat ${configpath}/${board}/vbootrevision)"
-(
- cd "coreboot/${cbrevision}/${cbrevision}/"
- git checkout ${payload}_${board}
- (
- cd "3rdparty/vboot/"
- git checkout ${payload}_${board}
- )
-
- printf "Replacing or creating new config for %s (%s payload)\n" "${board}" "${payload}"
- sleep 2
-
- make menuconfig
-
- [ ! -d "../../../${configpath}/${board}/" ] && mkdir -p "../../../${configpath}/${board}/"
- mv ".config" "../../../${configpath}/${board}/config"
-
- git checkout master
- (
- cd "3rdparty/vboot/"
- git checkout master
- )
-)
-}
-
-if [ $# -lt 1 ]; then
- for config in ${configpath}/*; do hackconfig "${config##*/}"; done
-else
- for config in "${@}"; do hackconfig "${config}"; done
-fi
diff --git a/resources/scripts/helpers/build/config/dcupdate b/resources/scripts/helpers/build/config/dcupdate
deleted file mode 100755
index 8d45c9de..00000000
--- a/resources/scripts/helpers/build/config/dcupdate
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/bash
-
-#
-# helper script: run "make oldconfig" on all coreboot config files
-#
-# Copyright (C) 2014, 2015, 2016 Leah Rowe <info@minifree.org>
-#
-# 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 git
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
-
-payload="depthcharge"
-configpath="resources/libreboot/config/${payload}"
-
-hackconfig () {
- board="${1}"
- cbrevision="$(cat ${configpath}/${board}/cbrevision)"
- vbootrevision="$(cat ${configpath}/${board}/vbootrevision)"
-(
- cd "coreboot/${cbrevision}/${cbrevision}/"
- git checkout ${payload}_${board}
- (
- cd "3rdparty/vboot/"
- git checkout ${payload}_${board}
- )
-
- printf "Updating config for %s (%s payload)\n" "${board}" "${payload}"
- sleep 2
-
- if [ ! -d "../../../${configpath}/${board}/" ]; then
- printf "build/config/dcupdate WARNING: config '%s' does not exist. Skipping.\n" "${board}"
- git checkout master
- (
- cd "3rdparty/vboot/"
- git checkout master
- )
- return
- fi
-
- mv "../../../${configpath}/${board}/config" ".config"
- make oldconfig
- mv ".config" "../../../${configpath}/${board}/config"
-
- git checkout master
- (
- cd "3rdparty/vboot/"
- git checkout master
- )
-)
-}
-
-if [ $# -lt 1 ]; then
- for config in ${configpath}/*; do hackconfig "${config##*/}"; done
-else
- for config in "${@}"; do hackconfig "${config}"; done
-fi
diff --git a/resources/scripts/helpers/build/release/src b/resources/scripts/helpers/build/release/src
index 0fde6899..c33f9b4b 100755
--- a/resources/scripts/helpers/build/release/src
+++ b/resources/scripts/helpers/build/release/src
@@ -88,7 +88,6 @@ printf '\n'
rm -Rf "${distdir}/bucts/".git*
rm -Rf "${distdir}/flashrom/".git*
rm -Rf "${distdir}/grub/".git*
-rm -Rf "${distdir}/depthcharge/".git*
rm -Rf "${distdir}/seabios/".git*
rm -f "${distdir}"/*.vim
@@ -107,8 +106,6 @@ rm -Rf "${distdir}/resources/utilities/coreboot-libre/"
rm -f "${distdir}/download"
rm -Rf "${distdir}/resources/scripts/helpers/download/"
-# Other patches aren't needed in the release, either
-rm -Rf "${distdir}/resources/depthcharge/patch/"
rm -Rf "${distdir}/resources/grub/patch/"
rm -Rf "${distdir}/resources/memtest86plus/patch/"
diff --git a/resources/scripts/helpers/build/roms/withdepthcharge b/resources/scripts/helpers/build/roms/withdepthcharge
deleted file mode 100755
index 1df97a23..00000000
--- a/resources/scripts/helpers/build/roms/withdepthcharge
+++ /dev/null
@@ -1,207 +0,0 @@
-#!/bin/bash
-
-# helper script: build ROM images with depthcharge and put them in ./bin/
-#
-# Copyright (C) 2014, 2015, 2016 Leah Rowe <info@minifree.org>
-# Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr>
-#
-# 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.
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
-if [ -z ${NPROC+x} ]; then
- cores="$(nproc)"
-else
- case ${NPROC} in
- ''|*[!0-9]*)
- printf "value '%s' for NPROC is invalid. non-numeric. Exiting.\n" "${NPROC}"
- exit 1
- ;;
- esac
- cores="${NPROC}"
-fi
-
-printf "Building ROM images with the depthcharge payload\n"
-
-if [ ! -d "bin/" ]
-then
- mkdir "bin/"
-fi
-
-if [ -f "version" ]; then
- # _src release archive is being used
- version="$(cat "version")"
-else
- # git repo is being used
- version="$(git describe --tags HEAD)" # note: in libreboot, coreboot/.git doesn't exist, this uses libreboot .git
-fi
-
-# Build libpayload
-# ------------------------------------------------------------------------------
-
-buildlibpayload() {
- family="${1}"
- board="${2}"
- cbrevision="${3}"
- vbootrevision="${4}"
-
- (
- cd "coreboot/${cbrevision}/${cbrevision}/"
- git checkout depthcharge_${board}
-
- (
- cd "3rdparty/vboot/"
- git checkout depthcharge_${board}
- )
-
- cd "payloads/libpayload/"
-
- make distclean
- rm -Rf "install/"
-
- make KBUILD_DEFCONFIG="configs/config.$family" defconfig
- make -j${cores}
- make DESTDIR="install" install
-
- cd "../../"
- git checkout master
- cd "3rdparty/vboot/"
- git checkout master
- )
-}
-
-# Build depthcharge
-# ------------------------------------------------------------------------------
-
-builddepthcharge() {
- board="${1}"
- cbrevision="${2}"
- vbootrevision="${3}"
-
- (
- (
- cd "coreboot/${cbrevision}/${cbrevision}/"
- git checkout depthcharge_${board}
-
- cd "3rdparty/vboot/"
- git checkout depthcharge_${board}
- )
-
- cd "depthcharge/"
-
- make distclean
- rm -f "../coreboot/${cbrevision:?}/${cbrevision:?}/payload.elf"
-
- make BOARD="${board}" defconfig
- make BOARD="${board}" LIBPAYLOAD_DIR="$(pwd)/../coreboot/${cbrevision}/${cbrevision}/payloads/libpayload/install/libpayload" VB_SOURCE="$(pwd)/../coreboot/${cbrevision}/${cbrevision}/3rdparty/vboot" -j${cores} depthcharge_unified
-
- cp "build/depthcharge.elf" "../coreboot/${cbrevision}/${cbrevision}/payload.elf"
-
- cd "../coreboot/${cbrevision}/${cbrevision}/"
- git checkout master
-
- cd "3rdparty/vboot/"
- git checkout master
- )
-}
-
-# Build coreboot
-# ------------------------------------------------------------------------------
-
-buildcoreboot() {
- board="${1}"
- cbrevision="${2}"
- vbootrevision="${3}"
-
- (
- cd "coreboot/${cbrevision}/${cbrevision}"
- git checkout depthcharge_${board}
-
- (
- cd "3rdparty/vboot/"
- git checkout depthcharge_${board}
- )
-
- make distclean
- rm -f ".coreboot-version"
- rm -f *.img
-
- printf 'libreboot-%s' "${version}" > "ro-frid"
- printf 'libreboot-%s\n' "${version}" > ".coreboot-version" # needed for reproducible builds in coreboot
-
- make KBUILD_DEFCONFIG="$(pwd)/../../../resources/libreboot/config/depthcharge/${board}/config" defconfig
- make -j${cores}
-
- cbfs_size=$( grep CONFIG_CBFS_SIZE ".config" | sed "s/.*[[:space:]]*=[[:space:]]*//g" )
- cbfs_size=$( printf "%d\n" "${cbfs_size}" )
- cbfs_size=$(( $cbfs_size / 1024 ))
-
- dd if="build/coreboot.rom" of="coreboot.img" bs=1024 count="${cbfs_size}"
-
- objcopy -I binary -O binary --pad-to=0x100 --gap-fill=0x00 "ro-frid" "ro-frid.img"
-
- # prepare directory for new images
- rm -Rf "${board:?}/"
- mkdir "${board}/"
- # move the images into the newly created directory
- mv "coreboot.img" "${board}/"
- mv "ro-frid.img" "${board}/"
- # copy the scripts too
- cp "../../../resources/libreboot/install/depthcharge/cros-flash-replace" "${board}/"
- cp "../../../resources/libreboot/install/depthcharge/${board}/layout.txt" "${board}/"
- # delete the old images from ../bin
- rm -Rf "../../../bin/depthcharge/${board}/"
- # now put the new images in ./bin/depthcharge/
- [ ! -d "../../../bin/depthcharge/" ] && mkdir -p "../../../bin/depthcharge/"
- mv "${board}/" "../../../bin/depthcharge/"
-
- # clean this up
- rm -f "payload.elf"
- rm -f *.img
-
- git checkout master
-
- cd "3rdparty/vboot/"
- git checkout master
- )
-}
-
-# Build ROM images for supported boards
-buildrom() {
- board="${1}"
- cbrevision="$(cat resources/libreboot/config/depthcharge/${board}/cbrevision)"
- vbootrevision="$(cat resources/libreboot/config/depthcharge/${board}/vbootrevision)"
-
- if [ -f "resources/libreboot/config/depthcharge/${board}/config" ]; then
- family=$( echo ${board} |sed "s/_.*//g" )
-
- buildlibpayload "${family}" "${board}" "${cbrevision}" "${vbootrevision}"
- builddepthcharge "${board}" "${cbrevision}" "${vbootrevision}"
- buildcoreboot "${board}" "${cbrevision}" "${vbootrevision}"
- fi
-}
-
-if [ $# -gt 0 ]; then
- for board in "${@}"; do
- buildrom "${board}"
- done
-else
- for board in resources/libreboot/config/depthcharge/*; do
- buildrom "${board##*/}"
- done
-fi
diff --git a/resources/scripts/helpers/download/depthcharge b/resources/scripts/helpers/download/depthcharge
deleted file mode 100755
index 9827a346..00000000
--- a/resources/scripts/helpers/download/depthcharge
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-
-# helper script: downloads depthcharge and patches it
-#
-# Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr>
-#
-# 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.
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
-
-# Get depthcharge and patch it
-
-printf "Downloading depthcharge\n"
-
-rm -Rf "depthcharge/"
-
-# Get depthcharge
-# ------------------------------------------------------------------------------
-
-# download depthcharge from git
-git clone https://chromium.googlesource.com/chromiumos/platform/depthcharge
-
-# enter the tree to patch it
-cd "depthcharge/"
-
-# reset to the latest previously tested revision
-git reset --hard 065ba14bc56c9044247fef6337d8f9e9a3055820
-
-# Patch depthcharge
-# ------------------------------------------------------------------------------
-
-printf "arm: armv7-a march abi flag for ARMv7 hardware\n"
-git am "../resources/depthcharge/patch/0001-arm-armv7-a-march-abi-flag-for-ARMv7-hardware.patch"
-
-printf "Coreboot image integration removal\n"
-git am "../resources/depthcharge/patch/0002-Coreboot-image-integration-removal.patch"
-
-printf "DOTCONFIG location correction\n"
-git am "../resources/depthcharge/patch/0003-DOTCONFIG-location-correction.patch"
-
-printf "Adaptation for a read-only boot path when no vboot handoff data is found\n"
-git am "../resources/depthcharge/patch/0004-Adaptation-for-a-read-only-boot-path-when-no-vboot-h.patch"
-
-printf "vboot: Only initialize cparams once\n"
-git am "../resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch"
-
-printf "Proper firmware index report for read-only boot path\n"
-git am "../resources/depthcharge/patch/0006-Proper-firmware-index-report-for-read-only-boot-path.patch"
-
-printf "fdt: nonvolatile-context-storage report to mkbp for EC NV storage\n"
-git am "../resources/depthcharge/patch/0007-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch"
-
-printf "vboot: Display callbacks for developer and recovery mode screens\n"
-git am "../resources/depthcharge/patch/0008-vboot-Display-callbacks-for-developer-and-recovery-m.patch"
-
-# leave the tree
-cd "../"
-
-printf "\n\n"