Wednesday, January 6, 2016

Nitrogen6_MAX yocto krogoth Qt5



How I got Qt5 working on nitrogen6_max using yocto krogoth

note of caution: I've only tested this very little. I'm not sure if everything I've done is correct.
I'm using Debian 8 as my host system.

Install dependencies:
apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm

Install repo:
su to root
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo
chmod a+x /usr/bin/repo

Get Yocto krogoth:
mkdir ~/krogoth
cd ~/krogoth
repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b krogoth
repo sync

Setup directories:
sudo mkdir -p /opt/freescale/yocto/imx
sudo mkdir -p /opt/freescale/yocto/sstate-cache
sudo chmod -R 777 /opt/freescale

Build krogoth:

cd ~/krogoth
MACHINE=nitrogen6x . setup-environment core-image-base

update the following file: ~/krogoth/core-image-base/conf/local.conf

using this file: local.conf

bitbake core-image-base

Build Qt5 toolchain:
bitbake meta-toolchain-qt5

Put the sdcard image on a sdcard:
cd ~/krogoth/core-image-base/tmp/deploy/images/nitrogen6x/
su to root
umount /dev/sd*
zcat core-image-base-nitrogen6x.sdcard.gz | dd of=/dev/sd* bs=1M

* needs to be replaced with your drive letter for your sdcard, example /dev/sde1, /dev/sde2, etc)
Once this is done, you can insert sdcard into nitrogen6 and power / boot the device.

Install qt5 toolchain sdk:
cd ~/krogoth/core-image-base/tmp/deploy/sdk
sudo ./poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.sh

Note enviroment setup script:
. /opt/poky/2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi

Install Qt creator:
download and install - http://www.qt.io/download-open-source/
To start qt creator, I created a script call start_qtc, with the following inside:

. /opt/poky/2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
~/Qt/Tools/QtCreator/bin/qtcreator

Then change it to an executable
chmod +x start_qtc

Setting up qt creator environment:
This is easiest to show in pictures, because there is a lot going on.













I've used pieces from the following websites:

https://boundarydevices.com/jethro-release-of-yocto/
https://community.freescale.com/thread/309578
http://wiki.wandboard.org/index.php/Building_Qt5_using_yocto_on_Wandboard








No comments:

Post a Comment