Open main menu

DAVE Developer's Wiki β

Changes

Building the Yocto BSP (XUELK)

4,816 bytes added, 16:57, 5 December 2016
Created page with "{{InfoBoxTop}} {{AppliesToAXELULite}} {{AppliesToSBCLynx}} {{Applies To Yocto}} {{InfoBoxBottom}} == History == {| class="wikitable" border="1" !Version !Date !XUELK version..."
{{InfoBoxTop}}
{{AppliesToAXELULite}}
{{AppliesToSBCLynx}}
{{Applies To Yocto}}
{{InfoBoxBottom}}

== History ==

{| class="wikitable" border="1"
!Version
!Date
!XUELK version
!Notes
|-
|1.0.0
|December 2016
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_1.1.0|XUELK 1.1.0]]
|
|-
|}

== Quick reference ==

{| class="wikitable" border="1"
|+Repository Information
|-
! Repository
| BSP Manifest
| Yocto BSP Layer
|-
! URL
| git@git.dave.eu:lynx/lynx-bsp.git
| git@git.dave.eu:lynx/meta-lynx.git
|-
! stable branch
| lynx-fido
| lynx-fido
|-
! stable tag
| xuelk-1.1.0
| xuelk-1.1.0
|}

{| class="wikitable" border="1"
|+Build Information
|-
! Distro
| colspan=4 | fsl-imx-fb
|-
! rowspan=4 | Images
! Name
! Description
|-
| lynx-image-qt5
| QT5.x support
|-
| lynx-image-devel
| minimal for development/debugging image
|-
| lynx-image-networking
| based on lynx-image-devel plus networking tools
|}


This is a quickstart guide to build Yocto BSP for AxelULite SOM and SBC Lynx, to rebuild the binaries (u-boot, linux kernel, root file system) provided with XUELK releases.

For more information regarding Yocto build system, go to its [[:Category:Yocto|dedicated category page]]

=== Build System prerequisite ===

XUELK MVM is already configured to build this Yocto version/configuration, however users typically don't use a VirtualBox VM for Yocto builds for performance reasons.

You can refer to [http://www.yoctoproject.org/docs/1.8/mega-manual/mega-manual.html#yp-resources Yocto manual setup section] for a list of supported Linux distribution and their configuration.

=== Build XUELK Yocto BSP ===

==== Initialize the build environment ====

XUELK Yocto BSP uses [https://code.google.com/p/git-repo/ git-repo] tool to fetch all the required git repositories to build

<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo
dvdk@dvdk-vm:~/lynx$ chmod a+x repo
dvdk@dvdk-vm:~/lynx$ ./repo init -u git@git.dave.eu:lynx/lynx-bsp.git -b lynx-fido
dvdk@dvdk-vm:~/lynx$ ./repo sync
dvdk@dvdk-vm:~/lynx$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build-fb -e fb
dvdk@dvdk-vm:~/lynx/build$ bitbake lynx-image-gui
</pre>

==== Build the Yocto image ====

Please note that even the basic root file system requires a few hours to build on a mid-hi range desktop (4-6 cores, 8-12 GiB RAM) also depending on your Internet connection speed (all sources are fetched from the network). Nearly 20GiB of disk space is required for the build. Moreover, building inside the DVDK adds some overhead, since the performances of a virtual machine are reduced if compared to the physical hardware. Thus, it's recommended to check the hardware capabilities of the host system and, when building with Yocto is required, developers should consider the following options:
* migrating the build system to a physical machine
* assuming that the host system has the required resources, extending the hardware capabilities of the default DVDK (eg: adding more cores and disk space)

Once completed the initialization phase, developers can launch the Yocto image build process with the following commands:

<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build-fb -e fb
dvdk@dvdk-vm:~/lynx/build$ bitbake lynx-image-gui
</pre>

The resulting files (kernel, devicetree and u-boot binaries, plus .tar.gz root file system) will then be available inside ''build/tmp/deploy/images/sbc-lynx''.

==== Build additional packages ====

To build additional packages the user must first enter the directory where the <code>lynx-setup-release.sh</code> is placed and source it

<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx$ DISTRO=fsl-imx-fb MACHINE=sbc-lynx source lynx-setup-release.sh -b build-fb -e fb
dvdk@dvdk-vm:~/lynx/build$
</pre>

And then can run any of the [[http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#usingpoky-components-bitbake bitbake]] command.

<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx/build$ bitbake memtester
</pre>

The resulting packages (the default format is ipk) can be found inside ''build/tmp/deploy/rpm''.

<pre class="workstation-terminal">
dvdk@dvdk-vm:~/lynx/build$ ls -l tmp/deploy/rpm/armv7a-vfp-neon/memtester*
-rw-r--r-- 2 dvdk dvdk 7102 Aug 26 16:33 tmp/deploy/rpm/armv7a-vfp-neon/memtester_4.1.3-r0_armv7a-vfp-neon.ipk
-rw-r--r-- 2 dvdk dvdk 21720 Aug 26 16:33 tmp/deploy/rpm/armv7a-vfp-neon/memtester-dbg_4.1.3-r0_armv7a-vfp-neon.ipk
-rw-r--r-- 2 dvdk dvdk 792 Aug 26 16:33 tmp/deploy/rpm/armv7a-vfp-neon/memtester-dev_4.1.3-r0_armv7a-vfp-neon.ipk
-rw-r--r-- 2 dvdk dvdk 2748 Aug 26 16:33 tmp/deploy/rpm/armv7a-vfp-neon/memtester-doc_4.1.3-r0_armv7a-vfp-neon.ipk
</pre>
770
edits