render / rpms / edk2

Forked from rpms/edk2 2 months ago
Clone

Blame build-iso.sh

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