Skip to content

Commit

Permalink
release/amd64: Check config variables instead of checking files
Browse files Browse the repository at this point in the history
Check the MK_LOADER_IA32 variable instead of manually checking if the
file exists.

Signed-off-by: Ahmad Khalifa <[email protected]>
  • Loading branch information
VexedUXR committed Jan 11, 2025
1 parent 76658cd commit da3e113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions release/amd64/make-memstick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ fi

# Make an ESP in a file.
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then
make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi bootx64 \
${BASEBITSDIR}/boot/loader_ia32.efi bootia32
else
make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi
if [ ${MK_LOADER_IA32} = "yes" ]; then
extra_args="${BASEBITSDIR}/boot/loader_ia32.efi bootia32"
fi
make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi bootx64 ${extra_args}

mkimg -s mbr \
-b ${BASEBITSDIR}/boot/mbr \
Expand Down
8 changes: 3 additions & 5 deletions release/amd64/mkisoimages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ if [ "$1" = "-b" ]; then
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
# ESP file size in KB.
espsize="2048"
if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then
make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi bootx64 \
${BASEBITSDIR}/boot/loader_ia32.efi bootia32
else
make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi
if [ ${MK_LOADER_IA32} = "yes" ]; then
extra_args="${BASEBITSDIR}/boot/loader_ia32.efi bootia32"
fi
make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi bootx64 ${extra_args}
bootable="$bootable -o bootimage=i386;${espfilename} -o no-emul-boot -o platformid=efi"

shift
Expand Down

0 comments on commit da3e113

Please sign in to comment.