diff options
3 files changed, 80 insertions, 1 deletions
diff --git a/meta/recipes-core/images/build-appliance-image.bb b/meta/recipes-core/images/build-appliance-image.bb index bac7f80d0c..6b00e64fe9 100644 --- a/meta/recipes-core/images/build-appliance-image.bb +++ b/meta/recipes-core/images/build-appliance-image.bb | |||
| @@ -20,7 +20,10 @@ IMAGE_FSTYPES = "vmdk" | |||
| 20 | inherit core-image | 20 | inherit core-image |
| 21 | 21 | ||
| 22 | SRCREV = "73cdebf60df225ee10f2eb215935be3b61e1b831" | 22 | SRCREV = "73cdebf60df225ee10f2eb215935be3b61e1b831" |
| 23 | SRC_URI = "git://git.yoctoproject.org/poky;protocol=git" | 23 | SRC_URI = "git://git.yoctoproject.org/poky;protocol=git \ |
| 24 | file://Yocto_Build_Appliance.vmx \ | ||
| 25 | file://Yocto_Build_Appliance.vmxf \ | ||
| 26 | " | ||
| 24 | 27 | ||
| 25 | IMAGE_CMD_ext3_append () { | 28 | IMAGE_CMD_ext3_append () { |
| 26 | # We don't need to reserve much space for root, 0.5% is more than enough | 29 | # 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 () { | |||
| 68 | bb.build.exec_func('base_do_unpack', d) | 71 | bb.build.exec_func('base_do_unpack', d) |
| 69 | } | 72 | } |
| 70 | addtask do_get_poky_src before do_rootfs | 73 | addtask do_get_poky_src before do_rootfs |
| 74 | |||
| 75 | create_bundle_files () { | ||
| 76 | cd ${WORKDIR} | ||
| 77 | mkdir -p Yocto_Build_Appliance | ||
| 78 | cp *.vmx* Yocto_Build_Appliance | ||
| 79 | ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk | ||
| 80 | zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance | ||
| 81 | ln -sf ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip | ||
| 82 | } | ||
| 83 | |||
| 84 | python do_bundle_files() { | ||
| 85 | bb.build.exec_func('create_bundle_files', d) | ||
| 86 | } | ||
| 87 | |||
| 88 | addtask bundle_files after do_vmdkimg before do_build | ||
| 89 | do_bundle_files[nostamp] = "1" | ||
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx new file mode 100644 index 0000000000..b38127ab87 --- /dev/null +++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | .encoding = "UTF-8" | ||
| 2 | displayname = "Yocto Build Appliance" | ||
| 3 | guestos = "other" | ||
| 4 | tools.syncTime = "FALSE" | ||
| 5 | virtualhw.version = "8" | ||
| 6 | config.version = "8" | ||
| 7 | numvcpus = "2" | ||
| 8 | cpuid.coresPerSocket = "1" | ||
| 9 | vcpu.hotadd = "TRUE" | ||
| 10 | mem.hotadd = "TRUE" | ||
| 11 | memsize = "4096" | ||
| 12 | svga.autodetect = "TRUE" | ||
| 13 | pciBridge0.present = "TRUE" | ||
| 14 | mks.enable3d = "TRUE" | ||
| 15 | pciBridge4.present = "TRUE" | ||
| 16 | pciBridge4.virtualDev = "pcieRootPort" | ||
| 17 | pciBridge4.functions = "8" | ||
| 18 | pciBridge5.present = "TRUE" | ||
| 19 | pciBridge5.virtualDev = "pcieRootPort" | ||
| 20 | pciBridge5.functions = "8" | ||
| 21 | pciBridge6.present = "TRUE" | ||
| 22 | pciBridge6.virtualDev = "pcieRootPort" | ||
| 23 | pciBridge6.functions = "8" | ||
| 24 | pciBridge7.present = "TRUE" | ||
| 25 | pciBridge7.virtualDev = "pcieRootPort" | ||
| 26 | pciBridge7.functions = "8" | ||
| 27 | vmci0.present = "TRUE" | ||
| 28 | floppy0.present = "TRUE" | ||
| 29 | floppy0.fileType = "device" | ||
| 30 | floppy0.autodetect = "FALSE" | ||
| 31 | floppy0.startConnected = "FALSE" | ||
| 32 | ide1:0.present = "TRUE" | ||
| 33 | ide1:0.deviceType = "atapi-cdrom" | ||
| 34 | ide1:0.autodetect = "TRUE" | ||
| 35 | ide1:0.startConnected = "FALSE" | ||
| 36 | ide0:0.present = "TRUE" | ||
| 37 | ide0:0.deviceType = "disk" | ||
| 38 | ide0:0.fileName = "Yocto_Build_Appliance.vmdk" | ||
| 39 | usb.present = "TRUE" | ||
| 40 | scsi0.virtualDev = "lsilogic" | ||
| 41 | scsi0.present = "TRUE" | ||
| 42 | ethernet0.present = "TRUE" | ||
| 43 | ethernet0.virtualDev = "e1000" | ||
| 44 | ethernet0.connectionType = "nat" | ||
| 45 | ethernet0.startConnected = "TRUE" | ||
| 46 | ethernet0.addressType = "generated" | ||
| 47 | sound.present = "TRUE" | ||
| 48 | sound.virtualDev = "es1371" | ||
| 49 | sound.autodetect = "TRUE" | ||
| 50 | extendedConfigFile = "Yocto_Build_Appliance.vmxf" | ||
| 51 | sound.fileName = "-1" | ||
| 52 | virtualHW.productCompatibility = "hosted" | ||
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf new file mode 100644 index 0000000000..ca3f0264d6 --- /dev/null +++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | <?xml version="1.0"?> | ||
| 2 | <Foundry> | ||
| 3 | <VM> | ||
| 4 | <VMId type="string">52 e4 0b df 7b 70 21 f8-88 56 a7 26 47 43 95 93</VMId> | ||
| 5 | <ClientMetaData> | ||
| 6 | <clientMetaDataAttributes/> | ||
| 7 | <HistoryEventList/></ClientMetaData> | ||
| 8 | <vmxPathName type="string">Yocto_Build_Appliance.vmx</vmxPathName></VM></Foundry> | ||
