From eddd587c0f65eb07abe6f76d200bfa1b15b251b7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 30 Oct 2011 16:51:41 +0100 Subject: [PATCH] test-cd: sync extlinux changes with livecd --- platforms/livecd-root/post.inc.sh | 1 - platforms/testcd-root/post.inc.sh | 8 +++ platforms/testcd/post.inc.sh | 92 +++++++++++++++++++++---------- 3 files changed, 72 insertions(+), 29 deletions(-) diff --git a/platforms/livecd-root/post.inc.sh b/platforms/livecd-root/post.inc.sh index a29ed0f..18b7e65 100644 --- a/platforms/livecd-root/post.inc.sh +++ b/platforms/livecd-root/post.inc.sh @@ -49,7 +49,6 @@ sed -i -e '/^halt .*/i \ sed -i -e '/^reboot .*/i \ /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot - # configure favorites in kde menu for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f diff --git a/platforms/testcd-root/post.inc.sh b/platforms/testcd-root/post.inc.sh index 2768a84..18b7e65 100644 --- a/platforms/testcd-root/post.inc.sh +++ b/platforms/testcd-root/post.inc.sh @@ -64,4 +64,12 @@ rm -f $MOUNTDIR/tmp/sounddb.sh # remove unused initramfs generated by kernel rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* +# remove failsafe image to save space for livecd +rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* + +# remove some documentation to save space on CD +for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do + find $MOUNTDIR/usr/share/doc -name $f -exec rm -f {} \; +done + prelink diff --git a/platforms/testcd/post.inc.sh b/platforms/testcd/post.inc.sh index 9965060..cb8ba54 100644 --- a/platforms/testcd/post.inc.sh +++ b/platforms/testcd/post.inc.sh @@ -7,20 +7,24 @@ [ -e $MOUNTDIR2/boot/isolinux ] || mkdir -p $MOUNTDIR2/boot/isolinux -chroot $MOUNTDIR depmod -a ${KERNEL_MAJVER}${KERNEL_EXTRAVER} +ISOID= +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 unionfs squashfs isofs reiserfs reiser4" \ + --nomdadmconf --nolvmconf \ + /boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \ + ${KERNEL_MAJVER}${K} -LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR dracut \ - --filesystems "ext3 ext4 unionfs squashfs isofs reiserfs reiser4" \ - --nomdadmconf --nolvmconf \ - /boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \ - ${KERNEL_MAJVER}${KERNEL_EXTRAVER} + # Note: isolinux requires 8.3 filenames + cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \ + $MOUNTDIR2/boot/initrd${ISOID}.gz -# Note: isolinux requires 8.3 filenames -cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \ - $MOUNTDIR2/boot/initrmfs.gz + cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K} \ + $MOUNTDIR2/boot/vmlinuz${ISOID} -cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${KERNEL_EXTRAVER} \ - $MOUNTDIR2/boot/vmlinuz + ISOID=$(($ISOID + 1)) +done # add buildinfo buildinfo="`cat $MOUNTDIR/etc/openmamba-release` ${PLATFORM}" @@ -30,26 +34,58 @@ cat > $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF PROMPT 0 TIMEOUT 20 DEFAULT vesamenu.c32 -MENU TITLE ${buildinfo} (${KERNEL_MAJVER}${KERNEL_EXTRAVER} kernel) +MENU TITLE ${buildinfo} (${KERNEL_MAJVER} kernel) MENU BACKGROUND openmamba.png MENU COLOR TITLE 1;32;49 #ff00993d #00000000 std +_EOF -LABEL kms -MENU LABEL default - kernel /boot/vmlinuz - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 -LABEL vga1024 -MENU LABEL VGA 1024x768 (no modeset) - kernel /boot/vmlinuz - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 nomodeset -LABEL vga800 -MENU LABEL VGA 800x600 (no modeset) - kernel /boot/vmlinuz - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 nomodeset -LABEL debug -MENU LABEL Debug mode - kernel /boot/vmlinuz - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 rddebug nomodeset +ISOID= +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF +LABEL default-${KERNEL_MAJVER}${K} +MENU LABEL default (${KERNEL_MAJVER}${K}) + kernel /boot/vmlinuz${ISOID} + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 +_EOF + ISOID=$(($ISOID + 1)) +done + +echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg +ISOID= +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF +LABEL vga800-${KERNEL_MAJVER}${K} +MENU LABEL VGA 800x600 no modeset (${KERNEL_MAJVER}${K}) + kernel /boot/vmlinuz${ISOID} + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 nomodeset +_EOF + ISOID=$(($ISOID + 1)) +done + +ISOID= +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF +LABEL vga1024-${KERNEL_MAJVER}${K} +MENU LABEL VGA 1024x768 no modeset (${KERNEL_MAJVER}${K}) + kernel /boot/vmlinuz${ISOID} + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 nomodeset +_EOF + ISOID=$(($ISOID + 1)) +done + +echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg +ISOID= +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF +LABEL debug-${KERNEL_MAJVER}${K} +MENU LABEL Debug mode (${KERNEL_MAJVER}${K}) + kernel /boot/vmlinuz${ISOID} + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 rddebug nomodeset +_EOF + ISOID=$(($ISOID + 1)) +done + +cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF MENU SEPARATOR LABEL memtest MENU LABEL Memory test