diff options
| author | Leah Rowe <leah@libreboot.org> | 2022-11-26 21:22:06 +0000 | 
|---|---|---|
| committer | Gogs <gogitservice@gmail.com> | 2022-11-26 21:22:06 +0000 | 
| commit | 59e4f560d68449f2ab9ec8439e36750bc1c20430 (patch) | |
| tree | d972b8872b9a456671305d8ef2d0b695393a0813 /resources/scripts/blobs/download | |
| parent | 0ae00e881efa32e1d13ad7bb0e60e195d3d3406a (diff) | |
| parent | 99652baa969d5312c87a6ea8debe048ffc955567 (diff) | |
Merge branch 'dev' of shmalebx9/lbmk into master
Diffstat (limited to 'resources/scripts/blobs/download')
| -rwxr-xr-x | resources/scripts/blobs/download | 21 | 
1 files changed, 13 insertions, 8 deletions
diff --git a/resources/scripts/blobs/download b/resources/scripts/blobs/download index c274e9d1..e8e82448 100755 --- a/resources/scripts/blobs/download +++ b/resources/scripts/blobs/download @@ -14,6 +14,11 @@ else  	redistributable=false  fi +Fail(){ +	printf "\nERROR: $@\n" +	exit 1 +} +  Download_needed(){  	for need in ${needs}; do  		case ${need} in @@ -27,8 +32,7 @@ Download_needed(){  	done  	if [ ! -z ${_failed+x} ]; then -	printf "\nERROR: failed to obtain${_failed}\nrun: './blobutil extract ${board} /path/to/romdump.rom' to extract the remaining blobs\n" -	exit 1 +	Fail "failed to obtain ${_failed}\nYou may try manually extracting blobs with './blobutil extract'"  	fi  } @@ -68,27 +72,28 @@ Extract_me(){  		return 1  	fi -	( cd blobs && innoextract me.exe )  	printf 'extracting and stripping intel management engine\n' +	innoextract blobs/me.exe -d blobs || Fail 'could not extract me executable with innoextract'   	./me_cleaner/me_cleaner.py -r -t -O ${_me_destination} blobs/app/*ME*.bin \ -	|| ./resources/blobs/me7_update_parser.py -O ${_me_destination} blobs/app/ME7*.bin +	|| ./resources/blobs/me7_update_parser.py -O ${_me_destination} blobs/app/ME7*.bin \ +	|| return 1  	printf "Truncated and cleaned me output to ${_me_destination}\n"  }  Build_deps(){  	if [ ! -d me_cleaner ]; then  		printf "downloading me_cleaner\n" -		./download me_cleaner +		./download me_cleaner || Fail 'could not download me_cleaner'  	fi  	if [ ! -d coreboot/default ]; then  		printf "downloading coreboot\n" -		./download coreboot default +		./download coreboot default || Fail 'could not download coreboot'  	fi  	if [ ! -f "coreboot/default/util/ifdtool/ifdtool" ]; then -	printf "building ifdtool from coreboot\n" -	( cd coreboot/default/util/ifdtool && make ) +		printf "building ifdtool from coreboot\n" +		make -C coreboot/default/util/ifdtool || Fail 'could not build ifdtool'  	fi  }  | 
