《CentOS 6.3 64-bit Host Building i.MX6Q-SDB Linux L3.0.35_12.09.01.01_GA_Source》
Introduction
The SABRE Board for Smart Devices Based on the i.MX 6 Series is an evalutaion board featuring the i.MX6 Quad Core Cortex-A9 processor. Freescale ported the Linux Operating System (as of this writing version 3.0.35) and the Board Support Package (BSP) containing the Linux Kernel, build system called LTIB, GCC compiler tools, boot loader, u-boot, and root file system is available for download, install, and build.
LTIB is a perl script and is the acroynm for Linux Target Image Builder.
This document describes setting up a CentOS 6.3 64-bit host in a virtual machine for using the BSP and running the images on i.MX6Q-SDB evaluation board.
References
Description
|
Reference
|
---|---|
CentOS 6.3 LiveCD installed in a virtual machine from virtual box. |
CentOS-6.3-x86_64-LiveCD.iso 9953ff1cc2ef31da89a0e1f993ee6335 |
The BSP provides, a build system called ltib, GNU tools, U-Boot, Linux Kernel, and root file system: (由于Freescale官方不断更新,我下载的是 L3.0.35_4.1.0_130816_source.tar.gz) |
Download archive fromhttp://freescale.com/sabresdb L3.0.35_12.09.01.0_GA_source.tar.gz5ab4198278e92e03be74ca602227afad |
Virtual Box - A Virtual Machine used for creating the CentOS host. Virtual Box installed on Windows 7 64-bit Pro, then create the VM. Allocated 20 GB Hard disk and 1 MB RAM. The steps for installations are found at the virtual box web site. | http://www.virtualbox.org |
Document Conventions
Bold lines are Linux commands and edits run on CentOS.
The '$' indicates running the command as a regular user
The '#' indicates running the command as root user.
CentOS Host Setup
For this example a virtual machine is used, however a dedicated PC running only CentOS linux could be used.
1. Add user login to sudo'ers file (给普通用户添加root权限)
Login as user root and run the visudo command
# visudo
Add the following line and save the file:
user ALL=(ALL) ALL
2. Update the system packages:
$ sudo yum udpate
3. Install package for "ltib" operations: (安装必备的软件)
$ sudo yum install make gcc gcc-c++ kernel-devel bison libuuid-devel ncurses-devel zlib-devel lzo-devel intltool libtool tcl rpm-build perl-ExtUtils-MakeMaker ld-linux.so.2 zlib-1.2.3-27.el6.i686
4. Update sudo'ers file for supporting ltib rpm
$ sudo visudo
Add the following line and save the file:
user ALL=NOPASSWD: /bin/rpm,/opt/freescale/ltib/usr/bin/rpm
在最后添加 这一行,user替换成你的username。
Install BSP
The sources are in a tar gziped archive file which is downloaded from http://freescale.com/sabresdb, selecting the Software & Tools tab then expanding Run-time Software in the middle of the page. A free login is required for download which can be registered for by selecting the Login at the top right of the freescale.com page.
Once downloaded, verify the md5 checksum (see references above for the value).
$ mkdir ~/imx6
$ tar -zxf L3.0.35_12.09.01.01_GA_source.tar.gz -C ~/imx6
$ cd ~/imx6/*source
$ ./install
Installation complete, your ltib installation has been placed in
y/ltib, to complete the installation:
cd /ltib
./ltib
Read and accept the licensing information.
Choose a directory to install too, for this example entered .. which is the parent directory.
Build the i.MX6Q SDB
$ cd ~/imx6/ltib
$ ./ltib
./ltib
Installing host support packages.
This only needs to be done once per host, but may take up to
an hour to complete ...
If an error occurs, a log file with the full output may be found in:
/home/your name/L3.0.35_4.1.0_130816_source/ltib/host_config.log
需要等一会
如果出错:
出错一:
/bin/sh: texi2dvi: command not found使用:
make[2]: *** [flex.pdf] Error 127
make[2]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/flex-2.5.37/doc'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/flex-2.5.37'
make: *** [install] Error 2
yum whatprovides *texi2dvi
texinfo-tex-4.13a-8.el6.x86_64 : Tools for formatting Texinfo documentation files using TeXRepo : baseMatched from:Filename : /usr/bin/texi2dviFilename : /usr/bin/pdftexi2dvitexlive-texmf-doc-2007-38.el6.noarch : TeX documentationRepo : baseMatched from:Filename : /usr/share/texmf/doc/texdraw/texi2dvi
sudo yum install texinfo-tex
$ sudo rm -rf /opt/freescale/
$ ./ltib
出错二:
Can't get: m4-1.4.16.tar.gz at ./ltib line 802
下载地址:http://ftp.gnu.org/gnu/m4/
下载到:/opt/freescale/pkgs
wget:http://ftp.gnu.org/gnu/m4/
mkspooflinks-3.4.tar.gz
bison-2.6.tar.gz
flex-2.5.37.tar.gz
autoconf-2.68.tar.gz
..........................
用同样方法解决。
所有文件都在这里:pkgs files
After some time (depends on how fast your host computer is) the menuing system is shown which allows you to select build configurations.
The second screen selects the development platform which is imx6q for the SDB. For this example the Min profile is chosen which is the default. Use the arrow keys to move and the enter key to select. The space bar selects/deselects an entry.
Use the right arrow key to move to <Exit> and press the enter key. The save dialog box is presented, save. The next menu is the iMX6x Base Boards which leaving all as default except for the U-boot board selection which is mx6q_sabresd for the SDB. Save and exit.
Images
When ltib completes, the images are found in <ltib>/rootfs/boot.
Bootloader = u-boot.bin
Linux Kernel = uImage
File system = </ltib>/rootfs
from:https://community.freescale.com/docs/DOC-93865
编译过程要下载好多源码包,由于“fanghuochangcheng”,真是历经千辛万苦
最后:
Processing deployment operations
==================================
making filesystem image file
staging directory is /home/your name/L3.0.35_4.1.0_130816_source/ltib/rootfs.tmp
removing the boot directory and files
removing man files and directories
removing info files
removing /usr/share/locale directory
removing static libraries
removing target rpm database
stripping binaries and libraries
Filesystem stats, including padding:
Total size = 22248k
Total number of files = 1586
Started: Tue May 12 18:22:41 2015
Ended: Tue May 12 18:23:06 2015
Elapsed: 25 seconds
Build Succeeded