Skip to contentSkip to conversation

build-appliance-image: Add vmx* files and build zip file

PATCH New Saul Wold 1 participant 1 message Aug 23, 2012

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH v2 1/1 build-appliance-image: Add vmx* files and build zip file

This commit adds the vmx* files needed to setup a VMware image, this also packages the vmdk along with the vmx files.

v2: Add -f to ln to allow for overwrite

---
 meta/recipes-core/images/build-appliance-image.bb  |   21 ++++++++-
 .../Yocto_Build_Appliance.vmx                      |   52 ++++++++++++++++++++
 .../Yocto_Build_Appliance.vmxf                     |    8 +++
 3 files changed, 80 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
 create mode 100644 meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
meta/recipes-core/images/build-appliance-image.bb +20 -1
index bac7f80..6b00e64 100644
@@ -20,7 +20,10 @@ IMAGE_FSTYPES = "vmdk"
 inherit core-image
 
 SRCREV = "73cdebf60df225ee10f2eb215935be3b61e1b831"
-SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
+SRC_URI = "git://git.yoctoproject.org/poky;protocol=git \
+           file://Yocto_Build_Appliance.vmx \
+           file://Yocto_Build_Appliance.vmxf \
+          "
 
 IMAGE_CMD_ext3_append () {
 	# We don't need to reserve much space for root, 0.5% is more than enough
@@ -68,3 +71,19 @@ python do_get_poky_src () {
     bb.build.exec_func('base_do_unpack', d)
 }
 addtask do_get_poky_src before do_rootfs
+
+create_bundle_files () {
+	cd ${WORKDIR}
+	mkdir -p Yocto_Build_Appliance
+	cp *.vmx* Yocto_Build_Appliance
+	ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
+	zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
+	ln -sf ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip
+}
+
+python do_bundle_files() {
+    bb.build.exec_func('create_bundle_files', d)
+}
+
+addtask bundle_files after do_vmdkimg before do_build
+do_bundle_files[nostamp] = "1"
meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx new file +52 -0

52 lines not on this page · raw message

meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf new file +8 -0
new file mode 100644
index 0000000..ca3f026
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Foundry>
+<VM>
+<VMId type="string">52 e4 0b df 7b 70 21 f8-88 56 a7 26 47 43 95 93</VMId>
+<ClientMetaData>
+<clientMetaDataAttributes/>
+<HistoryEventList/></ClientMetaData>
+<vmxPathName type="string">Yocto_Build_Appliance.vmx</vmxPathName></VM></Foundry>
Signature · 1 line
1.7.7.6