From c10a157aeee4b5d6ddb9dfc4945c8a533ce00150 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 26 Sep 2018 11:09:11 +0300 Subject: emulator: adapt to sumo - Use WIC for image creation - Update VirtualBox components Change-Id: I48d76906a66477ec844cbdc37c919079a9bd949b Reviewed-by: Mikko Gronoff --- .../conf/distro/include/emulator.conf | 8 +-- meta-boot2qt-distro/conf/machine/emulator.conf | 5 +- meta-boot2qt/classes/image-hdd.bbclass | 48 ---------------- meta-boot2qt/classes/image_types_sdcard.bbclass | 10 ++-- .../virtualbox/mount-vboxsf_4.3.30.bb | 65 ---------------------- .../virtualbox/mount-vboxsf_5.2.18.bb | 65 ++++++++++++++++++++++ .../virtualbox-guest-additions_5.1.16.bb | 62 --------------------- .../virtualbox-guest-additions_5.2.18.bb | 64 +++++++++++++++++++++ 8 files changed, 141 insertions(+), 186 deletions(-) delete mode 100644 meta-boot2qt/classes/image-hdd.bbclass delete mode 100644 meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_4.3.30.bb create mode 100644 meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_5.2.18.bb delete mode 100644 meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.1.16.bb create mode 100644 meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.2.18.bb diff --git a/meta-boot2qt-distro/conf/distro/include/emulator.conf b/meta-boot2qt-distro/conf/distro/include/emulator.conf index 2c70783..619af16 100644 --- a/meta-boot2qt-distro/conf/distro/include/emulator.conf +++ b/meta-boot2qt-distro/conf/distro/include/emulator.conf @@ -27,10 +27,7 @@ ## ############################################################################ -IMAGE_CLASSES += "image-hdd" -IMAGE_ROOTFS_ALIGNMENT = "1048576" -ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext3" -IMAGE_FSTYPES = "ext3" +IMAGE_FSTYPES = "ext3 wic" QBSP_IMAGE_CONTENT = "${IMAGE_LINK_NAME}.hdd" @@ -41,6 +38,8 @@ MACHINE_EXTRA_RRECOMMENDS += "\ PREFERRED_PROVIDER_virtual/egl = "qtglesstream-dummy-client" PREFERRED_PROVIDER_virtual/libgles2 = "qtglesstream-dummy-client" +RDEPENDS_qtbase_pn-qtbase += "qtglesstream" + KERNEL_MODULE_AUTOLOAD += "snd-intel8x0 vboxguest vboxsf" DISTRO_FEATURES_remove = "webengine opengl wayland vulkan" @@ -48,5 +47,4 @@ DISTRO_FEATURES_remove = "webengine opengl wayland vulkan" MACHINE_EXTRA_INSTALL += "\ mount-vboxsf \ qtsystems \ - qtglesstream \ " diff --git a/meta-boot2qt-distro/conf/machine/emulator.conf b/meta-boot2qt-distro/conf/machine/emulator.conf index 2ab622e..cb18983 100644 --- a/meta-boot2qt-distro/conf/machine/emulator.conf +++ b/meta-boot2qt-distro/conf/machine/emulator.conf @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2018 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -50,3 +50,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d virtualbox-guest-additions" MACHINE_FEATURES += "apm alsa pcmcia bluetooth irda usbgadget screen" SYSTEMD_DEFAULT_TARGET = "custom.target" + +WKS_FILE = "directdisk.wks" +do_image_wic[depends] += "syslinux:do_populate_sysroot syslinux-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" diff --git a/meta-boot2qt/classes/image-hdd.bbclass b/meta-boot2qt/classes/image-hdd.bbclass deleted file mode 100644 index bceb1b1..0000000 --- a/meta-boot2qt/classes/image-hdd.bbclass +++ /dev/null @@ -1,48 +0,0 @@ -############################################################################ -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the Boot to Qt meta layer. -## -## $QT_BEGIN_LICENSE:GPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 or (at your option) any later version -## approved by the KDE Free Qt Foundation. The licenses are as published by -## the Free Software Foundation and appearing in the file LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################ - -VM_ROOTFS_TYPE = "ext3" -ROOT_VM = "root=/dev/hda2" -LABELS_VM = "boot" -AUTO_SYSLINUXMENU = "0" -SYSLINUX_DEFAULT_CONSOLE = "console=ttyS0,115200" - -inherit image_types image-vm - -create_hdd_image () { - cd ${IMGDEPLOYDIR} - rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdd - ln -s ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdd -} - -python do_hddimg() { - bb.build.exec_func('create_hdd_image', d) -} - -addtask hddimg after do_bootdirectdisk before do_image_complete diff --git a/meta-boot2qt/classes/image_types_sdcard.bbclass b/meta-boot2qt/classes/image_types_sdcard.bbclass index 3258dbd..4ec38e5 100644 --- a/meta-boot2qt/classes/image_types_sdcard.bbclass +++ b/meta-boot2qt/classes/image_types_sdcard.bbclass @@ -34,14 +34,14 @@ IMAGE_CMD_wic_append() { ln -s ${IMAGE_NAME}.rootfs.wic ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.img } -IMAGE_CMD_rpi-sdimg_append() { - rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.img - ln -s ${IMAGE_NAME}.rootfs.rpi-sdimg ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.img +IMAGE_CMD_wic_append_emulator() { + rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdd + ln -s ${IMAGE_NAME}.rootfs.wic ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdd } -build_hddimg_append() { +IMAGE_CMD_rpi-sdimg_append() { rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.img - ln -s ${IMAGE_NAME}.hddimg ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.img + ln -s ${IMAGE_NAME}.rootfs.rpi-sdimg ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.img } do_image_tegraflash[depends] += "parted-native:do_populate_sysroot" diff --git a/meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_4.3.30.bb b/meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_4.3.30.bb deleted file mode 100644 index 1eb2652..0000000 --- a/meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_4.3.30.bb +++ /dev/null @@ -1,65 +0,0 @@ -############################################################################ -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the Boot to Qt meta layer. -## -## $QT_BEGIN_LICENSE:GPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 or (at your option) any later version -## approved by the KDE Free Qt Foundation. The licenses are as published by -## the Free Software Foundation and appearing in the file LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################ - -DESCRIPTION = "VirtualBox Guest Additions for Linux: mount" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${WORKDIR}/VirtualBox-${PV}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660" - -SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/VirtualBox-${PV}.tar.bz2 \ - file://mount-vboxsf.sh \ - file://mount-vboxsf.service \ - " - -SRC_URI[md5sum] = "cc053340f88922a11ad9d4fab56557bd" -SRC_URI[sha256sum] = "ea9569ec16cd6202ee61bcadb2506d31ac12fd343adb91565773a05eaaea9a36" - -S = "${WORKDIR}/VirtualBox-${PV}/src/VBox/Additions/linux/sharedfolders" - -do_compile() { - ${CC} ${LDFLAGS} mount.vboxsf.c vbsfmount.c -o mount.vboxsf -} - -do_install() { - install -m 0755 -d ${D}${bindir}/ - install -m 0755 mount.vboxsf ${D}${bindir}/ - install -m 0755 ${WORKDIR}/mount-vboxsf.sh ${D}${bindir}/ - - install -m 0755 -d ${D}${sysconfdir}/init.d - ln -s ${bindir}/mount-vboxsf.sh ${D}${sysconfdir}/init.d/ - - install -m 0755 -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/mount-vboxsf.service ${D}${systemd_unitdir}/system/ -} - -INITSCRIPT_NAME = "mount-vboxsf.sh" -INITSCRIPT_PARAMS = "defaults 33" - -SYSTEMD_SERVICE_${PN} = "mount-vboxsf.service" - -inherit update-rc.d systemd diff --git a/meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_5.2.18.bb b/meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_5.2.18.bb new file mode 100644 index 0000000..6dba661 --- /dev/null +++ b/meta-boot2qt/recipes-devtools/virtualbox/mount-vboxsf_5.2.18.bb @@ -0,0 +1,65 @@ +############################################################################ +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +DESCRIPTION = "VirtualBox Guest Additions for Linux: mount" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/VirtualBox-${PV}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660" + +SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/VirtualBox-${PV}.tar.bz2 \ + file://mount-vboxsf.sh \ + file://mount-vboxsf.service \ + " + +SRC_URI[md5sum] = "d8e291525b84569356773eef507c49ce" +SRC_URI[sha256sum] = "ed0a7efd56c7f39fae79c7ec3321473da412ef0d7914457b66f42679d513efcf" + +S = "${WORKDIR}/VirtualBox-${PV}/src/VBox/Additions/linux/sharedfolders" + +do_compile() { + ${CC} ${LDFLAGS} -I../../../../../include -DIN_RING3 mount.vboxsf.c vbsfmount.c -o mount.vboxsf +} + +do_install() { + install -m 0755 -d ${D}${bindir}/ + install -m 0755 mount.vboxsf ${D}${bindir}/ + install -m 0755 ${WORKDIR}/mount-vboxsf.sh ${D}${bindir}/ + + install -m 0755 -d ${D}${sysconfdir}/init.d + ln -s ${bindir}/mount-vboxsf.sh ${D}${sysconfdir}/init.d/ + + install -m 0755 -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/mount-vboxsf.service ${D}${systemd_unitdir}/system/ +} + +INITSCRIPT_NAME = "mount-vboxsf.sh" +INITSCRIPT_PARAMS = "defaults 33" + +SYSTEMD_SERVICE_${PN} = "mount-vboxsf.service" + +inherit update-rc.d systemd diff --git a/meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.1.16.bb b/meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.1.16.bb deleted file mode 100644 index 752d8cb..0000000 --- a/meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.1.16.bb +++ /dev/null @@ -1,62 +0,0 @@ -############################################################################ -## -## Copyright (C) 2017 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the Boot to Qt meta layer. -## -## $QT_BEGIN_LICENSE:GPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 or (at your option) any later version -## approved by the KDE Free Qt Foundation. The licenses are as published by -## the Free Software Foundation and appearing in the file LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################ - -DESCRIPTION = "Kernel drivers for the VirtualBox guest additions" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${WORKDIR}/VirtualBox-${PV}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660" - -inherit module - -MACHINE_KERNEL_PR_append = "a" -PR = "${MACHINE_KERNEL_PR}" - -SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/VirtualBox-${PV}.tar.bz2" - -SRC_URI[md5sum] = "37ebbd51370841eed8ab80f2f38446d6" -SRC_URI[sha256sum] = "78071c3172f3bd3c7981c352c3ae6c6a9c01f6ab24bc0aa7ec79f3528b2291a7" - -S = "${WORKDIR}/vbox" - -export KERN_DIR="${STAGING_KERNEL_DIR}" -export KBUILD_VERBOSE="1" -export BUILD_TARGET_ARCH="${ARCH}" - -do_compile_prepend() { - ${WORKDIR}/VirtualBox-${PV}/src/VBox/Additions/linux/export_modules ${WORKDIR}/vbox.tar.gz - tar xf ${WORKDIR}/vbox.tar.gz -C ${WORKDIR}/vbox -} - -do_install() { - install -m 0755 -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox - install -m 0644 vboxsf.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox - install -m 0644 vboxguest.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox - install -m 0644 vboxvideo.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox -} - -PKG_${PN} = "kernel-module-vbox" diff --git a/meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.2.18.bb b/meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.2.18.bb new file mode 100644 index 0000000..a727c6f --- /dev/null +++ b/meta-boot2qt/recipes-devtools/virtualbox/virtualbox-guest-additions_5.2.18.bb @@ -0,0 +1,64 @@ +############################################################################ +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +DESCRIPTION = "Kernel drivers for the VirtualBox guest additions" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/VirtualBox-${PV}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660" + +inherit module + +MACHINE_KERNEL_PR_append = "a" +PR = "${MACHINE_KERNEL_PR}" + +SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/VirtualBox-${PV}.tar.bz2" + +SRC_URI[md5sum] = "d8e291525b84569356773eef507c49ce" +SRC_URI[sha256sum] = "ed0a7efd56c7f39fae79c7ec3321473da412ef0d7914457b66f42679d513efcf" + +S = "${WORKDIR}/vbox" + +export KERN_DIR="${STAGING_KERNEL_DIR}" +export KERN_VER="${KERNEL_VERSION}" +export KBUILD_VERBOSE="1" +export BUILD_TARGET_ARCH="${ARCH}" + +do_compile_prepend() { + ${WORKDIR}/VirtualBox-${PV}/src/VBox/Additions/linux/export_modules.sh ${WORKDIR}/vbox.tar.gz + tar xf ${WORKDIR}/vbox.tar.gz -C ${WORKDIR}/vbox + find ${WORKDIR}/vbox -name Makefile.include.header | xargs sed -i -e '/KERN_DIR :=/d' +} + +do_install() { + install -m 0755 -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox + install -m 0644 vboxsf.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox + install -m 0644 vboxguest.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox + install -m 0644 vboxvideo.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/vbox +} + +PKG_${PN} = "kernel-module-vbox" -- cgit v1.2.3-54-g00ecf