summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt75
-rw-r--r--meta/recipes-core/images/build-appliance-image_14.0.0.bb14
2 files changed, 87 insertions, 2 deletions
diff --git a/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt b/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt
new file mode 100644
index 0000000000..e7298f2c3c
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt
@@ -0,0 +1,75 @@
1
2Installing VirtualBox Guest Additions
3=====================================
4
5In order to use VirtualBox guest additions, they have to be build
6first. They may have to be rebuilt each time the time you upgrade to
7a new version of VirtualBox.
8
9Make sure VM is configured with an Optical Drive.
10
11Please follow these steps to install the VirtualBox Guest Additions on the
12Build Appliance VM:
13
141. Boot VM, select root "Terminal" instead of the default "Terminal <2>"
15
162. Insert Guest additions CD into VM optical drive:
17 VM menu "Devices"->"Optical Drives"-> Select "VBoxGuestAdditions<version>.iso"
18
193. Find your CDROM device. Typically it is /dev/hda for IDE. You can determine
20 the actual name <cdromedev> by viewing the cdrom info:
21
22 # cat /proc/sys/dev/cdrom/info
23
24 Mount the cdrom drive:
25 # mount -t iso9660 <cdromdev> /media/cdrom
26 i.e.:
27 # mount -t iso9660 /dev/hda /media/cdrom
28
294. Build the additions:
30
31 First, we need to build of some prerequisite utilities.
32 (This is only needed to be done once)
33
34 # cd /lib/modules/<kernel-version>-yocto-standard/build
35 # make scripts
36
37 Now build the guest additions:
38
39 # /media/cdrom/VBoxLinuxAdditions.run --nox11
40
41 At this point, providing there were no build errors, the guest additions are
42 built and installed.
43
445. Check if vbox additions running:
45
46 # /etc/init.d/vboxadd status
47
48 If not running, try manually starting:
49
50 # /etc/init.d/vboxadd start
51
526. Check if additons actually work, in particular folder sharing.
53
54 Host: Devices->Shared Folders->Shared Folder Settings...
55 Add any host folder and name it (i.e. "images")
56
57 Guest VM: create mount point for the shared folder, i.e.:
58
59 # mkdir ~/my-host
60
61 Mount the shared folder: (Watch out for spelling: it's vboxsf NOT vboxfs)
62
63 # mount -t vboxsf images ~/my-host
64
65 Verify mount, should see the contents of the shared folder:
66
67 # ls ~/my-host
68
69
70
71
72
73
74
75
diff --git a/meta/recipes-core/images/build-appliance-image_14.0.0.bb b/meta/recipes-core/images/build-appliance-image_14.0.0.bb
index a34a621c4c..eeb301df57 100644
--- a/meta/recipes-core/images/build-appliance-image_14.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_14.0.0.bb
@@ -6,7 +6,7 @@ LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ 6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8 8
9IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted" 9IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted kernel-dev kernel-devsrc "
10 10
11IMAGE_FEATURES += "x11-base package-management splash" 11IMAGE_FEATURES += "x11-base package-management splash"
12 12
@@ -19,12 +19,13 @@ APPEND += "rootfstype=ext4 quiet"
19DEPENDS = "zip-native" 19DEPENDS = "zip-native"
20IMAGE_FSTYPES = "vmdk" 20IMAGE_FSTYPES = "vmdk"
21 21
22inherit core-image 22inherit core-image module-base
23 23
24SRCREV ?= "00c4c9bf0007b964dfa4559fe8fc8687f14cdec3" 24SRCREV ?= "00c4c9bf0007b964dfa4559fe8fc8687f14cdec3"
25SRC_URI = "git://git.yoctoproject.org/poky \ 25SRC_URI = "git://git.yoctoproject.org/poky \
26 file://Yocto_Build_Appliance.vmx \ 26 file://Yocto_Build_Appliance.vmx \
27 file://Yocto_Build_Appliance.vmxf \ 27 file://Yocto_Build_Appliance.vmxf \
28 file://README_VirtualBox_Guest_Additions.txt \
28 " 29 "
29BA_INCLUDE_SOURCES ??= "0" 30BA_INCLUDE_SOURCES ??= "0"
30 31
@@ -49,6 +50,12 @@ fakeroot do_populate_poky_src () {
49 rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_* 50 rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
50 fi 51 fi
51 52
53 # Place the README_VirtualBox_Guest_Additions file in builders home folder.
54 cp ${WORKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/
55
56 # Create a symlink, needed for out-of-tree kernel modules build
57 ln -snr ${IMAGE_ROOTFS}/usr/src/kernel ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
58
52 echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone 59 echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
53 echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf 60 echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
54 mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo 61 mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
@@ -70,6 +77,9 @@ fakeroot do_populate_poky_src () {
70 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky 77 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
71 chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky 78 chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
72 79
80 # Assume we will need CDROM to install guest additions
81 mkdir -p ${IMAGE_ROOTFS}/media/cdrom
82
73 # Allow builder to use sudo to setup tap/tun 83 # Allow builder to use sudo to setup tap/tun
74 echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers 84 echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
75 85