diff options
| -rw-r--r-- | config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch | 26 | ||||
| -rwxr-xr-x | include/git.sh | 21 | 
2 files changed, 47 insertions, 0 deletions
| diff --git a/config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch b/config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch new file mode 100644 index 00000000..66428b56 --- /dev/null +++ b/config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch @@ -0,0 +1,26 @@ +From 68f99140dda455a4f4e9d73df6d7b0a504494e95 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <info@minifree.org> +Date: Sun, 19 May 2024 23:35:52 +0100 +Subject: [PATCH 1/1] test patch + +Signed-off-by: Leah Rowe <info@minifree.org> +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index 4cb265b2..ef29489f 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. +  ++# test ++ + # This Makefile normally builds in a 'build' subdir, but use + # + #    make BUILD=<dir> +--  +2.39.2 + diff --git a/include/git.sh b/include/git.sh index d737fd1c..91ccf179 100755 --- a/include/git.sh +++ b/include/git.sh @@ -93,6 +93,9 @@ git_prep()  	if [ "$project" != "coreboot" ] || [ $# -gt 2 ]; then  		[ ! -f "$tmpgit/.gitmodules" ] || git -C "$tmpgit" submodule \  		    update --init --checkout || $err "git_prep $_loc: !submod" + +		patch_submodules +  		if [ "$project" = "coreboot" ] && [ -n "$xtree" ] && \  		    [ "$xtree" != "$tree" ]; then  			( @@ -114,6 +117,24 @@ git_prep()  		x_ ./update project trees -f coreboot "$xtree"; return 0  } +patch_submodules() +{ +	moddir="${PWD}/config/submodule/$project" +	[ -n "$tree" ] && moddir="$moddir/$tree" +	[ -d "$moddir" ] || return 0 + +	git -C "$tmpgit" submodule status | awk '{print $2}' > \ +	    "$tmpdir/modules" || $err "$moddir: cannot list submodules" + +	while read -r modsrcdir; do +		modname="${modsrcdir##*/}" +		modpatchdir="$moddir/$modname/patches" +		[ -d "$modpatchdir" ] || continue + +		git_am_patches "$tmpgit/$modsrcdir" "$modpatchdir" +	done < "$tmpdir/modules" +} +  git_am_patches()  {  	for _patch in "$2/"*; do | 
