summaryrefslogtreecommitdiff
path: root/resources/scripts/build/clean
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2021-05-18 13:56:12 +0100
committerLeah Rowe <leah@libreboot.org>2021-05-18 13:56:12 +0100
commit89517ed6b9e89321e1387ed8f534d7f080ffdf57 (patch)
tree6f2085cb89b035d3cb62ad49b470a514672102d6 /resources/scripts/build/clean
libreboot!
this is forked from the "libre" branch in osboot, which is itself a libre, deblobbed fork of osboot, a blobbed up fork of libreboot libreboot needed to be purged clean. this is the new libreboot development repository. the old one has been abandoned
Diffstat (limited to 'resources/scripts/build/clean')
-rwxr-xr-xresources/scripts/build/clean/cbutils47
-rwxr-xr-xresources/scripts/build/clean/crossgcc44
-rwxr-xr-xresources/scripts/build/clean/flashrom35
-rwxr-xr-xresources/scripts/build/clean/grub39
-rwxr-xr-xresources/scripts/build/clean/ich9utils40
-rwxr-xr-xresources/scripts/build/clean/memtest86plus35
-rwxr-xr-xresources/scripts/build/clean/payloads30
-rwxr-xr-xresources/scripts/build/clean/rom_images31
-rwxr-xr-xresources/scripts/build/clean/seabios37
-rwxr-xr-xresources/scripts/build/clean/tianocore30
10 files changed, 368 insertions, 0 deletions
diff --git a/resources/scripts/build/clean/cbutils b/resources/scripts/build/clean/cbutils
new file mode 100755
index 00000000..b908e1bf
--- /dev/null
+++ b/resources/scripts/build/clean/cbutils
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# helper script: clean the dependencies that were built in coreboot
+#
+# Copyright (C) 2014, 2015, 2016, 2020 Leah Rowe <info@minifree.org>
+# Copyright (C) 2015 Klemens Nanni <contact@autoboot.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 current working directory is the root
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+# clean coreboot utilities (dependencies for 'build'):
+
+printf "Cleaning the previous build of coreboot and its utilities\n"
+
+[ ! -d "coreboot/" ] && exit 0
+
+for board in coreboot/*; do
+ if [ "${board##*/}" = "coreboot" ]; then
+ continue
+ fi
+ # Clean coreboot, of course
+ make -C "${board}/" distclean
+
+ # Clean its utilities as well
+ for util in {cbfs,ifd,nvram}tool cbmem; do
+ make -C "${board}/util/${util}/" clean
+ done
+ make -C "${board}/payloads/libpayload/" distclean
+done
+
+printf "\n\n"
diff --git a/resources/scripts/build/clean/crossgcc b/resources/scripts/build/clean/crossgcc
new file mode 100755
index 00000000..a855d203
--- /dev/null
+++ b/resources/scripts/build/clean/crossgcc
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# helper script: clean the crossgcc builds
+#
+# Copyright (C) 2014, 2015, 2016, 2020 Leah Rowe <info@minifree.org>
+# Copyright (C) 2015 Klemens Nanni <contact@autoboot.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 current working directory is the root
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+# clean coreboot utilities (dependencies for 'build'):
+
+printf "Cleaning crossgcc builds in all coreboot archives\n"
+
+[ ! -d "coreboot/" ] && exit 0
+
+# clean coreboot and crossgcc (source archives preserved)
+for board in coreboot/*; do
+ if [ "${board##*/}" = "coreboot" ]; then
+ continue
+ fi
+ if [ ! -d "${board}" ]; then
+ continue
+ fi
+ make -C "${board}/" crossgcc-clean
+done
+
+printf "\n\n"
diff --git a/resources/scripts/build/clean/flashrom b/resources/scripts/build/clean/flashrom
new file mode 100755
index 00000000..2a13bdb2
--- /dev/null
+++ b/resources/scripts/build/clean/flashrom
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# helper script: clean the dependencies that were built in flashrom
+#
+# Copyright (C) 2014, 2015 Leah Rowe <info@minifree.org>
+# Copyright (C) 2015 Klemens Nanni <contact@autoboot.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 current working directory is the root
+# of git or release archive
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+printf "Cleaning the previous build of flashrom\n"
+
+[ ! -d "flashrom/" ] && exit 0
+
+# clean flashrom
+make -C flashrom clean
+
+printf "\n\n"
diff --git a/resources/scripts/build/clean/grub b/resources/scripts/build/clean/grub
new file mode 100755
index 00000000..ec6cab13
--- /dev/null
+++ b/resources/scripts/build/clean/grub
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# helper script: clean the dependencies that were built in GRUB
+#
+# Copyright (C) 2014, 2015, 2016 Leah Rowe <info@minifree.org>
+# Copyright (C) 2015 Klemens Nanni <contact@autoboot.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 current working directory is the root
+# of git or release archive
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+printf "Cleaning the previous build of GRUB\n"
+
+[ ! -d "grub/" ] && exit 0
+
+(
+ cd grub/
+ if [ -f Makefile ]; then
+ make distclean
+ fi
+)
+
+printf "\n\n"
diff --git a/resources/scripts/build/clean/ich9utils b/resources/scripts/build/clean/ich9utils
new file mode 100755
index 00000000..c2c0aede
--- /dev/null
+++ b/resources/scripts/build/clean/ich9utils
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+# helper script: clean the previous build of ich9utils
+#
+# Copyright (C) 2014, 2015, 2020 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 current working directory is the root
+# of libreboot_src or libreboot git
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+# clean ich9deblob utility
+# --------------------------------------------------------------------
+
+if [ ! -d ich9utils ]; then
+ exit 0
+fi
+
+printf "Cleaning the previous build of ich9utils\n"
+(
+cd "ich9utils/"
+make clean
+)
+rm -Rf descriptors/
+printf "\n\n"
diff --git a/resources/scripts/build/clean/memtest86plus b/resources/scripts/build/clean/memtest86plus
new file mode 100755
index 00000000..13155496
--- /dev/null
+++ b/resources/scripts/build/clean/memtest86plus
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# helper script: clean the dependencies that were built in memtest86+
+#
+# Copyright (C) 2014, 2015 Leah Rowe <info@minifree.org>
+# Copyright (C) 2015 Klemens Nanni <contact@autoboot.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 current working directory is the root
+# of git or release archive
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+printf "Cleaning the previous build of MemTest86+\n"
+
+[ ! -d "memtest86plus" ] && exit 0
+
+# clean MemTest86+
+make -C memtest86plus clean
+
+printf "\n\n"
diff --git a/resources/scripts/build/clean/payloads b/resources/scripts/build/clean/payloads
new file mode 100755
index 00000000..a2abe195
--- /dev/null
+++ b/resources/scripts/build/clean/payloads
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# helper script: nothing to see here, forks!
+#
+# Copyright (C) 2020, 2021 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/>.
+#
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+# clean bucts
+# --------------------------------------------------------
+
+printf "Cleaning up payloads\n"
+
+rm -Rf payload/
+
diff --git a/resources/scripts/build/clean/rom_images b/resources/scripts/build/clean/rom_images
new file mode 100755
index 00000000..abf352d0
--- /dev/null
+++ b/resources/scripts/build/clean/rom_images
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# helper script: delete the ROM images
+#
+# Copyright (C) 2014, 2015 Leah Rowe <info@minifree.org>
+# Copyright (C) 2015 Klemens Nanni <contact@autoboot.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 current working directory is the root
+# of git or release archive
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+# Delete the ROM images
+rm -Rf "bin/"
+
+printf "Deleted the bin/ directory containing the ROM images.\n\n"
diff --git a/resources/scripts/build/clean/seabios b/resources/scripts/build/clean/seabios
new file mode 100755
index 00000000..eef72a89
--- /dev/null
+++ b/resources/scripts/build/clean/seabios
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# helper script: clean the dependencies that were built in seabios
+#
+# Copyright (C) 2015, 2020, 2021 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/>.
+#
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+# clean bucts
+# --------------------------------------------------------
+
+printf "Cleaning the previous build of seabios\n"
+
+rm -f seabios_libgfxinit.elf seavgabios.bin seabios_vgarom.elf
+
+[ ! -d "seabios/" ] && exit 0
+
+(
+cd "seabios/"
+make distclean
+)
+
diff --git a/resources/scripts/build/clean/tianocore b/resources/scripts/build/clean/tianocore
new file mode 100755
index 00000000..a57d986e
--- /dev/null
+++ b/resources/scripts/build/clean/tianocore
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Copyright (C) 2020 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 current working directory is the root
+# of git or release archive
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+if [ -d "coreboot/default/payloads/external/tianocore/tianocore" ]; then
+ (
+ cd "coreboot/default/payloads/external/tianocore/"
+ make clean
+ )
+fi