Skip to content

Commit

Permalink
release/amd64: cleanup code duplication
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmad Khalifa <[email protected]>
  • Loading branch information
VexedUXR committed Jan 25, 2025
1 parent 3999a86 commit 8d7d3f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions release/amd64/make-memstick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ 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
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
6 changes: 2 additions & 4 deletions release/amd64/mkisoimages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ if [ "$1" = "-b" ]; then
# 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
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 8d7d3f1

Please sign in to comment.