diff options
| author | Alper Nebi Yasak <alpernebiyasak@gmail.com> | 2022-08-25 20:31:37 +0300 | 
|---|---|---|
| committer | Alper Nebi Yasak <alpernebiyasak@gmail.com> | 2022-08-27 17:35:55 +0300 | 
| commit | eae6b35dabdeba336aaa3ecc3fdc22a23b16d98a (patch) | |
| tree | 64c3982e696b1499037cb86a6fdb7b2e4ad07179 /resources | |
| parent | 454364ccb8c14738f88b7b51c26258c548a17305 (diff) | |
download/u-boot: Support applying patches from board dirs
Boards may need different sets of patches to be applied to their U-Boot
builds, copy the existing mechanism from the coreboot download script to
the U-Boot download script.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Diffstat (limited to 'resources')
| -rwxr-xr-x | resources/scripts/download/u-boot | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/resources/scripts/download/u-boot b/resources/scripts/download/u-boot index 86be55b9..212a5a21 100755 --- a/resources/scripts/download/u-boot +++ b/resources/scripts/download/u-boot @@ -169,6 +169,20 @@ downloadfor() {  			"${ubtree}"  		return 1  	fi + +	for patch in resources/u-boot/${board}/patches/*.patch; do +		if [ ! -f "${patch}" ]; then +			continue +		fi + +		git -C "${ubtree}" am "$(pwd)/${patch}" || touch build_error +		if [ -f build_error ]; then +			printf "ERROR: %s: Unable to apply patch '%s' for board '%s' on tree '%s'" \ +				"download/u-boot" "${patch}" "${board}" "${ubtree}" +			git -C "${ubtree}" am --abort +			return 1 +		fi +	done  }  strip_comments() | 
