livedvd: modify for douple kernel support (mamba and mamba-64GB)

This commit is contained in:
Silvan Calarco 2011-10-06 18:50:56 +02:00
parent 8ea79401e5
commit 24e3b61db3
4 changed files with 78 additions and 35 deletions

View File

@ -56,13 +56,15 @@ for f in /usr/share/applications/chromium-devel.desktop \
done done
# prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot) # prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot)
[ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r` for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh [ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${K} $MOUNTDIR/lib/modules/`uname -r`
chroot $MOUNTDIR sh /tmp/sounddb.sh echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh
rm -f $MOUNTDIR/tmp/sounddb.sh chroot $MOUNTDIR sh /tmp/sounddb.sh
[ -L $MOUNTDIR/lib/modules/`uname -r` ] && rm $MOUNTDIR/lib/modules/`uname -r` rm -f $MOUNTDIR/tmp/sounddb.sh
[ -L $MOUNTDIR/lib/modules/`uname -r` ] && rm $MOUNTDIR/lib/modules/`uname -r`
# remove unused initramfs generated by kernel # remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
done
prelink prelink

View File

@ -6,6 +6,8 @@ KERNEL_EXTRAVER=mamba
KERNEL_PLATFORM="" KERNEL_PLATFORM=""
#KERNEL_ADDITIONAL="extramodules sound" #KERNEL_ADDITIONAL="extramodules sound"
KERNEL_MORE_EXTRAVER=mamba-64GB
TARGET_HOSTNAME=openmamba-livedvd TARGET_HOSTNAME=openmamba-livedvd
ROOTDEV= ROOTDEV=
ROOTFS= ROOTFS=

View File

@ -7,20 +7,24 @@
[ -e $MOUNTDIR2/boot/isolinux ] || mkdir -p $MOUNTDIR2/boot/isolinux [ -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
LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR dracut \ chroot $MOUNTDIR depmod -a ${KERNEL_MAJVER}${K}
LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR dracut \
--filesystems "ext3 ext4 unionfs squashfs isofs reiserfs reiser4" \ --filesystems "ext3 ext4 unionfs squashfs isofs reiserfs reiser4" \
--nomdadmconf --nolvmconf \ --nomdadmconf --nolvmconf \
/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \ /boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
${KERNEL_MAJVER}${KERNEL_EXTRAVER} ${KERNEL_MAJVER}${K}
# Note: isolinux requires 8.3 filenames # Note: isolinux requires 8.3 filenames
cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \ cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
$MOUNTDIR2/boot/initrmfs.gz $MOUNTDIR2/boot/initrd${ISOID}.gz
cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${KERNEL_EXTRAVER} \ cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K} \
$MOUNTDIR2/boot/vmlinuz $MOUNTDIR2/boot/vmlinuz${ISOID}
ISOID=$(($ISOID + 1))
done
# add buildinfo # add buildinfo
buildinfo="`cat $MOUNTDIR/etc/openmamba-release` ${PLATFORM}" buildinfo="`cat $MOUNTDIR/etc/openmamba-release` ${PLATFORM}"
@ -30,26 +34,58 @@ cat > $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
PROMPT 0 PROMPT 0
TIMEOUT 20 TIMEOUT 20
DEFAULT vesamenu.c32 DEFAULT vesamenu.c32
MENU TITLE ${buildinfo} (${KERNEL_MAJVER}${KERNEL_EXTRAVER} kernel) MENU TITLE ${buildinfo} (${KERNEL_MAJVER} kernel)
MENU BACKGROUND openmamba.png MENU BACKGROUND openmamba.png
MENU COLOR TITLE 1;32;49 #ff00993d #00000000 std MENU COLOR TITLE 1;32;49 #ff00993d #00000000 std
_EOF
LABEL kms ISOID=
MENU LABEL default for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
kernel /boot/vmlinuz cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 LABEL default-${KERNEL_MAJVER}${K}
LABEL vga1024 MENU LABEL default (${KERNEL_MAJVER}${K})
MENU LABEL VGA 1024x768 (no modeset) kernel /boot/vmlinuz${ISOID}
kernel /boot/vmlinuz append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792
append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 nomodeset _EOF
LABEL vga800 ISOID=$(($ISOID + 1))
MENU LABEL VGA 800x600 (no modeset) done
kernel /boot/vmlinuz
append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 nomodeset echo "MENU SEPARATOR" >> $MOUNTDIR/boot/extlinux.conf
LABEL debug ISOID=
MENU LABEL Debug mode for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
kernel /boot/vmlinuz cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 rddebug nomodeset 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" >> $MOUNTDIR/boot/extlinux.conf
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 MENU SEPARATOR
LABEL memtest LABEL memtest
MENU LABEL Memory test MENU LABEL Memory test

View File

@ -4,6 +4,9 @@ DISTROMATIC=off
KERNEL_EXTRAVER=mamba KERNEL_EXTRAVER=mamba
KERNEL_PLATFORM="" KERNEL_PLATFORM=""
#KERNEL_ADDITIONAL="extramodules" #KERNEL_ADDITIONAL="extramodules"
KERNEL_MORE_EXTRAVER=mamba-64GB
[ "$SUBPLATFORM" ] || { [ "$SUBPLATFORM" ] || {
SUBPLATFORM="livedvd-root" SUBPLATFORM="livedvd-root"
PRODUCT_NAME="livedvd" PRODUCT_NAME="livedvd"