# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: architecture/sparc/boot/boot.in # Copyright (C) 2006 - 2022 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 --- if [ "$SDECFG_SPARC_CD_LOADER" = "grub2" ]; then arch_boot_cd_pre() { local platform=sparc64-ieee1275 mkdir -p $isofsdir/boot/grub cp -af $build_root/usr/lib*/grub/$platform $isofsdir/boot/grub/ rm -f $isofsdir/boot/grub/$platform/*.{module,img} dd if=/dev/zero bs=512 count=1 > $isofsdir/../isofs.b cat $build_root/usr/lib*/grub/$platform/cdboot.img >> $isofsdir/../isofs.b grub-mkimage -O $platform-cdcore -p "/boot/grub" \ -d $build_root/usr/lib*/grub/$platform \ -o $isofsdir/boot/grub/$platform/core.img \ --compression auto iso9660 fat part_sun part_msdos part_gpt # header sed -n '/CUT/q;p' $base/architecture/share/boot/grub.cfg \ > $1/boot/grub/grub.cfg } arch_boot_cd_add() { cat >> $1/boot/grub/grub.cfg <<-EOT menuentry "$3 ($2)" { linux $4 initrd $5 } EOT } arch_boot_cd_post() { # footer sed '1,/CUT/d' $base/architecture/share/boot/grub.cfg \ >> $1/boot/grub/grub.cfg echo_status "Creating isofs_arch.txt file .." echo "DISK1 $isofsdir/ /" > $build_toolchain/isofs_arch.txt cat >> $build_toolchain/isofs_arch.txt <<- EOT BOOT -G $isofsdir/../isofs.b -B ... --grub2-sparc-core boot/grub/sparc64-ieee1275/core.img EOT } else # SILO arch_boot_cd_pre() { mkdir -p $isofsdir/boot cp -f $build_root/boot/isofs.b $isofsdir/.. cp -f $build_root/boot/second.b $isofsdir/boot/ cp -f $base/architecture/sparc/boot/{silo.conf,boot.msg} \ $isofsdir/boot/ } arch_boot_cd_add() { # unused $2, verbose name cat >> $isofsdir/boot/silo.conf <<-EOT image=$4 label=$2 initrd=$5 EOT } arch_boot_cd_post() { echo_status "Creating isofs_arch.txt file .." cat > $build_toolchain/isofs_arch.txt <<- EOT BOOT -G $isofsdir/../isofs.b -B ... -r DISK1 $isofsdir/ / EOT } fi