edk2/build-iso.sh

27 lines
638 B
Bash
Raw Normal View History

2016-04-18 13:07:22 +00:00
#!/bin/sh
# args
dir="$1"
# cfg
shell="$dir/Shell.efi"
enroll="$dir/EnrollDefaultKeys.efi"
root="$dir/image"
2016-04-18 13:07:22 +00:00
vfat="$dir/shell.img"
iso="$dir/UefiShell.iso"
# create non-partitioned (1.44 MB floppy disk) FAT image
mkdir "$root"
mkdir "$root"/efi
mkdir "$root"/efi/boot
cp "$shell" "$root"/efi/boot/bootx64.efi
cp "$enroll" "$root"
qemu-img convert --image-opts \
driver=vvfat,floppy=on,fat-type=12,label=UEFI_SHELL,dir="$root/" \
$vfat
2016-04-18 13:07:22 +00:00
# build ISO with FAT image file as El Torito EFI boot image
genisoimage -input-charset ASCII -J -rational-rock \
-efi-boot "${vfat##*/}" -no-emul-boot -o "$iso" -- "$vfat"
rm -rf "$root/" "$vfat"