bairaulinter 发表于 2007-11-12 09:48:14

bootloader以及gdb调试

我以前是做wince的,对于嵌入式linux根本不了解,由于一些特殊原因,现在也要做嵌入式linux了。
现在遇到一些问题,望各位高手指点迷津!
一:
我在机器上装了一个skyeye+uClinux,我看到uClinux已经跑起来了。
但是在启动的时候,并没有看见有bootloader的启动代码,或者说skyeye没有使用bootloader吗?
下面是启动时在shell端的输出:
# skyeye -e linux -c skyeye.conf
big_endian is false.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x8063140
lcd_mod:1
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
Loaded RAM   ./boot.rom
exec file "linux"'s format is elf32-little.
load section .init: addr = 0x01008000size = 0x00010000.
load section .text: addr = 0x01018000size = 0x000c30d4.
not load section .pci_fixup: addr = 0x010dc000size = 0x00000000 .
not load section .rio_route: addr = 0x010dc000size = 0x00000000 .
not load section __ksymtab: addr = 0x010dc000size = 0x00000000 .
not load section __ksymtab_gpl: addr = 0x010dc000size = 0x00000000 .
not load section __ksymtab_unused: addr = 0x010dc000size = 0x00000000 .
not load section __ksymtab_unused_gpl: addr = 0x010dc000size = 0x00000000 .
not load section __ksymtab_gpl_future: addr = 0x010dc000size = 0x00000000 .
not load section __kcrctab: addr = 0x010dc000size = 0x00000000 .
not load section __kcrctab_gpl: addr = 0x010dc000size = 0x00000000 .
not load section __kcrctab_unused: addr = 0x010dc000size = 0x00000000 .
not load section __kcrctab_unused_gpl: addr = 0x010dc000size = 0x00000000 .
not load section __kcrctab_gpl_future: addr = 0x010dc000size = 0x00000000 .
load section __param: addr = 0x010dc000size = 0x00000078.
load section .data: addr = 0x010de000size = 0x0001be60.
not load section .bss: addr = 0x010f9e60size = 0x0000b1fc .
not load section .comment: addr = 0x00000000size = 0x00001368 .
start addr is set to 0x01008000 by exec file.
Linux version 2.6.19-uc1 ([email protected]) (gcc version 3.4.4) #14 Sun Nov 11 19:08:48 CST 2007
CPU: Atmel-AT91M40xxx revision 0 (ARMvundefined/unknown), cr=0000007c
Machine: ATMEL EB01
Built 1 zonelists.Total pages: 1016
Kernel command line:
PID hash table entries: 16 (order: 4, 64 bytes)
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 4MB = 4MB total
Memory: 3036KB available (788K code, 156K data, 64K init)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
io scheduler noop registered (default)
Atmel USART driver version 0.99
ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USART
ttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
uclinux: RAM probe address=0x1400000 size=0x10a000
Creating 1 MTD partitions on "ROM":
0x00000000-0x0010a000 : "ROMfs"
uclinux: set ROMfs to be root filesystem
VFS: Mounted root (romfs filesystem) readonly.
Freeing init memory: 64K
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram0 /var
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
          ____ __
         /__| ||_|               
    _   _| || | _ _____   ___
   | | | | || || |_ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

GDB/ARMulator support by <[email protected]>
For further information check:
http://www.uclinux.org/

Execution Finished, Exiting

Sash command shell (version 1.1.1)
/>

二:
我在skyeye.conf里面已经配置好
lcd: state=on, type=ep7312, mod=gtk
为什么在uClinux启动之后,LCD并没有出现呢?我用testsutie的时候,LCD是出来的。
难道要用/bin/same/same来触发skyeye调用LCD吗?或者其他原因呢?
谢谢!

三:
我想用gdb调试uClinux内核,但是除了continue命令以外,其他的命令,比如:next, step, breakpoint等命令根本不能使用。
比如一使用next命令就会出现这个错误:
Can't send signals to this remote system.SIGHUP not sent.
下面是部分输出:
# arm-linux-gdb linux
GNU gdb 6.7
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux"...
(no debugging symbols found)
(gdb) target remote localhost:12345
Remote debugging using localhost:12345
0x01008000 in stext ()
(gdb) next
Single stepping until exit from function stext,
which has no line number information.
Can't send signals to this remote system.SIGHUP not sent.

Program received signal SIGHUP, Hangup.
0x01008004 in stext ()
(gdb) c
Continuing.
Can't send signals to this remote system.SIGHUP not sent.

Program received signal SIGHUP, Hangup.
0x01019618 in default_idle ()

我在论坛里查了一下以前的帖子,发现有人也遇到了这个问题,但是好像并没有得到解决!
另外我发现了在arm-linux-gdb启动后有一句:(no debugging symbols found),是不是这里就出了问题?!

希望各位高手能够帮帮忙,谢谢!

ksh 发表于 2007-11-12 16:31:10

一:
我在机器上装了一个skyeye+uClinux,我看到uClinux已经跑起来了。
但是在启动的时候,并没有看见有bootloader的启动代码,或者说skyeye没有使用bootloader吗?

> Yes, SkyEye plays some roles of bootloader . It can load kernel image to memory and run it.

二:
我在skyeye.conf里面已经配置好
lcd: state=on, type=ep7312, mod=gtk
为什么在uClinux启动之后,LCD并没有出现呢?
> Need LCD driver . BTW, if you run ep7312, you should use arm linux.

三:
我想用gdb调试uClinux内核,但是除了continue命令以外,其他的命令,比如:next, step, breakpoint等命令根本不能使用.

> As far as I know, stepi, break and other display into can be used in SkyEye. But next command have some issues in SkyEye. Another thing is you should select debug info option when you copile linux kernel, thus debug symbols will be added to the kernel image.

bairaulinter 发表于 2007-11-12 20:40:34

Hi ksh, Thanks very much!

I have understood the first question and the third question, and I will fix them soon.
I will update this issue when I've fixed them.

But there are still some confusions of the second question.
How to add LCD driver into the kernel, and what do you mean ''if you run ep7312, you should use arm-linux"?
Do you mean 'I should compile the kernel with arm-linux-gcc', or just add some command option when run the image?

[ 本帖最后由 bairaulinter 于 2007-11-12 20:41 编辑 ]

bairaulinter 发表于 2007-11-12 22:06:07

I've found that"如果要让 FrameBuffer 支持一种新的显示设备,就需要在
Linux 源代码的 driver/video/下添加针对这种设备的文件。" Is this right?
But where is the LCD driver source files for ep7312?
Thanks!
页: [1]
查看完整版本: bootloader以及gdb调试