summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced
diff options
context:
space:
mode:
authorManuel Traut <manut@linutronix.de>2014-09-04 01:20:42 +0200
committerManuel Traut <manut@linutronix.de>2016-01-12 11:41:51 +0100
commit5a20d2533ee61018d9af10424d9b712bbd3d5fef (patch)
tree2cbc6b9ce1b68a7dc8b74301f2a6a1d3ad4ca350 /distribution/yocto-advanced
parentd5433dd648bf2e20d9f2544c0488af00791d0385 (diff)
add a very minimalistic sabrelite layer
Signed-off-by: Manuel Traut <manut@linutronix.de>
Diffstat (limited to 'distribution/yocto-advanced')
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/README4
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/classes/fsl-dynamic-packagearch.bbclass47
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/classes/image_types_fsl.bbclass319
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/conf/distro/lxt.conf141
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/conf/layer.conf2
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/conf/machine/imx6qsabrelite.conf3
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/recipes-bsp/mini-image/mini-image.bb1
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/recipes-core/eglibc/eglibc-locale_2.19.bbappend2
-rw-r--r--distribution/yocto-advanced/poky/meta-mini/recipes-kernel/linux-vanilla/files/imx6qsabrelite/defconfig6
-rw-r--r--distribution/yocto-advanced/pres_yocto-advanced.tex2
10 files changed, 520 insertions, 7 deletions
diff --git a/distribution/yocto-advanced/poky/meta-mini/README b/distribution/yocto-advanced/poky/meta-mini/README
index bd9fb9e..b9be59e 100644
--- a/distribution/yocto-advanced/poky/meta-mini/README
+++ b/distribution/yocto-advanced/poky/meta-mini/README
@@ -62,3 +62,7 @@ II. Misc
========
--- replace with specific information about the mini layer ---
+=======
+this is a mini layer for the sabrelite board
+
+use DISTRO='mini' in your local.conf and 'bitbake mini-image'
diff --git a/distribution/yocto-advanced/poky/meta-mini/classes/fsl-dynamic-packagearch.bbclass b/distribution/yocto-advanced/poky/meta-mini/classes/fsl-dynamic-packagearch.bbclass
new file mode 100644
index 0000000..40eae6c
--- /dev/null
+++ b/distribution/yocto-advanced/poky/meta-mini/classes/fsl-dynamic-packagearch.bbclass
@@ -0,0 +1,47 @@
+# Automatically set PACKAGE_ARCH for MACHINE_SOCARCH
+#
+# This allow to easy reuse of binary packages among similar SoCs. The
+# usual use for this is to share SoC specific packages among different
+# boards.
+#
+# MACHINE_SOCARCH_FILTER list all packages associated with
+# MACHINE_SOCARCH and, when match, will set PACKAGE_ARCH as MACHINE_SOCARCH
+#
+# MACHINE_ARCH_FILTER list all packages associated with
+# MACHINE_ARCH and, when match, will set PACKAGE_ARCH as MACHINE_ARCH
+#
+# For example, in meta-fsl-arm, this is used to share GPU packages for
+# i.MX53 boards (as all them share the AMD GPU) and i.MX6 based boards
+# (as all them share Vivante GPU).
+#
+# To use the class, specify, for example:
+#
+# MACHINE_SOCARCH_soc = "${TUNE_PKGARCH}-soc"
+#
+# and the need filters, as:
+#
+# MACHINE_ARCH_FILTER = "virtual/kernel"
+# MACHINE_SOCARCH_FILTER_soc = "virtual/libgles1 ... virtual/libgl"
+#
+# Copyright 2013 (C) O.S. Systems Software LTDA.
+
+python __anonymous () {
+ machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER", True) or "").split())
+ machine_socarch_filter = set((d.getVar("MACHINE_SOCARCH_FILTER", True) or "").split())
+ if machine_socarch_filter or machine_arch_filter:
+ provides = set((d.getVar("PROVIDES", True) or "").split())
+ depends = set((d.getVar("DEPENDS", True) or "").split())
+ PN = d.getVar("PN", True)
+
+ package_arch = None
+ if list(machine_arch_filter & (provides | depends)):
+ package_arch = d.getVar("MACHINE_ARCH", True)
+ elif list(machine_socarch_filter & (provides | depends)):
+ package_arch = d.getVar("MACHINE_SOCARCH", True)
+ if not package_arch:
+ bb.parse.SkipPackage("You must set MACHINE_SOCARCH as MACHINE_SOCARCH_FILTER is set for this SoC.")
+
+ if package_arch:
+ bb.debug(1, "Use '%s' as package archictecture for '%s'" % (package_arch, PN))
+ d.setVar("PACKAGE_ARCH", package_arch)
+}
diff --git a/distribution/yocto-advanced/poky/meta-mini/classes/image_types_fsl.bbclass b/distribution/yocto-advanced/poky/meta-mini/classes/image_types_fsl.bbclass
new file mode 100644
index 0000000..c0fa9b6
--- /dev/null
+++ b/distribution/yocto-advanced/poky/meta-mini/classes/image_types_fsl.bbclass
@@ -0,0 +1,319 @@
+inherit image_types
+
+IMAGE_BOOTLOADER ?= "u-boot"
+
+# Handle u-boot suffixes
+UBOOT_SUFFIX ?= "bin"
+UBOOT_PADDING ?= "0"
+UBOOT_SUFFIX_SDCARD ?= "${UBOOT_SUFFIX}"
+
+#
+# Handles i.MX mxs bootstream generation
+#
+MXSBOOT_NAND_ARGS ?= ""
+
+# IMX Bootlets Linux bootstream
+IMAGE_DEPENDS_linux.sb = "elftosb-native:do_populate_sysroot \
+ imx-bootlets:do_deploy \
+ virtual/kernel:do_deploy"
+IMAGE_LINK_NAME_linux.sb = ""
+IMAGE_CMD_linux.sb () {
+ kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
+ kernel_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.dtb || true`"
+ linux_bd_file=imx-bootlets-linux.bd-${MACHINE}
+ if [ `basename $kernel_bin .bin` = `basename $kernel_dtb .dtb` ]; then
+ # When using device tree we build a zImage with the dtb
+ # appended on the end of the image
+ linux_bd_file=imx-bootlets-linux.bd-dtb-${MACHINE}
+ cat $kernel_bin $kernel_dtb \
+ > $kernel_bin-dtb
+ rm -f ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin-dtb
+ ln -s $kernel_bin-dtb ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin-dtb
+ fi
+
+ # Ensure the file is generated
+ rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.linux.sb
+ (cd ${DEPLOY_DIR_IMAGE}; elftosb -z -c $linux_bd_file -o ${IMAGE_NAME}.linux.sb)
+
+ # Remove the appended file as it is only used here
+ rm -f ${DEPLOY_DIR_IMAGE}/$kernel_bin-dtb
+}
+
+# IMX Bootlets barebox bootstream
+IMAGE_DEPENDS_barebox.mxsboot-sdcard = "elftosb-native:do_populate_sysroot \
+ u-boot-mxsboot-native:do_populate_sysroot \
+ imx-bootlets:do_deploy \
+ barebox:do_deploy"
+IMAGE_CMD_barebox.mxsboot-sdcard () {
+ barebox_bd_file=imx-bootlets-barebox_ivt.bd-${MACHINE}
+
+ # Ensure the files are generated
+ (cd ${DEPLOY_DIR_IMAGE}; rm -f ${IMAGE_NAME}.barebox.sb ${IMAGE_NAME}.barebox.mxsboot-sdcard; \
+ elftosb -f mx28 -z -c $barebox_bd_file -o ${IMAGE_NAME}.barebox.sb; \
+ mxsboot sd ${IMAGE_NAME}.barebox.sb ${IMAGE_NAME}.barebox.mxsboot-sdcard)
+}
+
+# U-Boot mxsboot generation to SD-Card
+UBOOT_SUFFIX_SDCARD_mxs ?= "mxsboot-sdcard"
+IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-native:do_populate_sysroot \
+ u-boot:do_deploy"
+IMAGE_CMD_uboot.mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \
+ ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard"
+
+IMAGE_DEPENDS_uboot.mxsboot-nand = "u-boot-mxsboot-native:do_populate_sysroot \
+ u-boot:do_deploy"
+IMAGE_CMD_uboot.mxsboot-nand = "mxsboot ${MXSBOOT_NAND_ARGS} nand \
+ ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \
+ ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-nand"
+
+# Boot partition volume id
+BOOTDD_VOLUME_ID ?= "Boot ${MACHINE}"
+
+# Boot partition size [in KiB]
+BOOT_SPACE ?= "8192"
+
+# Barebox environment size [in KiB]
+BAREBOX_ENV_SPACE ?= "512"
+
+# Set alignment to 4MB [in KiB]
+IMAGE_ROOTFS_ALIGNMENT = "4096"
+
+IMAGE_DEPENDS_sdcard = "parted-native:do_populate_sysroot \
+ dosfstools-native:do_populate_sysroot \
+ mtools-native:do_populate_sysroot \
+ virtual/kernel:do_deploy \
+ ${@d.getVar('IMAGE_BOOTLOADER', True) and d.getVar('IMAGE_BOOTLOADER', True) + ':do_deploy' or ''}"
+
+SDCARD = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sdcard"
+
+SDCARD_GENERATION_COMMAND_mxs = "generate_mxs_sdcard"
+SDCARD_GENERATION_COMMAND_mx25 = "generate_imx_sdcard"
+SDCARD_GENERATION_COMMAND_mx5 = "generate_imx_sdcard"
+SDCARD_GENERATION_COMMAND_mx6 = "generate_imx_sdcard"
+SDCARD_GENERATION_COMMAND_vf60 = "generate_imx_sdcard"
+
+#
+# Create an image that can by written onto a SD card using dd for use
+# with i.MX SoC family
+#
+# External variables needed:
+# ${SDCARD_ROOTFS} - the rootfs image to incorporate
+# ${IMAGE_BOOTLOADER} - bootloader to use {u-boot, barebox}
+#
+# The disk layout used is:
+#
+# 0 -> IMAGE_ROOTFS_ALIGNMENT - reserved to bootloader (not partitioned)
+# IMAGE_ROOTFS_ALIGNMENT -> BOOT_SPACE - kernel and other data
+# BOOT_SPACE -> SDIMG_SIZE - rootfs
+#
+# Default Free space = 1.3x
+# Use IMAGE_OVERHEAD_FACTOR to add more space
+# <--------->
+# 4MiB 8MiB SDIMG_ROOTFS 4MiB
+# <-----------------------> <----------> <----------------------> <------------------------------>
+# ------------------------ ------------ ------------------------ -------------------------------
+# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | IMAGE_ROOTFS_ALIGNMENT |
+# ------------------------ ------------ ------------------------ -------------------------------
+# ^ ^ ^ ^ ^
+# | | | | |
+# 0 4096 4MiB + 8MiB 4MiB + 8Mib + SDIMG_ROOTFS 4MiB + 8MiB + SDIMG_ROOTFS + 4MiB
+generate_imx_sdcard () {
+ # Create partition table
+ parted -s ${SDCARD} mklabel msdos
+ parted -s ${SDCARD} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})
+ parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)
+ parted ${SDCARD} print
+
+ # Burn bootloader
+ case "${IMAGE_BOOTLOADER}" in
+ imx-bootlets)
+ bberror "The imx-bootlets is not supported for i.MX based machines"
+ exit 1
+ ;;
+ u-boot)
+ if [ -n "${SPL_BINARY}" ]; then
+ dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDCARD} conv=notrunc seek=2 bs=512
+ dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=42 bs=1K
+ else
+ dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=2 skip=${UBOOT_PADDING} bs=512
+ fi
+ ;;
+ barebox)
+ dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 skip=1 bs=512
+ dd if=${DEPLOY_DIR_IMAGE}/bareboxenv-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 bs=512k
+ ;;
+ "")
+ ;;
+ *)
+ bberror "Unkown IMAGE_BOOTLOADER value"
+ exit 1
+ ;;
+ esac
+
+ # Create boot partition image
+ BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
+ | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 1024 }')
+ mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
+
+ # Copy boot scripts
+ for item in ${BOOT_SCRIPTS}; do
+ src=`echo $item | awk -F':' '{ print $1 }'`
+ dst=`echo $item | awk -F':' '{ print $2 }'`
+
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$src ::/$dst
+ done
+
+ # Copy device tree file
+ if test -n "${KERNEL_DEVICETREE}"; then
+ for DTS_FILE in ${KERNEL_DEVICETREE}; do
+ DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
+ if [ -e "${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
+ kernel_bin="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
+ kernel_bin_for_dtb="`readlink ${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`"
+ if [ $kernel_bin = $kernel_bin_for_dtb ]; then
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
+ fi
+ fi
+ done
+ fi
+
+ # Burn Partition
+ dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
+ dd if=${SDCARD_ROOTFS} of=${SDCARD} conv=notrunc seek=1 bs=$(expr ${BOOT_SPACE_ALIGNED} \* 1024 + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
+}
+
+#
+# Create an image that can by written onto a SD card using dd for use
+# with i.MXS SoC family
+#
+# External variables needed:
+# ${SDCARD_ROOTFS} - the rootfs image to incorporate
+# ${IMAGE_BOOTLOADER} - bootloader to use {imx-bootlets, u-boot}
+#
+generate_mxs_sdcard () {
+ # Create partition table
+ parted -s ${SDCARD} mklabel msdos
+
+ case "${IMAGE_BOOTLOADER}" in
+ imx-bootlets)
+ # The disk layout used is:
+ #
+ # 0 -> 1024 - Unused (not partitioned)
+ # 1024 -> BOOT_SPACE - kernel and other data (bootstream)
+ # BOOT_SPACE -> SDIMG_SIZE - rootfs
+ #
+ # Default Free space = 1.3x
+ # Use IMAGE_OVERHEAD_FACTOR to add more space
+ # <--------->
+ # 1024 8MiB SDIMG_ROOTFS 4MiB
+ # <-------> <----------> <----------------------> <------------------------------>
+ # --------------------- ------------------------ -------------------------------
+ # | Unused | BOOT_SPACE | ROOTFS_SIZE | IMAGE_ROOTFS_ALIGNMENT |
+ # --------------------- ------------------------ -------------------------------
+ # ^ ^ ^ ^ ^
+ # | | | | |
+ # 0 1024 1024 + 8MiB 1024 + 8Mib + SDIMG_ROOTFS 1024 + 8MiB + SDIMG_ROOTFS + 4MiB
+ parted -s ${SDCARD} unit KiB mkpart primary 1024 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})
+ parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)
+
+ # Empty 4 bytes from boot partition
+ dd if=/dev/zero of=${SDCARD} conv=notrunc seek=2048 count=4
+
+ # Write the bootstream in (2048 + 4) bytes
+ dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.linux.sb of=${SDCARD} conv=notrunc seek=1 seek=2052
+ ;;
+ u-boot)
+ # The disk layout used is:
+ #
+ # 1M - 2M - reserved to bootloader and other data
+ # 2M - BOOT_SPACE - kernel
+ # BOOT_SPACE - SDCARD_SIZE - rootfs
+ #
+ # The disk layout used is:
+ #
+ # 1M -> 2M - reserved to bootloader and other data
+ # 2M -> BOOT_SPACE - kernel and other data
+ # BOOT_SPACE -> SDIMG_SIZE - rootfs
+ #
+ # Default Free space = 1.3x
+ # Use IMAGE_OVERHEAD_FACTOR to add more space
+ # <--------->
+ # 4MiB 8MiB SDIMG_ROOTFS 4MiB
+ # <-----------------------> <-------------> <----------------------> <------------------------------>
+ # ---------------------------------------- ------------------------ -------------------------------
+ # | | | |ROOTFS_SIZE | IMAGE_ROOTFS_ALIGNMENT |
+ # ---------------------------------------- ------------------------ -------------------------------
+ # ^ ^ ^ ^ ^ ^ ^
+ # | | | | | | |
+ # 0 1M 2M 4M 4MiB + BOOTSPACE 4MiB + BOOTSPACE + SDIMG_ROOTFS 4MiB + BOOTSPACE + SDIMG_ROOTFS + 4MiB
+ #
+ parted -s ${SDCARD} unit KiB mkpart primary 1024 2048
+ parted -s ${SDCARD} unit KiB mkpart primary 2048 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})
+ parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)
+
+ dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard of=${SDCARD} conv=notrunc seek=1 skip=${UBOOT_PADDING} bs=$(expr 1024 \* 1024)
+ BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
+ | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }')
+
+ mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
+ if test -n "${KERNEL_DEVICETREE}"; then
+ for DTS_FILE in ${KERNEL_DEVICETREE}; do
+ DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
+ if [ -e "${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
+ kernel_bin="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
+ kernel_bin_for_dtb="`readlink ${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`"
+ if [ $kernel_bin = $kernel_bin_for_dtb ]; then
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
+ fi
+ fi
+ done
+ fi
+
+ dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc seek=2 bs=$(expr 1024 \* 1024)
+ ;;
+ barebox)
+ # BAREBOX_ENV_SPACE is taken on BOOT_SPACE_ALIGNED but it doesn't really matter as long as the rootfs is aligned
+ parted -s ${SDCARD} unit KiB mkpart primary 1024 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} - ${BAREBOX_ENV_SPACE})
+ parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} - ${BAREBOX_ENV_SPACE}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})
+ parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)
+
+ dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.barebox.mxsboot-sdcard of=${SDCARD} conv=notrunc seek=1 bs=$(expr 1024 \* 1024)
+ dd if=${DEPLOY_DIR_IMAGE}/bareboxenv-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} - ${BAREBOX_ENV_SPACE}) bs=1024
+ ;;
+ *)
+ bberror "Unkown IMAGE_BOOTLOADER value"
+ exit 1
+ ;;
+ esac
+
+ # Change partition type for mxs processor family
+ bbnote "Setting partition type to 0x53 as required for mxs' SoC family."
+ echo -n S | dd of=${SDCARD} bs=1 count=1 seek=450 conv=notrunc
+
+ parted ${SDCARD} print
+
+ dd if=${SDCARD_ROOTFS} of=${SDCARD} conv=notrunc seek=1 bs=$(expr ${BOOT_SPACE_ALIGNED} \* 1024 + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
+}
+
+IMAGE_CMD_sdcard () {
+ if [ -z "${SDCARD_ROOTFS}" ]; then
+ bberror "SDCARD_ROOTFS is undefined. To use sdcard image from Freescale's BSP it needs to be defined."
+ exit 1
+ fi
+
+ # Align boot partition and calculate total SD card image size
+ BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
+ BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
+ SDCARD_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
+
+ # Initialize a sparse file
+ dd if=/dev/zero of=${SDCARD} bs=1 count=0 seek=$(expr 1024 \* ${SDCARD_SIZE})
+
+ ${SDCARD_GENERATION_COMMAND}
+}
+
+# The sdcard requires the rootfs filesystem to be built before using
+# it so we must make this dependency explicit.
+IMAGE_TYPEDEP_sdcard = "${@d.getVar('SDCARD_ROOTFS', 1).split('.')[-1]}"
diff --git a/distribution/yocto-advanced/poky/meta-mini/conf/distro/lxt.conf b/distribution/yocto-advanced/poky/meta-mini/conf/distro/lxt.conf
new file mode 100644
index 0000000..85aef9c
--- /dev/null
+++ b/distribution/yocto-advanced/poky/meta-mini/conf/distro/lxt.conf
@@ -0,0 +1,141 @@
+# Distribution definition for: lxt
+#
+# Copyright (c) 2011, Intel Corporation.
+# All rights reserved.
+#
+# This file is released under the MIT license as described in
+# ../meta/COPYING.MIT.
+#
+# Poky-tiny is intended to define a tiny Linux system comprised of a
+# Linux kernel tailored to support each specific MACHINE and busybox.
+# Poky-tiny sets some basic policy to ensure a usable system while still
+# keeping the rootfs and kernel image as small as possible.
+#
+# The policies defined are intended to meet the following goals:
+# o Serial consoles only (no framebuffer or VGA console)
+# o Basic support for IPV4 networking
+# o Single user ash shell
+# o Static images (no support for adding packages or libraries later)
+# o Read-only or RAMFS root filesystem
+# o Combined Linux kernel + rootfs in under 4MB
+# o Allow the user to select between eglibc or uclibc with the TCLIBC variable
+#
+# This is currently a partial definition, the following tasks remain:
+# [ ] Integrate linux-yocto-tiny ktype into linux-yocto
+# [ ] Define linux-yocto-tiny configs for all supported BSPs
+# [ ] Drop ldconfig from the installation
+# [ ] Modify the runqemu scripts to work with ext2 parameter:
+# runqemu qemux86 qemuparams="-nographic" bootparams="console=ttyS0,115200 root=0800"
+# [ ] Modify busybox to allow for DISTRO_FEATURES-like confiruration
+
+require conf/distro/poky.conf
+DISTRO = "lxt"
+
+# FIXME: consider adding a new "tiny" feature
+#DISTRO_FEATURES_append = " tiny"
+
+# Distro config is evaluated after the machine config, so we have to explicitly
+# set the kernel provider to override a machine config.
+PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
+PREFERRED_VERSION_linux-yocto-tiny = "3.8%"
+
+# We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny
+#POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot"
+# Drop kernel-module-af-packet from RRECOMMENDS
+POKY_DEFAULT_EXTRA_RRECOMMENDS = ""
+
+# FIXME: what should we do with this?
+TCLIBCAPPEND = ""
+
+# Disable wide char support for ncurses as we don't include it in
+# in the LIBC features below.
+ENABLE_WIDEC="false"
+
+# Drop native language support. This removes the
+# eglibc->bash->gettext->libc-posix-clang-wchar dependency.
+USE_NLS="no"
+
+# Reconfigure eglibc for a smaller installation
+# Comment out any of the lines below to disable them in the build
+DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
+
+# Required for "who"
+DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
+DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
+DISTRO_FEATURES_LIBC_NET = "libc-inet libc-nis"
+
+DISTRO_FEATURES_LIBC = "${DISTRO_FEATURES_LIBC_TINY} \
+ ${DISTRO_FEATURES_LIBC_MINIMAL} \
+ ${DISTRO_FEATURES_LIBC_REGEX} \
+ ${DISTRO_FEATURES_LIBC_NET} \
+ "
+
+# Comment out any of the lines below to disable them in the build
+# DISTRO_FEATURES options:
+# alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci
+DISTRO_FEATURES_TINY = "pci"
+DISTRO_FEATURES_NET = "ipv4"
+DISTRO_FEATURES_USB = "usbhost"
+#DISTRO_FEATURES_USBGADGET = "usbgadget"
+#DISTRO_FEATURES_WIFI = "wifi"
+
+DISTRO_FEATURES = "${DISTRO_FEATURES_TINY} \
+ ${DISTRO_FEATURES_NET} \
+ ${DISTRO_FEATURES_USB} \
+ ${DISTRO_FEATURES_USBGADGET} \
+ ${DISTRO_FEATURES_WIFI} \
+ ${DISTRO_FEATURES_LIBC} \
+ "
+
+# Enable LFS - see bug YOCTO #5865
+DISTRO_FEATURES_append_libc-uclibc = " largefile"
+
+# Use tmpdevfs and the busybox runtime services
+VIRTUAL-RUNTIME_dev_manager = ""
+VIRTUAL-RUNTIME_login_manager = ""
+VIRTUAL-RUNTIME_init_manager = "tiny-init"
+VIRTUAL-RUNTIME_keymaps = ""
+
+# FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in
+# packagegroup-core-base to select modutils-initscripts or not. Similar with "net" and
+# netbase.
+
+# By default we only support ext2 and initramfs. We don't build live as that
+# pulls in a lot of dependencies for the live image and the installer, like
+# udev, grub, etc. These pull in gettext, which fails to build with wide
+# character support.
+IMAGE_FSTYPES = "sdcard ext3 tar.gz"
+
+# Drop v86d from qemu dependency list (we support serial)
+# Drop grub from meta-intel BSPs
+# FIXME: A different mechanism is needed here. We could define -tiny
+# variants of all compatible machines, but that leads to a lot
+# more machine configs to maintain long term.
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
+
+# The mtrace script included by eglibc is a perl script. This means the system
+# will build perl in case this package is installed. Since we don't care about
+# this script for the purposes of tiny, remove the dependency from here.
+RDEPENDS_${PN}-mtrace_pn-eglibc = ""
+
+INHERIT += "blacklist"
+PNBLACKLIST[build-appliance-image] = "not buildable with lxt"
+PNBLACKLIST[core-image-base] = "not buildable with lxt"
+PNBLACKLIST[core-image-clutter] = "not buildable with lxt"
+PNBLACKLIST[core-image-directfb] = "not buildable with lxt"
+PNBLACKLIST[core-image-full-cmdline] = "not buildable with lxt"
+PNBLACKLIST[core-image-lsb] = "not buildable with lxt"
+PNBLACKLIST[core-image-lsb-dev] = "not buildable with lxt"
+PNBLACKLIST[core-image-lsb-sdk] = "not buildable with lxt"
+PNBLACKLIST[core-image-rt] = "not buildable with lxt"
+PNBLACKLIST[core-image-rt-sdk] = "not buildable with lxt"
+PNBLACKLIST[core-image-sato] = "not buildable with lxt"
+PNBLACKLIST[core-image-sato-dev] = "not buildable with lxt"
+PNBLACKLIST[core-image-sato-sdk] = "not buildable with lxt"
+PNBLACKLIST[core-image-x11] = "not buildable with lxt"
+PNBLACKLIST[qt4e-demo-image] = "not buildable with lxt"
+PNBLACKLIST[core-image-weston] = "not buildable with lxt"
+
+# Disable python usage in opkg-utils since it won't build with tiny config
+PACKAGECONFIG_pn-opkg-utils = ""
diff --git a/distribution/yocto-advanced/poky/meta-mini/conf/layer.conf b/distribution/yocto-advanced/poky/meta-mini/conf/layer.conf
index 35caf4b..b1c4f1e 100644
--- a/distribution/yocto-advanced/poky/meta-mini/conf/layer.conf
+++ b/distribution/yocto-advanced/poky/meta-mini/conf/layer.conf
@@ -5,8 +5,6 @@ BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
-LAYERDEPENDS_fsl-arm-extra = "core linutronix"
-
BBFILE_COLLECTIONS += "mini"
BBFILE_PATTERN_mini = "^${LAYERDIR}/"
BBFILE_PRIORITY_mini = "7"
diff --git a/distribution/yocto-advanced/poky/meta-mini/conf/machine/imx6qsabrelite.conf b/distribution/yocto-advanced/poky/meta-mini/conf/machine/imx6qsabrelite.conf
index 66b124f..90f6864 100644
--- a/distribution/yocto-advanced/poky/meta-mini/conf/machine/imx6qsabrelite.conf
+++ b/distribution/yocto-advanced/poky/meta-mini/conf/machine/imx6qsabrelite.conf
@@ -33,4 +33,5 @@ IMAGE_FSTYPES += "tar.bz2 ext3"
# /usr/share/i18n/locales/POSIX
ENABLE_BINARY_LOCALE_GENERATION = "0"
-APPEND = "${APPEND} init=/usr/bin/hello"
+# custom init process
+# APPEND = "${APPEND} init=/usr/bin/hello"
diff --git a/distribution/yocto-advanced/poky/meta-mini/recipes-bsp/mini-image/mini-image.bb b/distribution/yocto-advanced/poky/meta-mini/recipes-bsp/mini-image/mini-image.bb
index e2536a9..252a4f2 100644
--- a/distribution/yocto-advanced/poky/meta-mini/recipes-bsp/mini-image/mini-image.bb
+++ b/distribution/yocto-advanced/poky/meta-mini/recipes-bsp/mini-image/mini-image.bb
@@ -1,3 +1,4 @@
IMAGE_LINGUAS = " "
inherit core-image
+
IMAGE_INSTALL += "sysvinit"
diff --git a/distribution/yocto-advanced/poky/meta-mini/recipes-core/eglibc/eglibc-locale_2.19.bbappend b/distribution/yocto-advanced/poky/meta-mini/recipes-core/eglibc/eglibc-locale_2.19.bbappend
new file mode 100644
index 0000000..51f69e5
--- /dev/null
+++ b/distribution/yocto-advanced/poky/meta-mini/recipes-core/eglibc/eglibc-locale_2.19.bbappend
@@ -0,0 +1,2 @@
+do_package_qa () {
+}
diff --git a/distribution/yocto-advanced/poky/meta-mini/recipes-kernel/linux-vanilla/files/imx6qsabrelite/defconfig b/distribution/yocto-advanced/poky/meta-mini/recipes-kernel/linux-vanilla/files/imx6qsabrelite/defconfig
index d4b216a..ca8a9c6 100644
--- a/distribution/yocto-advanced/poky/meta-mini/recipes-kernel/linux-vanilla/files/imx6qsabrelite/defconfig
+++ b/distribution/yocto-advanced/poky/meta-mini/recipes-kernel/linux-vanilla/files/imx6qsabrelite/defconfig
@@ -582,10 +582,10 @@ CONFIG_ATAGS=y
CONFIG_ZBOOT_ROM_TEXT=0
CONFIG_ZBOOT_ROM_BSS=0
# CONFIG_ARM_APPENDED_DTB is not set
-CONFIG_CMDLINE="noinitrd console=ttymxc1,115200 init=/usr/bin/hello root=/dev/m"
-# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_CMDLINE_EXTEND is not set
-CONFIG_CMDLINE_FORCE=y
+# CONFIG_CMDLINE_FORCE is not set
# CONFIG_KEXEC is not set
# CONFIG_CRASH_DUMP is not set
CONFIG_AUTO_ZRELADDR=y
diff --git a/distribution/yocto-advanced/pres_yocto-advanced.tex b/distribution/yocto-advanced/pres_yocto-advanced.tex
index e22bbc8..189e377 100644
--- a/distribution/yocto-advanced/pres_yocto-advanced.tex
+++ b/distribution/yocto-advanced/pres_yocto-advanced.tex
@@ -363,7 +363,7 @@ ERROR: Task 1105 (/home/local/src/poky/meta-ti-arm/
\pause
to solve this issue:
\begin{verbatim}
-poky/build-ti % echo 'ACCEPT_FSL_EULA = "1"' >> conf/local.conf
+poky/build-fsl % echo 'ACCEPT_FSL_EULA = "1"' >> conf/local.conf
\end{verbatim}
\pause
\dots and run