summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-core/images
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/images')
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt75
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx46
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb120
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-base.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-dev.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-mtdutils.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal.bb12
9 files changed, 305 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt
new file mode 100644
index 000000000..e7298f2c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt
@@ -0,0 +1,75 @@
+
+Installing VirtualBox Guest Additions
+=====================================
+
+In order to use VirtualBox guest additions, they have to be build
+first. They may have to be rebuilt each time the time you upgrade to
+a new version of VirtualBox.
+
+Make sure VM is configured with an Optical Drive.
+
+Please follow these steps to install the VirtualBox Guest Additions on the
+Build Appliance VM:
+
+1. Boot VM, select root "Terminal" instead of the default "Terminal <2>"
+
+2. Insert Guest additions CD into VM optical drive:
+ VM menu "Devices"->"Optical Drives"-> Select "VBoxGuestAdditions<version>.iso"
+
+3. Find your CDROM device. Typically it is /dev/hda for IDE. You can determine
+ the actual name <cdromedev> by viewing the cdrom info:
+
+ # cat /proc/sys/dev/cdrom/info
+
+ Mount the cdrom drive:
+ # mount -t iso9660 <cdromdev> /media/cdrom
+ i.e.:
+ # mount -t iso9660 /dev/hda /media/cdrom
+
+4. Build the additions:
+
+ First, we need to build of some prerequisite utilities.
+ (This is only needed to be done once)
+
+ # cd /lib/modules/<kernel-version>-yocto-standard/build
+ # make scripts
+
+ Now build the guest additions:
+
+ # /media/cdrom/VBoxLinuxAdditions.run --nox11
+
+ At this point, providing there were no build errors, the guest additions are
+ built and installed.
+
+5. Check if vbox additions running:
+
+ # /etc/init.d/vboxadd status
+
+ If not running, try manually starting:
+
+ # /etc/init.d/vboxadd start
+
+6. Check if additons actually work, in particular folder sharing.
+
+ Host: Devices->Shared Folders->Shared Folder Settings...
+ Add any host folder and name it (i.e. "images")
+
+ Guest VM: create mount point for the shared folder, i.e.:
+
+ # mkdir ~/my-host
+
+ Mount the shared folder: (Watch out for spelling: it's vboxsf NOT vboxfs)
+
+ # mount -t vboxsf images ~/my-host
+
+ Verify mount, should see the contents of the shared folder:
+
+ # ls ~/my-host
+
+
+
+
+
+
+
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
new file mode 100644
index 000000000..6472e8750
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
@@ -0,0 +1,46 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "10"
+numvcpus = "2"
+vcpu.hotadd = "TRUE"
+memsize = "4096"
+mem.hotadd = "TRUE"
+sata0.present = "TRUE"
+sata0:0.present = "TRUE"
+sata0:0.fileName = "Yocto_Build_Appliance.vmdk"
+ethernet0.present = "TRUE"
+ethernet0.virtualDev = "e1000"
+ethernet0.wakeOnPcktRcv = "FALSE"
+ethernet0.addressType = "generated"
+usb.present = "TRUE"
+ehci.pciSlotNumber = "0"
+sound.present = "TRUE"
+sound.fileName = "-1"
+sound.autodetect = "TRUE"
+pciBridge0.present = "TRUE"
+pciBridge4.present = "TRUE"
+pciBridge4.virtualDev = "pcieRootPort"
+pciBridge4.functions = "8"
+pciBridge5.present = "TRUE"
+pciBridge5.virtualDev = "pcieRootPort"
+pciBridge5.functions = "8"
+pciBridge6.present = "TRUE"
+pciBridge6.virtualDev = "pcieRootPort"
+pciBridge6.functions = "8"
+pciBridge7.present = "TRUE"
+pciBridge7.virtualDev = "pcieRootPort"
+pciBridge7.functions = "8"
+vmci0.present = "TRUE"
+hpet0.present = "TRUE"
+usb.vbluetooth.startConnected = "TRUE"
+displayName = "Yocto Build Appliance"
+guestOS = "other3xlinux-64"
+virtualHW.productCompatibility = "hosted"
+gui.exitOnCLIHLT = "FALSE"
+powerType.powerOff = "soft"
+powerType.powerOn = "soft"
+powerType.suspend = "soft"
+powerType.reset = "soft"
+extendedConfigFile = "Yocto_Build_Appliance.vmxf"
+scsi0:0.present = "FALSE"
+floppy0.present = "FALSE"
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
new file mode 100644
index 000000000..9e941ff2f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Foundry>
+<VM>
+<VMId type="string">52 a5 d8 cb ed 6c 85 48-cd 99 68 af cc 30 a0 98</VMId>
+<ClientMetaData>
+<clientMetaDataAttributes/>
+<HistoryEventList/></ClientMetaData>
+<vmxPathName type="string">Yocto_Build_Appliance.vmx</vmxPathName></VM></Foundry>
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb
new file mode 100644
index 000000000..bdcb9212d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb
@@ -0,0 +1,120 @@
+SUMMARY = "An image containing the build system itself"
+DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
+HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted kernel-dev kernel-devsrc "
+
+IMAGE_FEATURES += "x11-base package-management splash"
+
+# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
+IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
+
+# Do a quiet boot with limited console messages
+APPEND += "rootfstype=ext4 quiet"
+
+DEPENDS = "zip-native"
+IMAGE_FSTYPES = "vmdk"
+
+inherit core-image module-base
+
+SRCREV ?= "5f84d6545e6d7a2be8e603a1f4b1afae0dad0a9b"
+SRC_URI = "git://git.yoctoproject.org/poky;branch=krogoth \
+ file://Yocto_Build_Appliance.vmx \
+ file://Yocto_Build_Appliance.vmxf \
+ file://README_VirtualBox_Guest_Additions.txt \
+ "
+BA_INCLUDE_SOURCES ??= "0"
+
+IMAGE_CMD_ext4_append () {
+ # We don't need to reserve much space for root, 0.5% is more than enough
+ tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4
+}
+
+fakeroot do_populate_poky_src () {
+ # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
+ # will become invalid in the target.
+ rm -rf ${WORKDIR}/git/.git
+ rm -f ${WORKDIR}/git/.gitignore
+
+ cp -R ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
+
+ mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
+ mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
+ if [ ${BA_INCLUDE_SOURCES} != 0 ]; then
+ cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
+ # Remove the git2_* tarballs -- this is ok since we still have the git2/.
+ rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
+ fi
+
+ # Place the README_VirtualBox_Guest_Additions file in builders home folder.
+ cp ${WORKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/
+
+ # Create a symlink, needed for out-of-tree kernel modules build
+ ln -snr ${IMAGE_ROOTFS}/usr/src/kernel ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
+
+ echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
+ echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
+ mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
+ echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+ # Also save (for reference only) the actual SRCREV used to create this image
+ echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# If working behind a proxy and using the provided oe-git-proxy script" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# you need to set ALL_PROXY based on your proxy settings." >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# Example ALL_PROXY values:" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+ chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
+
+ chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
+ chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
+
+ # Assume we will need CDROM to install guest additions
+ mkdir -p ${IMAGE_ROOTFS}/media/cdrom
+
+ # Allow builder to use sudo
+ echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
+
+ # Load tap/tun at startup
+ ln -sr ${IMAGE_ROOTFS}/usr/sbin/iptables ${IMAGE_ROOTFS}/sbin/iptables
+ echo "tun" >> ${IMAGE_ROOTFS}/etc/modules
+
+ # Use Clearlooks GTK+ theme
+ mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
+ echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
+}
+
+IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
+
+addtask rootfs after do_unpack
+
+python () {
+ # Ensure we run these usually noexec tasks
+ d.delVarFlag("do_fetch", "noexec")
+ d.delVarFlag("do_unpack", "noexec")
+}
+
+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 Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip
+}
+create_bundle_files[vardepsexclude] = "DATETIME"
+
+python do_bundle_files() {
+ bb.build.exec_func('create_bundle_files', d)
+}
+
+addtask bundle_files after do_vmimg before do_build
+do_bundle_files[nostamp] = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-base.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-base.bb
new file mode 100644
index 000000000..75a08cfc9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-base.bb
@@ -0,0 +1,8 @@
+SUMMARY = "A console-only image that fully supports the target device \
+hardware."
+
+IMAGE_FEATURES += "splash"
+
+LICENSE = "MIT"
+
+inherit core-image
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-dev.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-dev.bb
new file mode 100644
index 000000000..93ead2055
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-dev.bb
@@ -0,0 +1,7 @@
+require core-image-minimal.bb
+
+DESCRIPTION = "A small image just capable of allowing a device to boot and \
+is suitable for development work."
+
+IMAGE_FEATURES += "dev-pkgs"
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
new file mode 100644
index 000000000..8d7c0d2d3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -0,0 +1,22 @@
+# Simple initramfs image. Mostly used for live images.
+DESCRIPTION = "Small image capable of booting a device. The kernel includes \
+the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
+first 'init' program more efficiently."
+
+PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = ""
+
+export IMAGE_BASENAME = "core-image-minimal-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-mtdutils.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-mtdutils.bb
new file mode 100644
index 000000000..c92234c08
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-mtdutils.bb
@@ -0,0 +1,7 @@
+require core-image-minimal.bb
+
+DESCRIPTION = "Small image capable of booting a device with support for the \
+Minimal MTD Utilities, which let the user interact with the MTD subsystem in \
+the kernel to perform operations on flash devices."
+
+IMAGE_INSTALL += "mtd-utils"
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal.bb
new file mode 100644
index 000000000..8dd77b347
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal.bb
@@ -0,0 +1,12 @@
+SUMMARY = "A small image just capable of allowing a device to boot."
+
+IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
+
+IMAGE_LINGUAS = " "
+
+LICENSE = "MIT"
+
+inherit core-image
+
+IMAGE_ROOTFS_SIZE ?= "8192"
+IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "" ,d)}"
OpenPOWER on IntegriCloud