IMX Ltib common errors

These are the common errors you may encounter while building Ltib

  • Ltib Zlib not installed error

While building ltib it may report zlib packages are missing


The reason is zlib path is changed
Edit bin/ inside ltib folder in zlib section add one line

zlib => sub { my @f = (glob('/usr/lib/*'),
  • Failed building wget” undefined reference to `SSLv2_client_method’


To eliminate this error edit ltib/dist/lfs-5.1/wget/wget.spec file and add “–without-ssl” to ./configure section


After adding this you need to manually remove the wgest file from BUILD (/opt/freescale/ltib/usr/src/rpm/BUILD) directory then again compile

  • /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-12.09.01/common/stdafx.h:30:36: fatal error: /usr/include/sys/types.h: No such file or directory


The error is that there is no types.h usr/include/sys directory its in /usr/incude/i386-linux-gnu/sys

To fix this error

sudo ln -s i386-linux-gnu/sys sys
  • /usr/bin/ld: ElftosbAST.o: undefined reference to symbol ‘powf@@GLIBC_2.0’


To avoid this error you need to edit makefile.rules of elftosb-

cp /opt/freescale/pkgs/elftosb- ~/Desktop
tar -zxvf elftosb-
cd elftosb-
vim makefile.rules

Inside that file there is a line that reads

LIBS = -lstdc++

change it to

LIBS = -lstdc++ -lm

to add the standard math library to the build.


After editing compress the folder back to tar.gz and place it in pkgs folder

tar -zcvf elftosb- elftosb-
cp  ~/Desktop/elftosb- /opt/freescale/pkgs/elftosb-

Now delete the old file from BUILD folder.Else you will get an error saying delete that file.

rm -rf /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-

Happy Hacking 🙂


Burning IMX28 Ltib image to SD card and booting

After successful creation of bootable image as per previous post we need to do some hack in order to get the OS booted from the IMX28EVK board.

Most probably inside ypur Ltib folder there will be a scrpt named mk_mx28_sd .This is the utility used to burn the image to sdcard it will reduce us the difficulty of partitioning etc.he BSP includes the mk_mx28_sd shell script that makes it very easy to place the build output onto an SD/MMC card. The script will write the
selected boot stream, the rootfs.

The mk_mx28_sd script should always be run from the LTIB install directory. It knows how to find the boot stream files and rootfs from this
directory.Before running the script, you need to determine the device for your SD/MMC card. Find the device id of your SD card.

ls /dev/sd?

Try issuing the above command without inserting the SD card and with inserting the SD card then you will get the device id.The SD/MMC card will be the new /dev/sdX device in the output. Where X value changes as a,b,c etc.Once you already know your card’s device, updating the card contents with a new build image

cd ~/ltib
mk_mx28_sd /dev/sdX

If you dont have mk_mx28_sd in your ltib folder then download L2.6.35_10.12.01_SDK_scripts.tar.gz from Freescale site and extract it.

cp ~/ltib  
cp mk_mx28_sd ~/ltib  
cd ~/ltib

Here you need to do a small change in order to make the script work

Edit mk_mx28_sd script and add the ‘u’ at line 177 then the o command after. This changes cylinders to sectors.

echo “o

echo “u

Once updated to create the SD card which is at /dev/sdX:

./mk_mx28_sd /dev/sdX  


Next, set the boot mode on the i.MX28 EVK board for MMC/SD on SSP0. The boot mode DIP switch settings are shown in the table below.

Screenshot from 2014-07-11 18:54:56

Then, insert the SD/MMC card into the SSP0 card socket. This is the rightmost socket on the bottom of the EVK board.

Finally, connect power to the board and press the Power button. You will see serial output over the debug UART if you have a terminal program

you will reach the login promt


Login using the username root

Happy Hacking 🙂

i.MX28 LTIB on UBUNTU 13.04

I tried Ltib installation in Ubuntu 13.04 for i.MX28 board which completed successfully

First install required packages

sudo apt-get update
sudo apt-get install build-essential zlib1g-dev rpm libncurses5-dev m4 bison liblzo2-dev uuid-dev tcl

Configure sudo

The LTIB installation script runs several commands with sudo where the user should not be prompted for a password. sudo without password must be configured for the current user to execute the script correctly.

sudo visudo

the file /etc/sudoers is opened for editing.

The following line should be inserted in the file, where user has to be changed to your user name:

# Allow user to run commands for ltib.
user ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm

Save with Ctrl+o, then close with Ctrl+x.

Download BSP source for Ltib for iMX281

Extract it

tar -xvf L2.6.35_1.1.0_130130_source.tar.gz

cd L2.6.35_1.1.0_130130_source


The installer will ask you to read and accept a EULA and then ask you for the install directory. For this example, choose your home directory.
After the installation, there will be a new directory named “ltib” under the install directory you specified. This new directory contains the actual
ltib Perl script, config files, package specs, and utilities.

so now change directory to newly created ltib directory

cd ~/ltib

Now we must patch some files of the folder.Note that ,this must be done from ltib folder itself.



It will download ubuntu-ltib-patch.tgz

tar -xzvf ubuntu-ltib-patch.tgz


You can download the shell script and files from this link

Configure and Build

To configure and build your LTIB installation the first time, run this command from the ~/ltib directory:


This command invokes LTIB with its default behavior of performing a build. Since the installation has not yet been configured, LTIB will present
the ncurses configuration screen before building. Then, when you exit the configuration screen, LTIB will build the target can see installed host tools in /opt/freescale/ .

When you invoke ./ltib the screen will be like this and a log file will be created inside the ltib folder


If there is any dependency problem the the building process may stop like this
Here the issue is that zlib is missing then you must install zlib

Then you will get the first time configuration window
Because the i.MX BSP contains only the i.MX platform, you don’t need to change anything on this screen.
When is selected, you can hit the return key to exit the current screen. On most main screens, exiting will bring up the following dialog
asking if you want to save changes.Here, use the right and left arrow keys to select between and . Press return to activate your selection. Selecting will cause LTIB to not continue to the following step. We must save the configuration when asked. This will bring up another sub-platform screen


The first option available on this screen is used to choose the sub-platform type. For the i.MX platform, the sub-platform is the specific chip family combined with the board type. For the i.MX28, this is the EVK board. The second option on this screen, under the Choose the packages profile item, lets you select the default set of packages. Individual packages can be enabled and disabled later, as you need. The default choice is sufficient for now.
If you need to change the sub-platform later, use the command:

./ltib -m selectype

Move the cursor down to the Selection item below the Choose the platform type line and press return to open up a platform selection

Select the imx28 platform, which is near the top of the list, and press return to return to the main screen.Exit the sub-platform selection screen and save the configuration. This will bring you to the main LTIB configuration screen.

Here you can change the settings such as packages kernel version build parameters etc



After modifying the parameters you must exit from configuration menu saving the settings and run ltib again without any arguments


Possibly you may get an error like this

Can’t get: gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12-1.i386.rpm at ./ltib line 2560.

CONFIG_TOOLCHAIN forced a full rebuild
Installing: gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12-1.i386.rpm
Testing network connectivity
Try gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12-1.i386.rpm.md5 from the GPP
21:59:11 ERROR 404: Not Found.
Try gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12-1.i386.rpm from the GPP
21:59:11 ERROR 404: Not Found.
Can't get: gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12-1.i386.rpm at ./ltib line 2560.
Died at ./ltib line 2560.
Started: Sun Mar  3 21:17:48 2013
Ended:   Sun Mar  3 21:59:11 2013
Elapsed: 2483 seconds
Build Failed
Exiting on error or interrupt


To fix this error chnage the toolchain configuration

./ltib -m config

in the Toolchain selection choose “ARM, gcc-4.4.4, multilib, neon optimized” instead of default “ARM, gcc-4.6.2, multilib, neon optimized, gnueabi/eglibc2.13”.



One more serious error that you will encounter is this

Couldn’t link to symbol lroundf@@GLIBC_2.2.5


To avoid this error you need to edit makefile.rules of elftosb-

cp /opt/freescale/pkgs/elftosb- ~/Desktop
tar -zxvf elftosb-
cd elftosb-
vim makefile.rules

Inside that file there is a line that reads

 LIBS = -lstdc++

change it to

LIBS = -lstdc++ -lm

to add the standard math library to the build.
After editing compress the folder back to tar.gz and place it in pkgs folder

tar -zcvf elftosb- elftosb-
cp  ~/Desktop /opt/freescale/pkgs/elftosb-

Now delete the old file from BUILD folder.Else you will get an error saying delete that file.

rm -rf /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-

Now again start building using the command


After sucessful build you will be seeing this


After you have completed a build by using LTIB, you will have a target root filesystem in the rootfs directory inside the LTIB install directory. For instance, if you installed LTIB in your home directory, there will be a ~/ltib/rootfs directory containing the target rootfs.
Inside the ~/ltib/rootfs/boot directory, you will find a set of .sb files. These are the boot streams that the i.MX28 ROM interprets to boot the system.


Happy Hacking 🙂