1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: architecture/riscv/boot/boot.in
3 # Copyright (C) 2007 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 . $base/architecture/share/boot/grub.in
16 local platform=riscv32-efi
17 local exe=BOOTRISCV32.EFI
18 [ $arch = riscv64 ] && platform=${platform/32/64} && exe=${exe/32/64}
20 mkdir -p $isofsdir/boot/grub
21 cp -af $build_root/usr/lib*/grub/* $isofsdir/boot/grub/
22 rm -f $isofsdir/boot/grub/*/*.{module,img} # not needed in the image
24 mkdir -p $isofsdir/efi/boot/
25 grub-mkimage -O $platform -p "/boot/grub" \
26 -d $build_root/usr/lib*/grub/$platform \
27 -o $isofsdir/efi/boot/$exe \
28 --compression auto iso9660 fat part_msdos part_gpt
30 grub_create_efi_img $isofsdir/efi/boot/$exe
33 sed -n '/CUT/q;p' $base/architecture/riscv/boot/grub.cfg \
34 > $1/boot/grub/grub.cfg
39 cat >> $1/boot/grub/grub.cfg <<-EOT
51 sed '1,/CUT/d' $base/architecture/riscv/boot/grub.cfg \
52 >> $1/boot/grub/grub.cfg
53 echo_status "Creating isofs_arch.txt file .."
55 echo "DISK1 $isofsdir/ /" > $build_toolchain/isofs_arch.txt
56 cat >> $build_toolchain/isofs_arch.txt <<- EOT
59 grub_create_boot_entry >> $build_toolchain/isofs_arch.txt