No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.adoc

README.adoc

NutsBoard Yocto BSP

Environment Setup

% sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 build-essential chrpath  socat \
 libsdl1.2-dev xterm  sed cvs subversion coreutils texi2html \
 docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \
 libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc

For Ubuntu 12.04 host setup only:

% sudo apt-get install uboot-mkimage

For Ubuntu 14.04 or later revision host setup:

% sudo apt-get install u-boot-tools

To get the BSP you need to have repo installed and use it as:

Download the BSP source:

% PATH=${PATH}:~/bin
% mkdir yocto_project
% cd yocto_project
% repo init -u https://github.com/nutsboard/nutsboard-yocto-bsp.git -b krogoth_4.4.32-1.0.0_ga
% repo sync

At the end of the commands you have every metadata you need to start work with.

To start a simple image build:

% cd <local path>/yocto_project/poky/
% source oe-init-build-env

You must specify which machine is your target at $(BUILDDIR)conf/local.conf. By default it is qemu. We need to build an image for a customer board (ex:almond). Update the MACHINE configuration variable accordingly.

Don’t forget to make the configuration aware of the nutsboard layer. Edit the layer configuration file ($BUILDDIR/conf/bblayers.conf) and append the full path to the meta-nutsboard-bsp-release directory to the BBLAYERS variable.

To generate the poky cross compilier environment, it’s easy to use to develop applications.

% bitbake meta-toolchain

To generate the poky image with nutsboard customize meta-layer.

% bitbake core-image-minimal

The image elements as follows:

Example - Almond

Output Path: <build path>/tmp/deploy/images/almond/

Partition 1: MLO, u-boot.img, zImage, am335x-nutsboard-almond.dtb, uEnv.txt

Partition 2: core-image-minimal-almond-<date>.rootfs.tar.xz, modules.tgz

Nand Flash UBI: core-image-minimal-almond-<date>.rootfs.ubifsi

Installing the toolchain:

Path: <build path>/build/tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-armv7ahf-neon-toolchain-2.1.1.sh

After Installtion, please source the environment to auto setting the poky compile environment.

% source environment-setup-armv7ahf-neon-poky-linux-gnueabi

An AP file compile:

% $CC hello.c -o hello

How to add additional packages, for Almond SoM, we showing a simple example: Edit <build path>/conf/local.conf/

EXTRA_IMAGE_FEATURES ?= "debug-tweaks ssh-server-openssh"
IMAGE_INSTALL_append = "i2c-tools wget wpa-supplicant iw procps wireless-tools iptables busybox bash iptables minicom util-linux bluez5 bridge-utils dnsmasq hostapd firmware-wg7833 create-ap mtd-utils libsocketcan canutils uim iperf iperf3 memtester ppp iproute2 ethtool coreutils haveged"

Then re-compile again!

2017/03/23 Update: How to build a QT based applications
To download the meta-layer source of the QT (Ex: QT4)
[source,console]
% cd <local path>/yocto_project/poky/
% git clone git://git.yoctoproject.org/meta-qt4.git

Add meta-qt4 location to ($BUILDDIR/conf/bblayers.conf)

To generate the poky cross compilier environment, it's easy to use to develop applications.
[source,console]
% bitbake meta-toolchain-qt


To generate the poky image with nutsboard customize qt4 meta-layer.
[source,console]
% bitbake bitbake qt4e-demo-image

Installing the qt based toolchain:

Path: <build path>/build/tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-qt-armv7ahf-neon-toolchain-qt-2.1.1.sh

After Installtion, please source the environment to auto setting the poky compile environment.
[source,console]
% source environment-setup-armv7ahf-neon-poky-linux-gnueabi


A QT application project compile:
[source,console]
% cd <your QT project>
% qmake
% make