From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../images/build-appliance-image_8.0.bb | 93 ++++++++++++++++++++++ meta/recipes-core/images/core-image-base.bb | 8 ++ meta/recipes-core/images/core-image-minimal-dev.bb | 7 ++ .../images/core-image-minimal-initramfs.bb | 21 +++++ .../images/core-image-minimal-mtdutils.bb | 7 ++ meta/recipes-core/images/core-image-minimal.bb | 12 +++ 6 files changed, 148 insertions(+) create mode 100644 meta/recipes-core/images/build-appliance-image_8.0.bb create mode 100644 meta/recipes-core/images/core-image-base.bb create mode 100644 meta/recipes-core/images/core-image-minimal-dev.bb create mode 100644 meta/recipes-core/images/core-image-minimal-initramfs.bb create mode 100644 meta/recipes-core/images/core-image-minimal-mtdutils.bb create mode 100644 meta/recipes-core/images/core-image-minimal.bb (limited to 'meta/recipes-core/images') 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..fe2b7b18a7 --- /dev/null +++ b/meta/recipes-core/images/build-appliance-image_8.0.bb @@ -0,0 +1,93 @@ +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" + +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 += "quiet" + +DEPENDS = "zip-native" +IMAGE_FSTYPES = "vmdk" + +inherit core-image + +SRCREV ?= "c4ebd5d28b75e844a1bd146dbfac205f64cc8915" +SRC_URI = "git://git.yoctoproject.org/poky;branch=dizzy \ + 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 + tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 +} + +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 -Rp ${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 + 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_* + + 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 + + chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo + + chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky + + # Allow builder to use sudo to setup tap/tun + echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers + + # 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 +} + +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" 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 @@ +SUMMARY = "A console-only image that fully supports the target device \ +hardware." + +IMAGE_FEATURES += "splash" + +LICENSE = "MIT" + +inherit 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 @@ +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/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 @@ +# 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 busybox 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" + +BAD_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 @@ +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/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 @@ +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" + -- cgit v1.2.3-54-g00ecf