User Tools

Site Tools


vmware.png nfs.png tftp.png subversion.png eclipse.png logo.png tutorial.png

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:power:tqmt10xx:linux:build_bsp [2019/05/13 17:05] (current)
liedmann created
Line 1: Line 1:
 +~~NOCACHE~~
 +<embed en:​templates:​tabs>​
 +  <label lang>​en</​label>​
 +  <label mod_name>​tqmt10xx</​label>​
 +  <label mod_name_head>​TQMT10xx</​label>​
 +  <label mod_arch>​power</​label>​
 +  <label bsp_name>​linux</​label>​
 +  <label bsp_name_head>​Linux</​label>​
 +</​embed>​
 +\\  ​
 +\\
  
 +<WRAP round info>
 +The Virtual Machine includes a pre-installed Yocto Project build environment including the Linux BSP for TQMT104x.
 +</​WRAP>​
 +
 +
 +===== Using Yocto Project =====
 +
 +==== Prerequisites ====
 +Initialize the build environment by executing
 +<​code>​
 +cd /​opt/​tq-powerarch-bsp/​yocto
 +loadenv
 +</​code>​
 +
 +Among other things this creates the //Build Directory// ''/​opt/​tq-powerarch-bsp/​yocto/​build''​ and a default //Local Configuration File// ''/​opt/​tq-powerarch-bsp/​yocto/​build/​conf/​local.conf''​.
 +After the script runs, your current working directory is set to the //Build Directory//​. Later, when the build completes, the //Build Directory// contains all the files created during the build.
 +
 +All subsequent tasks need to be executed from within the //Build Directory//​.
 +
 +==== Yocto Local Configuration File ====
 +
 +The file ''/​opt/​tq-powerarch-bsp/​yocto/​build/​conf/​local.conf''​ holds configuration variables that define the BSP build process.\\ ​ In the scope of the TQMT104x, these are:
 +
 +^ Variable ​              ^ Valid Values ​                  ^ Description ​                                        ^
 +| **''​MACHINE''​** ​           | ''​tqmt1042-stk'' ​              | Defines target architecture / hardware platform ​    |
 +| :::                    | ''​tqmt1042-64b-stk'' ​          | :::                                                 |
 +| :::                    | ''​tqmt1040-stk'' ​              | :::                                                 |
 +| :::                    | ''​tqmt1040-64b-stk'' ​          | :::                                                 |
 +| **''​FSL_RCW''​** ​           | ''​TQMT1042_SERDES86'' ​         | Selects RCW w/ specific SerDes configuration for using a TQMT1040/​TQMT1042 on STKT104x ​ |
 +| :::                    | ''​TQMT1042_SERDES88'' ​         | :::                                                 |
 +| :::                    | ''​TQMT1042_SERDES8E''​((requires ''​KERNEL_DEVICETREE=fsl/​tqmt1042_serdes8e.dtb''​)) ​         | :::                                                 |
 +| :::                    | ''​TQMT1040_SERDES66'' ​         | :::                                                 |
 +| **''​KERNEL_DEVICETREE''​** ​ | ''​fsl/​tqmt1042.dtb'' ​          | Selects device tree blob                            |
 +| :::                    | ''​fsl/​tqmt1042_serdes8e.dtb''​ ((requires ''​FSL_RCW=TQMT1042_SERDES8E''​)) ​ | :::                                                 |
 +| :::                    | ''​fsl/​tqmt1040.dtb'' ​          | :::                                                 |
 +
 +Following excerpt from ''​local.conf''​ file shows the default configuration (# = commented out):
 +<​code>​
 +FSL_RCW = "​TQMT1042_SERDES86"​
 +#FSL_RCW = "​TQMT1042_SERDES88"​
 +#FSL_RCW = "​TQMT1042_SERDES8E"​
 +#FSL_RCW = "​TQMT1040_SERDES66"​
 +
 +#MACHINE = "​tqmt1042-stk"​
 +MACHINE = "​tqmt1042-64b-stk"​
 +#MACHINE = "​tqmt1040-stk"​
 +#MACHINE = "​tqmt1040-64b-stk"​
 +
 +KERNEL_DEVICETREE = "​fsl/​tqmt1042.dtb"​
 +#​KERNEL_DEVICETREE = "​fsl/​tqmt1042_serdes8e.dtb"​
 +#​KERNEL_DEVICETREE = "​fsl/​tqmt1040.dtb"​
 +</​code>​
 +
 +Whenever you wish to deviate from the default BSP configuration,​ e.g. select a different RCW, simply edit the ''​local.conf''​ file accordingly.
 +
 +For a full documentation of Yocto Project in general and the ''​local.conf''​ file in particular, please see:
 +  * [[http://​www.yoctoproject.org/​docs/​latest/​mega-manual/​mega-manual.html|Full Yocto Documentation]]
 +  * [[http://​www.yoctoproject.org/​docs/​latest/​mega-manual/​mega-manual.html#​usingpoky-extend-customimage-localconf| Chapter 5.2.1. Customizing Images Using local.conf]]
 +
 +==== Build BSP images ====
 +
 +To build an BSP image execute
 +<​code>​
 +bitbake <image name>
 +</​code>​
 +
 +from within the //Build Directory//,​ where ''<​image name>''​ can be one of the following:
 +
 +^ Image name                   ^ Description ​ ^
 +| ''​core-image-minimal'' ​      | A small image just capable of allowing a device to boot.  |
 +| ''​core-image-full-cmdline'' ​ | A console-only image with more full-featured Linux system functionality installed. ​ |
 +
 +This will effectively
 +   * Build U-Boot for the TQMT104[02] module on STKT104x starterkit
 +   * Build the Linux Kernel for the TQMT104[02] module on STKT104x starterkit
 +   * Build a small-size minimal root file system ​
 +   * Build a self-contained,​ bootable NOR flash and SD card image
 +   * Deploy U-Boot, kernel uImage, device tree, NOR flash and SD card image and root file system to:\\  ''/​opt/​tq-powerarch-bsp/​yocto/​build/​tmp/​deploy/​images/​tqmt1042-64b-stk''​
 +
 +Names of possible root file systems images can be obtained by typing:
 +<​code>​
 +ls /​opt/​tq-powerarch-bsp/​yocto/​poky/​meta*/​recipes*/​images/​*.bb
 +</​code>​
 +<WRAP round important>​
 +Note that not all images may be buildable in the default yocto configuration.
 +Tests have been performed with **"​core-image-minimal"​** only.
 +For a description of the scope of these images / root file systems, please see the yocto documentation.
 +</​WRAP>​
 +
 +<WRAP round info>
 +Note that the building process may take a large amount of time, depending on the hardware resources of your host system.
 +</​WRAP>​
 +
 +==== Build U-Boot only ====
 +<​code>​
 +bitbake u-boot
 +</​code>​
 +
 +
 +==== Build Linux kernel only ====
 +<​code>​
 +bitbake kernel
 +</​code>​
 +
 +===== Manual builds =====
 +
 +U-Boot and the Linux kernel can also be build outside Yocto Project.
 +
 +
 +==== Linux kernel & device tree ====
 +Checkout devel branch:
 +<​code>​
 +cd /​opt/​tq-powerarch-bsp/​linux/​
 +git checkout 4.4_devel
 +</​code>​
 +Initialize the build environment:​
 +<WRAP round important>​
 +The file ''​environment''​ required by the ''​loadenv''​ script is missing in the VM.\\
 +Please download the following file and put it in the ''/​opt/​tq-powerarch-bsp/​linux/''​ directory before running the ''​loadenv''​ script.
 +</​WRAP>​
 +<file bash environment>​
 +source /​opt/​tq-powerarch-sdk64/​environment-setup-ppc64e5500-poky-linux
 +
 +# Remove "​-Wl,"​ from LDFLAGS as the Makefiles from Das U-Boot and Linux call the
 +# linker directly and not GCC for linking.
 +export LDFLAGS="​${LDFLAGS//​-Wl,/​}"​
 +
 +# Use packages from the build system. This fixes e.g. 'make menuconfig'​
 +export PKG_CONFIG_PATH=
 +export PKG_CONFIG_SYSROOT_DIR=
 +
 +export LOADENV_USER=tq
 +</​file>​
 +<​code>​
 +loadenv
 +</​code>​
 +Configure:
 +<​code>​
 +make 85xx/​tqmt1042_defconfig
 +make 85xx/<​TQ-MODULE>​_defconfig
 +</​code>​
 +''<​TQ-MODULE>''​ can be either ''​tqmt1042_64''​ or ''​tqmt1042''​.\\
 +Build the kernel and device tree:
 +<​code>​
 +make uImage ​
 +make fsl/​tqmt1042.dtb ​
 +</​code>​
 +==== U-Boot ====
 +Initialize the build environment:​
 +<​code>​
 +cd /​opt/​tq-powerarch-bsp/​u-boot/​
 +loadenv
 +</​code>​
 +Configure and start the build:
 +<​code>​
 +make <​TQ-MODULE>​[_SDCARD]_defconfig
 +make
 +</​code>​
 +''<​TQ-MODULE>''​ can be either ''​TQMT1040''​ or ''​TQMT1042''​.\\
 +If the optional ''​[_SDCARD]''​ is given U-Boot is built for booting from SD card, otherwise it is built for booting from NOR flash.\\
 +In case you want to modify some aspects of the U-Boot configuration (e.g. selecting another RCW) you can do so by executing:
 +<​code>​
 +make menuconfig
 +</​code>​
 +The RCW is implicitly built and included in the U-Boot image, to build a "​stand-alone"​ RCW binary simply execute:
 +<​code>​
 +make fsl_rcw.bin
 +</​code>​

en/power/tqmt10xx/linux/build_bsp.txt · Last modified: 2019/05/13 17:05 by liedmann


Disclaimer

TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.


Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki