summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/images
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/images')
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx52
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf8
-rw-r--r--meta/recipes-core/images/build-appliance-image_8.0.bb93
-rw-r--r--meta/recipes-core/images/core-image-base.bb8
-rw-r--r--meta/recipes-core/images/core-image-minimal-dev.bb7
-rw-r--r--meta/recipes-core/images/core-image-minimal-initramfs.bb21
-rw-r--r--meta/recipes-core/images/core-image-minimal-mtdutils.bb7
-rw-r--r--meta/recipes-core/images/core-image-minimal.bb12
8 files changed, 208 insertions, 0 deletions
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..b04a1b6a73
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
@@ -0,0 +1,52 @@
1.encoding = "UTF-8"
2displayname = "Yocto Build Appliance"
3guestos = "other"
4tools.syncTime = "FALSE"
5virtualhw.version = "8"
6config.version = "8"
7numvcpus = "2"
8cpuid.coresPerSocket = "1"
9vcpu.hotadd = "TRUE"
10mem.hotadd = "TRUE"
11memsize = "4096"
12svga.autodetect = "TRUE"
13pciBridge0.present = "TRUE"
14mks.enable3d = "TRUE"
15pciBridge4.present = "TRUE"
16pciBridge4.virtualDev = "pcieRootPort"
17pciBridge4.functions = "8"
18pciBridge5.present = "TRUE"
19pciBridge5.virtualDev = "pcieRootPort"
20pciBridge5.functions = "8"
21pciBridge6.present = "TRUE"
22pciBridge6.virtualDev = "pcieRootPort"
23pciBridge6.functions = "8"
24pciBridge7.present = "TRUE"
25pciBridge7.virtualDev = "pcieRootPort"
26pciBridge7.functions = "8"
27vmci0.present = "TRUE"
28floppy0.present = "TRUE"
29floppy0.fileType = "device"
30floppy0.autodetect = "FALSE"
31floppy0.startConnected = "FALSE"
32ide1:0.present = "TRUE"
33ide1:0.deviceType = "atapi-cdrom"
34ide1:0.autodetect = "TRUE"
35ide1:0.startConnected = "FALSE"
36ide0:0.present = "TRUE"
37ide0:0.deviceType = "disk"
38ide0:0.fileName = "Yocto_Build_Appliance.vmdk"
39usb.present = "TRUE"
40scsi0.virtualDev = "lsilogic"
41scsi0.present = "TRUE"
42ethernet0.present = "TRUE"
43ethernet0.virtualDev = "e1000"
44ethernet0.connectionType = "bridged"
45ethernet0.startConnected = "TRUE"
46ethernet0.addressType = "generated"
47sound.present = "TRUE"
48sound.virtualDev = "es1371"
49sound.autodetect = "TRUE"
50extendedConfigFile = "Yocto_Build_Appliance.vmxf"
51sound.fileName = "-1"
52virtualHW.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>
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..420f30f337
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image_8.0.bb
@@ -0,0 +1,93 @@
1SUMMARY = "An image containing the build system itself"
2DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
3HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8
9IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted"
10
11IMAGE_FEATURES += "x11-base package-management splash"
12
13# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
14IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
15
16# Do a quiet boot with limited console messages
17APPEND += "quiet"
18
19DEPENDS = "zip-native"
20IMAGE_FSTYPES = "vmdk"
21
22inherit core-image
23
24SRCREV ?= "84d524c9386065d06e6b9c2368b93fc07dc1816f"
25SRC_URI = "git://git.yoctoproject.org/poky;branch=daisy \
26 file://Yocto_Build_Appliance.vmx \
27 file://Yocto_Build_Appliance.vmxf \
28 "
29
30IMAGE_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
35fakeroot 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
69IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
70
71addtask rootfs after do_unpack
72
73python () {
74 # Ensure we run these usually noexec tasks
75 d.delVarFlag("do_fetch", "noexec")
76 d.delVarFlag("do_unpack", "noexec")
77}
78
79create_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
88python do_bundle_files() {
89 bb.build.exec_func('create_bundle_files', d)
90}
91
92addtask bundle_files after do_vmdkimg before do_build
93do_bundle_files[nostamp] = "1"
diff --git a/meta/recipes-core/images/core-image-base.bb b/meta/recipes-core/images/core-image-base.bb
new file mode 100644
index 0000000000..75a08cfc92
--- /dev/null
+++ b/meta/recipes-core/images/core-image-base.bb
@@ -0,0 +1,8 @@
1SUMMARY = "A console-only image that fully supports the target device \
2hardware."
3
4IMAGE_FEATURES += "splash"
5
6LICENSE = "MIT"
7
8inherit core-image
diff --git a/meta/recipes-core/images/core-image-minimal-dev.bb b/meta/recipes-core/images/core-image-minimal-dev.bb
new file mode 100644
index 0000000000..93ead20553
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal-dev.bb
@@ -0,0 +1,7 @@
1require core-image-minimal.bb
2
3DESCRIPTION = "A small image just capable of allowing a device to boot and \
4is suitable for development work."
5
6IMAGE_FEATURES += "dev-pkgs"
7
diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb
new file mode 100644
index 0000000000..1f0fa9580b
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -0,0 +1,21 @@
1# Simple initramfs image. Mostly used for live images.
2DESCRIPTION = "Small image capable of booting a device. The kernel includes \
3the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
4first 'init' program more efficiently."
5
6PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi busybox udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
7
8# Do not pollute the initrd image with rootfs features
9IMAGE_FEATURES = ""
10
11export IMAGE_BASENAME = "core-image-minimal-initramfs"
12IMAGE_LINGUAS = ""
13
14LICENSE = "MIT"
15
16IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
17inherit core-image
18
19IMAGE_ROOTFS_SIZE = "8192"
20
21BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/meta/recipes-core/images/core-image-minimal-mtdutils.bb b/meta/recipes-core/images/core-image-minimal-mtdutils.bb
new file mode 100644
index 0000000000..c92234c082
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal-mtdutils.bb
@@ -0,0 +1,7 @@
1require core-image-minimal.bb
2
3DESCRIPTION = "Small image capable of booting a device with support for the \
4Minimal MTD Utilities, which let the user interact with the MTD subsystem in \
5the kernel to perform operations on flash devices."
6
7IMAGE_INSTALL += "mtd-utils"
diff --git a/meta/recipes-core/images/core-image-minimal.bb b/meta/recipes-core/images/core-image-minimal.bb
new file mode 100644
index 0000000000..9716274c34
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal.bb
@@ -0,0 +1,12 @@
1SUMMARY = "A small image just capable of allowing a device to boot."
2
3IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
4
5IMAGE_LINGUAS = " "
6
7LICENSE = "MIT"
8
9inherit core-image
10
11IMAGE_ROOTFS_SIZE ?= "8192"
12