summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/images/build-appliance-image.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/images/build-appliance-image.bb')
-rw-r--r--meta/recipes-core/images/build-appliance-image.bb70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-core/images/build-appliance-image.bb b/meta/recipes-core/images/build-appliance-image.bb
new file mode 100644
index 0000000000..2b7906ff8d
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image.bb
@@ -0,0 +1,70 @@
1DESCRIPTION = "An image you can boot and run using either the VMware Player or VMware Workstation. For more information, see the<a href='http://www.yoctoproject.org/documentation/build-appliance'>Build Appliance page</a>."
2IMAGE_INSTALL = "task-core-boot task-core-apps-console task-core-ssh-openssh task-self-hosted"
3
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
6 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7
8PR = "r15"
9
10IMAGE_FEATURES += "x11-mini package-management"
11
12# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
13IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
14
15# Do a quiet boot with limited console messages
16APPEND += "quiet"
17
18IMAGE_FSTYPES = "vmdk"
19
20inherit core-image
21
22SRCREV = "3ab5d73f0c49df9fefa2a46031d33436bbd7d7d8"
23SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
24
25IMAGE_CMD_ext3_append () {
26 # We don't need to reserve much space for root, 0.5% is more than enough
27 tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3
28}
29
30fakeroot do_populate_poky_src () {
31 # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
32 # will become invalid in the target.
33 rm -rf ${WORKDIR}/git/.git
34 rm -f ${WORKDIR}/git/.gitignore
35
36 cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
37
38 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
39 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
40 cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
41
42 # Remove the git2_* tarballs -- this is ok since we still have the git2/.
43 rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
44
45 echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
46 echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
47 mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
48 echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
49 echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
50 echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
51
52 chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
53
54 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
55
56 # Allow builder to use sudo to setup tap/tun
57 echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
58
59 # Use Clearlooks GTK+ theme
60 mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
61 echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
62}
63
64IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
65
66python do_get_poky_src () {
67 bb.build.exec_func('base_do_fetch', d)
68 bb.build.exec_func('base_do_unpack', d)
69}
70addtask do_get_poky_src before do_rootfs