makedist-openmamba-milestone3/platforms/bootusb/post.inc.sh
Silvan Calarco 08658128b3 Revert "platforms: remove vga=xxx from command lines in modeset mode"
It is actually needed for splash boot whit no KMS drivers (e.g. virtualbox)
This reverts commit 3ee62201d3.
2013-07-15 01:40:08 +02:00

99 lines
3.5 KiB
Bash

# make initramfs
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
chroot $MOUNTDIR depmod -a ${KERNEL_MAJVER}${K}
LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR dracut \
--filesystems "ext3 ext4 overlayfs squashfs isofs reiserfs" \
--nomdadmconf --nolvmconf \
/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
${KERNEL_MAJVER}${K}
done
# add buildinfo
buildinfo="`cat $MOUNTDIR/etc/openmamba-release` ${PLATFORM}"
# configure extlinux boot loader
cat > $MOUNTDIR/boot/extlinux.conf << _EOF
PROMPT 0
TIMEOUT 20
DEFAULT /boot/vesamenu.c32
MENU TITLE ${buildinfo} (${KERNEL_MAJVER} kernel)
MENU BACKGROUND /boot/openmamba.png
MENU COLOR TITLE 1;32;49 #ff00993d #00000000 std
_EOF
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
cat >> $MOUNTDIR/boot/extlinux.conf << _EOF
LABEL default-${KERNEL_MAJVER}${K}
MENU LABEL default (${KERNEL_MAJVER}${K})
kernel /boot/vmlinuz-${KERNEL_MAJVER}${K}
append initrd=/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz root=live:/openmamba_live/openmamba-live.iso ro selinux=0 quiet splash vga=792
_EOF
done
echo "MENU SEPARATOR" >> $MOUNTDIR/boot/extlinux.conf
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
cat >> $MOUNTDIR/boot/extlinux.conf << _EOF
LABEL vga800-${KERNEL_MAJVER}${K}
MENU LABEL VGA 800x600 no modeset (${KERNEL_MAJVER}${K})
kernel /boot/vmlinuz-${KERNEL_MAJVER}${K}
append initrd=/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz root=live:/openmamba_live/openmamba-live.iso ro selinux=0 quiet splash vga=789 nomodeset
_EOF
done
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
cat >> $MOUNTDIR/boot/extlinux.conf << _EOF
LABEL vga1024-${KERNEL_MAJVER}${K}
MENU LABEL VGA 1024x768 no modeset (${KERNEL_MAJVER}${K})
kernel /boot/vmlinuz-${KERNEL_MAJVER}${K}
append initrd=/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz root=live:/openmamba_live/openmamba-live.iso ro selinux=0 quiet splash vga=792 nomodeset
_EOF
done
echo "MENU SEPARATOR" >> $MOUNTDIR/boot/extlinux.conf
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
cat >> $MOUNTDIR/boot/extlinux.conf << _EOF
LABEL debug-${KERNEL_MAJVER}${K}
MENU LABEL ${KERNEL_MAJVER}${K} Debug mode
kernel /boot/vmlinuz-${KERNEL_MAJVER}${K}
append initrd=/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz root=live:/openmamba_live/openmamba-live.iso ro selinux=0 rddebug rdshell debug
_EOF
done
cat >> $MOUNTDIR/boot/extlinux.conf << _EOF
MENU SEPARATOR
LABEL memtest
MENU LABEL Memory test
kernel /boot/memtest
MENU SEPARATOR
MENU SEPARATOR
LABEL -
MENU LABEL $PRODUCT_NAME build:`date -R`
MENU DISABLE
_EOF
# rename memtest.bin because syslinux/extlinux consider .bin extension as
# other thing
mv $MOUNTDIR/boot/memtest.bin $MOUNTDIR/boot/memtest
# copy /boot directory to final root
cp -a --no-preserve=ownership $MOUNTDIR/boot $MOUNTDIR2
# copy syslinux addons to final root /boot dir
cp $MOUNTDIR/usr/share/syslinux/{libcom32,libutil,vesamenu}.c32 $MOUNTDIR2/boot/
# copy static files for specific platform
[ -e $TARGETDIR/platforms/$PLATFORM/root ] &&
cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root/* $MOUNTDIR2/
# copy localized static files for specific platform
[ "$LANGUAGE" -a -e $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE ] &&
cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE/* $MOUNTDIR2/
## add buildinfo
#buildinfo="`cat $MOUNTDIR/etc/openmamba-release` [$PRODUCT_NAME build:`date +%c`]"
#sed -i "s|%buildinfo%|$buildinfo|" $MOUNTDIR2/boot/isolinux/menu.txt
MOUNTDIR=$MOUNTDIR2 produce_media $MEDIA_NAME
exit 0