diff options
Diffstat (limited to 'meta/recipes-core/images/build-appliance-image_8.0.bb')
| -rw-r--r-- | meta/recipes-core/images/build-appliance-image_8.0.bb | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-core/images/build-appliance-image_8.0.bb b/meta/recipes-core/images/build-appliance-image_8.0.bb new file mode 100644 index 0000000000..fad4176036 --- /dev/null +++ b/meta/recipes-core/images/build-appliance-image_8.0.bb | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | SUMMARY = "An image containing the build system itself" | ||
| 2 | DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation." | ||
| 3 | HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance" | ||
| 4 | |||
| 5 | LICENSE = "MIT" | ||
| 6 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | ||
| 7 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
| 8 | |||
| 9 | IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted" | ||
| 10 | |||
| 11 | IMAGE_FEATURES += "x11-base package-management splash" | ||
| 12 | |||
| 13 | # Ensure there's enough space to do a core-image-sato build, with rm_work enabled | ||
| 14 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" | ||
| 15 | |||
| 16 | # Do a quiet boot with limited console messages | ||
| 17 | APPEND += "quiet" | ||
| 18 | |||
| 19 | DEPENDS = "zip-native" | ||
| 20 | IMAGE_FSTYPES = "vmdk" | ||
| 21 | |||
| 22 | inherit core-image | ||
| 23 | |||
| 24 | SRCREV ?= "dc529e1f18975ff33a1686dc9804a38204fd1bd0" | ||
| 25 | SRC_URI = "git://git.yoctoproject.org/poky;protocol=git \ | ||
| 26 | file://Yocto_Build_Appliance.vmx \ | ||
| 27 | file://Yocto_Build_Appliance.vmxf \ | ||
| 28 | " | ||
| 29 | |||
| 30 | IMAGE_CMD_ext3_append () { | ||
| 31 | # We don't need to reserve much space for root, 0.5% is more than enough | ||
| 32 | tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 | ||
| 33 | } | ||
| 34 | |||
| 35 | fakeroot do_populate_poky_src () { | ||
| 36 | # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo | ||
| 37 | # will become invalid in the target. | ||
| 38 | rm -rf ${WORKDIR}/git/.git | ||
| 39 | rm -f ${WORKDIR}/git/.gitignore | ||
| 40 | |||
| 41 | cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky | ||
| 42 | |||
| 43 | mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf | ||
| 44 | mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads | ||
| 45 | cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/ | ||
| 46 | |||
| 47 | # Remove the git2_* tarballs -- this is ok since we still have the git2/. | ||
| 48 | rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_* | ||
| 49 | |||
| 50 | echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone | ||
| 51 | echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf | ||
| 52 | mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo | ||
| 53 | echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc | ||
| 54 | echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc | ||
| 55 | echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc | ||
| 56 | |||
| 57 | chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo | ||
| 58 | |||
| 59 | chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky | ||
| 60 | |||
| 61 | # Allow builder to use sudo to setup tap/tun | ||
| 62 | echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers | ||
| 63 | |||
| 64 | # Use Clearlooks GTK+ theme | ||
| 65 | mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0 | ||
| 66 | echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc | ||
| 67 | } | ||
| 68 | |||
| 69 | IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; " | ||
| 70 | |||
| 71 | addtask rootfs after do_unpack | ||
| 72 | |||
| 73 | python () { | ||
| 74 | # Ensure we run these usually noexec tasks | ||
| 75 | d.delVarFlag("do_fetch", "noexec") | ||
| 76 | d.delVarFlag("do_unpack", "noexec") | ||
| 77 | } | ||
| 78 | |||
| 79 | create_bundle_files () { | ||
| 80 | cd ${WORKDIR} | ||
| 81 | mkdir -p Yocto_Build_Appliance | ||
| 82 | cp *.vmx* Yocto_Build_Appliance | ||
| 83 | ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk | ||
| 84 | zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance | ||
| 85 | ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip | ||
| 86 | } | ||
| 87 | |||
| 88 | python do_bundle_files() { | ||
| 89 | bb.build.exec_func('create_bundle_files', d) | ||
| 90 | } | ||
| 91 | |||
| 92 | addtask bundle_files after do_vmdkimg before do_build | ||
| 93 | do_bundle_files[nostamp] = "1" | ||
