summaryrefslogtreecommitdiffstats
path: root/resources/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts')
-rwxr-xr-xresources/scripts/helpers/build/clean/coreboot20
-rwxr-xr-xresources/scripts/helpers/build/module/coreboot36
-rwxr-xr-xresources/scripts/helpers/download/coreboot56
3 files changed, 46 insertions, 66 deletions
diff --git a/resources/scripts/helpers/build/clean/coreboot b/resources/scripts/helpers/build/clean/coreboot
index 2f7701e..baaabbd 100755
--- a/resources/scripts/helpers/build/clean/coreboot
+++ b/resources/scripts/helpers/build/clean/coreboot
@@ -31,7 +31,8 @@ printf "Cleaning the previous build of coreboot and its utilities\n"
# clean coreboot and crossgcc (source archives preserved)
for payload in coreboot/*; do
for board in "${payload}/"*; do
- # Clean coreboot, of course
+
+ # Clean coreboot, of course
make -C "${board}/" distclean
# Clean its utilities as well
@@ -40,16 +41,15 @@ for payload in coreboot/*; do
done
make -C "${board}/payloads/libpayload/" distclean
- # Clean crossgcc
- if [ "${payload##*/}" != "crossgcc" ]; then # is a symlink
- # delete symlink to crossgcc
- rm -f "${board}/util/crossgcc"
- else # is the real crossgcc
- # payload is crossgcc
- # board is not a board, it's a coreboot revision
- make -C "${board}/" crossgcc-clean
- fi
+ rm -f "${board}/util/crossgcc"
done
done
+# Also do the same for the crossgcc version of coreboot
+make -C "crossgcc/" crossgcc-clean
+for util in {cbfs,ifd,nvram}tool cbmem; do
+ make -C "crossgcc/util/${util}/" clean
+done
+make -C "crosgcc/" distclean
+
printf "\n\n"
diff --git a/resources/scripts/helpers/build/module/coreboot b/resources/scripts/helpers/build/module/coreboot
index 07659cd..d3e86cd 100755
--- a/resources/scripts/helpers/build/module/coreboot
+++ b/resources/scripts/helpers/build/module/coreboot
@@ -34,24 +34,24 @@ printf "Building the utilities in coreboot\n"
for payload in coreboot/*; do
for board in "${payload}/"*; do
- if [ "${payload##*/}" = "crossgcc" ]; then # build crossgcc
-
- for architecture in i386 arm; do
- make -j$(nproc) -BC "${board}/" crossgcc-${architecture}
- done
- else # build other utils
- # cbfstool, cbmem, nvramtool
- for util in {cbfs,nvram}tool cbmem; do
- make -BC "${board}/util/${util}"
- done
- # create symlink to crossgcc
- (
- boardconfig_path="resources/libreboot/config/${payload##*/}/${board##*/}"
- cbrevision="$(cat "${boardconfig_path}/cbrevision")"
- cd "${board}/util/"
- ln -s "../../../crossgcc/${cbrevision}/util/crossgcc/" crossgcc
- )
- fi
+ # cbfstool, cbmem, nvramtool
+ for util in {cbfs,nvram}tool cbmem; do
+ make -BC "${board}/util/${util}"
+ done
+ # create symlink to crossgcc
+ (
+ boardconfig_path="resources/libreboot/config/${payload##*/}/${board##*/}"
+ cbrevision="$(cat "${boardconfig_path}/cbrevision")"
+ cd "${board}/util/"
+ ln -s "../../../../crossgcc/util/crossgcc/" crossgcc
+ )
done
done
+
+# Now build crossgcc
+(
+cd "crossgcc/"
+make crossgcc-i386
+make crossgcc-arm
+)
diff --git a/resources/scripts/helpers/download/coreboot b/resources/scripts/helpers/download/coreboot
index c8b853d..16bd1a8 100755
--- a/resources/scripts/helpers/download/coreboot
+++ b/resources/scripts/helpers/download/coreboot
@@ -33,6 +33,9 @@ else
version="libreboot-$(git describe --tags HEAD)"
fi
+# coreboot revisios used for crossgcc
+crossgccrevision="4351ace145c4069f9c93ca7541d6dfaf8300b53b"
+
# sanity check (check for invalid paths in the reused.list patch lists before proceeding)
for payloads in resources/libreboot/config/*; do
@@ -137,11 +140,6 @@ git clone https://review.coreboot.org/coreboot
# there are modifications required
cd "coreboot/"
-# Reset to a common revision#
-# other revisions used will be on this one, or before it
-# This common revision is used for the crossgcc compilation
-git reset --hard 4351ace145c4069f9c93ca7541d6dfaf8300b53b
-
# Define a common version (based on the libreboot version)
# Most likely redundant, because the build system needs to update
# this every time when building a ROM image anyway
@@ -204,38 +202,20 @@ for payloads in ../../resources/libreboot/config/*; do
done
done
-# prepare directories for crossgcc
-for payloads in ../../resources/libreboot/config/*; do
-
- if [ ! -d "${payloads}/" ]; then
- continue
- fi
-
- payload="${payloads##*/}"
-
- for boardconfig in ../../resources/libreboot/config/${payload}/*; do
-
- if [ ! -d "${boardconfig}/" ]; then
- continue
- fi
-
- boardname="${boardconfig##*/}"
- cbrevision=$(cat "${boardconfig}/cbrevision")
- vbootrevision=$(cat "${boardconfig}/vbootrevision")
-
- # Create coreboot directory for compiling crossgcc
- if [ ! -d "../crossgcc/${cbrevision}" ]; then
- make_coreboot_src_directory crossgcc ${cbrevision} ..
- (
- cd "../crossgcc/${cbrevision}/"
- # reset to known revision (coreboot)
- reset_at_revision ${cbrevision}
- # no way to know which vboot revision is used here, so delete 3rdparty
- rm -Rf "3rdparty/"
- )
- fi
- done
-done
+# prepare directory for crossgcc
+rm -Rf "../../crossgcc/"
+make_coreboot_src_directory crossgcc ${crossgccrevision} ..
+(
+ cd "../crossgcc/${crossgccrevision}"
+ reset_at_revision ${crossgccrevision}
+ rm -Rf "3rdparty/"
+
+ # Put this in its own separate directory
+ rm -Rf "../../../crossgcc"
+ cd ../
+ mv "${crossgccrevision}/" "crossgcc/"
+ mv "crossgcc/" ../../
+)
# go back to _src/coreboot/ (containing all coreboot directories)
cd "../"
@@ -246,7 +226,7 @@ rm -Rf "coreboot/"
# ------------------------------------------------------------------------------
printf "Deleting .git* in coreboot/ (history inside .git contains the blobs that were deleted)\n"
-rm -Rf */*/.git*
+rm -Rf */*/.git* ../crossgcc/*.git
rm -Rf */*/3rdparty/*/.git*
# Delete crossgcc from non-crossgcc coreboot archives