学习中遇到的问题小计

来源:互联网 发布:小米任我行联通4g知乎 编辑:程序博客网 时间:2024/06/04 19:48

2014-09-10 

编译内核遇到如下警告

make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Warning: File `scripts/Makefile.host' has modification time 2.3e+07 s in the future

开始以为是编译器版本低于内核版本导致的,,差点去研究怎么制作交叉编译工具

后来才发现是系统时间设置的不对,修改系统时间命令

date -s 07/13/2007
date -s 11:55:00


2014-09-10 

用4412CD中的编译工具arm-linux-gcc-4.5.1-v6-vfp-20120301编译程序在2440上不能运行

而用arm-linux-gcc-4.4.3-20100728可以运行

猜想编译工具与运行平台有关,不知道-v6-vfp这个后缀是什么意思

看样子没有后缀的编译工具编译的程序在2440的板子上可用,但是不知道在4412上能跑不,因为我怀疑没有后缀的arm-linux-gcc在arm上是通用的

有机会要了解一下交叉编译工具的组成


arm-linux-gcc的下载地址

ARM官方连接:http://www.codesourcery.com/gnu_toolchains/arm/download.html

友善之臂官方网站:http://www.arm9.net/download.asp


2014-09-15 

由于google在大陆没有服务器了,更新android开发工具成了问题,这是找的一个大陆的下载地址

http://www.cnblogs.com/bjzhanghao/archive/2012/11/14/2769409.html


2014-09-20

在ubuntu9.10上装xawtv在线装出问题,下载源码包编译还出错

在ubuntu12.0上xawtv到是装上了,但是虚拟摄像头驱动编译出错,编译需要的模块时出错

郁闷啊,明天学英语整这玩意了


2014-11-14 

仿照u-boot写字符界面,链接文件的时候出现如下情况

arm-linux-ld -Tboot.lds -o boot.elf start.o init.o boot.o device.oboot.o(.text+0x198): In function `main':: undefined reference to `abortboot'device.o(.text+0xa0): In function `udelay':: undefined reference to `__udivsi3'device.o(.text+0xc0): In function `udelay':: undefined reference to `__udivsi3'make: *** [boot.bin] Error 1
我靠,郁闷啊,

明天编译U-BOOT 在里面加打印试试,看看到底u-boot运行那些函数了没

这个问题在链接的时候加上-Ttext 0x33F80000  解决了

类似的后来包含头文件#include <stdarg.h>  却怎么也找不到   编译时候加上选项

-isystem /work/tools/gcc-3.4.5-glibc-2.3.6/lib/gcc/arm-linux/3.4.5/include 




2014-11-16 

试写bootloader的字符界面,实现两条命令hello和test
打印命令字符长度
len = strlen (cmd);
puthex((unsigned int)len);
cmd为命令,打印结果一会是正确的0x00000005一会又变成0x00000105
找了一整天这个毛病,快崩溃了

怀疑是不是什么字节对齐或者其他高端的问题




2014-11-21 

下载最新u-boot2014.10
配置make smdk2410_config
编译make
出现如下问题
book@book-desktop:/work/u-boot-2014.10$ makescripts/kconfig/conf --silentoldconfig Kconfig  CHK     include/config.h  GEN     include/autoconf.mkcc1: error: bad value (armv4) for -march= switchcc1: error: bad value (armv4) for -mtune= switchmake[2]: *** [include/autoconf.mk] Error 1make[1]: *** [silentoldconfig] Error 1make: *** No rule to make target `include/config/auto.conf', needed by `include/config/uboot.release'.  Stop.

这个问题最终在README中找到了答案
在长长的README中最最最后面
Building the Software:======================Building U-Boot has been tested in several native build environmentsand in many different cross environments. Of course we cannot supportall possibly existing versions of cross development tools in all(potentially obsolete) versions. In case of tool chain problems werecommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK)which is extensively used to build and test U-Boot.If you are not using a native environment, it is assumed that youhave GNU cross compiling tools available in your path. In this case,you must set the environment variable CROSS_COMPILE in your shell.Note that no changes to the Makefile or any other source files arenecessary. For example using the ELDK on a 4xx CPU, please enter:$ CROSS_COMPILE=ppc_4xx-$ export CROSS_COMPILE

我搜索Makefile把这几行
# set default to nothing for native buildsifeq ($(HOSTARCH),$(ARCH))CROSS_COMPILE ?=endif
换成
CROSS_COMPILE=/work/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-export CROSS_COMPILE
果然能编译了

真心很吐血,老版本的u-boot都不用设编译器,新版本那么麻烦




0 0
原创粉丝点击