Merge pull request #18 from Ognian/master

add --efi-dir option to build-arm-iamge.sh
This commit is contained in:
Ettore Di Giacinto 2022-11-18 11:12:01 +01:00 committed by GitHub
commit 85adc00f5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,7 @@ usage()
echo " --local: (optional) Use local repository when building" echo " --local: (optional) Use local repository when building"
echo " --directory: (optional) A directory which will be used for active/passive/recovery system" echo " --directory: (optional) A directory which will be used for active/passive/recovery system"
echo " --model: (optional) The board model" echo " --model: (optional) The board model"
echo " --efi-dir: (optional) A directory with files which will be added to the efi partition"
exit 1 exit 1
} }
@ -174,6 +175,10 @@ while [ "$#" -gt 0 ]; do
shift 1 shift 1
model=$1 model=$1
;; ;;
--efi-dir)
shift 1
efi_dir=$1
;;
--final-repo) --final-repo)
shift 1 shift 1
final_repo=$1 final_repo=$1
@ -313,6 +318,10 @@ if [ -z "$EFI" ]; then
fi fi
cp -rfv /arm/grub/efi/* $EFI cp -rfv /arm/grub/efi/* $EFI
if [ -n "$EFI" ] && [ -n "$efi_dir" ]; then
echo "Copy $efi_dir to EFI directory"
cp -rfv $efi_dir/* $EFI
fi
echo ">> Writing image and partition table" echo ">> Writing image and partition table"
dd if=/dev/zero of="${output_image}" bs=1024000 count="${size}" || exit 1 dd if=/dev/zero of="${output_image}" bs=1024000 count="${size}" || exit 1