ubuntu 10.10 ltib 安裝 問題解決

來源:互聯網
上載者:User

 

 

第一個問題:關於安裝過程中需要超級許可權,而ltib安裝又不讓用root使用者安裝,所以只有修改/etc/sudoers檔案,

sudo visudo

在最後一行添加 username ALL=NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm

需要添加的內容我是得到的過程是:

開始我在最後一行添加 username ALL=(ALL) ALL

執行./ltib 

自動提示出來你需要添加的內容 我的當然就是username ALL=NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm

再次執行 sudo visudo 修改最後一行的內容。

 

第二個rpm-build的問題:我的解決辦法跟下面描述的不一樣,rpmbuild是安裝上了,但是我的原因是因為我使用sudo apt-get install rpm 預設安裝的rpm版本太高是rpm4.7。最後我重新下載了rpm_4.4.2.3-1_i386.deb,由於安裝包有相當多的依賴關係我總共下載了

librpm4.4_4.4.2.3-1_i386.deb

libbeecrypt6_4.1.2-7_i386.deb

libneon27_0.28.2-6.1_i386.deb

libcomerr2_1.41.3-1_i386.deb

相關下載deb包的地址:http://www.debian.org/distrib/packages

以後遇到的問題安裝下面文章解決方案均的到解決。

以下轉自:http://blog.chinaunix.net/u2/70351/showart_2005242.html 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 <bits/byteswap.h> directly; include <byteswap.h> 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

解決方案是:修改“ /opt/freescale/pkgs/mtd-utils-20060302-cf-byteswap_h-1.patch”檔案,下面是網上論壇中摘錄的解決方案:
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" file.

 

+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H

+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." +#endif

  by

 

+//#if !defined _BYTESWAP_H && !defined _NETINET_IN_H

+//# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." +//#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.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.