[coreboot-gerrit] New patch to review for coreboot: tint: update from 0.03b to 0.04+nmu1 with some extra changes
Mike Banon (mikebdp2@gmail.com)
gerrit at coreboot.org
Sat Nov 19 18:56:41 CET 2016
Mike Banon (mikebdp2 at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17505
-gerrit
commit d5148fb7250c08bdf1cd149ead94b3ce28ad6c56
Author: Mike <read.only2015 at yandex.ru>
Date: Sat Nov 19 20:46:27 2016 +0300
tint: update from 0.03b to 0.04+nmu1 with some extra changes
This commit includes the following changes:
1) Update from 0.03b to 0.04+nmu1 fixes two buffer overflows
2) Fix to show "Paused - Press any key to continue" message
3) Make it possible to reboot PC from this payload
4) Reduce a size of libpayload_tint.patch in half
5) Add USB keyboard support (thanks to libpayload)
6) Verify SHA-1 checksum of the downloaded archive
More details in thread *TINT payload major update!* [1].
[1] https://www.coreboot.org/pipermail/coreboot/2016-November/082426.html
Change-Id: Ie11de7eb3f86f9e0a54f2364e2bd5debaa0e4c8d
Signed-off-by: Mike Banon <mikebdp2 at gmail.com>
---
payloads/external/tint/Makefile | 39 ++++++++++++++++++++++++----
payloads/external/tint/libpayload_tint.patch | 2 +-
util/lint/kconfig_lint | 2 +-
3 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/payloads/external/tint/Makefile b/payloads/external/tint/Makefile
index 23379e0..60acb1e 100644
--- a/payloads/external/tint/Makefile
+++ b/payloads/external/tint/Makefile
@@ -1,5 +1,9 @@
project_url=http://http.debian.net/debian/pool/main/t/tint/tint_0.04+nmu1.tar.gz
archive_name=tint_0.04+nmu1.tar.gz
+correct_sha1=7fcaa428c6d0de7096d1e4fbfd14848096ae5aad
+sha-1:=$(shell { command -v sha1sum || command -v sha1 || command -v shasum; } 2>/dev/null)
+
+THIS_FILE := $(lastword $(MAKEFILE_LIST))
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
@@ -16,13 +20,38 @@ tint: patch
patch: download
cd tint; \
- if [ -e debian ]; then rm -rf debian; rm typedefs.h; rm Makefile; touch Makefile; patch -l -p1 < ../libpayload_tint.patch; fi
+ if [ -e debian ]; then \
+ rm -rf debian typedefs.h Makefile; \
+ touch Makefile; \
+ patch -l -p1 < ../libpayload_tint.patch; \
+ fi
download:
- test -d tint || { wget $(project_url); \
- tar -xvf $(archive_name); \
- rm $(archive_name); \
- mv tint-0.04+nmu1 tint; }
+ if [ ! -d tint ]; then \
+ if [ ! -f $(archive_name) ]; then \
+ wget $(project_url); \
+ fi; \
+ if [ -f $(archive_name) ]; then \
+ if $(MAKE) -f $(THIS_FILE) check; then \
+ tar -xvf $(archive_name); \
+ rm $(archive_name); \
+ mv tint-0.04+nmu1 tint; \
+ fi; \
+ else \
+ echo "TINT payload: archive not found!" 1>&2 ; \
+ exit 1;\
+ fi; \
+ fi
+
+check:
+ $(eval archive_sha1 := $(shell $(sha-1) $(archive_name)))
+ @echo $(archive_sha1)
+ @if echo $(archive_sha1) | grep -Eq $(correct_sha1); then \
+ exit 0;\
+ else \
+ echo "TINT payload: bad SHA-1 of downloaded archive!" 1>&2 ; \
+ exit 1;\
+ fi
clean:
test -d tint && $(MAKE) -C tint clean || exit 0
diff --git a/payloads/external/tint/libpayload_tint.patch b/payloads/external/tint/libpayload_tint.patch
index 6e2d54a..d32ab8a 100644
--- a/payloads/external/tint/libpayload_tint.patch
+++ b/payloads/external/tint/libpayload_tint.patch
@@ -372,7 +372,7 @@ diff -rupN tint-0.04+nmu1/tint.c tint/tint.c
/* Initialize */
+
+ #ifndef CONFIG_LP_USB
-+ #define CONFIG_LP_USB 1
++ #define CONFIG_LP_USB 0
+ #endif
+
+ #if IS_ENABLED(CONFIG_LP_USB)
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 064f3db..143d4e7 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -45,7 +45,7 @@ my $root_dir = "src"; # Directory of the top level Kconfig file
my $errors_found = 0; # count of errors
my $warnings_found = 0;
my $exclude_dirs_and_files =
- '^build/\|^coreboot-builds/\|^payloads/libpayload\|^payloads/coreinfo\|^configs/\|^util/\|^\.git/'
+ '^build/\|^coreboot-builds/\|^payloads/libpayload\|^payloads/coreinfo\|^payloads/external/tint\|^configs/\|^util/\|^\.git/'
. '\|' . # directories to exclude when searching for used symbols
'\.txt$\|\.tex$\|\.tags'; #files to exclude when looking for symbols
my $config_file = ""; # name of config file to load symbol values from.
More information about the coreboot-gerrit
mailing list