新闻  |   论坛  |   博客  |   在线研讨会
在ARMulator中移植uClinux(4)
tvro_china | 2007-12-21 18:21:19    阅读:1191   发布文章

Running the ARMulator

Before run the ARMulator, we need a symbolic link to the rootfs image, “romfs.img”.

[root@hyoklinux gdb-5.0]# cd ..
[root@hyoklinux uClinux-dist]# ln -s images/romfs.img boot.rom

And if we make this initial script for GDB, it's convenient.

[root@hyoklinux uClinux-dist]# cat > .gdbinit
target sim
load
^D

That's all for our first kernel running. Let's do it!

[root@hyoklinux uClinux-dist]# 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-gnu --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: /uClinux-dist/linux-2.6.x/linux
Linux version 2.6.5-hsc1 (root@hyoklinux) (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/)) #9 Mon May 3 11:00:29 KST 2004
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: host>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)
/> ps
PID PORT STAT SIZE SHARED %CPU COMMAND
1 S 163K 0K 48.0 /sbin/init
2 S 0K 0K 0.0 ksoftirqd/0
3 S 0K 0K 1.0 events/0
4 S 0K 0K 0.0 kblockd/0
5 S 0K 0K 0.0 pdflush
6 S 0K 0K 0.0 pdflush
7 S 0K 0K 0.0 kswapd0
8 S 0K 0K 0.0 aio/0
11 S0 R 165K 0K 0.0 /bin/sh

*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。

参与讨论
登录后参与讨论
与快乐握手
最近文章
怎样做一块好的PCB板
2009-05-18 17:14:25
ARM入门
2009-05-18 17:10:18
推荐文章
最近访客