Using i.MX 6 Series LTIB on Host Ubuntu 14.04 Trusty Tahr

Document created by Curtis Wald Employee on Apr 21, 2014Last modified by Curtis Wald Employee on Oct 30, 2015
Version 4Show Document
  • View in full screen mode

Overview

This document provides some solutions for building i.MX 6 series LTIB on an Ubuntu 14.04 Trusty Tahr host.

A Virtualbox virtual machine was created for the Ubuntu computer which is used for the build host.

 

Linux Target Image Builder (LTIB) is a perl script used for creating images (Bootloader u-boot, Linux uImage, and root file system). The build example shown here was for the i.MX 6Q and minimum root file system.

 

Software Versions

  • L3.0.35_4.1.0_ER_SOURCE_BSP
    • L3.0.35 : Linux version 3.0.35
    • 4.1.0 :  Freescale release number
    • ER_SOURCE_BSP : Engineering Release source Board support package
    • File download URL:  L3.0.35_4.1.0_130816_source.tar.gz. Note this requires a free account registration at freescale.com.
    • md5sum L3.0.35_4.1.0_130816_source.tar.gz

      dec08bb266134b94af0f54356e2e9de9  L3.0.35_4.1.0_130816_source.tar.gz

  • L3.0.35_4.1.0_docs.tar.gz
    • Documentation bundle.
    • File download URL: L3.0.35_4.1.0_docs.tar.gz
    • md5sum L3.0.35_4.1.0_docs.tar.gz

      85f122c72735f3d162a99ae42554e886  L3.0.35_4.1.0_docs.tar.gz

  • Ubuntu 14.04 LTS Trusty Tahr
    • LTS : Long Term Supported
    • 64-bit version
    • File download URL: http://www.ubuntu.com/download/desktop
    • md5sum ubuntu-14.04-desktop-amd64.iso

      dccff28314d9ae4ed262cfc6f35e5153  ubuntu-14.04-desktop-amd64.iso

  • Virtualbox
    • Version 4.3.10
    • File download URL: Oracle VM VirtualBox
    • Machine Setup
      • 4 CPU
      • 4 GB RAM
      • 64 GB Hard disk from USB 3.0 connected drive
  • Host Computer
    • Dell M4600, 8GB RAM,  8 CPU
    • Ubuntu Linux 12.04.02 LTS

 

Ubuntu Host 14.04

Host Packages

Various packages are required to meet build requirements of LTIB.

Please refer to "Setting_Up_LTIB_host.pdf" document found in the L3.0.35_4.1.0_docs.tar.gz download.

See below for the trustyPkgs.txt attachment that shows all the packages that were installed. This was created using

the command: dpkg --list

 

On your host you can run the command "dpkg --list" and compare with the trustyPkgs.txt using your favorite diff tool. (examples, meld, diff). Any package missing can be added using your favorite package manager.  For example to install mkimage which is found in the u-boot-tools package:  sudo apt-get install u-boot-tools

 

Build

LTIB

Host Package M4

Failure

The package m4 fails to build. Paste of the error messages:

 

gcc -std=gnu99  -I.     -g -O2 -MT clean-temp.o -MD -MP -MF .deps/clean-temp.Tpo -c -o clean-temp.o clean-temp.c

In file included from clean-temp.h:22:0,

                 from clean-temp.c:23:

./stdio.h:477:1: error: 'gets' undeclared here (not in a function)

make[3]: *** [clean-temp.o] Error 1

make[3]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/m4-1.4.16/lib'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/m4-1.4.16/lib'

 

Solution

Replace the m4 package with a newer version. The m4 package bundled with LTIB is version 1.4.16. A newer version 1.4.17 is available and does not have build failures.

          md5sum m4-1.4.17.tar.gz > m4-1.4.17.tar.gz.md5

  • Move both files to /opt/freescale/pkgs which is where ltib searches for packages.

          mv m4* /opt/freescale/pkgs

  • Edit the m4.spec file that specifies the version

          cd <ltib>/dist/lfs5.1/m4/

          Edit m4.spec using your favorite editor.  Line 5 is the Version number to change from 16 to 17:

 

Original:

1 %define pfx /opt/freescale/rootfs/%{_target_cpu}
2
3 Summary: The GNU macro processor
4 Name  : m4
5 Version: 1.4.16
6 Release: 1
7 License: GPL

 

Updated:

1 %define pfx /opt/freescale/rootfs/%{_target_cpu}
2
3 Summary: The GNU macro processor
4 Name  : m4
5 Version: 1.4.17
6 Release: 1
7 License: GPL

 

 

 

busybox

 

Failure

 

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /lib/libc.so.6

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /usr/lib/libc_nonshared.a

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /lib/ld-linux.so.3

collect2: ld returned 1 exit status

make: *** [busybox_unstripped] Error 1

error: Bad exit status from /home/user/imx6/ltib/tmp/rpm-tmp.60711 (%build)

 

 

RPM build errors:

    Bad exit status from /home/user/imx6/ltib/tmp/rpm-tmp.60711 (%build)

Build time for busybox: 93 seconds

 

Failed building busybox

 

Solution:

 

Go into ltib/dist/lfs-5.1/base_libs/base_libs.spec and find these lines:
     # remove absolute paths from text search files (if they exist)
     perl -w -e '
         @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV;
         exit(0) unless @ARGV;


Remove the last two (the lines beginning with "@ARGV" and "exit(0)"

 

Adding the # character removes the lines 299 and 300

297 # remove absolute paths from text search files (if they exist)
298 perl -w -e '
299 #@ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV;
300 #exit(0) unless @ARGV;
301$^I = ".bak";

 

 

Success

When the build completes, u-boot.bin and uImage are found in <ltib>/rootfs/boot

 

[user@trusty ltib]$ tree rootfs/boot

rootfs/boot

├── bootable_kernel -> uImage

├── linux.config

├── System.map

├── u-boot

├── u-boot.bin

├── uImage

├── vmlinux

└── zImage

3 people found this helpful

Attachments

Outcomes