i.MX Processors Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX Processors Knowledge Base

Discussions

Sort by:
NOTE: Please suggest bitbake commands you find it useful! bitbake command Description bitbake <image> Bake an image (add -k to continue building even errors are found in the tasks execution) bitbake <package> -c <task> Execute a particular package's task. Default Tasks names: fetch, unpack , patch , configure , compile , install , package , package_write , and build. Example: To (force) compiling a kernel and then build, type: $ bitbake  linux-imx -f -c compile $ bitbake linux-imx bitbake <image > -g -u depexp Show the package dependency for image. Example: To show all packages included on fsl-image-gui $ bitbake fsl-image-gui -g -u depexp NOTE: This command will open a UI window, so it must be execute on a console inside the host machine (either virtual or native). bitbake <package> -c  devshell Open a new shell where with neccesary system values already defined for package hob bitbake frontend/GUI. bitbake <package> -c listtasks List all tasks for package bitbake virtual/kernel -c menuconfig Interactive kernel configuration bitbake <image> -c fetchall Fetch sources for a particular image bitbake-layers show-layers Show layers bitbake-layers show-recipes "*-image-*" Show possible images to bake. Without "*-images-*", it shows ALL recipes bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq Show image's packages bitbake -g <pkg> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq Show package's dependencies bitbake –v <image> 2>&1 | tee image_build.log Print (on console) and store verbose baking bitbake -s | grep <pkg> Check if certain package is present on current Yocto Setup
View full article
Yoctoproject Framework Installing any Needed Package Using Yocto and i.MX Boards Testing Yocto for i.MX6 i.MX53 QSB - Quick Start Board i.MX6 Sabre Lite Board Build the image SDCard Image Yoctoproject Framework Yoctoproject is a framework for creating Linux distributions for embedded devices. Its layering mechanism makes it easy to add Linux to new target devices highly customized for a particular platform; it can include custom start-up scripts, software packages built with a high degree of optimization for a particular architecture, and different user interfaces from full Gnome desktop to a simple a serial console. Yocto has 2 basic layers: board support packages layer and core layer. In the BSP layer is where all the custom software and configuration tweaks for a particular platform are included, while the core layer provides the common software stack to provide from a simple command line interface to Sato desktop interface (Matchbox based and Gnome mobile software stack). A third layer could be added to provide additional user interfaces LXDE, XFCE, and more; YP is quite flexible&emdash;one of it major strengths. Installing any Needed Package Go to Yocto Project Quick Start and double check that you have all the necessary packages installed for your machine. For example, if building machine was an Ubuntu machine: $ sudo apt-get install gawk wget git-core diffstat unzip texinfo  build-essential chrpath libsdl1.2-dev xterm curl Using Yocto and i.MX Boards Please, go to project's README file in order to see the recommended instructions to download the source code. Testing Yocto for i.MX6 How to test Yocto for i.MX 6 i.MX53 QSB - Quick Start Board Edit conf/local.conf user config file and set imx53 Quick start board machine and enable parallel build features. MACHINE ?= "imx53qsb" BB_NUMBER_THREADS = "4" PARALLEL_MAKE = "-j 4" i.MX6 Sabre Lite Board Edit conf/local.conf user config file and set i.MX6 Sabrelite board machine and enable parallel build features MACHINE ?= "imx6qsabrelite" BB_NUMBER_THREADS = "4" PARALLEL_MAKE = "-j 4" if you've been facing problems to get yocto's images working on your i.MX Sabre Lite board, please take a look on this comment Re: The kernel sometins hang  in L3.0.35_4.0.0_130424 release Build the image some example of available image: image name description core-image-minimal A small image just capable of allowing a device to boot. core-image-base A console-only image that fully supports the target device hardware. core-image-sato Image with sato, a mobile environment and visual style for mobile devices.  The image supports X11 with a Sato theme, Pimlico applications and contains terminal, editor and file manager. fsl-image-test Builds contents core-image-base plus Freescale test applications and multimedia components. fsl-image-gui Builds contents of core-image-sato with Freescale test applications and multimedia with hardware accelerated X11 To build the image: $ bitbake <image_name> Build using Dash instead can bring some problems. You can check what your system uses typing: "ls -l /bin/sh". On Ubuntu you can change it using "dpkg-reconfigure bash". Some Ubuntu releases you must use "dpkg-reconfigure dash" and choose Bash Built images are located in cd tmp/deploy/images SDCard Image sudo dd if=core-image-minimal-imx6qsabrelite.sdcard of=/dev/sdb i.MX Yocto Project: Frequently Asked Questions
View full article
Yocto Project versions and names Preparing host environment For virtual machine (VirtualBox): Download the source code from NXP Code Aurora Yocto Project versions and names See here the list of all yocto version names: Releases - Yocto Project  The current stable release is Zeus Preparing host environment For virtual machine (VirtualBox): Please set memory size minimal to 1GB and disk size to 32GB. (24Feb2014 Ubuntu 12.04LTS)   First, make sure your host PC has the required packages to run Yocto The essential packages you need for a supported Ubuntu distribution are shown in the following command: $ sudo apt-get build-dep qemu $ sudo apt-get remove oss4-dev $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \   build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \   xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \   xterm‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ For other Linux distribution or newer Yocto Project release see here the updated list. Download the source code from community Install the repo $ sudo apt-get install repo‍‍‍‍ Download the BSP source: $ mkdir fsl-community-bsp $ cd fsl-community-bsp $ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b zeus $ repo sync‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Download the source code from NXP Code Aurora See here the list of all BSP releases from NXP: imx-manifest - i.MX Release Manifest  Currently, the latest NXP release how to is here: README - imx-manifest - i.MX Release Manifest  To understand the difference between the 2 source code (community X NXP BSP) see here Go to https://community.nxp.com/docs/DOC-94849  Go to Task #2
View full article
Introduction The "smart" package management system is available in  Yocto Project for managing  packages on a target machine. A host is configured as a server for the packages and on the target the "package-management" feature is enabled for working with the packages. The steps for setup and usage are described below. Resources The Yocto Project package management system will work with many hosts and targets. The following were used for creating this document: Host: Ubuntu 14.04 64-bit Target: MCIMX6Q-SDP Freescale Yocto Project Release Documentation: Linux 3.14.38_6ul BSP & Multimedia Codecs Documentation (fsl-yocto-L3.14.38_6ul-ga.tar.gz) Host You have successfully installed a Freescale Yocto Project release. (Refer to Freescale Yocto Project Release Documentation). There are two steps for adding package management and then building: 1. Modify conf/local.conf EXTRA_IMAGE_FEATURES = "debug-tweaks package-management" ‍ 2. Build the image: bitbake core-image-minimal ‍ The core-image-minimal recipe provides an image enabling the target board to boot and support a serial console. 3. Create SDCARD: $ cd <build>/tmp/deploy/images/imx6qsabresd $ sudo dd if=core-image-minimal-imx6qsabresd.sdcard of=/dev/sdb bs=4M && sync ‍‍ Note - verify location of SDCARD on your host, /dev/sdb in this example. Examine 'cat /proc/partitions' 4. Setup web server and add link to rpm packages A web server, lighttpd, is installed. $ sudo apt-get install lighttpd ‍ Provide user write capability in /var/www $ sudo chmod 777 /var/www ‍ Create a soft link in the default web server directory to the rpm directory from the build. Note: Please update $HOME/<build> to your actual location: $ ln -s $HOME/<build>/tmp/deploy/rpm /var/www/imx6qsd ‍‍‍ Target Insert the SDCARD created from step 3 above, connect power and console cable  and power on the MCIMX6Q-SDP. Login using the "root" id, no password required. The /usr/bin/smart application is now used to setup the channels and perform package commands. For all smart options: smart --help ‍ 1. Add channels To add the packages from the host to your target, the smart  channel --add is used: Please enter the IP adress of your server, replacing SERVERIP below: smart channel --add all type=rpm-md name=all baseurl= http://SERVERIP/imx6qsd/all smart channel --add cortexa9hf_vfp_neon type=rpm-md name=cortexa9hf_vfp_neon baseurl= http://SERVERIP/imx6qsd/cortexa9hf_vfp_neon smart channel --add imx6qsabresd type=rpm-md name=imx6qsabresd baseurl= http://SERVERIP/imx6qsd/imx6qsabresd ‍‍‍‍‍‍‍‍‍ Check  the added channels: root@imx6qsabresd:~# smart channel --list all imx6qsabresd rpmsys cortexa9hf_vfp_neon ‍‍‍‍‍ 2. Update  local package cache Once the chanels have been added, the local package cache is updated. Note  SERVERIP below will be the host IP address in your network. root@imx6qsabresd:~# smart update Loading cache... Updating cache...               ######################################## [100%] Fetching information for 'all'...                                           -> http://SERVERIP/imx6qsd/all/repodata/repomd.xml                          repomd.xml                      ######################################## [ 16%]                                                                             Fetching information for 'imx6qsabresd'... -> http://SERVERIP/imx6qsd/imx6qsabresd/repodata/repomd.xml                 repomd.xml                      ######################################## [ 41%]                                                                             Fetching information for 'cortexa9hf_vfp_neon'... -> http://SERVERIP/imx6qsd/cortexa9hf_vfp_neon/repodata/repomd.xml          repomd.xml                      ######################################## [ 66%] Updating cache...               ######################################## [100%] Channels have no new packages. 3. Searching for packages Let us look at all packages containing the string client root@imx6qsabresd:~# smart search client* Loading cache... Updating cache...               ######################################## [100%] libice-dbg - ICE: Inter-Client Exchange library - Debugging files libice-dev - ICE: Inter-Client Exchange library - Development files libice-doc - ICE: Inter-Client Exchange library - Documentation files libice-staticdev - ICE: Inter-Client Exchange library - Development files (Static Libraries) libice6 - ICE: Inter-Client Exchange library libsm-dbg - SM: Session Management library - Debugging files libsm-dev - SM: Session Management library - Development files libsm-doc - SM: Session Management library - Documentation files libsm-staticdev - SM: Session Management library - Development files (Static Libraries) libsm6 - SM: Session Management library libx11-6 - Xlib: C Language X Interface library libx11-dbg - Xlib: C Language X Interface library - Debugging files libx11-dev - Xlib: C Language X Interface library - Development files libx11-doc - Xlib: C Language X Interface library - Documentation files libx11-locale - Xlib: C Language X Interface library libx11-staticdev - Xlib: C Language X Interface library - Development files (Static Libraries) libx11-xcb1 - Xlib: C Language X Interface library libxau-dbg - Xau: X Authority Database library - Debugging files libxau-dev - Xau: X Authority Database library - Development files libxau-doc - Xau: X Authority Database library - Documentation files libxau-staticdev - Xau: X Authority Database library - Development files (Static Libraries) libxau6 - Xau: X Authority Database library python-netclient - Python Internet Protocol clients xtrans-dbg - XTrans: X Transport library - Debugging files xtrans-dev - XTrans: X Transport library - Development files xtrans-doc - XTrans: X Transport library - Documentation files ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Adding openssh client to core-image minimal The core-image-minimal does not provide openssh client applications like ssh or scp. Let's add them on the host then update the target cache of packages and then install. Host Run bitbake to exercise all the tasks for packagegroup-core-ssh-openssh $ bitbake packagegroup-core-ssh-openssh ‍ After building a package individually, always update the package-index $ bitbake package-index ‍ Target Run smart to update the local cache which will pickup the new packages from the bake above. root@imx6qsabresd:~# smart update Loading cache... Updating cache...               ######################################## [100%] Fetching information for 'all'...                                              -> http://SERVERIP/imx6qsd/all/repodata/repomd.xml                           repomd.xml                      ######################################## [ 16%] -> http://SERVERIP/imx6qsd/all/repodata/primary.xml.gz                       primary.xml.gz                  ######################################## [ 25%] -> http://SERVERIP/imx6qsd/all/repodata/filelists.xml.gz                     filelists.xml.gz                ######################################## [ 33%]                                                                                Fetching information for 'imx6qsabresd'... -> http://SERVERIP/imx6qsd/imx6qsabresd/repodata/repomd.xml                  repomd.xml                      ######################################## [ 50%] -> http://SERVERIP/imx6qsd/imx6qsabresd/repodata/primary.xml.gz              -> http://SERVERIP/imx6qsd/imx6qsabresd/repodata/filelists.xml.gz            filelists.xml.gz                ######################################## [ 58%] primary.xml.gz                  ######################################## [ 66%]                                                                                Fetching information for 'cortexa9hf_vfp_neon'... -> http://SERVERIP/imx6qsd/cortexa9hf_vfp_neon/repodata/repomd.xml           repomd.xml                      ######################################## [ 83%] -> http://SERVERIP/imx6qsd/cortexa9hf_vfp_neon/repodata/primary.xml.gz       primary.xml.gz                  ######################################## [ 91%] -> http://SERVERIP/imx6qsd/cortexa9hf_vfp_neon/repodata/filelists.xml.gz     filelists.xml.gz                ######################################## [100%] Updating cache...               ######################################## [100%] Channels have 15 new packages. Saving cache... ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Examine information about local cache: root@imx6qsabresd:~# smart stats Loading cache... Updating cache...               ######################################## [100%] Installed Packages: 80 Total Packages: 3586 Total Provides: 6580 Total Requires: 1611 Total Upgrades: 3565 Total Conflicts: 25 ‍‍‍‍‍‍‍‍‍‍‍ See what ssh packages are now available: root@imx6qsabresd:~# smart search *ssh* Loading cache... Updating cache...               ######################################## [100%] openssh - Secure rlogin/rsh/rcp/telnet replacement openssh-dbg - Secure rlogin/rsh/rcp/telnet replacement - Debugging files openssh-dev - Secure rlogin/rsh/rcp/telnet replacement - Development files openssh-doc - Secure rlogin/rsh/rcp/telnet replacement - Documentation files openssh-keygen - Secure rlogin/rsh/rcp/telnet replacement openssh-misc - Secure rlogin/rsh/rcp/telnet replacement openssh-ptest - Secure rlogin/rsh/rcp/telnet replacement - Package test files openssh-scp - Secure rlogin/rsh/rcp/telnet replacement openssh-sftp - Secure rlogin/rsh/rcp/telnet replacement openssh-sftp-server - Secure rlogin/rsh/rcp/telnet replacement openssh-ssh - Secure rlogin/rsh/rcp/telnet replacement openssh-sshd - Secure rlogin/rsh/rcp/telnet replacement packagegroup-core-ssh-openssh - OpenSSH SSH client/server packagegroup-core-ssh-openssh-dbg - OpenSSH SSH client/server - Debugging files packagegroup-core-ssh-openssh-dev - OpenSSH SSH client/server - Development files ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Install openssh root@imx6qsabresd:~# smart install openssh Loading cache... Updating cache...               ######################################## [100%] Computing transaction... Installing packages (9):   openssh-6.7p1-r0@cortexa9hf_vfp_neon                                            openssh-keygen-6.7p1-r0@cortexa9hf_vfp_neon                                     openssh-scp-6.7p1-r0@cortexa9hf_vfp_neon                                        openssh-ssh-6.7p1-r0@cortexa9hf_vfp_neon                                        openssh-sshd-6.7p1-r0@cortexa9hf_vfp_neon                                       shadow-4.2.1-r0@cortexa9hf_vfp_neon                                             shadow-base-4.2.1-r0@cortexa9hf_vfp_neon                                        shadow-securetty-4.2.1-r3@imx6qsabresd                                          util-linux-sulogin-2.25.2-r1@cortexa9hf_vfp_neon                              1.4MB of package files are needed. 3.2MB will be used. Confirm changes? (Y/n): y Fetching packages...                                                           -> http://SERVERIP/imx6qsd/.../openssh-6.7p1-r0.cortexa9hf_vfp_neon.rpm      -> http://SERVERIP/imx6qsd/.../shadow-securetty-4.2.1-r3.imx6qsabresd.rpm    shadow-securetty-4.2.1-r3.imx.. ######################################## [ 11%] -> http://SERVERIP/imx6qsd/.../openssh-scp-6.7p1-r0.cortexa9hf_vfp_neon.rpm openssh-scp-6.7p1-r0.cortexa9.. ######################################## [ 22%] openssh-6.7p1-r0.cortexa9hf_v.. ######################################## [ 33%] -> http://SERVERIP/imx6qsd/.../openssh-sshd-6.7p1-r0.cortexa9hf_vfp_neon.rpm openssh-sshd-6.7p1-r0.cortexa.. ######################################## [ 44%] -> http://SERVERIP/imx6qsd/.../shadow-4.2.1-r0.cortexa9hf_vfp_neon.rpm       -> http://SERVERIP/imx6qsd/.../openssh-ssh-6.7p1-r0.cortexa9hf_vfp_neon.rpm openssh-ssh-6.7p1-r0.cortexa9.. ######################################## [ 55%] -> http://SERVERIP/imx6qsd/.../shadow-base-4.2.1-r0.cortexa9hf_vfp_neon.rpm shadow-base-4.2.1-r0.cortexa9.. ######################################## [ 66%] shadow-4.2.1-r0.cortexa9hf_vf.. ######################################## [ 77%] -> http://SERVERIP/.../util-linux-sulogin-2.25.2-r1.cortexa9hf_vfp_neon.rpm util-linux-sulogin-2.25.2-r1... ######################################## [ 88%] -> http://SERVERIP/.../openssh-keygen-6.7p1-r0.cortexa9hf_vfp_neon.rpm       openssh-keygen-6.7p1-r0.corte.. ######################################## [100%]                                                                                Committing transaction... Preparing...                    ######################################## [  0%]    1:Installing openssh-ssh     ######################################## [ 11%] Output from openssh-ssh-6.7p1-r0@cortexa9hf_vfp_neon:                          update-alternatives: Linking /usr/bin/ssh to /usr/bin/ssh.openssh                 2:Installing openssh-scp     ######################################## [ 22%] Output from openssh-scp-6.7p1-r0@cortexa9hf_vfp_neon:                          update-alternatives: Linking /usr/bin/scp to /usr/bin/scp.openssh                 3:Installing shadow-secure.. ######################################## [ 33%]    4:Installing shadow-base     ######################################## [ 44%] Output from shadow-base-4.2.1-r0@cortexa9hf_vfp_neon:                          update-alternatives: Linking /usr/bin/newgrp to /usr/bin/newgrp.shadow         update-alternatives: Linking /usr/bin/groups to /usr/bin/groups.shadow update-alternatives: Linking /bin/login to /bin/login.shadow update-alternatives: Linking /bin/su to /bin/su.shadow    5:Installing util-linux-su.. ######################################## [ 55%] Output from util-linux-sulogin-2.25.2-r1@cortexa9hf_vfp_neon:                  update-alternatives: Linking /sbin/sulogin to /sbin/sulogin.util-linux            6:Installing openssh-keygen  ######################################## [ 66%]    7:Installing shadow          ######################################## [ 77%] Output from shadow-4.2.1-r0@cortexa9hf_vfp_neon:                               update-alternatives: Linking /usr/bin/passwd to /usr/bin/passwd.shadow         update-alternatives: Linking /usr/bin/chfn to /usr/bin/chfn.shadow update-alternatives: Linking /usr/bin/chsh to /usr/bin/chsh.shadow update-alternatives: Linking /usr/sbin/chpasswd to /usr/sbin/chpasswd.shadow update-alternatives: Linking /sbin/vipw to /sbin/vipw.shadow update-alternatives: Linking /sbin/vigr to /sbin/vigr.shadow Output from openssh-sshd-6.7p1-r0@cortexa9hf_vfp_neon:                         Removing any system startup links for sshd ...                                Running useradd commands... NOTE: Performing useradd with [ --system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd] and 10 times of retry    8:Installing openssh-sshd    ######################################## [ 88%] Adding system startup for /etc/init.d/sshd.                                   Starting OpenBSD Secure Shell server: sshd   generating ssh RSA key...   generating ssh ECDSA key...   generating ssh DSA key...   generating ssh ED25519 key... done.    9:Installing openssh         ######################################## [100%] ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Check for the scp command: root@imx6qsabresd:~# which scp /usr/bin/scp ‍‍ Summary To add a new package on the server host, run bitbake <recipe> then bitbake package-index to update the rpm tracking information. On the target board, run smart update and then smart install <package>. Use smart search <regular expression string> to hunt for a package to install.
View full article
How to Test Yocto for i.MX6 i.MX Yocto Project: How Can I Collaborate on the Freescale Yocto Project? i.MX Yocto Project: How Can I Build the Freescale Yocto Images using bitbake? i.MX Yocto Project: How Can I Build the Freescale Yocto Images using hob? i.MX Yocto Project: What Can I Do if I Run Into a Compilation Error? i.MX Yocto Project: Are There Prebuilt Images Available? i.MX Yocto Project: How Can I Quicken the Compilation? i.MX Yocto Project: how can I conserve disk space during builds? i.MX Yocto Project: How do I add an existing package to an image? i.MX Yocto Project: Can I use a virtual machine to build? i.MX Yocto Project: How can I build an image with (latest) mainline kernel? i.MX Yocto Project: How can I (quickly) modify a package' source code and test it? i.MX Yocto Project: How can I find out the packages include on an image? i.MX Yocto Project: How can I compile the kernel manually? i.MX Yocto Project: How can I patch the kernel? i.MX Yocto Proyect: How can I create a new Layer? i.MX Yocto Project: How can I contribute to the community? i.MX Yocto Project: Where can I see current  BSP issues? i.MX Yocto Project: Where are the mainstream repositories hosted? Tutorials: Yocto Training - HOME http://www.slideshare.net/OtavioSalvador/yocto-training-in-english - Great tutorial created by the Community's maintainer (there is also a Portuguese version) i.MX Yocto Project: Freescale Yocto Project Tutorial - It covers some basic developing tasks Others: Useful bitbake commands i.MX Yocto Project: ltib versus bitbake
View full article
NFS and TFTP Boot 1  Introduction This document explains the required steps to boot Linux Kernel and mount a NFS on your target. 2 Requirements A functional Yocto environment (Images generated for your target). Your preferred target.  (SABRE-AI, SABRE-SD) 1 Ethernet Cable 1 Micro USB cable USB to Serial converter depending on your target features. 3 Yocto Folders When you develop your Linux kernel and Root File System with Yocto, different folders are created and each folder contains different information. {YOCTO_BUILD_DIR}/tmp/deploy/images/ {TARGET}/  This directory contains the output images, like Kernel, U-Boot and the File System in a tar file. This directory will be used to fetch the kernel and device tree blob file only. {YOCTO_BUILD_DIR}/tmp/sysroot/{TARGET}/  This folder contains all the development files used to generate our Yocto images. Here we can find all the dynamic libraries and headers used for development. This folder is used as parameter for cross-compilation. {YOCTO_BUILD_DIR}/tmp/work/{TARGET}-poky-linux-gnueabi/{IMAGE}/1.0-r0/rootfs This folder contains the uncompressed rootfs of our target. This folder will be used as entry in the host NFS server. 4 IP Address and Network Setup This section covers how to boot Linux that mounts the root file system (RFS) over the network. Remember that in this scenario, the RFS exists on the laptop hard drive, and the kernel that runs on the target board will mount the RFS over Ethernet. This setup is used for developing and debugging Linux applications. It allows for applications to be loaded and run without having to re-boot the kernel each time. First some packages on your host need to be installed: # apt-get install xinetd tftp tftpd isc-dhcp-server nfs-kernel-server portmap For development, it is best to have a static IP setup for the board and Linux environment. This way U-Boot options won’t change between reboots as you get a new IP address as you would using DHCP. 4.1 Linux Host Setup This section describes how to setup a static IP in your Linux host environment. This is not required but will allow the IP address of your virtual host system to remain unchanged. Because u-boot parameters use specific IP addresses, this step is recommended because u-boot parameters may need to be updated in the future to match your virtual IP address if it should ever change. You could take the existing IP address and make it static, but you would lose the Internet connection in your virtual machine. Instead we want to make use of the virtual environment and add a secondary Ethernet port that is tied to your wired Internet connection, while keeping the original Ethernet port which can use the wireless connection on your laptop. In the Linux virtual environment, type sudo ifconfig and note that you should have one Ethernet adapter (eth0). The other item listed (lo) is a virtual port for loopback mode. Shutdown the Linux virtual machine In VMware Player, go to Edit virtual machine settings. And add a Bridged Network Adapter, choosing only the wired Ethernet port. And click on OK.  See below for example: Start up the Linux VM. Open a terminal and type: sudo ifconfig You should have a new entry (eth1). This is the new Ethernet port you created in the virtual machine, and it is bridged to your wired Ethernet port. This is the port we want to make a static IP address. To set eth1 to a static IP, open /etc/nework/interfaces sudo gedit /etc/network/interfaces Add the following to set eth1 to your desired IP address. auto eth1 iface eth1 inet static address 192.168.0.100      <-- Your HOST IP netmask 255.255.255.0 gateway 192.168.0.1 Save the file Restart eth1 sudo ifdown eth1 sudo ifup eth1 4.2 Target Setup We need to setup the network IP address of our target. Power On the board and hit a key to stop the U-Boot from continuing. Set the below parameters: setenv serverip 192.168.0.100 <-- This must be your Host IP address setenv ipaddr 192.168.1.102  <-- This must be your target IP addres setenv ip_dyn no The path where the rootfs is placed in our host has to be indicated in the U-Boot: setenv nfsroot /home/usuario/fsl-release-bsp/buildimx6q/tmp/work/imx6qsabresd-poky-linux-gnueabi/fsl-image-gui/1.0-r0/rootfs setenv image zImage setenv fdt_file uImage-imx6q-sabresd.dtb setenv netargs 'setenv bootargs console=${console},${baudrate} ${smp} root=/dev/nfs ip={ipaddr} nfsroot=${serverip}:${nfsroot},v3,tcp' 4.3 TFTP and NFS Configuration Now configure the Trivial File Transfer Protocol (TFTP) server and Networked File System (NFS) server. This is how U-Boot will download (via TFTP) the Linux kernel, and then the kernel will mount (via NFS) its root file system on the computer hard drive. 4.3.1 TFTP Setup Next setup the TFTP server. The following commands show that we are logged in as root (#). If you are not root ($) then precede each instruction with “sudo”. Edit /etc/xinetd.conf gedit /etc/xinetd.conf Add and save the following lines in the file service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s {YOCTO_BUILD_DIR}/tmp/deploy/images/ {TARGET}/  disable = no } Notice that {YOCTO_BUILD_DIR}/tmp/deploy/images/ {TARGET}/   has to be written as absolute path. Restart the xinetd service service xinetd restart Test that TFTP is working tftp localhost tftp> get {An Image found in the tftp folder} tftp> quit 4.3.2 NFS Setup Edit the /etc/exports file gedit /etc/exports Add the path where the rootfs is found in your host. {YOCTO_BUILD_DIR}/tmp/work/{TARGET}-poky-linux-gnueabi/{IMAGE}/1.0-r0/rootfs *(rw,no_root_squash)                                                                 NOTE:      {YOCTO_BUILD_DIR}/tmp/work/{TARGET}-poky-linux-gnueabi/{IMAGE}/1.0-r0/rootfs may work most of the times,        but it is recommended to untar the {IMAGE}.bz2 in an exported           folder keeping using sudoand keeping the chmod of each file.     3. Restart the NFS service sudo service portmap stop sudo service nfs-kernel-server stop sudo service portmap start sudo service nfs-kernel-server start 5 Host Final Configuration and Booting Linux over NFS In your host, under the images folder {YOCTO_BUILD_DIR}/tmp/deploy/images/ {TARGET}/ create the below links ln -s zImage_imx_v7_defconfig zImage      2. In U-boot type the below command:                run netboot After a pair of minutes you should get a Linux working system on your target.
View full article
Build the tool chain image. It generates the toolchain that will be installed on your host machine and used to build any source code: $ bitbake meta-toolchain It does take some time to build. Why to create a toolchain? Yocto is not intended to be used to package development. Yocto is a linux distribution creator. It´s intended to be a image builder, a rootfs creator. (please, see more about "what is yocto" here and here) So, yocto itself should not be used to "develop" a new package. Although, Yocto can help creating a environment for development like meta-toolchain or Eclipse ADT. Go HOME Go Task #6 - Customize the image
View full article
There are two ways: 1. BitBake. Append the package into the IMAGE_INSTALL variable. But In case you want the package in every image,  add a line to your conf/local.conf file IMAGE_INSTALL_append = " package"           Make sure to include the space BEFORE the package name. You can add other packages, just place spaces in-between. In case you want the package in a particular image, e.g. fsl-image-gui,, add it on meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb IMAGE_INSTALL += " \     ${SOC_IMAGE_INSTALL} \     cpufrequtils \     nano \     packagegroup-fsl-gstreamer \     packagegroup-fsl-tools-testapps \     packagegroup-fsl-tools-benchmark \     packagegroup-qt-in-use-demos \     qt4-plugin-phonon-backend-gstreamer \     qt4-demos \     qt4-examples \     fsl-gui-extrafiles \     package \     " 2. Hob. Due to its graphical nature, adding more packages to a base image is easier than the bitbake way. Run the hob app under the build folder, select your machine and image, then edit the later (click on the Edit image button) In case the package is not available, you need to create it. As a starting point take a look at this example. In case you consider is good enough to be present on the mainstream repos, send the patch to the meta-freescale mailing list.
View full article
Synchronize your source code Create your local branch Why should I create a local branch? Choose your board Start to build Synchronize your source code Source code you have is one week old now. So, first step is synchronize it. $ repo sync‍‍‍ Create your local branch $ repo start <new branch name> --all‍‍‍ Why should I create a local branch? If you change *any* source code (for choosing another preferred kernel, for example) and want to sync again, or use master instead of dylan, you may be able to rebase or sync your source code, even with changes. Or you found a bug, fixed that, and want to send a patch to community. Example of a system with 2 branches: zeus and new_feature (the asterisk shows the current branch)    $ repo branches * new_feature | in all projects zeus | in all projects‍‍‍ Choose your board The following command display the usage, with a list of all supported machines, all supported community distros and examples of Poky's distro: $ source setup-environment build‍ Usage: MACHINE=<machine> DISTRO=<distro> source setup-environment <build-dir> Usage: source setup-environment <build-dir> <machine> machine name <distro> distro name <build-dir> build directory The first usage is for creating a new build directory. In this case, the script creates the build directory <build-dir>, configures it for the specified <machine> and <distro>, and prepares the calling shell for running bitbake on the build directory. The second usage is for using an existing build directory. In this case, the script prepares the calling shell for running bitbake on the build directory <build-dir>. The build directory configuration is unchanged. Supported machines: apalis-imx6 ccimx6ulsbcexpress ccimx6ulsbcpro cgtqmx6 cm-fx6 colibri-imx6 colibri-imx6ull colibri-imx7 colibri-vf cubox-i imx233-olinuxino-maxi imx233-olinuxino-micro imx233-olinuxino-mini imx233-olinuxino-nano imx6dl-riotboard imx6qdl-variscite-som imx6q-dms-ba16 imx6qsabrelite imx6sl-warp imx6ul-pico imx7d-pico imx7s-warp m28evk m53evk nitrogen6sx nitrogen6x nitrogen6x-lite nitrogen7 nitrogen8m pcm052 tx6q-10x0 tx6q-11x0 tx6s-8034 tx6s-8035 tx6u-8033 tx6u-80x0 tx6u-81x0 ventana wandboard imx23evk imx25pdk imx28evk imx51evk imx53ard imx53qsb imx6qdlsabreauto imx6qdlsabresd imx6slevk imx6sllevk imx6sxsabreauto imx6sxsabresd imx6ulevk imx6ullevk imx7dsabresd imx7ulpevk imx8mmevk imx8mqevk imx8qmmek imx8qxpmek ls1012afrwy ls1012ardb ls1021atwr ls1043ardb ls1046ardb ls1088ardb ls1088ardb-pb ls2080ardb ls2088ardb lx2160ardb mpc8548cds p1020rdb p2020rdb p2041rdb p3041ds p4080ds p5040ds-64b p5040ds t1024rdb-64b t1024rdb t1042d4rdb-64b t1042d4rdb t2080rdb-64b t2080rdb t4240rdb-64b t4240rdb Supported Freescale's distros: fslc-framebuffer fslc-wayland fslc-x11 fslc-xwayland Available Poky's distros: poky-altcfg poky-bleeding poky poky-tiny Examples: - To create a new Yocto build directory: $ MACHINE=imx6qdlsabresd DISTRO=fslc-framebuffer source setup-environment build - To use an existing Yocto build directory: $ source setup-environment build ERROR: You must set MACHINE when creating a new build directory. ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ An example of command line to setup the build environment is (read and answer if you accept EULA or not): MACHINE=imx8mmevk DISTRO=fslc-wayland source setup-environment build‍ (...) Do you accept the EULA you just read? (y/n) y EULA has been accepted. Welcome to Freescale Community BSP The Yocto Project has extensive documentation about OE including a reference manual which can be found at: http://yoctoproject.org/documentation For more information about OpenEmbedded see their website: http://www.openembedded.org/ You can now run 'bitbake <target>' Common targets are: core-image-minimal meta-toolchain meta-toolchain-sdk adt-installer meta-ide-support Your build environment has been configured with: MACHINE=imx8mmevk SDKMACHINE=i686 DISTRO=fslc-wayland EULA= ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Now, you are in new created build directory. Your default build/conf/local.conf file can looks like: MACHINE ??= 'imx8mmevk' DISTRO ?= 'fslc-wayland' PACKAGE_CLASSES ?= 'package_rpm' EXTRA_IMAGE_FEATURES ?= "debug-tweaks" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop" BB_DISKMON_DIRS ??= "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ STOPTASKS,/tmp,100M,100K \ ABORT,${TMPDIR},100M,1K \ ABORT,${DL_DIR},100M,1K \ ABORT,${SSTATE_DIR},100M,1K \ ABORT,/tmp,10M,1K" PACKAGECONFIG_append_pn-qemu-system-native = " sdl" CONF_VERSION = "1" DL_DIR ?= "${BSPDIR}/downloads/" ACCEPT_FSL_EULA = "1"‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ For the current list of supported board, take a look on FSL Community BSP Release Notes 2.4 (Draft document) documentation Or, see the FSL Community BSP  Release Notes Start to build There are a huge list of images available. Some images includes more packages than others, you can see a list of FSL Community BSP images with description here. The list of supported images from Yocto Project (with description) is here. When an image has more packages included, it takes longer to build. Another way to list all the images you have installed in your metadata is: $ find ../sources -name *image*‍‍   For the goal of this training, any image is good, but a suggestion is presented in next command line: (make sure you are still in build directory) $ cd build $ bitbake core-image-base‍‍‍‍‍‍‍‍ Note (Sept2019): Required disk space for build image is ~31GB Go to Yocto Training - HOME Go to Task #1 - Download the source code Go to Task #3 - The build result
View full article
You already know. Your source code is one week old now, so please, update it (or should I say 'sync' it?)! Get used to update your BSP layers. Recipe Is the name of file that determinates how a package should act. For example, the version, where it is the mainstream repo, how to build, install, link. etc. Kernel For meta-fsl-arm the kernel recipes are under meta-fsl-arm/recipes-kernel/linux (take a look here meta-fsl-arm - Layer containing Freescale ARM hardware support metadata) For meta-fsl-arm, there are 3 kernel recipes: linux-fslc_3.8.bb  --> kernel mainline (from kernel.org) linux-imx_2.6.35.3.bb  --> kernel from FSL, for imx5x and imx28 linux-imx_3.0.35.bb --> kernel from FSL for imx6 Take the linux-imx for imx6 as an example meta-fsl-arm - Layer containing Freescale ARM hardware support metadata The recipe determinates: what´s the compatible machine for this linux version (mx6) what´s the commit ID for the head of this code (SRCREV) (MX6DL and MX6SL have different source code) what´s the patches for the mx6 boards (SRC_URI). In order to see where the source code is cloned from, you need to go to .inc file meta-fsl-arm - Layer containing Freescale ARM hardware support metadata SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git \            file://defconfig \ " it´s from git.freescale.com. In addition, there is a defconfig file added on SRC_URI. There is a defconfig file for every board, on every Linux revision. Some defconfigs are shared for more than one board (for example, every mx6 board), and some Linux version are not compatible for some boards (for example, imx53 is only compatible with 2.6.35). During a bitbake linux-imx, a temp folder will be created under build/tmp/armv7-imx6....../linux-imx, with code from git, patches and defconfig. Then bitbake takes that defconfig and configure the kernel, built it, and deploy it. So, in order to change the kernel configuration (make menuconfig) you must replace your defconfig file from meta-fsl-arm/recipes-kernel/linux/linux-imx-3.0.35/mx6 How to change kernel configuration Create the new defconfig Copy it to meta-fsl-arm/recipes-kernel/linux/linux-imx-3.0.35/mx6 (or the right folder for your board/kernel) $ bitbake -c cleansstate linux-imx $ bitbake linux-imx (if you want only the kernel image) $ bitbake fsl-image-gui (if you want to generate a complete image using the new kernel) How to make menuconfig with yocto $ bitbake -c menuconfig linux-imx will generate a config file on tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r33.10/git/.config The complete step by step to change the kernel configuration $ bitbake -c menuconfig linux-imx (change anything) $ cp tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r33.10/git/.config ../sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.0.35/mx6/defconfig $ bitbake -c cleansstate linux-imx $ bitbake fsl-image-gui The uImage will be under tmp/deploy/image In order to replace only uImage binary into one ready sdcard: $sudo cp tmp/deploy/image/uImage-imx6-XXX.bin /media/user/Boot imx6/uImage Kernel Mainline - kernel.org In order to use kernel mainline instead of linux-imx. Please add the following code to your conf/local.conf PREFERRED_PROVIDER_virtual/kernel = "linux-fslc" Make sure the desired board is supported by kernel.org. In order to take and build kernel mainline manually, please see https://community.freescale.com/docs/DOC-95017 Final points It´s not a simple task, I know. Yocto is not the best tool for use to develop and customize kernel during development stage. It is easier to use an external toolchain (bitbake meta-toolchain). Once the kernel development, or customization, is done, the changes can be integrated in the Yocto so it is managed for production use. I like to have a copy of kernel source code cloned on my machine directly from git.freescale.com, then I can re-configure it, rebuild it, apply some patches, make changes, and build it manually - any way I want it. So, I only change kernel using yocto when I know the bug and I know how to fix it, and I have the patch. (and this is the way I like to work) Although this is how to configure (and even patch) kernel (if you want to patch kernel, follow the example in the recipes) If you face any error, please, let me know. I tested the steps and it worked, but I´m using an Ubuntu machine, not a virtual machine (and I´m not sure how -c menuconfig will act in a virtual machine). Go to Yocto Training - HOME Go to Task #4 - Deploy and test
View full article
This document shows the necessary steps to configure the Eclipse IDE for development of Yocto applications. Requirements 1) Linux machine. Ubuntu 12.4 or higher is recommended. 2) Yocto Freescale BSP Release or Freescale Community BSP. For this example we'll use the Freescale BSP Release L3.14.28 but you may use the FSL Community BSP. - Freescale Community BSP FSL Community BSP - Freescale BSP Release  Documentation L3.14.28 (login required) https://www.freescale.com/webapp/Download?colCode=L3.14.28_1.0.0_LINUX_DOCS&location=null&fpsp=1&WT_TYPE=Supporting%20In… 3) Poky Meta Toolchain (Poky 1.7 / L3.14.28 for our example but you should use the toolchain that corresponds to the BSP that will be used) For information on how to extract and install the meta toolchain please follow the steps on the next document. Task #7 - Create the toolchain 4) Eclipse Luna. We’ll use the Luna SR2 (4.4.2) version of the Eclipse IDE. You may find it on the following website: http://www.eclipse.org/downloads/packages/release/luna/sr2 Look for the “Eclipse IDE for C/C++ Developers”, which contains the Eclipse Platform, the Java Development Tools (JDT), and the Plug-in Development Environment. Once you have downloaded the tarball extract it. The following command unpacks and installs the downloaded Eclipse IDE tarball into a clean directory using the default name eclipse:      $ cd ~      $ tar -xzvf ~/Downloads/eclipse-cpp-luna-SR2-linux-gtk-x86_64.tar.gz Configuring the Eclipse IDE Once with Eclipse Luna installed you may run the Eclipse IDE with the following command: $ cd eclipse $ ./eclipse Select a new workspace. Chose "Install New Software" from the "Help" pull-down menu. Select the "Luna - http://download.eclipse.org/releases/luna" Find and expand the Linux Tools option and select: Linux Tools LTTng Tracer Control Linux Tools LTTng Userspace Analysis LTTng Kernel Analysis If some of these options are not listed it means that they are already installed. (To change this you may uncheck the Hide items that are already installed box) Find and expand the Mobile and Device Development and select the following:   C/C++ Remote Launch (Requires RSE Remote System Explorer)   Remote System Explorer End-user Runtime   Remote System Explorer User Actions   Target Management Terminal (Core SDK)   TCF Remote System Explorer add-in   TCF Target Explorer If some of these options are not listed it means that they are already installed. (To change this you may uncheck the Hide items that are already installed box) Expand Programming Languages and select:   C/C++ Autotools Support   C/C++ Development Tools Chose Next and accept the necessary EULA Clck on the Finish button. The selected packages will be downloaded and installed. You will be asked to restart Eclipse IDE to finish the installation. Adding the Yocto Plug-in to the Eclipse IDE Next step is to install the Eclipse Yocto Plug-in into the Eclipse IDE. We'll show how to install the pre-built plug in. Start the Eclipse IDE In Eclipse, select "Install new Software" from the "Help" menu Click the "Add..." button to add a repository and enter: Name: Any name, we will use Yocto Fio Location: http://downloads.yoctoproject.org/releases/eclipse-plugin/1.8/luna Click "Ok" and then chose this new repository on the "Work with" drop-down menu and select the following plug-ins from the list:   Yocto Project ADT Plug-in   Yocto Project Bitbake Commander Plug-in   Yocto Project Documentation plug-in Install these plug-ins and click "OK" when prompted about installing software that contains unsigned content. You may be asked to restart the Eclipse IDE. Configuring the Eclipse Yocto Plug-in With all the necessary packages installed we'll now configure the Eclipse Yocto Plug-in. In this steps we will configure the Cross Compiler options and the Target options. These will then be used as default for your projects from within your working workspace. Select "Preferences" from the "Window" menu. Click on Yocto Project ADT from the left options and then under Cross Compiler Options select the Standalone pre-built toolchain radio button. We need to point to the Toolchain Root location of our installed toolchain. This is covered on the following community document: Task #7 - Create the toolchain In this case we'll be using poky 1.7 tollchain which has the following default location: /opt/poky/1.7 As fo the Sysroot Location this would correspond to your build directory sysroot folder, which is located on the following path: <YOCTO_BSP_DIR>/<BUILD_DIR>/tmp/sysroots/<MACHINE> In our case our Tartget architecture would be the Cortex-A9, which correspond to the i.MX6 and which is also the only option installed on the chosen directory. For Target Options we would be using the actual HW in order to test our application so keep the External HW option selected. Creating a Hello World Project We are now ready to create our project. Just to test our configuration we'll create a Hello World project.We can do so by selecting File->New->C Project or C++ Project We must then select a Project name and in project type we can chose either an Empty project or as in our case a Hello World Project, all this under the Yocto Project ADT Autotools Project folder. We will have the GNU Autotools Tolchain selected. The next screen will show some of the Basic Properties for our project, including the GNU license. Fill these as required. You may clock on Finish at this point. We should see that the HelloWorld project was created. We should right-click on the project folder and then chose Reconfigure Project in order to fill the necessary libraries. After this is completed we can build our project either by choosing the hammer icon or in the Build Project option inside the Project menu. We can look for correct competition or any errors or warning on the Console tab. Further Application Development After this basic setup you may work on more complex examples like a GPU and a Gstreamer Application examples on the following nicely written document: Yocto Application Development Using Eclipse IDE
View full article
Update The source code is one week old now, so please, update it! $ repo sync Images - the result of a bitbake Example of a content after bitbake build_mx6/tmp/deploy/images: fsl-image-gui-imx6qsabresd-20130505174618.rootfs.ext3 fsl-image-gui-imx6qsabresd-20130505174618.rootfs.sdcard fsl-image-gui-imx6qsabresd-20130505174618.rootfs.tar.bz2 fsl-image-gui-imx6qsabresd-20130508162511.rootfs.ext3 fsl-image-gui-imx6qsabresd-20130508162511.rootfs.sdcard fsl-image-gui-imx6qsabresd-20130508162511.rootfs.tar.bz2 fsl-image-gui-imx6qsabresd.ext3 fsl-image-gui-imx6qsabresd.sdcard fsl-image-gui-imx6qsabresd.tar.bz2 modules-3.0.35-1.1.0+yocto+g0596856-r32.10-imx6qsabresd.tgz README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt u-boot.imx u-boot-imx6qsabresd.imx u-boot-imx6qsabresd-v2013.04-r3.imx* uImage uImage-3.0.35-r32.10-imx6qsabresd-20130505174618.bin uImage-imx6qsabresd.bin Get used with generated images. Understand which file is a symbolic link and which one is the image in fact. Symbolic link will always point to latest image. sdcard image Take a look how sdcard is generated here meta-fsl-arm - Layer containing Freescale ARM hardware support metadata 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 Use IMAGE_OVERHEAD_FACTOR to add more space Please, go to original file in order to understand the disk layout. It´s basically some initial space for u-boot. One partition for uImage. One partition for rootfs. The total sdcard size will be calculate for every image, if you want to add more empty space inside generated sdcard, use IMAGE_OVERHEAD_FACTOR. Deploy Deploy the sdcard image: $ sudo dd if=fsl-image-gui-imx6qsabresd.sdcard of=/dev/sdX bs=1M Or, deploy the ext3 rootfs $ sudo dd if=fsl-image-gui-imx6qsabresd.ext3 of=/dev/sdX2 bs=1M Or deploy only the tar.bz rootfs $ sudo mount /dev/sdX2 /mnt/card $ sudo tar xf imagename-imx53qsb.tar.bz2 -C /mnt/card In order to deploy only kernel $ sudo cp uImage-3.0.35-r32.10-imx6qsabresd-20130505174618.bin /media/Boot In order to  deploy only u-boot $ sudo dd if=u-boot-imx6qsabresd-v2012.10-r3.imx of=/dev/sdX bs=512 seek=2 If using HDMI please, modify u-boot environment arguments: setenv mmcargs "setenv bootargs console=${console},${baudrate} root=${mmcroot} rootwait rw video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24" This is the how sdcards are made by meta-fsl-arm. Of course you can use your own. But double check the u-boot bootenv. Plug your sdcard and let the board boot To login: root Go to HOME Go to Task #3 - The build result Go to Task#5 - kernel
View full article
The Linux Kernel is just another recipe for Yocto, so learning to patch it you learn to patch any other package. In the other hand, Yocto **should not** be used for package development, but in those rare cases follow the below steps. It is assumed that you have already build the package you want to patch. 1. Create the patch or patches. In this example we are patching the Linux kernel for [wandboard-dual](http://www.wandboard.org/) machine; in other words, the value of MACHINE on the `build/conf/local.conf` is `MACHINE ??= 'wandboard-dual'`. In case you already have the patches, make sure these can be nicely applied with the commands `git apply --check <PATCH_NAME>`, and jump this step build $ cd tmp/work/wandboard_dual-poky-linux-gnueabi/linux-wandboard/3.0.35-r0/git build $ # Edit any files you want to change build $ git add <modified file 1> <modified file 2> .. # Select the files you want to commit build $ git commit -s -m '<your commit's title>' # Create the commit build $ git format-patch -1 # Create the patch 2. Create a new layer (see document i.MX Yocto Proyect: How can I create a new Layer?) 3. On the new layer (e.g `meta-fsl-custom`) , create the corresponding subfolders and the `.bbfile` sources $ mkdir -p meta-fsl-custom/recipes-kernel/linux/linux-wandboard-3.0.35/ sources $ cat > meta-fsl-custom/recipes-kernel/linux/linux-wandboard_3.0.35.bbappend FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" SRC_URI += "file://0001-calibrate-Add-printk-example.patch" PRINC := "${@int(PRINC) + 1}" # SEE NOTE BELLOW ^d (The PRINC variable is not needed starting at Yocto 1.6 ([RFC] base.bbclass: Deprecate the PRINC logic - Patchwork)) 4. Move the patch to the new layer sources $ cp \ ../build/tmp/work/wandboard_dual-poky-linux-gnueabi/linux-wandboard/3.0.35-r0/git/0001-calibrate-Add-printk-example.patch \ meta-fsl-custom/recipes-kernel/linux/linux-wandboard-3.0.35 5. Setup the enviroment and clean previous package's build data (sstate) fsl-community-bsp $ . setup-environment build build $ bitbake -c cleansstate linux-wandboard 6. Compile and Deploy build $ bitbake -f -c compile linux-wandboard build $ bitbake -c deploy linux-wandboard 7. Insert the SD into your Host and copy the `uImage` into the first partition. Do not forget to unmount the partition before removing the card! build $ sudo cp tmp/deploy/images/uImage /media/Boot\ wandbo/ 8. Insert the SD into your board and test your change.
View full article
One of the most important features of Yocto is its ability to handle sublayers. To understand the sublayers please Yocto Project Development Manual Start creating meta-custom folder, then create the other folders. For example: meta-daiane/ ├── conf │   └── layer.conf ├── README ├── recipes-core │   └── helloworld │       ├── helloworld │       │   └── hello_world.c │       └── helloworld_0.0.bb └── recipes-daiane     └── images         └── dai-image-hello.bb It´s possible to create recipes-kernel and place there your defconfig, or create a bbappend to apply your patches to kernel, or even create a recipes-multimedia and place there custom application for gstreamer, for example. Here, the custom application example is a helloworld application. One important tip: Yocto see recipes name as PACKAGENAME_VERSION.bb, It means, yocto uses "_" (underline) to separate the package name from package version on a recipe file name. So, if you call your helloworld application as hello_world_1.0.bb Yocto will think your application is called "hello" and the version is something around "world_1.0" Please, be careful. LAYER.CONF This is the file that gives new layer live. Find the content of mine layer.conf below: # We have a conf and classes directory, add to BBPATH BBPATH .= ":${LAYERDIR}" # We have a packages directory, add to BBFILES BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \             ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "daiane" BBFILE_PATTERN_daiane := "^${LAYERDIR}/" BBFILE_PRIORITY_daiane = "4" As soon as the new custom layer is created, it MUST include it to  conf/bblayers.conf file. Please see the example: LCONF_VERSION = "6" BBPATH = "${TOPDIR}" BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" BBFILES ?= "" BBLAYERS = " \   ${BSPDIR}/sources/poky/meta \   ${BSPDIR}/sources/poky/meta-yocto \   \   ${BSPDIR}/sources/meta-openembedded/meta-oe \   \   ${BSPDIR}/sources/meta-fsl-arm \   ${BSPDIR}/sources/meta-fsl-arm-extra \   ${BSPDIR}/sources/meta-fsl-demos \   \   ${BSPDIR}/sources/meta-daiane \ " Please, find the tarball with sample meta layer attached to this document. It includes one image that will install the Hello World application: $ bitbake dai-image-hello When the content of image tar ball is extracted, hello_world was installed and it was for ARM: $ find -name hello* ./usr/bin/hello_world $ file ./usr/bin/hello_world ./usr/bin/hello_world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped Go to Yocto Training - HOME Go to Task #9 - How to add bad/ugly
View full article
The edit-compile-test loop is the quickest way so can test your changes. 1. Go to the package's source code folder and edit your files. 2. Compile that particular package, e.g. bitbake linux-imx -c compile -f 3. Deploy, e.g. bitbake linux-imx -c deploy 4. Insert the SD card into your host, and copy the Linux kernel into the the first partition sudo cp tmp/deploy/images/uImage /media/Boot 5. Insert the SD card into your board, boot and test your changes 6. In case you are satisfied with the results, you need to create a patch and add into the package's recipe. Check this document to execute this step.
View full article
Don't forget to update your source code. How to customize the image Enter <yocto>/source and find any image available: $ find -name *image*.bb ./meta-fsl-demos/recipes-fsl/images/fsl-image-gui-sdk.bb ./meta-fsl-demos/recipes-fsl/images/fsl-image-test.bb ./meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb ./meta-fsl-demos/recipes-qt/images/qt-in-use-image.bb ./meta-fsl-demos/recipes-qt/images/qte-in-use-image.bb ./meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-klibc-image.bb ./meta-openembedded/meta-initramfs/recipes-bsp/images/initramfs-kexecboot-image.bb ./meta-openembedded/meta-oe/recipes-support/imagemagick/imagemagick_6.7.5.bb ./meta-openembedded/meta-oe/recipes-multimedia/libsdl-image/libsdl-image_1.2.12.bb ./poky/meta-hob/recipes-core/images/hob-image.bb ./poky/meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb ./poky/meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb ./poky/meta/recipes-sato/images/core-image-sato-dev.bb ./poky/meta/recipes-sato/images/core-image-sato.bb ./poky/meta/recipes-sato/images/core-image-sato-sdk.bb ./poky/meta/recipes-qt/images/qt4e-demo-image.bb ./poky/meta/recipes-core/images/core-image-minimal.bb ./poky/meta/recipes-core/images/core-image-base.bb ./poky/meta/recipes-core/images/core-image-minimal-dev.bb ./poky/meta/recipes-core/images/core-image-minimal-initramfs.bb ./poky/meta/recipes-core/images/build-appliance-image.bb ./poky/meta/recipes-core/images/core-image-minimal-mtdutils.bb ./poky/meta/recipes-extended/images/core-image-lsb-sdk.bb ./poky/meta/recipes-extended/images/core-image-basic.bb ./poky/meta/recipes-extended/images/core-image-lsb-dev.bb ./poky/meta/recipes-extended/images/core-image-lsb.bb ./poky/meta/recipes-graphics/images/core-image-directfb.bb ./poky/meta/recipes-graphics/images/core-image-x11.bb ./poky/meta/recipes-graphics/images/core-image-clutter.bb ./poky/meta/recipes-graphics/xcb/xcb-util-image_0.3.9.bb ./poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2012.04.01.bb ./poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2011.06.bb ./poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2011.03.bb ./poky/meta/recipes-rt/images/core-image-rt-sdk.bb ./poky/meta/recipes-rt/images/core-image-rt.bb The above images (and packages with 'image' in file name) may be used as a base image, where new packages may be added, or example of new images. bitbake -s  shows any *available* package locally. Grep for the name of desired package: $ bitbake -s | grep calibrat calibrateproto                      :0.0+gitAUTOINC+1da6fd1e2c7a49648245c98481fabea8b9690a8c-r2             libxcalibrate                       :0.0+gitAUTOINC+209d83af61ed38a002c8096377deac292b3e396c-r0             xinput-calibrator                   :0.7.5+gitAUTOINC+c01c5af807cb4b0157b882ab07a893df9a810111-r1 For example, the package name is xinput-calibrator, in order to include this package this would be the string needed. The dependency tree is shown with $ bitbake -g fsl-image-test For the fsl-image-test. Or any other image Include the package name on the image definition file. $ cd meta-fsl-demos/ $ vim recipes-fsl/images/fsl-image-test.bb Include the package name on IMAGE_INSTALL list: IMAGE_INSTALL += " \     packagegroup-fsl-gstreamer \     packagegroup-fsl-tools-testapps \     packagegroup-fsl-tools-benchmark \ xinput-calibrator \ " In order to include the package on any image, configure conf/local.conf file the as the following: MACHINE ??= 'imx6qsabresd' DISTRO ?= 'poky' PACKAGE_CLASSES ?= "package_rpm" EXTRA_IMAGE_FEATURES = "debug-tweaks tools-sdk" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop" CONF_VERSION = "1" BB_NUMBER_THREADS = '8' PARALLEL_MAKE = '-j 8' ACCEPT_FSL_EULA = "1" CORE_IMAGE_EXTRA_INSTALL += "xinput-calibrator" And then $ bitbake fsl-image-test In order to add debug or native builder include on conf/local.conf: EXTRA_IMAGE_FEATURES += "tools-sdk" Every image created after that will include development tools. The same may be included in any bb image file. From Poky description: 'tools-sdk" - Adds development tools such as gcc, make, pkgconfig and so forth. "dev-pkg" - Adds -dev packages for all installed packages. This is useful if you want to develop against the libraries in the image. "tools-debug" - Adds debugging tools such as gdb and strace. If you don't like command line, or you prefer a window-like interface, you can take a look on HOB. See hob documentation https://www.yoctoproject.org/documentation/hob-manual See getting started video for hob Introducing Hob - YouTube Go to Yocto Training - HOME Go to Task #5 - Kernel
View full article
After bitbake meta-toolchain the script to install the toolchain package is located under $ ls tmp/deploy/sdk/poky-eglibc-x86_64-arm-toolchain-1.4.1.sh    tmp/deploy/sdk/poky-eglibc-x86_64-arm-toolchain-1.4.1.sh In order to install it: $ source poky-eglibc-x86_64-arm-toolchain-1.4.1.sh     [sudo] password for daiane:     Enter target directory for SDK (default: /opt/poky/1.4.1):     You are about to install the SDK to "/opt/poky/1.4.1". Proceed[Y/n]?y     Extracting SDK...done     Setting it up...done     SDK has been successfully set up and is ready to be used. Hello World $ source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi $ cd ~/test/ $ arm-poky-linux-gnueabi-gcc helloworld.c $ ls a.out                                                 helloworld.c                           $ ./a.out -bash: ./a.out: cannot execute binary file $ file a.out a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped Kernel $ source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi $ cd linux-2.6-imx $ git checkout remotes/origin/imx_3.0.35 $ export ARCH=arm $ export CROSS_COMPILE=$TARGET_PREFIX $ unset LDFLAGS $ make imx6_defconfig $ make uImage Make sure to have mkimage available on bin patch (if using mkimage from u-boot export its patch) Or, download the ubuntu pachage: sudo apt-get install uboot-mkimage UPDATE You may find the following error:   OBJCOPY arch/arm/boot/zImage   Kernel: arch/arm/boot/zImage is ready multiple (or no) load addresses: This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage make[1]: *** [arch/arm/boot/uImage] Error 1 make: *** [uImage] Error 2 This is regarding a missing LOADADDR for mkimage to use to generate uImage with the right offset to be placed in the right LOADADDR. The address value is dependent on your hardware! And it is different depending on imx6 variations. So please be aware regarding what is your right value. If the machine you are using is supported in yocto project/meta-fsl-arm, for example, you can find the value related with your board in the file conf/machine/include/imx-base.inc or online here meta-fsl-arm - Layer containing Freescale ARM hardware support metadata It is the same value used in variable UBOOT_ENTRYPOINT. For example as of this writing for the Freescale SABRE-SD board looking in conf/machine/include/imx-base.inc UBOOT_ENTRYPOINT_mx6  = "0x10008000" Thus the build command would be: $ make uImage LOADADDR=0x10008000 So, as a quick reference table, I point here the 3 most wanted make command lines: imx28evk: $ make LOADADDR=0x40008000 imx53qsb: $ make LOADADDR=0x70008000 imx6qsabresd: $ make LOADADDR=0x10008000 Update 2 Suggested by cmcqueen1975 Building an autotools-based package. E.g. $ source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi $ ./configure ${CONFIGURE_FLAGS} $ make $ make install the CONFIGURE_FLAGS is the variable depending on your very-own project. Go to Yocto Training - HOME Go to Task #7 - Create the toolchain
View full article
You already know. Your source code is one week old now, so please, update it! $ repo sync What was the changes? Please, read the output and determinate what file was changed. Directory tree This is what I have under fsl-community-bsp directory: $ tree -d -L 2 -A . ├── build_mx53 │   ├── conf │   ├── sstate-cache │   └── tmp ├── build_mx6 │   ├── conf │   ├── sstate-cache │   └── tmp ├── downloads │   └── git2 └── sources     ├── base     ├── meta-fsl-arm     ├── meta-fsl-arm-extra     ├── meta-fsl-demos     ├── meta-openembedded     └── poky Sstate-cache keeps the pre-build packages cache so once one package is built, and it´s not changes, no need to re-build it again. If a team shares the same build environment, the sstate-cache folder can be shared as well. I´m not personally used to configure it, so, please, follow the doc: Yocto Project Reference Manual The downloads folder is shared for any build folder. It holds every package´s source code. For example, the ssh source code (and this source code can be built for any architecture) In addition, you may want to share the download folder with your team (one download folder for the complete team), so please, go to Yocto Project Reference Manual and look for DL_DIR. Build_mx6 tree .../build_mx6$ tree -d -L 2 -A . ├── conf ├── sstate-cache └── tmp     ├── buildstats     ├── cache     ├── deploy     ├── log     ├── pkgdata     ├── sstate-control     ├── stamps     ├── sysroots     ├── work     └── work-shared Inside tmp folder you will find images and build results. Images is placed inside deploy. Build statistics like initial and final time for each package/task are under buildstats The complete log for any 'bitbake' you did is under log. Take a look, for example, on the file  log/cooker/imx6qsabresd/11111111111.log. Please, notice that 111111111 is the PID number, so every time you run bitbake you have a different one. The source code, the patches, and the logs for the last bitbake, for each package is under work. Take a look on the files under tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/ for example, for the kernel. .../build_mx6$ tree -d -L 1 -A tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/ tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/ ├── deploy-linux-imx ├── deploy-rpms ├── git ├── image ├── license-destdir ├── package ├── packages-split ├── pkgdata ├── pseudo ├── sysroot-destdir └── temp Go under temp, and see a lot of log.* and run.*: .../build_mx6$ ls tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r37.14/temp/ log.do_bundle_initramfs             log.do_uboot_mkimage                run.do_package_write_rpm.28992      run.perform_packagecopy.16364 log.do_bundle_initramfs.28986       log.do_uboot_mkimage.2325           run.do_patch                        run.populate_packages.16364 log.do_compile                      log.do_unpack                       run.do_patch.2556                   run.read_shlibdeps.16364 log.do_compile.3483                 log.do_unpack.1155                  run.do_populate_lic                 run.read_subpackage_metadata.28992 log.do_compile_kernelmodules        log.task_order                      run.do_populate_lic.10988           run.split_and_strip_files.16364 log.do_compile_kernelmodules.29051  run.base_do_fetch.28859             run.do_populate_sysroot             run.split_kernel_module_packages.16364 log.do_configure                    run.base_do_unpack.1155             run.do_populate_sysroot.17692       run.split_kernel_packages.16364 log.do_configure.3048               run.BUILDSPEC.28992                 run.do_qa_configure.3048            run.sstate_create_package.10988 log.do_deploy                       run.debian_package_name_hook.16364  run.do_qa_staging.17692             run.sstate_create_package.16364 log.do_deploy.617                   run.do_bundle_initramfs             run.do_sizecheck                    run.sstate_create_package.17692 log.do_fetch                        run.do_bundle_initramfs.28986       run.do_sizecheck.2323               run.sstate_create_package.2724 log.do_fetch.28859                  run.do_compile                      run.do_strip                        run.sstate_create_package.28992 log.do_install                      run.do_compile.3483                 run.do_strip.2321                   run.sstate_create_package.617 log.do_install.2327                 run.do_compile_kernelmodules        run.do_uboot_mkimage                run.sstate_task_postfunc.10988 log.do_package                      run.do_compile_kernelmodules.29051  run.do_uboot_mkimage.2325           run.sstate_task_postfunc.16364 log.do_package.16364                run.do_configure                    run.do_unpack                       run.sstate_task_postfunc.17692 log.do_packagedata                  run.do_configure.3048               run.do_unpack.1155                  run.sstate_task_postfunc.2724 log.do_packagedata.2724             run.do_deploy                       run.emit_pkgdata.16364              run.sstate_task_postfunc.28992 log.do_package_write_rpm            run.do_deploy.617                   run.fixup_perms.16364               run.sstate_task_postfunc.617 log.do_package_write_rpm.28992      run.do_fetch                        run.package_depchains.16364         run.sstate_task_prefunc.10988 log.do_patch                        run.do_fetch.28859                  run.package_do_filedeps.16364       run.sstate_task_prefunc.16364 log.do_patch.2556                   run.do_install                      run.package_do_pkgconfig.16364      run.sstate_task_prefunc.17692 log.do_populate_lic                 run.do_install.2327                 run.package_do_shlibs.16364         run.sstate_task_prefunc.2724 log.do_populate_lic.10988           run.do_package                      run.package_do_split_locales.16364  run.sstate_task_prefunc.28992 log.do_populate_sysroot             run.do_package.16364                run.package_fixsymlinks.16364       run.sstate_task_prefunc.617 log.do_populate_sysroot.17692       run.do_packagedata                  run.package_get_auto_pr.16364       run.sysroot_cleansstate.3048 log.do_sizecheck                    run.do_packagedata.2724             run.package_get_auto_pr.2327        run.sysroot_stage_all.17692 log.do_sizecheck.2323               run.do_package_qa.16364             run.package_get_auto_pr.617         run.write_specfile.28992 log.do_strip                        run.do_package_rpm.28992            run.package_name_hook.16364 log.do_strip.2321                   run.do_package_write_rpm            run.patch_do_patch.2556 For each package, you will be able to see the log for the latest task, and what was done on the latest task. For example: log.do_compile - shows the log output from latest do_compile made for kernel run.do_compile - shows the compile command line log.do_compile.111111 - shows the log output from 1111111 time of do_compile In order to know the tasks and the task sequence, take a look to log.taskorder file For the images generated, you will find something like that: .../build_mx6$ ls -la tmp/deploy/images/imx6qsabresd/ total 146260 drwxr-xr-x 2 user user     4096 Mar  6 21:21 . drwxrwxr-x 3 user user     4096 Mar  6 21:12 .. -rw-r--r-- 1 user user 67108864 Mar  6 21:21 core-image-base-imx6qsabresd-20140306173758.rootfs.ext3 -rw-r--r-- 1 user user 83886080 Mar  6 21:21 core-image-base-imx6qsabresd-20140306173758.rootfs.sdcard -rw-r--r-- 1 user user 18782361 Mar  6 21:21 core-image-base-imx6qsabresd-20140306173758.rootfs.tar.bz2 lrwxrwxrwx 1 user user       55 Mar  6 21:21 core-image-base-imx6qsabresd.ext3 -> core-image-base-imx6qsabresd-20140306173758.rootfs.ext3 lrwxrwxrwx 1 user user       57 Mar  6 21:21 core-image-base-imx6qsabresd.sdcard -> core-image-base-imx6qsabresd-20140306173758.rootfs.sdcard lrwxrwxrwx 1 user user       58 Mar  6 21:21 core-image-base-imx6qsabresd.tar.bz2 -> core-image-base-imx6qsabresd-20140306173758.rootfs.tar.bz2 -rw-rw-r-- 2 user user   439697 Mar  6 21:12 modules--3.0.35-r37.14-imx6qsabresd-20140306173758.tgz lrwxrwxrwx 2 user user       54 Mar  6 21:12 modules-imx6qsabresd.tgz -> modules--3.0.35-r37.14-imx6qsabresd-20140306173758.tgz -rw-rw-r-- 2 user user      294 Mar  6 21:20 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt lrwxrwxrwx 2 user user       35 Mar  6 21:16 u-boot.imx -> u-boot-imx6qsabresd-v2013.10-r0.imx lrwxrwxrwx 2 user user       35 Mar  6 21:16 u-boot-imx6qsabresd.imx -> u-boot-imx6qsabresd-v2013.10-r0.imx -rwxr-xr-x 2 user user   297984 Mar  6 21:16 u-boot-imx6qsabresd-v2013.10-r0.imx lrwxrwxrwx 2 user user       53 Mar  6 21:12 uImage -> uImage--3.0.35-r37.14-imx6qsabresd-20140306173758.bin -rw-r--r-- 2 user user  4042496 Mar  6 21:12 uImage--3.0.35-r37.14-imx6qsabresd-20140306173758.bin lrwxrwxrwx 2 user user       53 Mar  6 21:12 uImage-imx6qsabresd.bin -> uImage--3.0.35-r37.14-imx6qsabresd-20140306173758.bin You can access any generated image, the image name ending with the yearmothdaypid (long number) is the real image, and every time your bitbake complete, it generate a new image. The symbolic link points to the latest created image. The .ext3 file is the EXT3 image for the rootfs. (you can copy it directly to SD card using dd: $sudo dd if=core-image-base.ext3 of=/dev/sdb2 ) The .sdcard file is the complete image to be copied to sdcard. It´s u-boot+uImage+rootfs The .tar.bz2 file is the tarball for the rootfs, you can extract it on your PC. uImage is the latest kernel image u-boot is the latest u-boot image. and so on. Play around with generated files. A lot of them I don´t know. And a lot of them I don´t use. For a standard image generation you only need to know where the final images is placed. Any question, comment, issue, please let me know. Before you go, let your bitbake creates the biggest image ever: $ bitbake fsl-image-gui Note (24Feb2014): Required disk space for build image is ~44GB Start it and let it finish while you do something else. Go HOME Go to Task #2 Go to Task#4
View full article
 This article uses i.MX Linux® User's Guide, Rev. L4.1.15_2.1.0-ga, 05/2017 as an example (it may be found as attachment), please refer to section 4.5.12 (How to build U-Boot and Kernel in standalone environment).   First, generate a development SDK, which includes the tools, toolchain, and small rootfs to compile against to put on the host machine.     • Generate an SDK from the Yocto Project build environment with the following command. To set up the Yocto Project build environment, follow the steps in the i.MX Yocto Project User's Guide (IMXLXYOCTOUG). In the following command, set <Target-Machine> to the machine you are building for.   <Target-Machine> may be one of the following :   • imx6qpsabreauto • imx6qpsabresd • imx6ulevk • imx6ull14x14evk • imx6ull9x9evk • imx6dlsabreauto • imx6dlsabresd • imx6qsabreauto • imx6qsabresd • imx6slevk • imx6sllevk • imx6solosabreauto • imx6solosabresd • imx6sxsabresd • imx6sxsabreauto • imx7dsabresd  The «populate_sdk» generates an script file that sets up environment without Yocto Project. This SDK should be updated for each release to pick up the latest headers, toolchain, and tools from the current release.   $ DISTRO=fsl-imx-fb MACHINE=<Target-Machine> source fsl-setup-release.sh -b build-fb   $ DISTRO=fsl-imx-fb MACHINE=<Target-Machine> bitbake core-image-minimal -c populate_sdk   or   $ bitbake meta-toolchain       • From the build directory, the bitbake was run in, copy the sh file in tmp/deploy/sdk to the host machine to build on and execute the script to install the SDK. The default location is in /opt but can be placed anywhere on the host machine.     Note. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.    $ . /opt/fsl-imx-fb/4.1.15-2.0.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi   or    $ source /opt/fsl-imx-fb/4.1.15-2.0.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi   From  Yocto Project Mega-Manual  Note By default, this toolchain does not build static binaries. If you want to use the toolchain to build these types of libraries, you need to be sure your image has the appropriate static development libraries. Use the  IMAGE_INSTALL  variable inside your  local.conf  file to install the appropriate library packages. Following is an example using  glibc  static development libraries:      IMAGE_INSTALL_append = " glibc-staticdev"   On the host machine, these are the steps to build U-Boot and Kernel:  • On the host machine, set the environment with the following command before building.   $ export CROSS_COMPILE=/opt/fsl-imx-fb/4.1.15/environment-setup-cortexa9hf-vfp-neon-pokylinux-gnueabi   $ export ARCH=arm • To build U-Boot, find the configuration for the target boot. In the following example, i.MX 6ULL is the target.     Download source by cloning with   $ git clone http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git -b imx_v2016.03_4.1.15_2.0.0_ga   $ cd uboot-imx $ make clean $ make mx6ull_14x14_evk_defconfig $ make u-boot.imx   • To build the kernel, execute the following commands:   Download source by cloning with   $ git clone http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git -b imx_4.1.15_2.0.0_ga   $ cd linux-imx $ make defconfig $ make   • To build an application (Hello World) as test.c:   $ source /opt/fsl-imx-fb/4.1.15-2.0.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi $ cd ~/test/ $ arm-poky-linux-gnueabi-gcc --sysroot=/opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi -mfloat-abi=hard test.c To check if the the compiled code (a.out) is ARM executable   $ file ./a.out   ./a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=0e5c22dcf021748ead2c0bd51a4553cb7d38f6f2, not stripped   Copy file a.out to target Linux filesystem and before run it check again :   root@imx6ul7d:/unit_tests/1# file a.out   a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=0e5c22dcf021748ead2c0bd51a4553cb7d38f6f2, not stripped   To define what Linux libs are needed to run our application :   root@imx6ul7d:/unit_tests/1# ldd a.out     linux-vdso.so.1 (0x7ee93000)   libc.so.6 => /lib/libc.so.6 (0x76e64000)   /lib/ld-linux-armhf.so.3 (0x76f9d000)   If some libs are not located in the filesystem you can observe the following message :   -sh: root@imx6ul7d:/unit_tests/1#./a.out: No such file or directory   Finally - run a.out:   root@imx6ul7d:/unit_tests/1# ./a.out Hello World root@imx6ul7d:/unit_tests/1#
View full article
  Just sharing some experiences during the development and studying.   Although, it appears some hardwares, it focuses on software to speed up your developing on your  hardware.     杂记共享一下在开发和学习过程中的经验。    虽然涉及一些硬件,但其本身关注软件,希望这些能加速您在自己硬件上的开发。   02/07/2024 i.MX8X security overview and AHAB deep dive i.MX8X security overview and AHAB deep dive - NXP Community   11/23/2023 “Standalone” Compile Device Tree https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Standalone-Compile-Device-Tree/ta-p/1762373     10/26/2023 Linux Dynamic Debug https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Linux-Dynamic-Debug/ta-p/1746611   08/10/2023 u-boot environment preset for sdcard mirror u-boot environment preset for sdcard mirror - NXP Community   06/06/2023 all(bootloader, device tree, Linux kernel, rootfs) in spi nor demo imx8qxpc0 mek all(bootloader, device tree, Linux kernel, rootfs)... - NXP Community     09/26/2022 parseIVT - a script to help i.MX6 Code Signing parseIVT - a script to help i.MX6 Code Signing - NXP Community   Provide  run under windows   09/16/2022   create sdcard mirror under windows create sdcard mirror under windows - NXP Community     08/03/2022   i.MX8MM SDCARD Secondary Boot Demo https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-SDCARD-Secondary-Boot-Demo/ta-p/1500011     02/16/2022 mx8_ddr_stress_test without UI   https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/mx8-ddr-stress-test-without-UI/ta-p/1414090   12/23/2021 i.MX8 i.MX8X Board Reset https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8-i-MX8X-Board-Reset/ta-p/1391130       12/21/2021 regulator userspace-consumer https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/regulator-userspace-consumer/ta-p/1389948     11/24/2021 crypto af_alg blackkey demo crypto af_alg blackkey demo - NXP Community   09/28/2021 u-boot runtime modify Linux device tree(dtb) u-boot runtime modify Linux device tree(dtb) - NXP Community     08/17/2021 gpio-poweroff demo https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/gpio-poweroff-demo/ta-p/1324306         08/04/2021 How to use gpio-hog demo https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709       07/14/2021 SWUpdate OTA i.MX8MM EVK / i.MX8QXP MEK https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/SWUpdate-OTA-i-MX8MM-EVK-i-MX8QXP-MEK/ta-p/1307416     04/07/2021 i.MX8QXP eMMC Secondary Boot https://community.nxp.com/t5/i-MX-Community-Articles/i-MX8QXP-eMMC-Secondary-Boot/ba-p/1257704#M45       03/25/2021 sc_misc_board_ioctl to access the M4 partition from A core side sc_misc_board_ioctl to access the M4 partition fr... - NXP Community     03/17/2021 How to Changei.MX8X MEK+Base Board  Linux Debug UART https://community.nxp.com/t5/i-MX-Community-Articles/How-to-Change-i-MX8X-MEK-Base-Board-Linux-Debug-UART/ba-p/1246779#M43     03/16/2021 How to Change i.MX8MM evk Linux Debug UART https://community.nxp.com/t5/i-MX-Community-Articles/How-to-Change-i-MX8MM-evk-Linux-Debug-UART/ba-p/1243938#M40       05/06/2020 Linux fw_printenv fw_setenv to access U-Boot's environment variables Linux fw_printenv fw_setenv to access U-Boot's env... - NXP Community     03/30/2020 i.MX6 DDR calibration/stress for Mass Production https://community.nxp.com/docs/DOC-346065     03/25/2020 parseIVT - a script to help i.MX6 Code Signing https://community.nxp.com/docs/DOC-345998     02/17/2020 Start your machine learning journey from tensorflow playground Start your machine learning journey from tensorflow playground      01/15/2020 How to add  iMX8QXP PAD(GPIO) Wakeup How to add iMX8QXP PAD(GPIO) Wakeup    01/09/2020 Understand iMX8QX Hardware Partitioning By Making M4 Hello world Running Correctly https://community.nxp.com/docs/DOC-345359   09/29/2019 Docker On i.MX6UL With Ubuntu16.04 https://community.nxp.com/docs/DOC-344462   09/25/2019 Docker On i.MX8MM With Ubuntu https://community.nxp.com/docs/DOC-344473 Docker On i.MX8QXP With Ubuntu https://community.nxp.com/docs/DOC-344474     08/28/2019 eMMC5.0 vs eMMC5.1 https://community.nxp.com/docs/DOC-344265     05/24/2019 How to upgrade  Linux Kernel and dtb on eMMC without UUU How to upgrade Linux Kernel and dtb on eMMC without UUU     04/12/2019 eMMC RPMB Enhance and GP https://community.nxp.com/docs/DOC-343116   04/04/2019 How to Dump a GPT SDCard Mirror(Android O SDCard Mirror) https://community.nxp.com/docs/DOC-343079   04/04/2019 i.MX Create Android SDCard Mirror https://community.nxp.com/docs/DOC-343078   04/02/2019: i.MX Linux Binary_Demo Files Tips  https://community.nxp.com/docs/DOC-343075   04/02/2019:       Update Set fast boot        eMMC_RPMB_Enhance_and_GP.pdf   02/28/2019: imx_builder --- standalone build without Yocto https://community.nxp.com/docs/DOC-342702   08/10/2018: i.MX6SX M4 MPU Settings For RPMSG update    Update slide CMA Arrangement Consideration i.MX6SX_M4_MPU_Settings_For_RPMSG_08102018.pdf   07/26/2018 Understand ML With Simplest Code https://community.nxp.com/docs/DOC-341099     04/23/2018:     i.MX8M Standalone Build     i.MX8M Standalone Build.pdf     04/13/2018:      i.MX6SX M4 MPU Settings For RPMSG  update            Add slide CMA Arrangement  Consideration     i.MX6SX_M4_MPU_Settings_For_RPMSG_04132018.pdf   09/05/2017:       Update eMMC RPMB, Enhance  and GP       eMMC_RPMB_Enhance_and_GP.pdf 09/01/2017:       eMMC RPMB, Enhance  and GP       eMMC_RPMB_Enhance_and_GP.pdf 08/30/2017:     Dual LVDS for High Resolution Display(For i.MX6DQ/DLS)     Dual LVDS for High Resolution Display.pdf 08/27/2017:  L3.14.28 Ottbox Porting Notes:         L3.14.28_Ottbox_Porting_Notes-20150805-2.pdf MFGTool Uboot Share With the Normal Run One:        MFGTool_Uboot_share_with_NormalRun_sourceCode.pdf Mass Production with programmer        Mass_Production_with_NAND_programmer.pdf        Mass_Production_with_emmc_programmer.pdf AndroidSDCARDMirrorCreator https://community.nxp.com/docs/DOC-329596 L3.10.53 PianoPI Porting Note        L3.10.53_PianoPI_PortingNote_151102.pdf Audio Codec WM8960 Porting L3.10.53 PianoPI        AudioCodec_WM8960_Porting_L3.10.53_PianoPI_151012.pdf TouchScreen PianoPI Porting Note         TouchScreen_PianoPI_PortingNote_151103.pdf Accessing GPIO From UserSpace        Accessing_GPIO_From_UserSpace.pdf        https://community.nxp.com/docs/DOC-343344 FreeRTOS for i.MX6SX        FreeRTOS for i.MX6SX.pdf i.MX6SX M4 fastup        i.MX6SX M4 fastup.pdf i.MX6 SDCARD Secondary Boot Demo        i.MX6_SDCARD_Secondary_Boot_Demo.pdf i.MX6SX M4 MPU Settings For RPMSG        i.MX6SX_M4_MPU_Settings_For_RPMSG_10082016.pdf Security        Security03172017.pdf    NOT related to i.MX, only a short memo
View full article