免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1963 | 回复: 0
打印 上一主题 下一主题

如何在Fedora 10上安装Ltib [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-23 23:47 |只看该作者 |倒序浏览

       
       
       
       
       
       
Howto Install Ltib in
Fedora 10
Author:
misty (qibing(a)yahoo.com.cn)
本文档是说明如何在Fedora
10系统上安装Freescale
提供的Ltib安装包。Ltib(Linux
Target Imagine
Build)是可以为不同平台开发和配置BSP的工具。Freescale为不同的平台(包括PowerPC,ColdFire,ARM等)提供来不同的Ltib,可以使用户很方便地移植Uboot,移植Linux内核,以及制作文件系统,使用Ltib只需要进行简单的配置,就可以帮我们完成其余的工作。
准备工作
首先到Freescale的网站上下载自己平台的BSP包,下载地址为:
       
       
               
                        http://www.freescale.com/webapp/sps/site/overview.jsp?code=CW_BSP
               
       
我下载的是MPC8349EA_MDS_K26_20061221-LTIB.iso,这是为MPC8349EA开发板提供的BSP。
安装Ltib
下载了BSP的ISO文件后,挂载这个iso文件,
       
       
               
                        下面操作的假设条件:
                        MPC8349EA_MDS_K26_20061221-LTIB.iso在/home/qibing/目录下;
                        安装ltib到/home/qibing/ppc/目录下;
                        “#”表示当前是以root权限操作;
                        “$”表示当前是以普通用户权限操作;
                       
#cd
                        /home/qibing
                       
#mount
                        -o loop MPC8349EA_MDS_K26_20061221-LTIB.iso /mnt
                       
$cd
                        /mnt
                        $./intall
                        注:当提示输入ltib的安装路径时,输入/home/qibing/ppc
                       
$cd
                        /home/qibing/ppc
                       
$cd
                        ltib
               
       
下面就要安装ltib了,但是在Fedora
10上按照的时候会有很多问题,我以走过这个流程的身份先把将要遇到的问题提出来,并解决这些问题,这样下面的安装过程才顺利。
如果这时运行./ltib则会遇到两个问题:
1.
ltib安装是普通用户权限,但是部分操作需要root用户权限。按照提示进行如下操作,
       
       
               
                        #/usr/sbin/visudo
                        然后在文件最后添加如下内容:
                       
qibing ALL =
                        NOPASSWD:/bin/rpm, /opt/freescale/ltib/usr/bin/rpm
                        注:visudo实际就是编辑文件/etc/sudoers文件
               
       
2.
提示缺少rpm-build包。
通过$rpm
-qrpm-build命令查看rpm-build包已经安装了,这可能是ltib的问题或者其他函数的问题,解决方法是(从论坛上摘录的):
       
       
               
                       
From the directory where
                        you type "./ltib" type "gedit ltib" if you
                        have a Gnome install. I'm not sure what the KDE editor is, or use
                        VI if you want edit in the console text mode. Search for
                        "pre_install_deps". This is the table that
                        "check_basic_deps" refers to. Look for a line that
                        contains " rpm-buld 0". Comment out the line by adding
                        "#" to the left of the line. Save and you should be good
                        to go.
               
       
如果这时继续运行./ltib安装,则还会有问题,我自己的error
log文件弄丢了,这是网上摘录的:
       
       
               
                       
cp
                        ./initscan.c scan.c
touch .bootstrap
gcc -c -I. -I. -g -O
                        ccl.c
gcc -c -I. -I. -g -O dfa.c
gcc -c -I. -I. -g -O
                        ecs.c
gcc -c -I. -I. -g -O gen.c
gcc -c -I. -I. -g -O
                        main.c
gcc -c -I. -I. -g -O misc.c
gcc -c -I. -I. -g -O
                        nfa.c
bison -y -d ./parse.y
make: *** [parse.c] Segmentation
                        fault
error: Bad exit status from
                        /home/nabendu/ltib-mpc8349emds-20061221/tmp/rpm-tmp.81449 (%build)
                       
RPM
                        build errors:
Bad exit status from
                        /home/nabendu/ltib-mpc8349emds-20061221/tmp/rpm-tmp.81449
                        (%build)
Build time for flex: 13 seconds
                       
Failed
                        building flex
Died at ./ltib line 1395.
                       
Started:
                        Fri May 16 00:56:58 2008
Ended: Fri May 16 01:29:53
                        2008
Elapsed: 1975 seconds
                       
These packages failed to
                        build:
flex
Build Failed
               
       
解决的方法是:在运行./ltib之前,修改”dist/lfs-5.1/bison/bison.spec”文件,在%Build段修改make为make
CFLAGS=-O0。然后再运行./ltib。
接着会遇到下面的问题,
       
       
               
                        + umask 022
                       
                       
                       
+ cd
                        /opt/freescale/ltib/usr/src/rpm/BUILD
                       
                       
                        + cd mtd
                       
                       
                        + make -C util
                       
                       
                       
make: Entering directory
                        `/opt/freescale/ltib/usr/src/rpm/BUILD/mtd/util'
                       
                       
                       
gcc -I../include -O2 -Wall
                        -g -c -o ftl_format.o ftl_format.c -g -Wp,-MD,.ftl_format.c.dep
                       
                       
                       
In file included from
                        /usr/include/endian.h:61,
                       
                       
                       
                 from
                        /usr/include/sys/types.h:217,
                       
                       
                       
                 from
                        ftl_format.c:38:
                       
                       
                       
../include/bits/byteswap.h:21:3:
                        error: #error "Never use  directly;
                        include  instead."
                       
                       
                       
make: *** [ftl_format.o]
                        Error 1
                       
                       
                       
make: Leaving directory
                        `/opt/freescale/ltib/usr/src/rpm/BUILD/mtd/util'
                       
                       
                       
error: Bad exit status
                        from /home/qibing/ppc/ltib-mpc8349emds-20061221/tmp/rpm-tmp.88474
                        (%build)
                       
                       
                       
                       
                       
                       
                       
                       
                       
                       
                        RPM build errors:
                       
                       
                       
    Bad exit status from
                        /home/qibing/ppc/ltib-mpc8349emds-20061221/tmp/rpm-tmp.88474
                        (%build)
                       
                       
                       
Build time for mtd-utils:
                        0 seconds
                       
                       
                       
                       
                       
                       
                        Failed building mtd-utils
                       
                       
                        Died at ./ltib line 1395.
                       
                       
                       
                       
                       
                       
                       
Started: Thu Jul 23
                        22:06:36 2009
                       
                       
                       
Ended:   Thu Jul 23
                        22:06:37 2009
                       
                       
                        Elapsed: 1 seconds
                       
                       
                       
                       
                       
                       
                       
These packages failed to
                        build:
                       
                       
                       
mtd-utils
                       
                       
                       
                        Build Failed
               
       
解决方法是:修改“[color="#000000"]/opt/freescale/pkgs/mtd-utils-20060302-cf-byteswap_h-1.patch”文件,下面是网上论坛中摘录的解决方法:
       
       
               
                        [color="#000000"]Hi,
                       
I
                        had the same problem under Ubuntu 9.04. I solved it by modifying
                        the lines 46, 47 and 48 of the
                        "/opt/freescale/pkgs/mtd-utils-20060302-cf-byteswap_h-1.patch"
                        [color="#000000"]file.
                       
                       
                       
+#if
                        !defined _BYTESWAP_H && !defined _NETINET_IN_H
                       
+#
                        error "Never use  directly; include
                         instead."
                        [color="#000000"]+#endif
                       
                       
                        [color="#000000"]by
                       
                       
                       
+//#if
                        !defined _BYTESWAP_H && !defined _NETINET_IN_H
                       
+//#
                        error "Never use  directly; include
                         instead."
                        [color="#000000"]+//#endif
                       
                       
                       
(very
                        cheap solution, but ... it works :-) )
                       
               
       
然后删除掉“/opt/freescale/ltib/usr/src/rpm/BUILD/mtd”这个目录,最后再运行./ltib,最后安装成功^_^。
使用Ltib
附录
1.
安装时出现错误的解决方法参看下面链接

http://forums.freescale.com/freescale/board/message?board.id=CWCFCOMM&thread.id=2044&view=by_date_ascending&page=1

2.
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/70351/showart_2005242.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP