From f6358f1d1cf7f7ed35a8fe804e6b4606a9d8c02f Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 12 Sep 2013 10:28:28 +0200 Subject: [PATCH] live platforms: support for precreating VirtualBox guest modules --- platforms/livecd-gnome-root/Makefile.defs | 1 + platforms/livecd-gnome-root/post.inc.sh | 10 ++++++++++ platforms/livecd-light-root/Makefile.defs | 1 + platforms/livecd-light-root/post.inc.sh | 10 ++++++++++ platforms/livecd-root/Makefile | 11 ++++++----- platforms/livecd-root/Makefile.defs | 1 + platforms/livecd-root/post.inc.sh | 10 ++++++++++ platforms/livedvd-root/Makefile | 2 +- platforms/livedvd-root/Makefile.defs | 1 + platforms/livedvd-root/post.inc.sh | 4 ++++ platforms/livedvd/Makefile.defs | 2 +- platforms/livegames-root/Makefile | 4 ++-- platforms/rootfs/Makefile | 5 +++-- platforms/testcd-root/Makefile | 11 ++++++----- platforms/testcd-root/Makefile.defs | 1 + platforms/testcd-root/post.inc.sh | 10 ++++++++++ 16 files changed, 68 insertions(+), 16 deletions(-) diff --git a/platforms/livecd-gnome-root/Makefile.defs b/platforms/livecd-gnome-root/Makefile.defs index a9dd47d..7bbc216 100644 --- a/platforms/livecd-gnome-root/Makefile.defs +++ b/platforms/livecd-gnome-root/Makefile.defs @@ -1,2 +1,3 @@ packagekitgui = gnome-packagekit firewallgui = gui-ufw +xorgdrvvideo += xorg-drv-video-vboxvideo VirtualBox-vboxguest diff --git a/platforms/livecd-gnome-root/post.inc.sh b/platforms/livecd-gnome-root/post.inc.sh index 5851121..9e5c69f 100644 --- a/platforms/livecd-gnome-root/post.inc.sh +++ b/platforms/livecd-gnome-root/post.inc.sh @@ -46,7 +46,17 @@ esac echo $timezone > $MOUNTDIR/etc/timezone cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime +# pre-create video drivers for VirtualBox +virtualbox_ver=`ls -d $MOUNTDIR/usr/src/vboxvideo-* | sed "s|.*-||"` for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + chroot $MOUNTDIR dkms install -q -m vboxguest -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force + chroot $MOUNTDIR dkms install -q -m vboxvideo -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force +done +chroot $MOUNTDIR rpm -e VirtualBox-vboxguest dkms --noscripts + +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + # remove kernel headers installed by dkms + chroot $MOUNTDIR smart remove kernel-${K}-headers -y # remove unused initramfs generated by kernel rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img* # remove failsafe image to save space for livecd diff --git a/platforms/livecd-light-root/Makefile.defs b/platforms/livecd-light-root/Makefile.defs index a9dd47d..7bbc216 100644 --- a/platforms/livecd-light-root/Makefile.defs +++ b/platforms/livecd-light-root/Makefile.defs @@ -1,2 +1,3 @@ packagekitgui = gnome-packagekit firewallgui = gui-ufw +xorgdrvvideo += xorg-drv-video-vboxvideo VirtualBox-vboxguest diff --git a/platforms/livecd-light-root/post.inc.sh b/platforms/livecd-light-root/post.inc.sh index a681b8d..66be490 100644 --- a/platforms/livecd-light-root/post.inc.sh +++ b/platforms/livecd-light-root/post.inc.sh @@ -35,7 +35,17 @@ esac echo $timezone > $MOUNTDIR/etc/timezone cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime +# pre-create video drivers for VirtualBox +virtualbox_ver=`ls -d $MOUNTDIR/usr/src/vboxvideo-* | sed "s|.*-||"` for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + chroot $MOUNTDIR dkms install -q -m vboxguest -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force + chroot $MOUNTDIR dkms install -q -m vboxvideo -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force +done +chroot $MOUNTDIR rpm -e VirtualBox-vboxguest dkms --noscripts + +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + # remove kernel headers installed by dkms + chroot $MOUNTDIR smart remove kernel-${K}-headers -y # remove unused initramfs generated by kernel rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img* # remove failsafe image to save space for livecd diff --git a/platforms/livecd-root/Makefile b/platforms/livecd-root/Makefile index 34b9df8..238e872 100644 --- a/platforms/livecd-root/Makefile +++ b/platforms/livecd-root/Makefile @@ -1,7 +1,6 @@ -$(MAKEDIST_TARGET)-livecd-kde4: kppp4 krfb4 ark kcalc kdf kgpg desktop-base-kde4 \ - ksnapshot okular desktop-base-kde4 kmix \ - bluedevil smb4k juk kwallet dragon kate -# kopete4 +$(MAKEDIST_TARGET)-livecd-kde4: desktop-base-kde4 kmix bluedevil kwallet +# smb4k juk kate dragon ksnapshot okular kppp krfb ark kcalc kdf kgpg kopete + $(MAKEDIST_TARGET)-livecd-libreoffice: libreoffice-Calc libreoffice-writer libreofice-impress $(MAKEDIST_TARGET)-livecd-root: \ @@ -15,8 +14,10 @@ $(MAKEDIST_TARGET)-livecd-root: \ macbook-tools livecd-tools \ Mesa-tools driconf parted testdisk \ samba-server \ - smart-gui cpufreqd mambatray \ + cpufreqd mambatray smart \ $(MAKEDIST_TARGET)-livecd-kde4 +# smart-gui + # Localization targets $(MAKEDIST_TARGET)-livecd-root-en: \ kde-l10n-en_GB diff --git a/platforms/livecd-root/Makefile.defs b/platforms/livecd-root/Makefile.defs index 103e646..36c84ec 100644 --- a/platforms/livecd-root/Makefile.defs +++ b/platforms/livecd-root/Makefile.defs @@ -1 +1,2 @@ networkmanagergui = plasma-applet-networkmanagement +xorgdrvvideo += xorg-drv-video-vboxvideo VirtualBox-vboxguest diff --git a/platforms/livecd-root/post.inc.sh b/platforms/livecd-root/post.inc.sh index 95f951d..4446d65 100644 --- a/platforms/livecd-root/post.inc.sh +++ b/platforms/livecd-root/post.inc.sh @@ -47,7 +47,17 @@ for f in /usr/share/applications/chromium-devel.desktop; do chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f || exit 1 done +# pre-create video drivers for VirtualBox +virtualbox_ver=`ls -d $MOUNTDIR/usr/src/vboxvideo-* | sed "s|.*-||"` for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + chroot $MOUNTDIR dkms install -q -m vboxguest -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force + chroot $MOUNTDIR dkms install -q -m vboxvideo -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force +done +chroot $MOUNTDIR rpm -e VirtualBox-vboxguest dkms --noscripts + +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + # remove kernel headers installed by dkms + chroot $MOUNTDIR smart remove kernel-${K}-headers -y # remove unused initramfs generated by kernel rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img* # remove failsafe image to save space for livecd diff --git a/platforms/livedvd-root/Makefile b/platforms/livedvd-root/Makefile index bbdc44a..6c68d6b 100644 --- a/platforms/livedvd-root/Makefile +++ b/platforms/livedvd-root/Makefile @@ -1,4 +1,4 @@ -$(MAKEDIST_TARGET)-livedvd-kde4: kppp4 krfb4 ark kcalc kdf kgpg desktop-base-kde4 \ +$(MAKEDIST_TARGET)-livedvd-kde4: kppp krfb ark kcalc kdf kgpg desktop-base-kde4 \ ksnapshot okular kontact kmail akregator desktop-base-kde4 kmix \ kopete4 bluedevil smb4k amarok kwallet dragon kate $(MAKEDIST_TARGET)-livedvd-libreoffice: libreoffice-calc libreoffice-writer libreoffice-impress diff --git a/platforms/livedvd-root/Makefile.defs b/platforms/livedvd-root/Makefile.defs index 103e646..36c84ec 100644 --- a/platforms/livedvd-root/Makefile.defs +++ b/platforms/livedvd-root/Makefile.defs @@ -1 +1,2 @@ networkmanagergui = plasma-applet-networkmanagement +xorgdrvvideo += xorg-drv-video-vboxvideo VirtualBox-vboxguest diff --git a/platforms/livedvd-root/post.inc.sh b/platforms/livedvd-root/post.inc.sh index cbc0c81..7811dbe 100644 --- a/platforms/livedvd-root/post.inc.sh +++ b/platforms/livedvd-root/post.inc.sh @@ -47,7 +47,11 @@ for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applicati chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f done +virtualbox_ver=`ls -d $MOUNTDIR/usr/src/vboxvideo-* | sed "s|.*-||"` for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + # pre-create video drivers for VirtualBox + chroot $MOUNTDIR dkms install -q -m vboxguest -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force + chroot $MOUNTDIR dkms install -q -m vboxvideo -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force # remove unused initramfs generated by kernel rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img* # # remove failsafe image to save space for livecd diff --git a/platforms/livedvd/Makefile.defs b/platforms/livedvd/Makefile.defs index f95e0ed..17d2cb2 100644 --- a/platforms/livedvd/Makefile.defs +++ b/platforms/livedvd/Makefile.defs @@ -4,7 +4,7 @@ xorglibglx = xorg-ext-libglx xorg-ext-libglx-nvidia #xorg-ext-libglx-nvidia libGLcore.so.1 = xorg-drv-video-nvidia libnvidia-tls.so.1 = xorg-drv-video-nvidia -xorgdrvvideo = xorg-drv-video-base xorg-drv-video-amd xorg-drv-video-nsc xorg-drv-video-fglrx xorg-drv-video-nvidia +xorgdrvvideo = xorg-drv-video-base xorg-drv-video-amd xorg-drv-video-nsc xorg-drv-video-fglrx xorg-drv-video-nvidia xorg-drv-video-vboxvideo libkorganizer.so.1 = korganizer libkorganizer_calendar.so.1 = korganizer libkorganizer_eventviewer.so.1 = korganizer diff --git a/platforms/livegames-root/Makefile b/platforms/livegames-root/Makefile index 8885e8e..c862f49 100644 --- a/platforms/livegames-root/Makefile +++ b/platforms/livegames-root/Makefile @@ -1,5 +1,5 @@ -$(MAKEDIST_TARGET)-livegames-kde4: kppp4 krfb4 ark4 kcalc4 kdf4 kfloppy4 kgpg4 desktop-base-kde4 \ - ksnapshot okular kontact4 kmail4 akregator4 desktop-base-kde4 kmix4 \ +$(MAKEDIST_TARGET)-livegames-kde4: kppp krfb ark kcalc kdf kfloppy kgpg desktop-base-kde4 \ + ksnapshot okular kontact kmail akregator desktop-base-kde4 kmix \ kopete4 kdebluetooth4 smb4k kate \ kruler gwenview4 kamera kcolorchooser lisa4 kwalletmanager4 libqt4-sqlite \ bomber bovo granatier kapman katomic kbattleship kblackbox kblocks kbounce \ diff --git a/platforms/rootfs/Makefile b/platforms/rootfs/Makefile index 4f41685..d16cbed 100644 --- a/platforms/rootfs/Makefile +++ b/platforms/rootfs/Makefile @@ -12,7 +12,8 @@ $(MAKEDIST_TARGET)-$(PLATFORM)-arm: \ $(MAKEDIST_TARGET)-$(PLATFORM)-i586: \ kernel-mamba kernel-mamba-sound kernel-mamba-wireless \ - kernel-mamba-64GB kernel-mamba-64GB-sound kernel-mamba-64GB-wireless + kernel-mamba-64GB kernel-mamba-64GB-sound kernel-mamba-64GB-wireless \ + chromium $(MAKEDIST_TARGET)-$(PLATFORM): \ $(MAKEDIST_TARGET)-$(PLATFORM)-kde4 openssh-server usbutils wireless_tools i2c-tools \ @@ -23,7 +24,7 @@ $(MAKEDIST_TARGET)-$(PLATFORM): \ liblame expect prelink NetworkManager ModemManager procps \ xorg-server x11vnc xkeyboard-config screen \ xorg-drv-input-tslib xcursor-transparent-theme rpm smart xdg-utils \ - dhcp-server rfkill plymouth livecd-tools chromium rdesktop mingetty \ + dhcp-server rfkill plymouth livecd-tools rdesktop mingetty \ postplug-xorg postplug-sound gparted tar net-tools chrony mambatray kvkbd # startactive diff --git a/platforms/testcd-root/Makefile b/platforms/testcd-root/Makefile index 9f3e550..4b3af7e 100644 --- a/platforms/testcd-root/Makefile +++ b/platforms/testcd-root/Makefile @@ -1,6 +1,6 @@ -$(MAKEDIST_TARGET)-testcd-kde4: kppp4 krfb4 ark kcalc kdf kgpg desktop-base-kde4 \ - ksnapshot okular kontact kmail akregator desktop-base-kde4 kmix \ - kopete bluedevil smb4k juk kwallet dragon kate +$(MAKEDIST_TARGET)-testcd-kde4: desktop-base-kde4 kmix bluedevil kwallet +# kopete dragon kate smb4k juk ksnapshot okular kontact kmail akregator kppp krfb ark kcalc kdf kgpg + $(MAKEDIST_TARGET)-testcd-libreoffice: libreoffice-calc libreoffice-writer libreoffice-impress $(MAKEDIST_TARGET)-testcd-root: \ @@ -13,9 +13,10 @@ $(MAKEDIST_TARGET)-testcd-root: \ chromium \ macbook-tools livecd-tools \ Mesa-tools driconf parted testdisk \ - samba-server \ - smart-gui cpufreqd mambatray \ + samba-server cpufreqd mambatray smart \ $(MAKEDIST_TARGET)-testcd-kde4 openssh-server +# smart-gui + # Localization targets $(MAKEDIST_TARGET)-testcd-root-en: \ kde-l10n-en_GB diff --git a/platforms/testcd-root/Makefile.defs b/platforms/testcd-root/Makefile.defs index 3ff64b8..05e6cdc 100644 --- a/platforms/testcd-root/Makefile.defs +++ b/platforms/testcd-root/Makefile.defs @@ -1,2 +1,3 @@ networkmanagergui = plasma-applet-networkmanagement #xorgdrvvideo = xorg-drv-video-base xorg-drv-video-fglrx xorg-drv-video-nvidia xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx xorg-drv-video-nouveau +xorgdrvvideo += xorg-drv-video-vboxvideo VirtualBox-vboxguest diff --git a/platforms/testcd-root/post.inc.sh b/platforms/testcd-root/post.inc.sh index ac865d7..6cdd366 100644 --- a/platforms/testcd-root/post.inc.sh +++ b/platforms/testcd-root/post.inc.sh @@ -47,7 +47,17 @@ for f in /usr/share/applications/chromium-devel.desktop; do chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f done +# pre-create video drivers for VirtualBox +virtualbox_ver=`ls -d $MOUNTDIR/usr/src/vboxvideo-* | sed "s|.*-||"` for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + chroot $MOUNTDIR dkms install -q -m vboxguest -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force + chroot $MOUNTDIR dkms install -q -m vboxvideo -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force +done +chroot $MOUNTDIR rpm -e VirtualBox-vboxguest dkms --noscripts + +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do + # remove kernel headers installed by dkms + chroot $MOUNTDIR smart remove kernel-${K}-headers -y # remove unused initramfs generated by kernel rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img* # remove failsafe image to save space for livecd