QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: faif

新手手记:一步一步教你在skyeye上运行uboot

[复制链接]
发表于 2005-2-16 10:30:24 | 显示全部楼层
都可以用。但不能单步,不能看到代码。你能看到代码吗?
回复

使用道具 举报

发表于 2005-2-18 14:49:24 | 显示全部楼层
请教楼主,偶是新手,对一些基本知识还很欠缺,偶按楼主的介绍,遇到了问题,麻烦

楼主帮帮小第,十分感谢!
偶的交叉编译是按照SKYEYE光盘里安装的,过程如下:
为编译armlinux建立交叉编译环境
    1)安装3.3.2版本
        #cd /opt/skyeye-cdrom/DevelopTools/ARMlinux_gnutools/arm/
        #cp arm-linux-gcc-3.3.2.tar.bz2 /
        #cd /
        #tar jxfv arm-linux-gcc-3.3.2.tar.bz2
        #ls /usr/local/arm/3.3.2/bin/arm-linux-* (可以看到3.3.2版本的arm-

linux-gcc等编译工具已经到您的机器上)
    1)安装2.95.3版本
        #cd /opt/skyeye-cdrom/DevelopTools/ARMlinux_gnutools/arm/
        #cp cross-2.95.3.tar.bz2 /usr/local/arm/
        #cd /usr/local/arm/
        #tar jxfv cross-2.95.3.tar.bz2
        #ls /usr/local/arm/2.95.3/bin/arm-linux-* (可以看到2.95.3版本的arm-

linux-gcc等编译工具已经到您的机器上)

然后偶下载了楼主介绍的UBOOT,改写了EP7312.H,接下来的操作过程如下:
[root@localhost u-boot-1.1.2]# ls
arm_config.mk  drivers         lib_microblaze        mips_config.mk
board          dtt             lib_mips              mkconfig
CHANGELOG      examples        lib_nios              net
common         fs              lib_nios2             nios2_config.mk
config.mk      i386_config.mk  lib_ppc               nios_config.mk
COPYING        include         m68k_config.mk        post
cpu            lib_arm         MAINTAINERS           ppc_config.mk
CREDITS        lib_generic     MAKEALL               README
disk           lib_i386        Makefile              rtc
doc            lib_m68k        microblaze_config.mk  tools
[root@localhost u-boot-1.1.2]# make ep7312_config
Configuring for ep7312 board...
[root@localhost u-boot-1.1.2]# make all
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/root/u-boot-1.1.2/tools'
ln -s ../common/environment.c environment.c
ln -s ../lib_generic/crc32.c crc32.c
gcc -M -Wall -pedantic -idirafter ../include -DTEXT_BASE=0xc0f80000 -

DUSE_HOSTCC environment.c img2srec.c mkimage.c crc32.c envcrc.c

gen_eth_addr.c bmp_logo.c > .depend
make[1]: Leaving directory `/root/u-boot-1.1.2/tools'
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/root/u-boot-1.1.2/tools'
make[1]: `.depend' is up to date.
make[1]: Leaving directory `/root/u-boot-1.1.2/tools'
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/root/u-boot-1.1.2/examples'
/bin/sh: line 1: arm-linux-gcc: command not found
dirname: 参数太少
请尝试执行‘dirname --help’来获取更多信息。
/bin/sh: line 1: arm-linux-gcc: command not found
dirname: 参数太少
请尝试执行‘dirname --help’来获取更多信息。
arm-linux-gcc -M -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -

mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xc0f80000 -

I/root/u-boot-1.1.2/include -fno-builtin -ffreestanding -nostdinc -isystem  

-pipe  -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=arm7tdmi -Wall

-Wstrict-prototypes hello_world.c stubs.c  > .depend
/bin/sh: line 1: arm-linux-gcc: command not found
make[1]: *** [.depend] Error 127
make[1]: Leaving directory `/root/u-boot-1.1.2/examples'
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/root/u-boot-1.1.2/post'
arm-linux-gcc -M -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -

mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xc0f80000 -

I/root/u-boot-1.1.2/include -fno-builtin -ffreestanding -nostdinc -isystem  

-pipe  -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=arm7tdmi -Wall

-Wstrict-prototypes cache_8xx.S cache.c codec.c cpu.c dsp.c ether.c i2c.c

memory.c post.c rtc.c spr.c sysmon.c tests.c uart.c usb.c watchdog.c >

.depend
/bin/sh: line 1: arm-linux-gcc: command not found
make[1]: *** [.depend] Error 127
make[1]: Leaving directory `/root/u-boot-1.1.2/post'
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/root/u-boot-1.1.2/post/cpu'
arm-linux-gcc -M -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -

mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xc0f80000 -

I/root/u-boot-1.1.2/include -fno-builtin -ffreestanding -nostdinc -isystem  

-pipe  -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=arm7tdmi -Wall

-Wstrict-prototypes asm.S cmp.c cmpi.c two.c twox.c three.c threex.c

threei.c andi.c srawi.c rlwnm.c rlwinm.c rlwimi.c store.c load.c cr.c b.c

multi.c string.c complex.c > .depend
/bin/sh: line 1: arm-linux-gcc: command not found
make[1]: *** [.depend] Error 127
make[1]: Leaving directory `/root/u-boot-1.1.2/post/cpu'
make: *** [depend] Error 2
[root@localhost u-boot-1.1.2]#
就是这样了,这个问题与交叉编译环境有关吧?偶该任何解决,请指点!
小弟是绝对新手,这样的问题还望各位大侠不要笑话偶哦~各位都帮帮偶,万分感激~
回复

使用道具 举报

发表于 2005-2-23 09:16:14 | 显示全部楼层

可以进行debug了,向大家报告一下

在make u-boot之前修改board下的u-boot.lds文件,在后面添加如下代码即可:/* Stabs debugging sections.    */
        .stab 0 : { *(.stab) }
        .stabstr 0 : { *(.stabstr) }
        .stab.excl 0 : { *(.stab.excl) }
        .stab.exclstr 0 : { *(.stab.exclstr) }
        .stab.index 0 : { *(.stab.index) }
        .stab.indexstr 0 : { *(.stab.indexstr) }
        .comment 0 : { *(.comment) }
        .debug_abbrev 0 : { *(.debug_abbrev) }
        .debug_info 0 : { *(.debug_info) }
        .debug_line 0 : { *(.debug_line) }
        .debug_pubnames 0 : { *(.debug_pubnames) }
        .debug_aranges 0 : { *(.debug_aranges) }

回复

使用道具 举报

发表于 2005-2-23 17:11:31 | 显示全部楼层

Re: ELDK安装后编译u-boot-1.1.2出问题,帮忙看一下

[quote:b46f0b58a5="q1a1z1"]make ep7312_config后
执行make all 出现如下
arm-linux-gcc -v 显示3.3.3


1-20 02:31:02 > 2005-01-18 21:05:37.346299)                                    
make[1]: `.depend' is up to date.                                             
make[1]: warning:  Clock skew detected.  Your build may be incomplete.         
make[1]: Leaving directory `/home/llf/u-boot-1.1.2/examples'                  
make[1]: Entering directory `/home/llf/u-boot-1.1.2/post'                     
make[1]: *** Warning: File `.depend' has modification time in the future (2005-
1-20 02:31:02 > 2005-01-18 21:05:37.699424)                                    
make[1]: `.depend' is up to date.                                             
make[1]: warning:  Clock skew detected.  Your build may be incomplete.         
make[1]: Leaving directory `/home/llf/u-boot-1.1.2/post'                       
make[1]: Entering directory `/home/llf/u-boot-1.1.2/post/cpu'                  
make[1]: *** Warning: File `.depend' has modification time in the future (2005-
1-20 02:31:02 > 2005-01-18 21:05:38.17866                                    
make[1]: `.depend' is up to date.                                             
make[1]: warning:  Clock skew detected.  Your build may be incomplete.         
make[1]: Leaving directory `/home/llf/u-boot-1.1.2/post/cpu'                  
make -C tools all                                                              
make[1]: Entering directory `/home/llf/u-boot-1.1.2/tools'                     
make[1]: *** Warning: File `.depend' has modification time in the future (2005-
1-20 02:31:02 > 2005-01-18 21:05:39.61665                                    
make[1]: *** No rule to make target `/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.
1.66/include/stddef.h', needed by `img2srec.o'.  Stop.                        
make[1]: Leaving directory `/home/llf/u-boot-1.1.2/tools'[/quote]

检查你的系统时间是否正确。
回复

使用道具 举报

发表于 2005-2-26 10:27:26 | 显示全部楼层

到最后还是有问题

偶下了楼主推荐的交叉编译工具,make all后还是有问题

/opt/x86-arm/usr/bin/../lib/gcc-lib/arm-linux/3.3.3/../../../../arm-linux/bin/ld: cannot find -lfloat
collect2: ld returned 1 exit status
make[1]: *** [hello_world] Error 1
make[1]: Leaving directory `/root/u-boot-1.1.2/examples'
make: *** [examples] Error 2

用以前的也是出错

/usr/local/arm/2.95.3/arm-linux/bin/ld: cannot find -lfloat
collect2: ld returned 1 exit status
arm-linux-gcc: file path prefix `static' never used
make[1]: *** [hello_world] Error 1
make[1]: Leaving directory `/root/u-boot-1.1.2/examples'
make: *** [examples] Error 2

望楼主指点~
回复

使用道具 举报

发表于 2005-3-21 22:08:20 | 显示全部楼层
能不能给发个源程序,这里是教育网,上不了上面的网址
最近又找不到好的代理服务器^_^[email protected]
回复

使用道具 举报

发表于 2005-3-29 19:00:16 | 显示全部楼层

make clean

好像是make distclean?记不清了,反正清理之后就能够编译通过了
回复

使用道具 举报

发表于 2005-4-1 09:28:20 | 显示全部楼层
你把makefile文件中subdir里example注释掉
回复

使用道具 举报

发表于 2005-4-14 17:10:43 | 显示全部楼层
[quote:d4826ab8a9="白雪皑皑"]都可以用。但不能单步,不能看到代码。你能看到代码吗?[/quote]

可以单步,也可以看到代码。
你在main_loop设个断点,然后run,自然可以停下来。
回复

使用道具 举报

发表于 2005-4-16 23:19:41 | 显示全部楼层
我在skyeye里运行u-boot的时候,
Hit any key to stop autoboot :n
这个数字很快就成0了,
必须得快速按键盘才行,
这个要怎么改才好?

还有一个CRC bad 的 Warning,不知道是否正常?

还有个问题,用图形界面的skyinsight运行uboot的时候,
当uboot运行的时候,skyinsight就不能操作了,
中断以后也看不到源代码,
用uboot和uboot.bin都一样。
回复

使用道具 举报

 楼主| 发表于 2005-4-19 23:06:33 | 显示全部楼层
[quote:a096ca78e5="keepstudying"]我在skyeye里运行u-boot的时候,
Hit any key to stop autoboot :n
这个数字很快就成0了,
必须得快速按键盘才行,
这个要怎么改才好?

还有一个CRC bad 的 Warning,不知道是否正常?

还有个问题,用图形界面的skyinsight运行uboot的时候,
当uboot运行的时候,skyinsight就不能操作了,
中断以后也看不到源代码,
用uboot和uboot.bin都一样。[/quote]

在你的主板的配置头文件里面寻找
#define CONFIG_BOOTDELAY        n
把后面的n改为大的数字。

CRC bad是正常的,因为刚起动的时候Flash里面没有存储任何你设定的环境变量的信息。现在的0.9.2的flash模拟已经搞好了,你可以试试看。我还没有试过。
回复

使用道具 举报

发表于 2005-5-3 11:18:21 | 显示全部楼层
ELDK貌似是没有提供浮点库,把Makefile里的SUBDIRS里的examples去掉好了。
0.9.4的CRC好像还有warning,不过没什么影响
至于autoboot的话,可以把common/main.c里面的abortboot函数改为恒返回1就可以了。
回复

使用道具 举报

发表于 2005-5-6 22:24:40 | 显示全部楼层
不行啊
CS8900已经define 成0了
但加载uboot时 仍提示找不到CS8900 停在那了
回复

使用道具 举报

发表于 2005-5-13 13:20:06 | 显示全部楼层
谢谢楼主,我用这个可以run起来了。
但是我在调试的时候遇到一些问题,请教一下各位:
我是这样调试的:
>skyeye u-boot
......
skyeye>target sim
...
skyeye>load u-boot
....
skyeye>b _start
...
skyeye>r
....
skyeye>info registers
..
pc     0xc0f80000

不明白这时候的PC为什么是0xc0f80000?
uboot不是已经在skyeye.conf中被设定在0x00000000?
但用arm-linux-objdump -d u-boot
发现_start的地址确实是 0xc0f80000

我不清楚skyeye到底是从什么地址开始运行的,
觉得应该是0x0000000,但_start却是0xc0f80000?
回复

使用道具 举报

发表于 2005-5-13 13:58:19 | 显示全部楼层
好文章,谢谢Faif!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-25 17:59 , Processed in 0.163268 second(s), 12 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表