- 论坛徽章:
- 0
|
按照opensrc.sec.samsung.com上的那片Getting familiar with uClinux/ARM 2.6一文,我成功编译了linux-2.6.5-hsc1,并且已经通过arm-elf-gdb运行起来了,但是发现一点小问题,即在同一个目录下ls命令的输出会不一样,以下是我输入的命令和输出:
buf@debianWS:~/dev/uClinux-on-armulator$ arm-elf-gdb linux-2.6.x/linux
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnuoldld --target=arm-elf"...
Loaded ROM boot.rom to 0x01300000
Loaded ROM boot.rom to 0x01400000
Loaded ROM boot.rom to 0x04000000
Loaded ROM boot.rom to 0x01300000
Loaded ROM boot.rom to 0x01400000
Loaded ROM boot.rom to 0x04000000
Connected to the simulator.
Loading section .init, size 0xb000 vma 0x1000000
Loading section .text, size 0xa0b98 vma 0x100b000
Loading section __ex_table, size 0x5b8 vma 0x10abba0
Loading section .data, size 0x8ef8 vma 0x10ae000
Start address 0x1000000
Transfer rate: 5931584 bits in <1 sec.
(gdb) run
Starting program: /home/buf/dev/uClinux-on-armulator/linux-2.6.x/linux
Linux version 2.6.5-hsc1 (buf@debianWS) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #1 Mon Nov 17 23:16:27 HKT 2008
CPU: Atmel-AT91M40xxx [14000040] revision 0 (ARMvundefined/unknown)
Machine: ATMEL EB01
On node 0 totalpages: 1024
DMA zone: 0 pages, LIFO batch:1
Normal zone: 1024 pages, LIFO batch:1
HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
Kernel command line: root=/dev/ram0 initrd=0x01300000,800K keepinitrd
PID hash table entries: 32 (order 5: 256 bytes)
Memory: 4MB = 4MB total
Memory: 2448KB available (642K code, 92K data, 44K init)
Calibrating delay loop... 15.87 BogoMIPS
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
checking if image is initramfs...it isn't (ungzip failed); looks like an initrd
POSIX conformance testing by UNIFIX
Linux NoNET1.0 for Linux 2.6
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
loop: loaded (max 8 devices)
RAMDISK: romfs filesystem found at block 0
RAMDISK: Loading 771 blocks [1 disk] into ram disk... done.
VFS: Mounted root (romfs filesystem) readonly.
Freeing init memory: 44K
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram1
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /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 <davidm@snapgear.com>
For further information check:
http://www.uclinux.org/
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/>
Sash command shell (version 1.1.1)
/> ls
bin
dev
etc
home
lib
mnt
proc
sbin
tmp
usr
var
/> cd bin
/bin> ls
bin
dev
etc
home
lib
mnt
proc
sbin
tmp
usr
var
/> ls
boa
dhcpcd
expand
gdbserver
ifconfig
inetd
init
login
ping
reboot
route
sh
telnetd
/bin> ls
bin
dev
etc
home
lib
mnt
proc
sbin
tmp
usr
var
/>
可以看到从根目录进入bin目录后ls依然显示根目录下的文件列表,再次ls就正常了,但第三次ls又不对了。事实上我的目标板上(s3c44b0x+uclinux-2.6.9-hsc0)也出现了同样的问题。请教是哪里出了问题了呢?或者应该怎样调试?谢谢。 |
|