Chinaunix首页 | 论坛 | 博客
  • 博客访问: 120322
  • 博文数量: 61
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 230
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-26 11:35
个人简介

实践Linux的理论

文章存档

2015年(1)

2014年(60)

我的朋友

分类: LINUX

2014-07-04 07:25:57

原文地址:Ubuntu12.04安装LTIB 作者:清平世

1、根据官方文档“Setting_Up_LTIB_Host.pdf”安装好相应的包,这里不多说,没多大问题。
2、解压L3.0.35_4.0.0_******source.tar(官网下载相应的源码包),运行解压目录下的install,注意选择好目标目录。
3、到了运行./ltib -m config 呵呵,出错了吧,别慌:
    cd
    ./patch-ltib-ubuntu12.04.sh
    patch -p1 < patch-dist-ubuntu12.04.patch
patch-ltib-ubuntu12.04.sh

点击(此处)折叠或打开

  1. #!/usr/bin/env bash

  2. # get the patch tarball and untar it
  3. wget -O ubuntu-ltib-patch.tgz https://community.freescale.com/servlet/JiveServlet/downloadBody/93454-102-3-2834/ubuntu-ltib-patch.tgz
  4. tar -xzvf ubuntu-ltib-patch.tgz

  5. # execute the script which do the patching
  6. ltibDir=`pwd`
  7. cd ubuntu-ltib-patch
  8. ./install-patches.sh $ltibDir
patch-dist-ubuntu12.04.patch

点击(此处)折叠或打开

  1. diff -uNr old/dist/lfs-5.1/base_libs/base_libs.spec new/dist/lfs-5.1/base_libs/base_libs.spec
  2. --- old/dist/lfs-5.1/base_libs/base_libs.spec 2013-11-09 11:08:21.897348939 +0800
  3. +++ new/dist/lfs-5.1/base_libs/base_libs.spec 2013-11-08 15:18:58.175937281 +0800
  4. @@ -296,7 +296,7 @@
  5. # remove absolute paths from text search files (if they exist)
  6. perl -w -e '
  7. - @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV;
  8. + @ARGV = grep { `file $_` =~ m,ASCII\s+.*text, } @ARGV;
  9. exit(0) unless @ARGV;
  10. $^I = ".bak";
  11. while(<>) {
  12. diff -uNr old/dist/lfs-5.1/glibc/glibc-2.3.2.spec new/dist/lfs-5.1/glibc/glibc-2.3.2.spec
  13. --- old/dist/lfs-5.1/glibc/glibc-2.3.2.spec 2013-11-09 11:08:13.149349103 +0800
  14. +++ new/dist/lfs-5.1/glibc/glibc-2.3.2.spec 2013-11-08 15:19:22.835937109 +0800
  15. @@ -192,7 +192,7 @@
  16. # remove absolute paths from text search files (if they exist)
  17. perl -w -e '
  18. - @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV;
  19. + @ARGV = grep { `file $_` =~ m,ASCII\s+.*text, } @ARGV;
  20. exit(0) unless @ARGV;
  21. $^I = ".bak";
  22. while(<>) {
  23. diff -uNr old/dist/lfs-5.1/glibc/glibc.spec new/dist/lfs-5.1/glibc/glibc.spec
  24. --- old/dist/lfs-5.1/glibc/glibc.spec 2013-11-09 11:08:13.145349103 +0800
  25. +++ new/dist/lfs-5.1/glibc/glibc.spec 2013-11-08 15:19:48.431936930 +0800
  26. @@ -97,7 +97,7 @@
  27. # remove absolute paths from text search files (if they exist)
  28. perl -w -e '
  29. - @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV;
  30. + @ARGV = grep { `file $_` =~ m,ASCII\s+.*text, } @ARGV;
  31. exit(0) unless @ARGV;
  32. $^I = ".bak";
  33. while(<>) {
  34. diff -uNr old/dist/lfs-5.1/gst-plugins-good/gst-plugins-good.spec new/dist/lfs-5.1/gst-plugins-good/gst-plugins-good.spec
  35. --- old/dist/lfs-5.1/gst-plugins-good/gst-plugins-good.spec 2013-11-09 11:07:59.141349366 +0800
  36. +++ new/dist/lfs-5.1/gst-plugins-good/gst-plugins-good.spec 2013-11-08 17:40:10.143878188 +0800
  37. @@ -21,9 +21,6 @@
  38. %patch1 -p1
  39. %Build
  40. -#export CAIRO_CFLAGS="-I${DEV_IMAGE}/usr/include/cairo"
  41. -#export CAIRO_LIBS="-L${DEV_IMAGE}/usr/lib/cairo"
  42. -#export LIBS="-lcairo"
  43. ./configure --prefix=%{_prefix} --host=$CFGHOST \
  44. --build=%{_build} --without-check \

继续./ltib(当然要在你的ltib安装目录之下)
是不是还有一个
[AESKey.o] Error 1的错误啊?
将下面内容保存为:elftosb-types_h-fix.patch并放在/opt/freescale/pkgs/目录
 

点击(此处)折叠或打开

  1. diff -rupN elftosb-11.09.01/common/stdafx.h elftosb-11.09.01-new/common/stdafx.h
  2. --- elftosb-11.09.01/common/stdafx.h    2011-03-01 05:05:19.000000000 +0100
  3. +++ elftosb-11.09.01-new/common/stdafx.h    2013-05-07 06:03:56.399989483 +0200
  4. @@ -27,7 +27,7 @@
  5.  // For Linux systems only, types.h only defines the signed
  6.  // integer types. This is not professional code.
  7.  // Update: They are defined in the header files in the more recent version of redhat enterprise gcc.
  8. -#include "/usr/include/sys/types.h"
  9. +#include <sys/types.h>
  10.  #include <stdint.h>
  11.  //typedef unsigned long uint32_t;
  12.  //typedef unsigned short uint16_t;
  13. diff -rupN elftosb-11.09.01/stdafx.h elftosb-11.09.01-new/stdafx.h
  14. --- elftosb-11.09.01/stdafx.h    2013-05-07 06:04:25.055987505 +0200
  15. +++ elftosb-11.09.01-new/stdafx.h    2013-05-07 06:03:23.671990775 +0200
  16. @@ -27,7 +27,7 @@
  17.  // For Linux systems only, types.h only defines the signed
  18.  // integer types. This is not professional code.
  19.  // Update: They are defined in the header files in the more recent version of redhat enterprise gcc.
  20. -#include "/usr/include/sys/types.h"
  21. +#include <sys/types.h>
  22.  //typedef unsigned long uint32_t;
  23.  //typedef unsigned short uint16_t;
  24.  //typedef unsigned char uint8_t;
再编辑文件ltib_root/dist/lfs-5.1/elftosb/elftosb.spec,增加如下红色部分内容:

...

Source : %{name}-%{version}-%{release}.tar.gz

Patch0 : elftosb-types_h-fix.patch

BuildRoot : %{_tmppath}/%{name}

  ...

%setup -n %{name}-%{version}-%{release}

%patch0 -p1

%Build

make

...

再删掉/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-3.0.35-4.0.0,或其它以elftosb开头的,如有的话

到这里我在Ubuntu12.04上安装的ltib就没有什么错误了。

阅读(1809) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~