1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: architecture/powerpc/boot/boot.in
3 # Copyright (C) 2005 - 2024 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 ---
13 # before r45543 vintage yaboot glue was here
14 grubdir="$(sed -n "/lib.*mod$/ {s,grub2: \(.*\)/[^/]*,\1,p ; q}" \
15 $build_root/var/adm/flists/grub2)"
16 grubarch="${grubdir##*/}"
17 mkdir -p $isofsdir/{boot/grub,etc,ppc}/
19 cp -v $base/architecture/powerpc/boot/ofboot.b $isofsdir/boot/
20 cp -v $base/architecture/powerpc/boot/bootinfo.txt $isofsdir/ppc/
21 cp -v $base/architecture/powerpc/boot/boot.msg $isofsdir/
23 if [ "$SDECFG_POWERPC64_ENDIANESS" != 'le' ]; then
24 cp -af $build_root/usr/lib*/grub/* $isofsdir/boot/grub/
25 rm -f $isofsdir/boot/grub/*/*.{module,img} # not needed in the image
27 grub-mkimage -O powerpc-ieee1275 -p /boot/grub -o $isofsdir/boot/bootppc.elf \
28 -d $build_root/$grubdir/ --compression auto \
29 normal configfile all_video reboot \
30 part_gpt part_msdos part_apple iso9660 hfs hfsplus
32 grub-mkimage -O powerpc-ieee1275 -p /boot/grub -o $isofsdir/install.bin \
33 -d $build_root/$grubdir/ --compression auto --note \
34 normal configfile all_video reboot \
35 part_gpt part_msdos part_apple iso9660 hfs hfsplus
39 sed -n '/CUT/q;p' $base/architecture/share/boot/grub.cfg \
40 > $isofsdir/boot/grub/grub.cfg
42 cat >> $isofsdir/boot/grub/grub.cfg <<-EOT
43 # try to switch from HFS w/o symlinks, to is the ISO9660
44 search --label --set isoroot --no-floppy T2
45 if [ "\$root" = "\$isoroot,2" ]; then
46 set root="(\$isoroot)"
52 # grub2 - unused $3, verbose name
53 cat >> $isofsdir/boot/grub/grub.cfg <<EOT
56 linux ${4/vmlinuz/vmlinux}
61 # kboot, e.g. petitboot - unused $3, verbose name
62 cat >> $isofsdir/etc/kboot.conf <<EOT
64 install='$4 initrd=$5' # video=ps3fb:mode:13
69 echo_status "Creating isofs_arch.txt file .."
72 [ "$SDECFG_POWERPC64_ENDIANESS" != 'le' ] &&
73 prepboot="--prep-boot install.bin"
75 # TODO: -hide-hfs *.tar.*
76 cat > $build_toolchain/isofs_arch.txt <<- EOT
77 BOOT -hfs -part -map $base/architecture/powerpc/boot/mapping -no-desktop
78 BOOTx -hfs-bless $isofsdir/boot -hfs-volid T2
79 BOOTx -sysid PPC -l -L -r -T -chrp-boot $prepboot