mkimage-profiles/features.in/e2k/scripts.d/20-e2k-boot
Michael Shigorin f47e09cff1 e2k, e2k.mk: merge boot, fixup and x11 bits
This commit is packing a bunch of changes that went
into RELENG-e2k-workstation during its forked
development; it covers three distinct things:

- boot.conf preparation for firmware to load the image;
- fixup of packages common for e2k images;
- major cleanup of obsolete/unused cruft
  (unified kernel and reliable xorg autodetection
  allow us to move away from canned machine-specific
  configurations for the most part).
2020-08-31 14:23:22 +03:00

51 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
echo "** 20-e2k-boot START"
cd "$WORKDIR"
# slightly different logic as there's no boot *menu*:
# ensure the user can install this if possible
[ -f live ] && default=live
[ -f rescue ] && default=rescue
[ -f altinst ] && default=install
cat > boot.conf << EOF
# USB Flash note: write the contents including .disk/ onto
# an ext2 formatted drive with "altinst" filesystem label
default=$default
timeout=3
EOF
for i in live altinst rescue; do
[ -f "$i" ] || continue
if [ "$i" = "altinst" ]; then
label=install
stage2=
else
label="$i"
stage2="stagename=$i"
fi
cat >> boot.conf << EOF
label=$label
partition=0
image=/alt0/vmlinux.0
cmdline=console=ttyS0,115200 console=tty0 hardreset fastboot live automatic=method:cdrom ${stage2:+$stage2 }${GLOBAL_STAGE2_BOOTARGS:+$GLOBAL_STAGE2_BOOTARGS }${GLOBAL_BOOT_LANG:+lang=$GLOBAL_BOOT_LANG}
initrd=/alt0/full.cz
label=${label}_flash
partition=0
image=/alt0/vmlinux.0
cmdline=console=ttyS0,115200 console=tty0 hardreset fastboot live lowmem automatic=method:disk,label:altinst,directory:/ ${stage2:+$stage2 }${GLOBAL_STAGE2_BOOTARGS:+$GLOBAL_STAGE2_BOOTARGS }${GLOBAL_BOOT_LANG:+lang=$GLOBAL_BOOT_LANG}
initrd=/alt0/full.cz
EOF
done
ls -lh
echo "** 20-e2k-boot END"