|
发表于 2006-1-2 02:02:17
|
显示全部楼层
我用busybox做的image为什么不行呢?使用的同样的armlinux版本。用斑竹贴出来的image是可以正常跑到shell的。
[root@localhost linux-2.4.18_rmk7_based]# cat skyeye.conf
cpu: arm720t
mach: ep7312
mem_bank: map=I, type=RW, addr=0x80000000, size=0x00010000
mem_bank: map=M, type=RW, addr=0xc0000000, size=0x00200000
mem_bank: map=M, type=RW, addr=0xc0200000, size=0x00200000, file=./my1.01initrd.img
mem_bank: map=M, type=RW, addr=0xc0400000, size=0x00c00000
[root@localhost linux-2.4.18_rmk7_based]# skyeye vmlinux
GNU gdb 5.3
Copyright 2002 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.
***************************************************************
************ SkyEye is Simulator based on GDB *************
***************************************************************
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(SkyEye) tar s
cpu info: armv4, arm720t, 41807200, ffffff00, 1
mach info: name ep7312, mach_init addr 0x813f5b4
SKYEYE: use arm7100 mmu ops
Loaded ROM ./my1.01initrd.img
Connected to the simulator.
(SkyEye) lo
Loading section .init, size 0xb000 vma 0xc0028000
Loading section .text, size 0xc77d0 vma 0xc0033000
Loading section __ex_table, size 0x6d8 vma 0xc00fa7d0
Loading section .data, size 0x9634 vma 0xc00fc000
Start address 0xc0028000
Transfer rate: 7218912 bits in <1 sec.
(SkyEye) r
Starting program: /usr/src/armlinux/linux-2.4.18_rmk7_based/vmlinux
Linux version 2.4.18-rmk7 ([email protected]) (gcc version 2.95.3 20010315 (release)) #20 Mon Jan 2 08:18:19 CST 2006
CPU: ARM ARM720T revision 0
Machine: Cirrus Logic 7212/7312
Warning: bad configuration page, trying to continue
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram,console=ttyAM0
Calibrating delay loop... 26.00 BogoMIPS
Memory: 16MB = 16MB total
Memory: 13032KB available (797K code, 167K data, 44K init)
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
ttyAM0 at I/O 0x100 (irq = 12) is a CLPS711x
ttyAM1 at I/O 0x1100 (irq = 2 is a CLPS711x
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 1024)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 1024 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 2048K
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 44K
to exec sbin init
pc : [<00064a01>] lr : [<00064a08>] Not tainted
sp : bffffcc0 ip : bffffd30 fp : bffffd2c
r10: 0006d4d4 r9 : 00000000 r8 : bffffd50
r7 : 00000000 r6 : 00000001 r5 : 0005f01c r4 : 0005f026
r3 : 00000388 r2 : 00000064 r1 : 00000101 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: 217D Table: C0F78000 DAC: 00000015
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Code: 00020800 01010100 01010204 00000101 (2d302b20)
init (1): undefined instruction: pc=00064a08
Co
Program received signal SIGINT, Interrupt.
0xc008d6e0 in clps711xuart_console_write (co=0x100, s=0xc0109eda "Code: ",
count=6) at serial_clps711x.c:529
529 clps_writel(s, UARTDR(port));
(SkyEye) r
最初我是用arm-linux-gcc编译busybox-1.01,执行/sbin/init时停掉了。后来改用了uClibc-gcc(一次选支持浮点,有FPU;另一次选不支持浮点)编译busybox,如上报非法指令。
image内容如下:
[root@localhost linux-2.4.18_rmk7_based]# mount -t ext2 -o loop my1.01initrd.img /mnt/img
[root@localhost linux-2.4.18_rmk7_based]# cd /mnt/img
[root@localhost img]# ls
bin dev etc linuxrc lost+found mnt proc sbin tmp usr var
[root@localhost img]# ls -al -R
.:
total 26
drwxr-xr-x 12 root root 1024 Jan 2 09:16 .
drwxr-xr-x 9 root root 4096 Jan 2 01:08 ..
drwxr-xr-x 2 root root 1024 Jan 2 09:16 bin
drwxr-xr-x 2 root root 1024 Dec 4 12:07 dev
drwxr-xr-x 2 root root 1024 Jan 2 07:24 etc
lrwxrwxrwx 1 root root 11 Jan 2 09:16 linuxrc -> bin/busybox
drwx------ 2 root root 12288 Dec 4 11:59 lost+found
drwxr-xr-x 2 root root 1024 Dec 4 12:01 mnt
dr-xr-xr-x 2 root root 1024 Dec 4 12:01 proc
drwxr-xr-x 2 root root 1024 Jan 2 09:16 sbin
drwxr-xr-x 2 root root 1024 Dec 4 12:01 tmp
drwxr-xr-x 4 root root 1024 Jan 2 09:16 usr
drwxr-xr-x 2 root root 1024 Dec 4 12:01 var
./bin:
total 380
drwxr-xr-x 2 root root 1024 Jan 2 09:16 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
lrwxrwxrwx 1 root root 7 Jan 2 09:16 ash -> busybox
-rwxr-xr-x 1 root root 383824 Jan 2 09:16 busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 cat -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 chgrp -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 chmod -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 chown -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 cp -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 date -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 dd -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 df -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 dmesg -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 echo -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 egrep -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 false -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 fgrep -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 grep -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 gunzip -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 gzip -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 hostname -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 kill -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 ln -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 ls -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 mkdir -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 mknod -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 mktemp -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 more -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 mount -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 mv -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 pidof -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 ping -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 ps -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 pwd -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 rm -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 rmdir -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 sed -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 sh -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 sleep -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 sync -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 tar -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 touch -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 true -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 umount -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 uname -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 usleep -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 vi -> busybox
lrwxrwxrwx 1 root root 7 Jan 2 09:16 zcat -> busybox
./dev:
total 3
drwxr-xr-x 2 root root 1024 Dec 4 12:07 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
lrwxrwxrwx 1 root root 6 Dec 4 12:07 console -> ttyAM0
-rw-rw-rw- 1 root root 397 Dec 4 12:02 mkdev.sh
crw-r--r-- 1 root root 5, 0 Dec 4 12:06 tty
crw-r--r-- 1 root root 204, 16 Dec 4 12:06 ttyAM0
./etc:
total 5
drwxr-xr-x 2 root root 1024 Jan 2 07:24 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
-rw-r--r-- 1 root root 25 Dec 4 12:04 fstab
-rw-r--r-- 1 root root 88 Jan 2 07:24 inittab
-rw-r--r-- 1 root root 112 Jan 2 07:25 rcS
./lost+found:
total 13
drwx------ 2 root root 12288 Dec 4 11:59 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
./mnt:
total 2
drwxr-xr-x 2 root root 1024 Dec 4 12:01 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
./proc:
total 2
dr-xr-xr-x 2 root root 1024 Dec 4 12:01 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
./sbin:
total 2
drwxr-xr-x 2 root root 1024 Jan 2 09:16 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
lrwxrwxrwx 1 root root 14 Jan 2 09:16 halt -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan 2 09:16 ifconfig -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan 2 09:16 init -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan 2 09:16 klogd -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan 2 09:16 pivot_root -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan 2 09:16 poweroff -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan 2 09:16 reboot -> ../bin/busyboxlrwxrwxrwx 1 root root 14 Jan 2 09:16 swapoff -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan 2 09:16 swapon -> ../bin/busyboxlrwxrwxrwx 1 root root 14 Jan 2 09:16 syslogd -> ../bin/busybox
./tmp:
total 2
drwxr-xr-x 2 root root 1024 Dec 4 12:01 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
./usr:
total 4
drwxr-xr-x 4 root root 1024 Jan 2 09:16 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
drwxr-xr-x 2 root root 1024 Jan 2 09:16 bin
drwxr-xr-x 2 root root 1024 Jan 2 09:16 sbin
./usr/bin:
total 2
drwxr-xr-x 2 root root 1024 Jan 2 09:16 .
drwxr-xr-x 4 root root 1024 Jan 2 09:16 ..
lrwxrwxrwx 1 root root 17 Jan 2 09:16 [ -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 basename -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 bunzip2 -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 bzcat -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 chvt -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 clear -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 cmp -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan 2 09:16 cut -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan 2 09:16 deallocvt -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 dirname -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 du -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 env -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan 2 09:16 expr -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 find -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 free -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 head -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 hexdump -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 id -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 install -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 killall -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 logger -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 openvt -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 readlink -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 reset -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 sort -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 strings -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 tail -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 tee -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan 2 09:16 test -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 time -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 tr -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 tty -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan 2 09:16 uniq -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 unzip -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 uptime -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 wc -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 wget -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 which -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 whoami -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 xargs -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan 2 09:16 yes -> ../../bin/busybox
./usr/sbin:
total 2
drwxr-xr-x 2 root root 1024 Jan 2 09:16 .
drwxr-xr-x 4 root root 1024 Jan 2 09:16 ..
lrwxrwxrwx 1 root root 17 Jan 2 09:16 chroot -> ../../bin/busybox
./var:
total 2
drwxr-xr-x 2 root root 1024 Dec 4 12:01 .
drwxr-xr-x 12 root root 1024 Jan 2 09:16 ..
[root@localhost img]#
[root@localhost img]# ls
bin dev etc linuxrc lost+found mnt proc sbin tmp usr var
[root@localhost img]# cd etc
[root@localhost etc]# ls
fstab inittab rcS
[root@localhost etc]# cat inittab
::sysinit:/etc/rcS
::respawn:/bin/ash
::restart:/sbin/init
::shutdown:/bin/umount -a -r
[root@localhost etc]# cat fstab
none /proc proc defaults
[root@localhost etc]# cat rcS
#!/bin/ash
hostname ARMLinux
mount -t proc proc /proc
mkdir /var/tmp /var/log /var/run /var/lock
cat /etc/motd
[root@localhost etc]#
大虾们是否能给些指点。或者诸位的不是使用busybox的工具包的话,那用的是怎么生成的呢? |
|