实验问题解决记录

来源:互联网 发布:阿里云域名官网 编辑:程序博客网 时间:2024/04/27 11:10
 
1.为了能在ram中直接运行u-boot需要修改以下内容
  在cpu/arm920t/ok2440.h中
  定义
  #define CONFIG_SKIP_LOWLEVEL_INIT
  
  #undef CONFIG_S3C2440_NAND_BOOT
 
  #define CONFIG_SKIP_RELOCATE_UBOOT
2.source insight kernel慢是因为*.o文件也被包含了,代码量太大了

3./dev/i2c-0 没有,只要选中i2c-device-interface即可

4.eabi工具链kernel要选中eabi编译支持,在kernel 特征项里面
5.有eabi的工具链编译2009.3等低版本的u-boot不行
6.busybox制作initramfs /init是到busybox的一个连接,是系统初始化第一个程序,在/sbin/init有
  如果init不正确会出现如下错误
  TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
Freeing init memory: 12948K
Kernel panic - not syncing: Attempted to kill init!
[<c0cb36bc>] (unwind_backtrace+0x0/0xcc) from [<c0f6ab4c>] (panic+0x3c/0x118)
[<c0f6ab4c>] (panic+0x3c/0x118) from [<c0ccee3c>] (do_exit+0x58/0x590)
[<c0ccee3c>] (do_exit+0x58/0x590) from [<c0ccf640>] (do_group_exit+0x88/0xbc)
[<c0ccf640>] (do_group_exit+0x88/0xbc) from [<c0cd8104>] (get_signal_to_deliver+0x31c/0x354)
[<c0cd8104>] (get_signal_to_deliver+0x31c/0x354) from [<c0cb0510>] (do_signal+0x64/0x578)
[<c0cb0510>] (do_signal+0x64/0x578) from [<c0cb0edc>] (do_notify_resume+0x14/0x48)
[<c0cb0edc>] (do_notify_resume+0x14/0x48) from [<c0cadea8>] (work_pending+0x1c/0x20)

7.arch/arm/kernel/setup.c文件中的parse_tag_cmdline()函数中的内容注释掉,可以实现不用u-boot给内核传bootargs,即使用kernel自己的参数

8.以下错误由于initramfs文件系统不对造成的(可能是没有init造成的)
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "(null)" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00             384 mtdblock0 (driver?)
1f01             256 mtdblock1 (driver?)
1f02            1024 mtdblock2 (driver?)
1f03            7168 mtdblock3 (driver?)
1f04           51200 mtdblock4 (driver?)
1f05           71040 mtdblock5 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c07e96bc>] (unwind_backtrace+0x0/0xcc) from [<c0aa0b4c>] (panic+0x3c/0x118)
[<c0aa0b4c>] (panic+0x3c/0x118) from [<c0008ef8>] (mount_block_root+0x1bc/0x1fc)
[<c0008ef8>] (mount_block_root+0x1bc/0x1fc) from [<c0009158>] (prepare_namespace+0x12c/0x180)
[<c0009158>] (prepare_namespace+0x12c/0x180) from [<c0008b5c>] (kernel_init+0xd8/0x10c)
[<c0008b5c>] (kernel_init+0xd8/0x10c) from [<c07e4e5c>] (kernel_thread_exit+0x0/0x8)

9.移植linux-3.0.1时机器号不一致,u-boot里定义的是5244,修改kernel里arch/arm/tool/mach-type里s3c2440 为5244
10.Additional CFLAGS必须填入-march=armv4t -mcpu=arm920t,指定CPU的类型。
这跟sourcery g++ lite的交叉编译器有关。如果不指定cpu的版本,sourcery g++ lite会把busybox编译成armv5t的版本。
(怎么知道?用arm-none-linux-gnueabi-readelf -A busybox 看看吧。)
  不然会出现以下错误
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Freeing init memory: 4072K
Kernel panic - not syncing: Attempted to kill init!
[<c05135c8>] (unwind_backtrace+0x0/0xf0) from [<c08425d0>] (panic+0x58/0x180)
[<c08425d0>] (panic+0x58/0x180) from [<c05281fc>] (do_exit+0x678/0x6a8)
[<c05281fc>] (do_exit+0x678/0x6a8) from [<c05284b0>] (do_group_exit+0x40/0xbc)
[<c05284b0>] (do_group_exit+0x40/0xbc) from [<c0533244>] (get_signal_to_deliver+0x1c8/0x3a4)
[<c0533244>] (get_signal_to_deliver+0x1c8/0x3a4) from [<c0510474>] (do_signal+0x84/0x504)
[<c0510474>] (do_signal+0x84/0x504) from [<c0510dd8>] (do_notify_resume+0x4c/0x58)
[<c0510dd8>] (do_notify_resume+0x4c/0x58) from [<c050deb4>] (work_pending+0x24/0x28)

11.start hello...
   Illegal instruction问题
   [root@slw hello]# arm-none-linux-gnueabi-gcc -march=armv4t -mcpu=arm920t main.c -o hello
   该编译器区分march类型,使用的库不同
 
12.u-boot-2011.06 toolchain-4.5.2编译成功,toolchain-3.4.1编译出错
   
  include/configs/smdk2440.h 里设置CONFIG_SYS_TEXT_BASE 为0 可以在ram里运行,其他值不行
原创粉丝点击