summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/build
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-02-20 00:56:41 (EST)
committer Francis Rowe <info@gluglug.org.uk>2015-02-20 00:56:41 (EST)
commitb7859ce55b85f06133ffb4c85e34f5d25a84f0b3 (patch)
tree0ac0f92216f8110a45a80be29fd80060d1408738 /resources/scripts/helpers/build
parenta4edcd82dc5405d8b58bf6ea2ddb6f928c059049 (diff)
downloadlibreboot-b7859ce55b85f06133ffb4c85e34f5d25a84f0b3.zip
libreboot-b7859ce55b85f06133ffb4c85e34f5d25a84f0b3.tar.gz
libreboot-b7859ce55b85f06133ffb4c85e34f5d25a84f0b3.tar.bz2
bash scripts: Make script output more user-friendly
Diffstat (limited to 'resources/scripts/helpers/build')
-rwxr-xr-xresources/scripts/helpers/build/clean/bucts4
-rwxr-xr-xresources/scripts/helpers/build/clean/coreboot4
-rwxr-xr-xresources/scripts/helpers/build/clean/flashrom4
-rwxr-xr-xresources/scripts/helpers/build/clean/grub3
-rwxr-xr-xresources/scripts/helpers/build/clean/i945pwm2
-rwxr-xr-xresources/scripts/helpers/build/clean/ich9deblob2
-rwxr-xr-xresources/scripts/helpers/build/clean/memtest86plus4
-rwxr-xr-xresources/scripts/helpers/build/clean/rom_images2
-rwxr-xr-xresources/scripts/helpers/build/external/source4
-rwxr-xr-xresources/scripts/helpers/build/module/bucts4
-rwxr-xr-xresources/scripts/helpers/build/module/coreboot4
-rwxr-xr-xresources/scripts/helpers/build/module/flashrom4
-rwxr-xr-xresources/scripts/helpers/build/module/grub4
-rwxr-xr-xresources/scripts/helpers/build/module/i945pwm4
-rwxr-xr-xresources/scripts/helpers/build/module/ich9deblob4
-rwxr-xr-xresources/scripts/helpers/build/module/memtest86plus4
-rwxr-xr-xresources/scripts/helpers/build/release/archives44
-rwxr-xr-xresources/scripts/helpers/build/roms/helper6
-rwxr-xr-xresources/scripts/helpers/build/roms/withgrub4
19 files changed, 103 insertions, 8 deletions
diff --git a/resources/scripts/helpers/build/clean/bucts b/resources/scripts/helpers/build/clean/bucts
index f84cd58..80fe3a8 100755
--- a/resources/scripts/helpers/build/clean/bucts
+++ b/resources/scripts/helpers/build/clean/bucts
@@ -27,9 +27,13 @@ set -u -e
# clean bucts
# --------------------------------------------------------
+printf "Cleaning the previous build of bucts\n"
+
cd bucts/
make clean
+printf "\n\n"
+
# done. go back to main directory.
cd ../
diff --git a/resources/scripts/helpers/build/clean/coreboot b/resources/scripts/helpers/build/clean/coreboot
index 4af7391..d657aa3 100755
--- a/resources/scripts/helpers/build/clean/coreboot
+++ b/resources/scripts/helpers/build/clean/coreboot
@@ -27,6 +27,8 @@ set -u -e
# clean coreboot utilities (dependencies for 'build'):
# -------------------------------------------------------
+printf "Cleaning the previous build of the utilities in coreboot\n"
+
cd coreboot/
# ----------------------
@@ -59,4 +61,6 @@ make crossgcc-clean
# done. go back to main directory
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/clean/flashrom b/resources/scripts/helpers/build/clean/flashrom
index 483ce4f..41f5d28 100755
--- a/resources/scripts/helpers/build/clean/flashrom
+++ b/resources/scripts/helpers/build/clean/flashrom
@@ -27,6 +27,8 @@ set -u -e
# clean flashrom
# --------------------------------------------------------
+printf "Cleaning the previous build of flashrom\n"
+
cd flashrom/
make clean
@@ -37,4 +39,6 @@ rm -f flashrom_lenovobios_macronix
# done. go back to main directory
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/clean/grub b/resources/scripts/helpers/build/clean/grub
index b6e4f13..d59410a 100755
--- a/resources/scripts/helpers/build/clean/grub
+++ b/resources/scripts/helpers/build/clean/grub
@@ -29,9 +29,12 @@ set -u -e
cd grub/
+printf "Cleaning the previous build of GRUB\n"
[[ -f Makefile ]] && make clean
# done. go back to main directoy
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/clean/i945pwm b/resources/scripts/helpers/build/clean/i945pwm
index fa9aecf..ff383e8 100755
--- a/resources/scripts/helpers/build/clean/i945pwm
+++ b/resources/scripts/helpers/build/clean/i945pwm
@@ -27,8 +27,10 @@ set -u -e
# clean i945-pwm utility
# --------------------------------------------------------------------
+printf "Cleaning the previous build of i945-pwm\n"
cd resources/utilities/i945-pwm
make clean
cd ../../../
+printf "\n\n"
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/clean/ich9deblob b/resources/scripts/helpers/build/clean/ich9deblob
index f3ee46a..04d971a 100755
--- a/resources/scripts/helpers/build/clean/ich9deblob
+++ b/resources/scripts/helpers/build/clean/ich9deblob
@@ -27,8 +27,10 @@ set -u -e
# clean ich9deblob utility
# --------------------------------------------------------------------
+printf "Cleaning the previous build of ich9deblob\n"
cd resources/utilities/ich9deblob/
make clean
cd ../../../
+printf "\n\n"
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/clean/memtest86plus b/resources/scripts/helpers/build/clean/memtest86plus
index 8d4ede6..3ad8130 100755
--- a/resources/scripts/helpers/build/clean/memtest86plus
+++ b/resources/scripts/helpers/build/clean/memtest86plus
@@ -27,6 +27,8 @@ set -u -e
# clean memtest86+
# --------------------------------------------------------
+printf "Cleaning the previous build of MemTest86+\n"
+
cd "memtest86+-5.01"/
make clean
@@ -34,4 +36,6 @@ make clean
# done. go back to main directory
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/clean/rom_images b/resources/scripts/helpers/build/clean/rom_images
index 592b111..02833c3 100755
--- a/resources/scripts/helpers/build/clean/rom_images
+++ b/resources/scripts/helpers/build/clean/rom_images
@@ -30,4 +30,6 @@ set -u -e
# delete the bin/ directory
rm -rf bin/
+printf "Deleted the bin/ directory containing the ROM images.\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/external/source b/resources/scripts/helpers/build/external/source
index 74cfdb3..520a004 100755
--- a/resources/scripts/helpers/build/external/source
+++ b/resources/scripts/helpers/build/external/source
@@ -23,6 +23,8 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+printf "Creating source archive for flashrom and bucts\n"
+
# delete the old data
rm -rf tobuild
rm -f tobuild.tar.xz
@@ -67,3 +69,5 @@ tar -c tobuild | xz -9e >tobuild.tar.xz
# and delete the directory
rm -rf tobuild/
+
+printf "\n\n"
diff --git a/resources/scripts/helpers/build/module/bucts b/resources/scripts/helpers/build/module/bucts
index 6c596dd..34e1a37 100755
--- a/resources/scripts/helpers/build/module/bucts
+++ b/resources/scripts/helpers/build/module/bucts
@@ -27,6 +27,8 @@ set -u -e
# Build BUC.TS utility (needed for flashing ROM's on X60/T60 while Lenovo BIOS is running)
# --------------------------------------------------------------------
+printf "Building bucts\n"
+
cd bucts/
buildtype="unknown"
@@ -50,4 +52,6 @@ fi
# done. go back to main directory
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/module/coreboot b/resources/scripts/helpers/build/module/coreboot
index 3060e58..d9083a7 100755
--- a/resources/scripts/helpers/build/module/coreboot
+++ b/resources/scripts/helpers/build/module/coreboot
@@ -27,6 +27,8 @@ set -u -e
# Build utilities needed in coreboot directory
# --------------------------------------------------------------------
+printf "Building the utilities in coreboot\n"
+
cd coreboot
# -----------------------------------------
@@ -54,4 +56,6 @@ make crossgcc-i386
# done. go back to main libreboot_src directory
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/module/flashrom b/resources/scripts/helpers/build/module/flashrom
index 7fe0fa7..a6cf612 100755
--- a/resources/scripts/helpers/build/module/flashrom
+++ b/resources/scripts/helpers/build/module/flashrom
@@ -27,6 +27,8 @@ set -u -e
# Build "flashrom" (utility for flashing/dumping ROM's)
# --------------------------------------------------------------------
+printf "Building flashrom\n"
+
cd flashrom/
make clean
@@ -78,5 +80,7 @@ mv flashrom_normal flashrom
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/module/grub b/resources/scripts/helpers/build/module/grub
index 5138b47..73f36e7 100755
--- a/resources/scripts/helpers/build/module/grub
+++ b/resources/scripts/helpers/build/module/grub
@@ -27,6 +27,8 @@ set -u -e
# Build utilies needed for building GRUB payloads
# ---------------------------------------------------------------------
+printf "Building GRUB\n"
+
cd grub/
# clean it first
@@ -37,6 +39,8 @@ cd grub/
./configure --with-platform=coreboot
make
+printf "\n\n"
+
# done. go back to main directory
cd ../
diff --git a/resources/scripts/helpers/build/module/i945pwm b/resources/scripts/helpers/build/module/i945pwm
index c70c37e..657a7b4 100755
--- a/resources/scripts/helpers/build/module/i945pwm
+++ b/resources/scripts/helpers/build/module/i945pwm
@@ -27,6 +27,8 @@ set -u -e
# Build i945-pwm utility
# --------------------------------------------------------------------
+printf "Building i945-pwm\n"
+
cd resources/utilities/i945-pwm/
make clean
@@ -36,4 +38,6 @@ make
# done. go back to main directory
cd ../../../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/module/ich9deblob b/resources/scripts/helpers/build/module/ich9deblob
index c0941ee..25cf97b 100755
--- a/resources/scripts/helpers/build/module/ich9deblob
+++ b/resources/scripts/helpers/build/module/ich9deblob
@@ -27,6 +27,8 @@ set -u -e
# Build ich9deblob utility
# --------------------------------------------------------------------
+printf "Building ich9deblob\n"
+
cd resources/utilities/ich9deblob
# clean it first
@@ -38,4 +40,6 @@ make
# done. go back to main directory
cd ../../../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/module/memtest86plus b/resources/scripts/helpers/build/module/memtest86plus
index 0b7686e..d6f52ef 100755
--- a/resources/scripts/helpers/build/module/memtest86plus
+++ b/resources/scripts/helpers/build/module/memtest86plus
@@ -27,6 +27,8 @@ set -u -e
# Build MemTest86+ payload (for GRUB)
# --------------------------------------------------------------------
+printf "Building MemTest86+\n"
+
cd "memtest86+-5.01"/
# clean it first
@@ -38,4 +40,6 @@ make
# done. go back to main directory
cd ../
+printf "\n\n"
+
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/release/archives b/resources/scripts/helpers/build/release/archives
index 8b4bfce..ae49b9e 100755
--- a/resources/scripts/helpers/build/release/archives
+++ b/resources/scripts/helpers/build/release/archives
@@ -25,6 +25,8 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+printf "Generating the release archives\n"
+
arch="unknown"
if [ $(uname -i) = "i686" ] || [ $(uname -m) = "i686" ]
then
@@ -50,8 +52,7 @@ cat .git/refs/heads/master > commitid
# ### Delete old archives before continuing
# ----------------------------------------------------------------------------------------------------------------------------
-echo "Deleting old release archives"
-
+printf "Deleting the old release archives\n"
rm -f libreboot_*.tar.xz
rm -f tobuild.tar.xz
rm -rf release/
@@ -63,9 +64,12 @@ rm -rf libreboot_doc
# Get manifest which will be used to copy everything
find -maxdepth 1 > releasefilelist
+printf "\n\n"
+
# ### Prepare libreboot_src archive ready for release
# ----------------------------------------------------------------------------------------------------------------------------
+printf "Copying libreboot sources to libreboot_src/\n"
mkdir libreboot_src
for resource in $(cat releasefilelist)
@@ -83,6 +87,8 @@ cd libreboot_src/
# back to main checkout directory
cd ../
+printf "\n\n"
+
# ### Create the release/ directory where the archives will go
# ----------------------------------------------------------------------------------------------------------------------------
@@ -93,6 +99,8 @@ mkdir release/rom/
# ### Prepare libreboot_docs archive ready for release
# ----------------------------------------------------------------------------------------------------------------------------
+printf "Creating libreboot_docs.tar.xz\n"
+
cd release/
mkdir libreboot_docs/
@@ -108,11 +116,15 @@ rm -rf libreboot_docs/
cd ../
+printf "\n\n"
+
# ### Further work in libreboot_src: delete *.git and *.svn
# ### To save space since they are not useful in the release archives
# ### Changes to these projects should be submitted upstream
# ----------------------------------------------------------------------------------------------------------------------------
+echo "Deleting .git* and .svn* in the modules of libreboot_src/\n"
+
cd libreboot_src/
# These instructions will also work even if .git or .svn are already deleted
@@ -144,14 +156,20 @@ rm -rf .git
rm -f .gitignore
cd ../
+printf "\n\n"
+
cd ../
# ### Prepare ROM archives ready for release
# ----------------------------------------------------------------------------------------------------------------------------
+printf "Generating ROM image archives for...\n"
+
cd bin/
for board in $(ls)
do
+ printf "...$board"
+
# show the libreboot commit ID in the archive
cat ../commitid > "$board"/commitid
@@ -163,12 +181,18 @@ do
# move the ROM images to the release/ directory
mv ../libreboot_"$board".tar.xz ../release/rom/
+
+ printf " OK\n"
done
cd ../
+printf "\n\n"
+
# ### Prepare libreboot_util archive ready for release
# ----------------------------------------------------------------------------------------------------------------------------
+printf "Generating libreboot_util.tar.xz\n"
+
mkdir libreboot_util
# --------------
@@ -351,6 +375,8 @@ cp resources/scripts/misc/ich9macchange libreboot_util/
# for changing the GRUB background
cp resources/scripts/misc/grub-background libreboot_util/
+printf "\n\n"
+
# ### Create the release tarballs
# ----------------------------------------------------------------------------------------------------------------------------
@@ -399,8 +425,10 @@ cat commitid > libreboot_src/commitid
cat commitid > libreboot_util/commitid
# create lzma compressed src archive
+printf "Compressing libreboot_src/ into libreboot_src.tar.xz\n"
tar -c libreboot_src | xz -9e >libreboot_src.tar.xz
+printf "Compressing libreboot_util/ into libreboot_util.tar.xz\n"
# create lzma compressed util archive
tar -c libreboot_util | xz -9e >libreboot_util.tar.xz
@@ -411,6 +439,8 @@ mv libreboot_util.tar.xz release/
# Create a symlink to the commitid file, in release/
cat commitid > release/commitid
+printf "\n\n"
+
# ### Delete the uncompressed release directories
# ----------------------------------------------------------------------------------------------------------------------------
@@ -424,9 +454,11 @@ rm -rf libreboot_util
# Move the archive to the release directory
mv tobuild.tar.xz release/
-# DONE. See libreboot_src.tar.xz and libreboot_util.tar.xz
-# NOTE FOR FCHMMR: don't forget to add ARM binaries for flashrom
-# NOTE FOR FCHMMR: don't forget to add i386 binaries for flashrom/bucts
-# The tarball tobuild.tar.xz has been created with everything needed to build these utilities
+printf "Tar archives are stored in release/.\n"
+printf "NOTE: don't forget to add ARM binaries for flashrom.\n"
+printf "NOTE: don't forget to add i386 binaries for flashrom/bucts.\n"
+printf "The archive tobuild.tar.xz has been created with everything needed to build these utilities.\n"
+
+printf "\n\n"
# ------------------- DONE ----------------------
diff --git a/resources/scripts/helpers/build/roms/helper b/resources/scripts/helpers/build/roms/helper
index d63598d..983be3d 100755
--- a/resources/scripts/helpers/build/roms/helper
+++ b/resources/scripts/helpers/build/roms/helper
@@ -31,7 +31,9 @@ if (( $# != 1 )); then
exit 1
fi
-cd coreboot
+printf "Helper script: build ROM images for '$1'\n"
+
+cd coreboot/
# Build ROM images with text-mode and corebootfb modes.
# ---------------------------------------------------------------------------------------------------------------
@@ -113,3 +115,5 @@ mv "$1" ../bin
# go back to main source directory
cd ../
+printf "\n\n"
+
diff --git a/resources/scripts/helpers/build/roms/withgrub b/resources/scripts/helpers/build/roms/withgrub
index 18cf62e..9e1ff42 100755
--- a/resources/scripts/helpers/build/roms/withgrub
+++ b/resources/scripts/helpers/build/roms/withgrub
@@ -25,7 +25,7 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
-# Build the ROM images
+printf "Building ROM images with the GRUB payload\n"
if [ ! -d "bin" ]
then
@@ -103,5 +103,7 @@ rm -f coreboot/grub_txtmode.elf
# The GRUB configs are no longer needed
rm -f coreboot/grub*cfg
+printf "\n\n"
+
# ------------------- DONE ----------------------