diff options
author | Valentin Popa <valentin.popa@intel.com> | 2012-06-28 15:42:20 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-28 16:53:05 +0100 |
commit | 6f3e6c75de82dba3f83a72e272225e80acace7ce (patch) | |
tree | 621b9b5ea0224348a508d983887a7480bce67f57 /meta/recipes-core/images/build-appliance-image.bb | |
parent | 89fa2c1fc613e4718ad35e6e2af4edab5078ade1 (diff) | |
download | poky-6f3e6c75de82dba3f83a72e272225e80acace7ce.tar.gz |
build-appliance-image: rename from self-hosted-image
(-) renamed self-hosted-image to build-appliance-image
(-) replaced build-appliance-image description
[YOCTO #2636]
(From OE-Core rev: 04096f31778886479dac479132bded57e717653e)
(From OE-Core rev: bf133c331029ac588b27173145db5be5f6ee1ef5)
Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/images/build-appliance-image.bb')
-rw-r--r-- | meta/recipes-core/images/build-appliance-image.bb | 70 |
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 @@ | |||
1 | DESCRIPTION = "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>." | ||
2 | IMAGE_INSTALL = "task-core-boot task-core-apps-console task-core-ssh-openssh task-self-hosted" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | ||
6 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
7 | |||
8 | PR = "r15" | ||
9 | |||
10 | IMAGE_FEATURES += "x11-mini package-management" | ||
11 | |||
12 | # Ensure there's enough space to do a core-image-sato build, with rm_work enabled | ||
13 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" | ||
14 | |||
15 | # Do a quiet boot with limited console messages | ||
16 | APPEND += "quiet" | ||
17 | |||
18 | IMAGE_FSTYPES = "vmdk" | ||
19 | |||
20 | inherit core-image | ||
21 | |||
22 | SRCREV = "3ab5d73f0c49df9fefa2a46031d33436bbd7d7d8" | ||
23 | SRC_URI = "git://git.yoctoproject.org/poky;protocol=git" | ||
24 | |||
25 | IMAGE_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 | |||
30 | fakeroot 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 | |||
64 | IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; " | ||
65 | |||
66 | python do_get_poky_src () { | ||
67 | bb.build.exec_func('base_do_fetch', d) | ||
68 | bb.build.exec_func('base_do_unpack', d) | ||
69 | } | ||
70 | addtask do_get_poky_src before do_rootfs | ||