安装飞思卡尔freescale的LTIB(linux目标镜像编译工具)过程

来源:互联网 发布:mac网页开发工具 编辑:程序博客网 时间:2024/05/02 10:18

最近开始转向freescale imx6平台进行嵌入式开发,这款SoC在工控领域运用很广。


第一篇:安装飞思卡尔freescale的LTIB(linux目标镜像编译工具)过程

 刚接触imx6就了解到这个恶心的ltib,既然是官方出品的,咱也得试用一下看看。

Linux Target ImageBuilder (LTIB) is a tool created byFreescale that is used to build Linux targetimages, composed of a set of packages。

LTIB说白了就tool-chain,包括各种dependencylib,也包括了对CPU,board,u-boot,kernel,busybox的配置。

 

i.MX 6 series 采用ARM Cortex A9 CPU。分为支持单核Solo,双核Dual,四核Quad。list: i.MX6Qi.MX6D i.MX6DL i.MX6Si.MX6SX i.MX6SL六款型号。

 

我的目标是基于iMX6S开发arm-linux系统,不是android。

 

首先是去飞思卡尔网站上面下载相关的开发工具,BSP,SDK及硬件配置工具。

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6_SW

最新可用的source code版本是L3.0.101_4.1.1_141016_source.tar.gz,但里面没有ltib(Linux Target Image Builder)。找啊找,终于在L3.0.35_4.0.0_130424_source.tar.gz包中找到,看来,freescale的习惯就是升级啊,以前发布过的,这次我就不一并发布了,并且发布也是以patch形式。

 

@ubuntu:/home/tools/L3.0.35_4.0.0_130424_source$ls

EULA     ltib.tar.gz           pkgs                tftp.zip

install  package_manifest.txt  redboot_201003.zip

tanyc@ubuntu:/home/tools/L3.0.35_4.0.0_130424_source$./install

 

You are about toinstall the LTIB (GNU/Linux Target Image Builder)

 

Before installingLTIB, you must read and accept the EULA

(End User LicenseAgreement) which will be presented next.

 

Do you want tocontinue ? Y|n

这个安装可真费劲,首先必须看完EULA授权协议。然后还必须得以非root用户来执行安装。

安装依赖库,死活说zlib没有安装。最后解决方式是建立一个链接文件了事。

@ubuntu:/lib# ln-s x86_64-linux-gnu/libz.so.1 libz.so

 

一时半会ltib安装不上,就改为prebuilts,就是一些预编译好的工具链,开发板的公司一般都会提供。

 

ltib只支持linux 3.0.35-imx,不支持linux 3.0.101-imx。这让我有一些concern,或许可以问一下freescale,我估计应该是不必升级LTIB吧。

 

L3.0.101_4.1.1_141016_source下面有两个ltib_config_platform_imx.patch,但不知道如何打这个patch,因为没有打patch的指令文件。上freescalecommunity发了个帖子,结果发现早有人提了此问题。

Please refer tothe next :

https://www.freescale.com/webapp/Download?colCode=IMX6LXPATCHRN&appType=license&location=null&Parent_nodeId=&Parent_page…

下载来看了就是:i.MX 6 Linux 3.0.101_4.1.1 Patch Release Notes

 

ltib生成的配置文件放在如下目录:

tanyc@ubuntu:~/ltib/config/platform/imx$ls

busybox.config     imx51_3stack.cf        kernel-3.5.7.spec.in

defconfig.dev      imx51.cf               main.lkc

dev.profile        imx51_updater.cf       max.profile

fsl_mm.lkc         imx6q.cf               merge

imx233.cf          imx6q_updater.cf       min.profile

imx233_updater.cf  imx6s.cf               packages.lkc

imx25_3stack.cf    imx6s_defconfig.dev    pkg_map

imx25_updater.cf   imx6s_updater.cf       preconfigs.lkc

imx27ads.cf        imx_v4_v5.cf           release_gnome.profile

imx28.cf           imx_v6_v7.cf           release.profile

imx28_updater.cf   kernel-2.6.28.spec.in  u-boot.spec.in

imx31_3stack.cf    kernel-2.6.31.spec.in  u-boot-v2009.08.spec.in

imx31ads.cf        kernel-2.6.35.spec.in  u-boot-v2012.10.spec.in

imx35_3stack.cf    kernel-2.6.38.spec.in  updater.profile

imx35_updater.cf   kernel-3.0.15.spec.in

imx37_3stack.cf    kernel-3.0.35.spec.in

编译u-boot,kernel,busybox都有出错,但我判断LTIB安装是正确了的。理由是:/opt/freescale/目录已经完整创建。并且 ,我用

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin下面的工具链arm-linux-gcc来编译u-boot是通过的。

顺便说一下,arm-linux-gcc及arm-none-linux-gnueabi-gcc其实都指向arm-fsl-linux-gnueabi-gcc。

遗留问题:

ltib相关的两个patch,依照i.MX 6 Linux 3.0.101_4.1.1 PatchRelease Notes.pdf文档的说明,打patch不成功。

sudo rm /ltib/config/platform/imx/.config

./ltib config

可以重配ltib。但结果linux3.0.101仍然放不出来,这也说明patch不成功。

但我判断这个不影响uboot,kernel 的配置及编译。因为ltib本质上只是提供了一个编译的tool-chain而已。

0 0