move bootx64.efi into efi subdir
This commit is contained in:
parent
dbc0f8f610
commit
77a0b436af
|
@ -172,10 +172,10 @@ if [[ $USE_EFISHELL ]]; then
|
||||||
[[ -e "${SOURCE}"/efi/startup.nsh ]] && cp "${SOURCE}"/efi/startup.nsh "$MY_TMPDIR"/boot/
|
[[ -e "${SOURCE}"/efi/startup.nsh ]] && cp "${SOURCE}"/efi/startup.nsh "$MY_TMPDIR"/boot/
|
||||||
[[ -e "${SOURCE}"/efi/LockDown.efi ]] && cp "${SOURCE}"/efi/LockDown.efi "$MY_TMPDIR"/boot/
|
[[ -e "${SOURCE}"/efi/LockDown.efi ]] && cp "${SOURCE}"/efi/LockDown.efi "$MY_TMPDIR"/boot/
|
||||||
cp "${SOURCE}"/efi/Shell.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
cp "${SOURCE}"/efi/Shell.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
||||||
cp "$SOURCE"/bootx64.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
cp "$SOURCE"/efi/EFI/Boot/bootx64.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
||||||
else
|
else
|
||||||
cp "$SOURCE"/bootx64.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
cp "$SOURCE"/efi/EFI/Boot/bootx64.efi "$MY_TMPDIR"/boot/EFI/Boot/bootx64.efi
|
||||||
cp "$SOURCE"/bootx64.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
cp "$SOURCE"/efi/EFI/Boot/bootx64.efi "$MY_TMPDIR"/boot/EFI/FedoraBook/1.efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
umount "$MY_TMPDIR"/boot
|
umount "$MY_TMPDIR"/boot
|
||||||
|
|
|
@ -805,6 +805,8 @@ echo -n "lockdown=1 quiet rd.shell=0 video=efifb:nobgrt "\
|
||||||
"verity.imagesize=$IMAGE_SIZE verity.roothash=$ROOT_HASH verity.root=PARTUUID=$ROOT_UUID " \
|
"verity.imagesize=$IMAGE_SIZE verity.roothash=$ROOT_HASH verity.root=PARTUUID=$ROOT_UUID " \
|
||||||
"verity.hashoffset=$ROOT_SIZE raid=noautodetect root=/dev/mapper/root" > "$MY_TMPDIR"/options.txt
|
"verity.hashoffset=$ROOT_SIZE raid=noautodetect root=/dev/mapper/root" > "$MY_TMPDIR"/options.txt
|
||||||
|
|
||||||
|
mkdir -p "$MY_TMPDIR"/efi/EFI/FedoraBook
|
||||||
|
|
||||||
echo -n "${NAME}-${VERSION_ID}" > "$MY_TMPDIR"/release.txt
|
echo -n "${NAME}-${VERSION_ID}" > "$MY_TMPDIR"/release.txt
|
||||||
objcopy \
|
objcopy \
|
||||||
--add-section .release="$MY_TMPDIR"/release.txt --change-section-vma .release=0x20000 \
|
--add-section .release="$MY_TMPDIR"/release.txt --change-section-vma .release=0x20000 \
|
||||||
|
@ -812,12 +814,11 @@ objcopy \
|
||||||
${LOGO:+--add-section .splash="$LOGO" --change-section-vma .splash=0x40000} \
|
${LOGO:+--add-section .splash="$LOGO" --change-section-vma .splash=0x40000} \
|
||||||
--add-section .linux="$MY_TMPDIR"/linux --change-section-vma .linux=0x2000000 \
|
--add-section .linux="$MY_TMPDIR"/linux --change-section-vma .linux=0x2000000 \
|
||||||
--add-section .initrd="$MY_TMPDIR"/initrd --change-section-vma .initrd=0x3000000 \
|
--add-section .initrd="$MY_TMPDIR"/initrd --change-section-vma .initrd=0x3000000 \
|
||||||
"${BASEDIR}"/linuxx64.efi.stub "$MY_TMPDIR"/bootx64.efi
|
"${BASEDIR}"/linuxx64.efi.stub "$MY_TMPDIR"/efi/EFI/${NAME}/bootx64.efi
|
||||||
|
|
||||||
|
|
||||||
mkdir -p "$OUTDIR"
|
mkdir -p "$OUTDIR"
|
||||||
mv "$MY_TMPDIR"/root-hash.txt \
|
mv "$MY_TMPDIR"/root-hash.txt \
|
||||||
"$MY_TMPDIR"/bootx64.efi \
|
|
||||||
"$MY_TMPDIR"/root.img \
|
"$MY_TMPDIR"/root.img \
|
||||||
"$MY_TMPDIR"/release.txt \
|
"$MY_TMPDIR"/release.txt \
|
||||||
"$MY_TMPDIR"/options.txt \
|
"$MY_TMPDIR"/options.txt \
|
||||||
|
@ -829,7 +830,7 @@ mv "$MY_TMPDIR"/root-hash.txt \
|
||||||
|
|
||||||
for i in LockDown.efi Shell.efi startup.nsh; do
|
for i in LockDown.efi Shell.efi startup.nsh; do
|
||||||
[[ -e "${BASEDIR}"/$i ]] || continue
|
[[ -e "${BASEDIR}"/$i ]] || continue
|
||||||
cp "$i" "$OUTDIR"/efi
|
cp "$i" "$OUTDIR"/efi/EFI/${NAME}/
|
||||||
done
|
done
|
||||||
|
|
||||||
chown -R "$USER" "$OUTDIR"
|
chown -R "$USER" "$OUTDIR"
|
||||||
|
|
21
update.sh
21
update.sh
|
@ -210,14 +210,23 @@ ROOT_UUID=${ROOT_HASH:32:8}-${ROOT_HASH:40:4}-${ROOT_HASH:44:4}-${ROOT_HASH:48:4
|
||||||
sfdisk --part-uuid ${ROOT_DEV} ${NEW_ROOT_PARTNO} ${ROOT_UUID}
|
sfdisk --part-uuid ${ROOT_DEV} ${NEW_ROOT_PARTNO} ${ROOT_UUID}
|
||||||
|
|
||||||
# install to /efi
|
# install to /efi
|
||||||
mkdir -p /efi/EFI/${NAME}
|
if [[ -d efi/EFI ]]; then
|
||||||
cp bootx64.efi /efi/EFI/${NAME}/${NEW_ROOT_NUM}.efi
|
cp -vr efi/EFI/* /efi/EFI/
|
||||||
|
fi
|
||||||
if [[ -d efi ]]; then
|
|
||||||
cp -vr efi/* /efi/
|
if [[ ! -f /efi/EFI/Boot/bootx64.efi ]] \
|
||||||
|
|| cmp --quiet /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/Boot/bootx64.efi \
|
||||||
|
|| cmp --quiet /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi /efi/EFI/Boot/bootx64.efi
|
||||||
|
then
|
||||||
|
cp /efi/EFI/${NAME}/bootx64.efi /efi/EFI/Boot/bootx64.efi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp /efi/EFI/${NAME}/bootx64.efi /efi/EFI/${NAME}/${NEW_ROOT_NUM}.efi
|
||||||
|
|
||||||
|
if [[ -f /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi ]]; then
|
||||||
|
mv /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv /efi/EFI/${NAME}/${OLD_ROOT_NUM}.efi /efi/EFI/${NAME}/_${OLD_ROOT_NUM}.efi || :
|
|
||||||
rm -f /efi/EFI/${NAME}/_${NEW_ROOT_NUM}.efi
|
rm -f /efi/EFI/${NAME}/_${NEW_ROOT_NUM}.efi
|
||||||
|
|
||||||
BOOT_ORDER=$(efibootmgr | grep BootOrder: | { read _ a; echo "$a"; })
|
BOOT_ORDER=$(efibootmgr | grep BootOrder: | { read _ a; echo "$a"; })
|
||||||
|
|
Loading…
Reference in a new issue