# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: architecture/share/boot/grub.in # Copyright (C) 2021 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- function grub_create_efi_img() { local exe="$1" dd if=/dev/zero bs=1024 count=1440 of=$isofsdir/efi.img mkfs.vfat $isofsdir/efi.img mmd -i $isofsdir/efi.img ::/EFI mmd -i $isofsdir/efi.img ::/EFI/BOOT mcopy -i $isofsdir/efi.img $exe ::/EFI/BOOT } function grub_create_boot_entry() { cat <<- EOT BOOTx -partition_offset 16 -append_partition 2 0xef $isofsdir/efi.img BOOTx -e --interval:appended_partition_2:all:: BOOTx -iso_mbr_part_type 0x83 EOT }