summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/pres_yocto-advanced.tex
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/yocto-advanced/pres_yocto-advanced.tex')
-rw-r--r--distribution/yocto-advanced/pres_yocto-advanced.tex261
1 files changed, 164 insertions, 97 deletions
diff --git a/distribution/yocto-advanced/pres_yocto-advanced.tex b/distribution/yocto-advanced/pres_yocto-advanced.tex
index ee69d0b..c7598b0 100644
--- a/distribution/yocto-advanced/pres_yocto-advanced.tex
+++ b/distribution/yocto-advanced/pres_yocto-advanced.tex
@@ -244,7 +244,8 @@ in conf/local.conf
\frametitle{set extra image features}
we want an image suitable for development, so set
\begin{verbatim}
-EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug eclipse-debug tools-profile"
+EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug \
+ eclipse-debug tools-profile"
\end{verbatim}
in conf/local.conf
\end{frame}
@@ -267,41 +268,11 @@ Currently 4 running tasks (26 of 4459):
\end{frame}
\begin{frame}[fragile]
-\frametitle{first errors and warnings}
-\begin{verbatim}
-recommended that you use a tested distribution.
-ERROR: OE-core's config sanity checker detected a potential misconfiguration.
-Either fix the cause of this error or at your own risk disable the checker
-see sanity.conf).
-Following is the list of potential problems / advisories:
-
-libsdl-native is set to be ASSUME_PROVIDED but sdl-config can't be
-found in PATH. Please either install it, or configure qemu not to
-require sdl.
-ERROR: Execution of event handler 'check_sanity_eventhandler' failed
-ERROR: Command execution failed: Exited with 1
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{disable sdl support in qemu}
-edit conf/local.conf:
-\begin{verbatim}
-# PACKAGECONFIG_pn-qemu-native = "sdl"
-# PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
-# ASSUME_PROVIDED += "libsdl-native"
-\end{verbatim}
-run 'bitbake qt4e-demo-image' again
-
-\dots coffee break!
-\end{frame}
-
-\begin{frame}[fragile]
\frametitle{build a ti demo image}
\dots back from coffee break
\begin{verbatim}
-ERROR: No new tasks can be executed since the disk space monitor action is
-"STOPTASKS"!
+ERROR: No new tasks can be executed since
+ the disk space monitor action is "STOPTASKS"!
\end{verbatim}
what happened??
\begin{verbatim}
@@ -325,16 +296,21 @@ A different behaviour can be configured in 'conf/local.conf'.
\begin{frame}[fragile]
\frametitle{example of an issue with a sabrelite board}
\begin{verbatim}
-ERROR: To use 'gpu-viv-bin-mx6q' you need to accept the Freescale EULA
-at '/home/local/src/poky/meta-ti-arm/EULA'. Please read it and in case
-you accept it, write: ACCEPT_FSL_EULA = "1" in your local.conf.
+ERROR: To use 'gpu-viv-bin-mx6q'
+ you need to accept the Freescale EULA
+ at '/home/local/src/poky/meta-ti-arm/EULA'.
+ Please read it and in case you accept it, write:
+ ACCEPT_FSL_EULA = "1" in your local.conf.
ERROR: Function failed: do_unpack
-ERROR: Logfile of failure stored in: /home/local/src/poky/build-ti/tmp
-/work/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/gpu-viv-bin-mx6q/1_3.1
-0.17-1.0.0-hfp-r0/temp/log.do_unpack.6795
-ERROR: Task 1105 (/home/local/src/poky/meta-ti-arm/recipes-graphics/gp
-u-viv-bin-mx6q/gpu-viv-bin-mx6q_3.10.17-1.0.0-hfp.bb, do_unpack) failed
-with exit code '1'
+ERROR: Logfile of failure stored in:
+ /home/local/src/poky/build-ti/tmp/work/
+ cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/
+ gpu-viv-bin-mx6q/1_3.10.17-1.0.0-hfp-r0/temp/
+ log.do_unpack.6795
+ERROR: Task 1105 (/home/local/src/poky/meta-ti-arm/
+ recipes-graphics/gpu-viv-bin-mx6q/
+ gpu-viv-bin-mx6q_3.10.17-1.0.0-hfp.bb, do_unpack) failed
+ with exit code '1'
\end{verbatim}
to solve this issue:
\begin{verbatim}
@@ -352,14 +328,25 @@ again.
if the build is completed the image can be transfered to a sdcard:
\begin{verbatim}
poky/build-ti % sudo fdisk /dev/mmcblk0
-# create a bootable primary partition with about 100 MB and Windows vFat format
-# and a secondary partition with Linux Ext format
+# create a
+# * bootable
+# * primary partition with
+# * about 100 MB and
+# * Windows vFat format
+# and another primary partition with Linux Ext format
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{flashing the image \#2}
+\begin{verbatim}
poky/build-ti % sudo mkfs.vfat -F 16 -n boot /dev/mmcblk0p1
poky/build-ti % sudo mke2fs -j -L "root" /dev/mmcblk0p2
poky/build-ti % sudo mount /dev/mmcblk0p1 /mnt
poky/build-ti % sudo cp -a tmp/deploy/images/beaglebone/MLO-beaglebone \
/mnt/MLO
-poky/build-ti % sudo cp -a tmp/deploy/images/beaglebone/u-boot-beaglebone.img \
+poky/build-ti % sudo cp -a \
+ tmp/deploy/images/beaglebone/u-boot-beaglebone.img \
/mnt/u-boot.img
poky/build-ti % sudo umount /mnt
poky/build-ti % sudo mount /dev/mmcblk0p2 /mnt
@@ -375,12 +362,12 @@ poky/build-ti % sudo umount /mnt
\begin{verbatim}
poky/build-ti % cd ..
poky % yocto-layer create mini
-Please enter the layer priority you'd like to use for the layer: [default: 6]
-<return>
-Would you like to have an example recipe created? (y/n) [default: n]
-<return>
-Would you like to have an example bbappend file created? (y/n) [default: n]
-<return>
+Please enter the layer priority you'd like to use for the layer:
+[default: 6] <return>
+Would you like to have an example recipe created? (y/n)
+[default: n] <return>
+Would you like to have an example bbappend file created? (y/n)
+[default: n] <return>
\end{verbatim}
\end{frame}
@@ -493,7 +480,8 @@ e.g. 'meta/recipes-core/packagegroups/packagegroup-base.bb':
\begin{verbatim}
PACKAGES = ' \
..
- ${@base_contains("DISTRO_FEATURES", "opengl", "packagegroup-opengl", "", d)} \
+ ${@base_contains("DISTRO_FEATURES", \
+ "opengl", "packagegroup-opengl", "", d)} \
..
'
\end{verbatim}
@@ -573,6 +561,33 @@ poky/build-ti % bitbake mini-image
\end{verbatim}
\end{frame}
+\begin{frame}[fragile]
+\frametitle{first errors and warnings}
+\begin{verbatim}
+recommended that you use a tested distribution.
+ERROR: OE-core's config sanity checker detected a potential
+ misconfiguration. Either fix the cause of this error or
+ at your own risk disable the checker see sanity.conf).
+Following is the list of potential problems / advisories:
+
+libsdl-native is set to be ASSUME_PROVIDED but sdl-config can't be
+found in PATH. Please either install it, or configure qemu not to
+require sdl.
+ERROR: Execution of event handler 'check_sanity_eventhandler' failed
+ERROR: Command execution failed: Exited with 1
+\end{verbatim}
+\end{frame}
+\begin{frame}[fragile]
+
+ \frametitle{disable sdl support in qemu}
+edit conf/local.conf:
+\begin{verbatim}
+# PACKAGECONFIG_pn-qemu-native = "sdl"
+# PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
+# ASSUME_PROVIDED += "libsdl-native"
+\end{verbatim}
+\end{frame}
+
\subsection{Machines}
\begin{frame}[fragile]
\frametitle{create a beaglebone-black machine config}
@@ -611,18 +626,25 @@ KERNEL_IMAGETYPE = "uImage"
inherit kernel
require recipes-kernel/linux/linux-dtb.inc
require recipes-kernel/linux/setup-defconfig.inc
+\end{verbatim}
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{adding a kernel \#2}
+\begin{verbatim}
COMPATILBE_MACHINE_beaglebone-black = "beaglebone-black"
-KERNEL_DEVICETREE_beaglebone-black = "arch/arm/boot/dts/am335x-boneblack.dts"
+KERNEL_DEVICETREE_beaglebone-black = \
+"arch/arm/boot/dts/am335x-boneblack.dts"
S = "${WORKDIR}/linux-${PV}"
SRC_URI = " \
https://www.kernel.org/pub/linux/kernel/v3.x/linux-${PV}.tar.xz \
file://defconfig \
+"
-SRC_URI[md5sum] = "e7a985a243b7941b6bc6240fcbc797fc"
-SRC_URI[sha256sum] = "be37dda8ea090525661d64e5c7fc8580f313b7f9ba8592e32120f1332bc57d71"
+SRC_URI[md5sum] = "???"
+SRC_URI[sha256sum] = "???"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
@@ -698,56 +720,101 @@ BOOTDD_VOLUME_ID ?= "Boot ${MACHINE}"
BOOT_SPACE ?= "8192"
# Set alignment to 4MB [in KiB]
IMAGE_ROOTFS_ALIGNMENT = "4096"
+\end{verbatim}
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{sdcard generation \#2}
+\begin{verbatim}
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 ''}"
+ 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_ti33x = "generate_ti_sdcard"
+\end{verbatim}
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{sdcard generation \#3}
+\begin{verbatim}
generate_ti_sdcard () {
- 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 -s ${SDCARD} set 1 boot on
- parted ${SDCARD} print
-
- 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
-
- # copy files to /boot
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ::/MLO
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.img ::/u-boot.img
- mmd -i ${WORKDIR}/boot.img ::/boot
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/boot/${KERNEL_IMAGETYPE}
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-am335x-boneblack.dtb ::/boot/am335x-boneblack.dtb
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/uEnv.txt ::/uEnv.txt
-
- # 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
+ 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 -s ${SDCARD} set 1 boot on
+ parted ${SDCARD} print
+
+ 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
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{sdcard generation \#4}
+\begin{verbatim}
+ # copy files to /boot
+ mcopy -i ${WORKDIR}/boot.img -s \
+ ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ::/MLO
+ mcopy -i ${WORKDIR}/boot.img -s \
+ ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.img ::/u-boot.img
+ mmd -i ${WORKDIR}/boot.img ::/boot
+ mcopy -i ${WORKDIR}/boot.img -s \
+ ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin \
+ ::/boot/${KERNEL_IMAGETYPE}
+ mcopy -i ${WORKDIR}/boot.img -s \
+ ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-am335x-boneblack.dtb \
+ ::/boot/am335x-boneblack.dtb
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/uEnv.txt \
+ ::/uEnv.txt
+
+ # Burn Partition
+ dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc seek=1 \
+ bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
+ sync
+ dd if=${SDCARD_ROOTFS} of=${SDCARD} conv=notrunc seek=1 \
+ bs=$(expr ${BOOT_SPACE_ALIGNED} \* 1024 + \
+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
+ sync
}
+\end{verbatim}
+\end{frame}
+\begin{frame}[fragile]
+\frametitle{sdcard generation \#5}
+\begin{verbatim}
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}
+ if [ -z "${SDCARD_ROOTFS}" ]; then
+ bberror "SDCARD_ROOTFS is undefined."
+ 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
@@ -796,8 +863,8 @@ this is the content of hello.bb
DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
-2f7b4f302"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT; \
+ md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"
SRC_URI = "file://hello.c"
S = "${WORKDIR}"