summaryrefslogtreecommitdiff
path: root/payloads/external/tint/Makefile
diff options
context:
space:
mode:
authorMike Banon <mikebdp2@gmail.com>2021-02-21 19:20:40 +0300
committerPatrick Georgi <pgeorgi@google.com>2021-04-16 06:49:18 +0000
commit40df8aa84bcdb13b5b7213d90eca04c3f4f6c6ac (patch)
tree791685ab958e21750977fbcf6d4305ffdc00a50b /payloads/external/tint/Makefile
parenta7696adbeb1f3ad7408a02ba82930c02079b01ed (diff)
tint: introduce the new tint build system with checksum verification
Three stages of the new tint build system: 1) generate_core.sh extracts the core part from buildgcc script, most importantly the checksum calculation/verification functions. 2) tintify_core.sh adds the tint-specific footer/header to the core, such as the properties of current version including its checksum. 3) tint.sh - generated and "tintified" core script - builds a tint. Signed-off-by: Mike Banon <mikebdp2@gmail.com> Change-Id: Ib71f5b861ecf91949a5af12812258e60873f0498 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50991 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/external/tint/Makefile')
-rw-r--r--payloads/external/tint/Makefile73
1 files changed, 52 insertions, 21 deletions
diff --git a/payloads/external/tint/Makefile b/payloads/external/tint/Makefile
index e57132c8e3..5bd9df5a4f 100644
--- a/payloads/external/tint/Makefile
+++ b/payloads/external/tint/Makefile
@@ -1,5 +1,25 @@
-project_url=https://mirror.fsf.org/trisquel/pool/main/t/tint/tint_0.05.tar.xz
-archive_name=tint_0.05.tar.xz
+#
+# TINT build system - helps to securely download TINT with a checksum verification and build it.
+#
+
+#
+# Properties of the current TINT version
+#
+
+TINT_VERSION=0.05
+TINT_EXT_VERSION=0.05
+TINT_ARCHIVE_LINK="https://mirror.fsf.org/trisquel/pool/main/t/tint/tint_${TINT_EXT_VERSION}.tar.xz"
+TINT_ARCHIVE="tint_${TINT_VERSION}.tar.xz"
+TINT_DIR="tint-${TINT_VERSION}"
+TINT_SHA1SUM="859008216930a4584e622d0df41fd75c44d2b47f"
+
+#
+# Locations of the input/output scripts
+#
+
+buildgcc="./../../../util/crossgcc/buildgcc"
+corescript="./core.sh"
+tintified="./tint.sh"
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
@@ -10,28 +30,39 @@ unexport KCONFIG_NEGATIVES
all: tint
-tint: patch
- echo " MAKE TINT "
- $(MAKE) -C tint
-
-patch: download
- cd tint; \
- if [ -e debian ]; then \
- rm -rf debian typedefs.h Makefile; \
- touch Makefile; \
- patch -l -p1 < ../libpayload_tint.patch; \
- fi
+################################################################################
+#
+# Three stages of TINT build system:
+#
+# 1) generate_core.sh extracts the core part from buildgcc script,
+# most importantly the checksum calculation/verification functions.
+#
+# 2) tintify_core.sh adds the TINT-specific footer/header to the core,
+# such as the properties of current version including its checksum.
+#
+# 3) tint.sh - generated and "tintified" core script - builds a TINT.
+#
+################################################################################
-download:
- test -d tint || { wget $(project_url); \
- tar -xvf $(archive_name); \
- rm $(archive_name); \
- mv tint-0.05 tint; }
+tint:
+ if [ ! -f ${tintified} ]; then \
+ chmod +x "./generate_core.sh" ; \
+ "./generate_core.sh" ${buildgcc} ${corescript} "prepare_before_patch" ; \
+ chmod +x "./tintify_core.sh" ; \
+ "./tintify_core.sh" ${corescript} ${tintified} \
+ ${TINT_ARCHIVE_LINK} ${TINT_ARCHIVE} ${TINT_DIR} ${TINT_SHA1SUM} ; \
+ fi ; \
+ chmod +x ${tintified}
+ ${tintified}
clean:
- test -d tint && $(MAKE) -C tint clean || exit 0
+ test -d "./tint/" && $(MAKE) -C "./tint/" clean || exit 0
distclean:
- rm -rf tint
+ rm -rf "./tint/"
+ rm -f ${corescript}
+ rm -f ${tintified}
+
+.PHONY: tint clean distclean
-.PHONY: download patch tint clean distclean
+#