makedist-openmamba-milestone1/platforms/bootusb/post.inc.sh
2011-05-19 16:08:22 +02:00

64 lines
2.4 KiB
Bash

# make initramfs
cat >> $MOUNTDIR/etc/modprobe.conf << _EOF
alias scsi_hostadapter ehci-hcd
alias scsi_hostadapter uhci-hcd
alias scsi_hostadapter usb-storage
alias scsi_hostadapter isofs
alias scsi_hostadapter ext3
alias scsi_hostadapter squashfs
_EOF
cp $TARGETDIR/platforms/$PLATFORM/initramfs-include.sh $MOUNTDIR/
chroot $MOUNTDIR depmod -ae ${KERNEL_MAJVER}${KERNEL_EXTRAVER}
#chroot $MOUNTDIR mkinitramfs /boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz ${KERNEL_MAJVER}${KERNEL_EXTRAVER}
LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR mkinitramfs \
--with-udev --postrc=/initramfs-include.sh \
/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \
${KERNEL_MAJVER}${KERNEL_EXTRAVER}
# configure extlinux boot loader
cat > $MOUNTDIR/boot/extlinux.conf << _EOF
PROMPT 0
TIMEOUT 20
DEFAULT /boot/vesamenu.c32
LABEL bootusb
MENU LABEL openmamba bootusb
KERNEL /boot/vmlinuz-${KERNEL_MAJVER}${KERNEL_EXTRAVER}
APPEND video=uvesafb:1024x768-32,ywrap,mtrr root=$ROOTDEV console=tty1 initrd=/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz splash=silent quiet
LABEL openmamba bootusb-single
MENU LABEL openmamba bootusb single (single mode)
KERNEL /boot/vmlinuz-${KERNEL_MAJVER}${KERNEL_EXTRAVER}
APPEND video=uvesafb:1024x768-32,ywrap,mtrr root=$ROOTDEV console=tty1 initrd=/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz splash=silent quiet 1
LABEL openmamba bootusb-debug
MENU LABEL openmamba bootusb debug (debug mode)
KERNEL /boot/vmlinuz-${KERNEL_MAJVER}${KERNEL_EXTRAVER}
APPEND video=uvesafb:1024x768-32,ywrap,mtrr root=$ROOTDEV console=tty1 initrd=/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz splash=off debug debug=1
_EOF
# copy /boot directory to final root
cp -a $MOUNTDIR/boot $MOUNTDIR2
# copy syslinux addons to final root /boot dir
cp $MOUNTDIR/usr/lib/syslinux/vesamenu.c32 $MOUNTDIR2/boot/
# copy static files for specific platform
[ -e $TARGETDIR/platforms/$PLATFORM/root ] &&
cp -a $TARGETDIR/platforms/$PLATFORM/root/* $MOUNTDIR2/
# copy localized static files for specific platform
[ "$LANGUAGE" -a -e $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE ] &&
cp -a $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