ubuntu 12.04.2 基于 L3.0.35_1.1.0_121218_source LTIB 问题汇总

梦想与她 提交于 2019-12-26 14:13:39

1)解压L3.0.35_1.1.0_121218_source.tar.gz

2)cd  L3.0.35_1.1.0_121218_source ,执行./install
3)  复制 patch-ltib-ubuntu12.04.sh 到 litb文件夹,
     修改权限,sudo chmod 777  patch-ltib-ubuntu12.04.sh ,
     执行:./ patch-ltib-ubuntu12.04.sh 
4)执行:./ltib
错误1:make[1]: Entering directory `/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/bld/linux'
gcc -g -I/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/elftosb2 -I/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/keygen -I/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/sbtool -I/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/common -DLinux -c /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/common/AESKey.cpp
In file included from /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/common/AESKey.h:10:0,
                 from /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/common/AESKey.cpp:8:
/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/common/stdafx.h:30:36: fatal error: /usr/include/sys/types.h: No such file or directory
compilation terminated.
make[1]: *** [AESKey.o] Error 1
make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/bld/linux'
make: *** [all] Error 2
error: Bad exit status from /home/think/imx6/ltib/tmp/rpm-tmp.51338 (%build)


RPM build errors:
    Bad exit status from /home/think/imx6/ltib/tmp/rpm-tmp.51338 (%build)
Build time for elftosb: 0 seconds

Failed building elftosb
Died at ./ltib line 1392.
traceback:
 main::build_host_rpms:1392
  main::host_checks:1447
   main:554
以上错误是因为/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0/common/stdafx.h,包含的头文件types.h的路径
不对导致,修改stdafx.h文件:
1)cd /opt/freescale/pkgs/
2)tar zxvf elftosb-1.1.0.tar.gz 
3)修改stdafx.h文件,#include"/usr/include/sys/types.h" 改成 #include"/usr/include/i386-linux-gnu/sys/types.h"
4)重新打包:
tar zcvf elftosb-1.1.0.tar.gz elftosb-1.1.0
5)rm -rf /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-1.1.0
6)./ltib -m config
执行通过,祝贺一下。
./ltib install 出错:
  • /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /lib/libc.so.6

    /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /usr/lib/libc_nonshared.a

    /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /lib/ld-linux.so.3

    解决方法:

    编辑 ltib/dist/lfs-5.1/base_libs/base_libs.spec

    找到以下行

    perl -w -e '

     @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV

    exit(0) unless @ARGV;

    删除.“ @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV”以及"exit(0) unless @ARGV;"

    保存退出。

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!