我的带有busybox的armlinux终于成功了!
虽然遇到的问题都是小问题,但是对于我这样的新手还是挺郁闷的.不过现在弄出来了,感觉还是很爽的:) (linux-2.4.18.tar.bz2+patch-2.4.18-rmk7+busybox-1.01.tar.bz2)
现在太忙,我要是什么时候有时间就把过程整理给大家:)
Welcome to
_ _____ __ __ _ _
/ \ /__ \ /\_/\| | |_|
/ _ \ | || |/ /\ /\ \ | | _ _____ ___
/ /_\ \| |__| | / /\_/\ \| | | |_ \| | | |\ \/ /
/ /___\ \ | |__\ \ | | | || |___ | | |_| | |_| |/ \
/_/ \_\| | \_\|_| |_||_____||_|_| |_|\____|\_/\_/
ARMLinux for Skyeye
For further information check:
http://hpclab.cs.tsinghua.edu.cn/~skyeye/
BusyBox v1.01 (2005.09.03-07:00+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ # cd bin
/bin # ./ls
ash date fgrep ln mv sed umount
busybox dd grep ls pidof sh uname
cat df gunzip mkdir ping sleep usleep
chgrp dmesg gzip mknod ps sync vi
chmod echo hostnamemktemp pwd tar zcat
chown egrep init more rm touch
cp false kill mount rmdir true
/bin # cd ..
/ # ./ls
/bin/sh: ./ls: not found
/ # ls
bin etc lib lost+foundproc usr
dev home linuxrc mnt sbin var 热烈关注,我也在学这方面的知识 希望能够把你的成功过程记录下来,让更多的人知道. 我会加为精华! 我用busybox做的image为什么不行呢?使用的同样的armlinux版本。用斑竹贴出来的image是可以正常跑到shell的。
# 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
# 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 = 28) 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 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 : bffffcc0ip : bffffd30fp : bffffd2c
r10: 0006d4d4r9 : 00000000r8 : bffffd50
r7 : 00000000r6 : 00000001r5 : 0005f01cr4 : 0005f026
r3 : 00000388r2 : 00000064r1 : 00000101r0 : 00000000
Flags: nZCvIRQs onFIQs onMode USER_32Segment user
Control: 217DTable: C0F78000DAC: 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内容如下:
# mount -t ext2 -o loop my1.01initrd.img /mnt/img
# cd /mnt/img
# ls
bindevetclinuxrclost+foundmntprocsbintmpusrvar
# ls -al -R
.:
total 26
drwxr-xr-x 12 root root 1024 Jan2 09:16 .
drwxr-xr-x 9 root root 4096 Jan2 01:08 ..
drwxr-xr-x 2 root root 1024 Jan2 09:16 bin
drwxr-xr-x 2 root root 1024 Dec4 12:07 dev
drwxr-xr-x 2 root root 1024 Jan2 07:24 etc
lrwxrwxrwx 1 root root 11 Jan2 09:16 linuxrc -> bin/busybox
drwx------ 2 root root 12288 Dec4 11:59 lost+found
drwxr-xr-x 2 root root 1024 Dec4 12:01 mnt
dr-xr-xr-x 2 root root 1024 Dec4 12:01 proc
drwxr-xr-x 2 root root 1024 Jan2 09:16 sbin
drwxr-xr-x 2 root root 1024 Dec4 12:01 tmp
drwxr-xr-x 4 root root 1024 Jan2 09:16 usr
drwxr-xr-x 2 root root 1024 Dec4 12:01 var
./bin:
total 380
drwxr-xr-x 2 root root 1024 Jan2 09:16 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
lrwxrwxrwx 1 root root 7 Jan2 09:16 ash -> busybox
-rwxr-xr-x 1 root root 383824 Jan2 09:16 busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 cat -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 chgrp -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 chmod -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 chown -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 cp -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 date -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 dd -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 df -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 dmesg -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 echo -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 egrep -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 false -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 fgrep -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 grep -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 gunzip -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 gzip -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 hostname -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 kill -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 ln -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 ls -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 mkdir -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 mknod -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 mktemp -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 more -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 mount -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 mv -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 pidof -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 ping -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 ps -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 pwd -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 rm -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 rmdir -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 sed -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 sh -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 sleep -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 sync -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 tar -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 touch -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 true -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 umount -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 uname -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 usleep -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 vi -> busybox
lrwxrwxrwx 1 root root 7 Jan2 09:16 zcat -> busybox
./dev:
total 3
drwxr-xr-x 2 root root 1024 Dec4 12:07 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
lrwxrwxrwx 1 root root 6 Dec4 12:07 console -> ttyAM0
-rw-rw-rw- 1 root root 397 Dec4 12:02 mkdev.sh
crw-r--r-- 1 root root 5, 0 Dec4 12:06 tty
crw-r--r-- 1 root root 204,16 Dec4 12:06 ttyAM0
./etc:
total 5
drwxr-xr-x 2 root root 1024 Jan2 07:24 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
-rw-r--r-- 1 root root 25 Dec4 12:04 fstab
-rw-r--r-- 1 root root 88 Jan2 07:24 inittab
-rw-r--r-- 1 root root 112 Jan2 07:25 rcS
./lost+found:
total 13
drwx------ 2 root root 12288 Dec4 11:59 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
./mnt:
total 2
drwxr-xr-x 2 root root 1024 Dec4 12:01 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
./proc:
total 2
dr-xr-xr-x 2 root root 1024 Dec4 12:01 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
./sbin:
total 2
drwxr-xr-x 2 root root 1024 Jan2 09:16 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
lrwxrwxrwx 1 root root 14 Jan2 09:16 halt -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan2 09:16 ifconfig -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan2 09:16 init -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan2 09:16 klogd -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan2 09:16 pivot_root -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan2 09:16 poweroff -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan2 09:16 reboot -> ../bin/busyboxlrwxrwxrwx 1 root root 14 Jan2 09:16 swapoff -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Jan2 09:16 swapon -> ../bin/busyboxlrwxrwxrwx 1 root root 14 Jan2 09:16 syslogd -> ../bin/busybox
./tmp:
total 2
drwxr-xr-x 2 root root 1024 Dec4 12:01 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
./usr:
total 4
drwxr-xr-x 4 root root 1024 Jan2 09:16 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
drwxr-xr-x 2 root root 1024 Jan2 09:16 bin
drwxr-xr-x 2 root root 1024 Jan2 09:16 sbin
./usr/bin:
total 2
drwxr-xr-x 2 root root 1024 Jan2 09:16 .
drwxr-xr-x 4 root root 1024 Jan2 09:16 ..
lrwxrwxrwx 1 root root 17 Jan2 09:16 [ -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 basename -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 bunzip2 -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 bzcat -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 chvt -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 clear -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 cmp -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan2 09:16 cut -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan2 09:16 deallocvt -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 dirname -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 du -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 env -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan2 09:16 expr -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 find -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 free -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 head -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 hexdump -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 id -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 install -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 killall -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 logger -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 openvt -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 readlink -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 reset -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 sort -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 strings -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 tail -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 tee -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan2 09:16 test -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 time -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 tr -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 tty -> ../../bin/busyboxlrwxrwxrwx 1 root root 17 Jan2 09:16 uniq -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 unzip -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 uptime -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 wc -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 wget -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 which -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 whoami -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 xargs -> ../../bin/busybox
lrwxrwxrwx 1 root root 17 Jan2 09:16 yes -> ../../bin/busybox
./usr/sbin:
total 2
drwxr-xr-x 2 root root 1024 Jan2 09:16 .
drwxr-xr-x 4 root root 1024 Jan2 09:16 ..
lrwxrwxrwx 1 root root 17 Jan2 09:16 chroot -> ../../bin/busybox
./var:
total 2
drwxr-xr-x 2 root root 1024 Dec4 12:01 .
drwxr-xr-x 12 root root 1024 Jan2 09:16 ..
#
# ls
bindevetclinuxrclost+foundmntprocsbintmpusrvar
# cd etc
# ls
fstabinittabrcS
# cat inittab
::sysinit:/etc/rcS
::respawn:/bin/ash
::restart:/sbin/init
::shutdown:/bin/umount -a -r
# cat fstab
none /proc proc defaults
# cat rcS
#!/bin/ash
hostname ARMLinux
mount -t proc proc /proc
mkdir /var/tmp /var/log /var/run /var/lock
cat /etc/motd
#
大虾们是否能给些指点。或者诸位的不是使用busybox的工具包的话,那用的是怎么生成的呢? 我现在使用arm-linux-gcc编译busybox1.2.2.1就在init.c的时候报错
说file truncated
我无言。。。不知为何 不知道是不是因为工具版本太低?
页:
[1]