QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3684|回复: 4

SkyEye的Flash模拟基本完成(2005-02-02)

[复制链接]
发表于 2005-2-1 20:24:35 | 显示全部楼层 |阅读模式
SkyEye的Flash模拟的进展及存在的问题
欢迎测试并积极参与
[email protected]

请到
http://gro.clinux.org/frs/?group_id=327&release_id=666
下载Flash模拟测试套件
skyeye-flash.tar.bz2

陈老师已经放假回家,能成功进行Flash模拟的测试套件可能要能到春节后发布了!

前言:
        SkyEye的Flash模拟首先是建立了一个Flash模拟框架,然后对ipaqsim([email protected])的Flash模拟模块的代码进行了部分修改并移植到SkyEye的Flash模拟框架中。
        以下是ipaqsim的README文件对ipaqsim的介绍。
iPAQ Simulator (ipaqsim)
Sep 09, 2004
---------------------------------------------------------------------
This is a full machine simulation for iPAQ device. The CPU simulation
code is based on Skyeye (www.skyeye.org) project. However, all the code
is re-written in C++ and much more organized. Important peripherals are
added: Flash, microcontroller, sleeve, wireless PC card, etc... to enable
the boot of Familiar Linux (familiar.handhelds.org).
。。。 。。。
---------------------------------------------------------------------
        Ipaqsim模拟的Flash是INTEL 28F640J3A,SkyEye目前模拟的Flash是Lubbock采用的INTEL 28F128J3A。SkyEye计划在Flash模拟框架下模拟更多厂商更多型号的Flash,这一工作需要大家的热情和积极参与。

内容:
一        目前的进展
二        目前存在的问题
三        详细的输出信息
四        u-boot-1.1.2 for Lubbock的编译
五        linux-2.6.10 for Lubbock的编译
六        SkyEye调试armlinux内核的方法

一        目前的进展
        (1)对u-boot的Flash操作的支持
        u-boot启动时能探测到Flash的类型(INTEL 28F128J3A)及大小((16M+16M)+(16M+16M))
        u-boot的flinfo能打印出所有的Flash扇区信息。
        支持u-boot对Flash的读,写,擦除操作。

        (2)对armlinux的MTD驱动的支持
        armlinux启动时能能探测到Flash的存在并创建4个MTD分区(3+1)。
                         Creating 3 MTD partitions on "Lubbock Boot ROM":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00140000 : "Kernel"
0x00140000-0x02000000 : "Filesystem"
Registering Lubbock Application Flash as whole device
       
        如果先挂上ramdisk,内核正常启动并进入shell,Linux-2.6.10/.config中对应的CONFIG_CMDLINE是:
CONFIG_CMDLINE=”root=/dev/ram rw initrd=0xa1000000,0x00800000 console=ttyS0,115200 mem=64M”
在/proc/mtd下能看到4个MTD设备。
                /> cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00040000 "Bootloader"
mtd1: 00100000 00040000 "Kernel"
mtd2: 01ec0000 00040000 "Filesystem"
mtd3: 02000000 00040000 "Lubbock Application Flash"

        可以将Flash上的第二个MTD分区中的JFFS2文件系统挂载到位于RAM中的ramdisk文件系统上。
                        /> mount -t jffs2 /dev/mtdblock2 /mnt
/> cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext2 rw 0 0
proc /proc proc rw,nodiratime 0 0
/dev/mtdblock2 /mnt jffs2 rw,noatime 0 0

        其他操作
(未验证)如果用arm-linux-gcc编译erase, mkfs.jffs2,应该可以进行如下操作:
/>mkdir –p jffs2-dir/test
/> mkfs.jffs2 -d jffs2-dir -o jffs2.img
/> erase /dev/mtd3
/> cp jffs2.img /dev/mtd3
/>mount –t jffs2 /dev/mtdblock3 /mnt
/>ls /mnt
test
/>

二        目前存在的问题
        (1)内核无法在启动时挂载位于第一块Flash(Lubbock Boot ROM)上的JFFS2文件系统。Linux-2.6.10/.config中对应的CONFIG_CMDLINE是:
        CONFIG_CMDLINE =“root=/dev/mtdblock2 rw console=ttyS0,115200 mem=64M”
内核启动到如下位置就停止了:
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)


(2)如果先挂上ramdisk ,shell启动后将位于Flash上的一个MTD分区mount之后,虽然能够对Flash进行读写操作,不断有如下信息输出,一部分由MTD驱动打印的,另一部分由Flash模拟模块打印,原因早找中。
Chip reports voltage low on erase: status 0xa8
Erase at 0x01100000 failed immediately: errno -5
Flash: can't erase when VPEN low
Chip reports voltage low on erase: status 0xa8
Erase at 0x010c0000 failed immediately: errno -5
Flash: can't erase when VPEN low
Chip reports voltage low on erase: status 0xa8
Erase at 0x01080000 failed immediately: errno -5
Flash: can't erase when VPEN low
… …

三        详细的输出信息(省略了自己加入的打印信息及上面的提到的问题信息)

-bash-2.05b$ cat skyeye.conf
cpu: xscale
mach: pxa_lubbock
mem_bank: map=F, type=RW, addr=0x00000000, size=0x00040000, file=./u-boot.bin, boot=yes
#mem_bank: map=F, type=RW, addr=0x00000000, size=0x00040000
mem_bank: map=F, type=RW, addr=0x00040000, size=0x00100000, file=./zImage
#mem_bank: map=F, type=RW, addr=0x00040000, size=0x00100000
mem_bank: map=F, type=RW, addr=0x00140000, size=0x01ec0000, file=./sitsang_fs.jffs2

mem_bank: map=F, type=RW, addr=0x04000000, size=0x02000000

mem_bank: map=I, type=RW, addr=0x40000000, size=0x0c000000

#mem_bank: map=M, type=RW, addr=0xa0000000, size=0x00200000
#mem_bank: map=M, type=RW, addr=0xa0200000, size=0x00100000
#mem_bank: map=M, type=RW, addr=0xa0200000, size=0x00100000,file=./zImage, boot=yes
#mem_bank: map=M, type=RW, addr=0xa0300000, size=0x00d00000
mem_bank: map=M, type=RW, addr=0xa0000000, size=0x01000000
#mem_bank: map=M, type=RW, addr=0xa0000000, size=0x00008000
#mem_bank: map=M, type=RW, addr=0xa0008000, size=0x00ff8000, file=./piggy
#mem_bank: map=M, type=RW, addr=0xa0008000, size=0x00ff8000, file=../linux-2.6.10/piggy
mem_bank: map=M, type=RW, addr=0xa1000000, size=0x03000000, file=./initrd4M.img
#mem_bank: map=M, type=RW, addr=0xa1800000, size=0x02800000

-bash-2.05b$ ./skyeye-0.8.6-flash.rh9.bin
***************************************************************
****                                                       ****
****   SkyEye  Simulator Ver 0.8.6 with  GDB 5.3 Interface ****
****                                                       ****
***************************************************************
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.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf".
(SkyEye) tar s
cpu info: xscale, xscale, 69052100, fffffff0, 2
mach info: name pxa_lubbock, mach_init addr 0x8145258
SKYEYE: use xscale mmu ops
Loaded FLASH ./u-boot.bin
Loaded FLASH ./zImage
Loaded FLASH ./sitsang_fs.jffs2
Loaded RAM   ./initrd4M.img
0x8248e00

Connected to the simulator.
(SkyEye) r
Starting program:  
warning: No executable file specified.
warning: No program loaded.
SKYEYE: xscale_cp15_mcr wrote UNKNOWN - reg 14, reg15 0x698
SKYEYE: xscale_cp15_mcr wrote UNKNOWN - reg 14, reg15 0x69c
SKYEYE: xscale_cp15_mcr wrote UNKNOWN - reg 14, reg15 0x6a0
SKYEYE: cp14_mcr unknown cp14 regs!!!!!!


U-Boot 1.1.2 (Jan 21 2005 - 18:02:07)

U-Boot code: A3080000 -> A309C72C  BSS: -> A30D12EC
RAM Configuration:
Bank #0: a0000000 64 MB
Bank #1: a4000000  0 kB
Bank #2: a8000000  0 kB
Bank #3: ac000000  0 kB

Flash: 64 MB
*** Warning - bad CRC, using default environment

Hit any key to stop autoboot:  0
$ flinfo

Bank # 1: INTEL 28F128J3A
  Size: 32 MB in 128 Sectors
  Sector Start Addresses:
    00000000 (RO) 00040000      00080000      000C0000      00100000     
    00140000      00180000      001C0000      00200000      00240000     
    00280000      002C0000      00300000      00340000      00380000     
    003C0000      00400000      00440000      00480000      004C0000     
    00500000      00540000      00580000      005C0000      00600000     
    00640000      00680000      006C0000      00700000      00740000     
    00780000      007C0000      00800000      00840000      00880000     
    008C0000      00900000      00940000      00980000      009C0000     
    00A00000      00A40000      00A80000      00AC0000      00B00000     
    00B40000      00B80000      00BC0000      00C00000      00C40000     
    00C80000      00CC0000      00D00000      00D40000      00D80000     
    00DC0000      00E00000      00E40000      00E80000      00EC0000     
    00F00000      00F40000      00F80000      00FC0000      01000000     
    01040000      01080000      010C0000      01100000      01140000     
    01180000      011C0000      01200000      01240000      01280000     
    012C0000      01300000      01340000      01380000      013C0000     
    01400000      01440000      01480000      014C0000      01500000     
    01540000      01580000      015C0000      01600000      01640000     
    01680000      016C0000      01700000      01740000      01780000     
    017C0000      01800000      01840000      01880000      018C0000     
    01900000      01940000      01980000      019C0000      01A00000     
    01A40000      01A80000      01AC0000      01B00000      01B40000     
    01B80000      01BC0000      01C00000      01C40000      01C80000     
    01CC0000      01D00000      01D40000      01D80000      01DC0000     
    01E00000      01E40000      01E80000      01EC0000      01F00000     
    01F40000      01F80000      01FC0000     

Bank # 2: INTEL 28F128J3A
  Size: 32 MB in 128 Sectors
  Sector Start Addresses:
    04000000      04040000      04080000      040C0000      04100000     
    04140000      04180000      041C0000      04200000      04240000     
    04280000      042C0000      04300000      04340000      04380000     
    043C0000      04400000      04440000      04480000      044C0000     
    04500000      04540000      04580000      045C0000      04600000     
    04640000      04680000      046C0000      04700000      04740000     
    04780000      047C0000      04800000      04840000      04880000     
    048C0000      04900000      04940000      04980000      049C0000     
    04A00000      04A40000      04A80000      04AC0000      04B00000     
    04B40000      04B80000      04BC0000      04C00000      04C40000     
    04C80000      04CC0000      04D00000      04D40000      04D80000     
    04DC0000      04E00000      04E40000      04E80000      04EC0000     
    04F00000      04F40000      04F80000      04FC0000      05000000     
    05040000      05080000      050C0000      05100000      05140000     
    05180000      051C0000      05200000      05240000      05280000     
    052C0000      05300000      05340000      05380000      053C0000     
    05400000      05440000      05480000      054C0000      05500000     
    05540000      05580000      055C0000      05600000      05640000     
    05680000      056C0000      05700000      05740000      05780000     
    057C0000      05800000      05840000      05880000      058C0000     
    05900000      05940000      05980000      059C0000      05A00000     
    05A40000      05A80000      05AC0000      05B00000      05B40000     
    05B80000      05BC0000      05C00000      05C40000      05C80000     
    05CC0000      05D00000      05D40000      05D80000      05DC0000     
    05E00000      05E40000      05E80000      05EC0000      05F00000     
    05F40000      05F80000      05FC0000     
$ cp 00040000 a0200000 00100000
$ go a0200000
Uncompressing Linux.................................................................. done, booting the kernel.
Linux version 2.6.10 ([email protected]) (gcc version 3.3.2) #40 Mon Jan 31 14:01:18 EST 2005
CPU: XScale-PXA250 [69052100] revision 0 (ARMv5TE)
CPU: D VIVT undefined 5 cache
CPU: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Machine: Intel DBPXA250 Development Platform (aka Lubbock)
Memory policy: ECC disabled, Data cache writeback
Memory clock: 99.53MHz (*27)
Run Mode clock: 199.07MHz (*2)
Turbo Mode clock: 199.07MHz (*1.0, inactive)
Built 1 zonelists
Kernel command line: root=/dev/ram rw initrd=0xa1000000,0x00800000 console=ttyS0,115200 mem=64M
PID hash table entries: 512 (order: 9, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 54528KB available (1645K code, 330K data, 96K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 8192K
NET: Registered protocol family 16
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
ttyS0 at MMIO 0x40100000 (irq = 15) is a FFUART
ttyS1 at MMIO 0x40200000 (irq = 14) is a BTUART
ttyS2 at MMIO 0x40700000 (irq = 13) is a STUART
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
smc91x: not found (-19).
elevator: using anticipatory as default io scheduler

Lubbock configured to boot from ROM (bank 0)
Probing Lubbock Boot ROM at physical address 0x00000000 (32-bit bankwidth)
Lubbock Boot ROM: Found 2 x16 devices at 0x0 in 32-bit bank
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
No RedBoot partition table detected in Lubbock Boot ROM
cmdlinepart partition parsing not available
Probing Lubbock Application Flash at physical address 0x04000000 (32-bit bankwidth)
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
No RedBoot partition table detected in Lubbock Application Flash
cmdlinepart partition parsing not available
Using static partitions on Lubbock Boot ROM
Creating 3 MTD partitions on "Lubbock Boot ROM":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00140000 : "Kernel"
0x00140000-0x02000000 : "Filesystem"
Registering Lubbock Application Flash as whole device


pxa2xx_udc: version 14-Dec-2003
gs_bind: Gadget Serial v2.0 bound
gs_module_init: Gadget Serial v2.0 loaded
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET: Registered protocol family 1
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 4096KiB [1 disk] into ram disk... done.
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 96K
Shell invoked to run file: /bin/init
Command: #!/bin/sh
Command: /etc/rc
Shell invoked to run file: /etc/rc
Command: #!/bin/sh
Command: hostname ARMLinux
Command: mount -t proc proc /proc
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: cat /etc/motd
Welcome to
     _          _____        __   __      _       _
    /   \       /  __  \      /   \_/   \    |  |     | _ |                 
   /  _  \     |  |   |  |    /  /\   /\   \   |  |      _  ____   _    _  _   _
  /  / _ \  \    |  | __ |  |   /  /  \_/  \   \  |  |     |  |   _  \ |  |  |  | \  \/  /
/  / ___ \  \   |  | __ \  \   |  |       |   |  |  |___  |  |  | _ |  |  | _ |  | /    \
/_ /       \ _ \  |  |   \ _ \   | _ |       | _ |  |_____ |  | _ | _ |  | _ | \____  | \ _ / \ _ /
           
ARMLinux for Skyeye
For further information check:
http://hpclab.cs.tsinghua.edu.cn/~skyeye/

Execution Finished, Exiting
Command: /bin/sh

Sash command shell (version 1.1.1)
/>
/> cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00040000 "Bootloader"
mtd1: 00100000 00040000 "Kernel"
mtd2: 01ec0000 00040000 "Filesystem"
mtd3: 02000000 00040000 "Lubbock Application Flash"
/>
/> mount -t jffs2 /dev/mtdblock2 /mnt
/>
/> cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext2 rw 0 0
proc /proc proc rw,nodiratime 0 0
/dev/mtdblock2 /mnt jffs2 rw,noatime 0 0
/>ls
bin
dev
etc
home
lib
lost+found
mnt
proc
tmp
usr
var
/>
\>cd /mnt
\>mkdir hello-flash
SR.4 or SR.5 bits set in buffer write (status a800a. Clearing.
SR.4 or SR.5 bits set in buffer write (status 98009. Clearing.
SR.4 or SR.5 bits set in buffer write (status 98009. Clearing.
SR.4 or SR.5 bits set in buffer write (status 98009. Clearing.
SR.4 or SR.5 bits set in buffer write (status 98009. Clearing.
\>ls
bin
dev
etc
hello-flash
home
lib
mnt
opt
proc
rd
root
sbin
sys
tmp
usr
var
\>
四        u-boot-1.1.2 for Lubbock的编译
$tar jxf u-boot-1.1.2.tar.bz2
$make CROSS_COMPILE=/usr/local/arm/3.3.2/bin/arm-linux- lubbock_conifg
$make CROSS_COMPILE=/usr/local/arm/3.3.2/bin/arm-linux- all

五        linux-2.6.10 for Lubbock的编译
(1)
$tar zxf linux-2.6.10.tar.gz
(2)
$make ARCH=arm CROSS_COMPILE=/usr/local/arm/3.3.2/bin/arm-linux- lubbock_defconfig
(3)
$make ARCH=arm CROSS_COMPILE=/usr/local/arm/3.3.2/bin/arm-linux- menuconfig
1)选择与MTD相关的选项
        采用lubbock_defconfig中默认的MTD选项

2)选择与ramdisk 相关的选项
Block devices  --->
  x x                   < > Normal floppy disk support                              x x
  x x                   < > Loopback device support                                 x x
  x x                   < > Network block device support                            x x
  x x                   <*> RAM disk support                                        x x
  x x                   (16)  Default number of RAM disks                           x x
  x x                   (4096) Default RAM disk size (kbytes)                         x x
  x x                  
  •    Initial RAM disk (initrd) support                                     x x
      x x                   ()  Source directory of cpio_list                                           x x
      x x                   < > Packet writing on CD/DVD media                          x x
      x x                       IO Schedulers  --->

    (4)
    修改linux-2.6.10/.config中的
    CONFIG_CMDLINE= “root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M”

    CONFIG_CMDLINE=”root=/dev/ram rw initrd=0xa1000000,0x00400000 console=ttyS0,115200 mem=64M”
    (5)
    $make ARCH=arm CROSS_COMPILE=/usr/local/arm/3.3.2/bin/arm-linux-
    生成压缩内核Linux-2.6.10/arm/arm/boot/zImage和带调试信息的内核Linux-2.6.10/vmlinux

    六        SkyEye调试armlinux内核的方法
  •  楼主| 发表于 2005-2-2 13:20:22 | 显示全部楼层
    (2)如果先挂上ramdisk ,shell启动后将位于Flash上的一个MTD分区mount之后,虽然能够对Flash进行读写操作,不断有如下信息输出,一部分由MTD驱动打印的,另一部分由Flash模拟模块打印,原因早找中。
    Chip reports voltage low on erase: status 0xa8
    Erase at 0x01100000 failed immediately: errno -5
    Flash: can't erase when VPEN low
    Chip reports voltage low on erase: status 0xa8
    Erase at 0x010c0000 failed immediately: errno -5
    Flash: can't erase when VPEN low
    Chip reports voltage low on erase: status 0xa8
    Erase at 0x01080000 failed immediately: errno -5
    Flash: can't erase when VPEN low
    … …


    这个问题找到原因:

    ipaqsim中vpen初始化时为0,即禁止对Flash的编程和擦除,
    系统运行期间通过EGPIO来设置vpen

    暂时的解决办法是,修改
    skyeye/sim/arm/skyeye-flash.c--->Intel28F128J3A_flash_init()中的
    vpen=0;

    vpen=1;
    即总是允许对Flash的编程和擦除操作。


    目前问题(1)依然没有解决,欢迎大家下载测试包,一起查找原因。
    回复

    使用道具 举报

     楼主| 发表于 2005-2-2 17:06:34 | 显示全部楼层
    问题(1)解决了,内核启动时能直接从Flash上挂载JFFS2文件系统

    与直接挂ramdisk不同的是,挂上位于Flash空间JFFS2文件系统后,速度明显减慢了
    不过这很正常,因为对Flash空间的读写比RAM空间的读写的过程要复杂,因此耗时增加。

    [root@17hl-6s test-mtdblock2]# cat skyeye.conf
    cpu: xscale
    mach: pxa_lubbock

    mem_bank: map=F, type=RW, addr=0x00000000, size=0x00040000, file=./u-boot.bin, boot=yes
    mem_bank: map=F, type=RW, addr=0x00040000, size=0x00100000, file=./zImage
    mem_bank: map=F, type=RW, addr=0x00140000, size=0x01ec0000, file=./ramdiskfs.jffs2

    mem_bank: map=F, type=RW, addr=0x04000000, size=0x02000000

    mem_bank: map=I, type=RW, addr=0x40000000, size=0x0c000000

    mem_bank: map=M, type=RW, addr=0xa0000000, size=0x04000000

    [root@17hl-6s test-mtdblock2]
    ——————————————————————————————————
    [root@17hl-6s test-mtdblock2]# ./skyeye
    ***************************************************************
    ****                                                       ****
    ****   SkyEye  Simulator Ver 0.8.6 with  GDB 5.3 Interface ****
    ****                                                       ****
    ***************************************************************
    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.
    This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf".
    (SkyEye) tar s
    cpu info: xscale, xscale, 69052100, fffffff0, 2
    mach info: name pxa_lubbock, mach_init addr 0x81452cc
    SKYEYE: use xscale mmu ops
    0x8248f60

    Loaded FLASH ./u-boot.bin
    Loaded FLASH ./zImage
    Loaded FLASH ./ramdiskfs.jffs2
    Connected to the simulator.
    (SkyEye) lo
    No executable file specified.
    Use the "file" or "exec-file" command.
    (SkyEye) r
    U-Boot 1.1.2 (Feb  1 2005 - 12:40:52)

    U-Boot code: A3080000 -> A309C72C  BSS: -> A30D12EC
    RAM Configuration:
    Bank #0: a0000000 64 MB
    Bank #1: a4000000  0 kB
    Bank #2: a8000000  0 kB
    Bank #3: ac000000  0 kB

    Flash: 64 MB
    *** Warning - bad CRC, using default environment

    Hit any key to stop autoboot:  0
    ## Booting image at 00040000 ...
    Bad Magic Number
    $
    $ cp 00040000 a0200000 00100000
    $ go a0200000
    ## Starting application at 0xA0200000 ...
    ————————————————————---------------------------
    Uncompressing Linux............................................................ done, booting the kernel.
    Linux version 2.6.10 ([email protected]) (gcc version 3.3.2) #56 Wed Feb 2 15:22:18 EST 2005
    CPU: XScale-PXA250 [69052100] revision 0 (ARMv5TE)
    CPU: D VIVT undefined 5 cache
    CPU: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
    CPU: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
    Machine: Intel DBPXA250 Development Platform (aka Lubbock)
    Memory policy: ECC disabled, Data cache writeback
    Memory clock: 99.53MHz (*27)
    Run Mode clock: 199.07MHz (*2)
    Turbo Mode clock: 199.07MHz (*1.0, inactive)
    Built 1 zonelists
    Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 console=ttyS0,115200 mem=64M
    PID hash table entries: 512 (order: 9, 8192 bytes)
    Console: colour dummy device 80x30
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 64MB = 64MB total
    Memory: 62896KB available (1503K code, 301K data, 88K init)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    NET: Registered protocol family 16
    NetWinder Floating Point Emulator V0.97 (double precision)
    JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
    Initializing Cryptographic API
    ttyS0 at MMIO 0x40100000 (irq = 15) is a FFUART
    ttyS1 at MMIO 0x40200000 (irq = 14) is a BTUART
    ttyS2 at MMIO 0x40700000 (irq = 13) is a STUART
    io scheduler noop registered
    io scheduler anticipatory registered
    io scheduler deadline registered
    io scheduler cfq registered
    RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
    loop: loaded (max 8 devices)
    smc91x: not found (-19).
    elevator: using anticipatory as default io scheduler
    Lubbock configured to boot from ROM (bank 0)
    Probing Lubbock Boot ROM at physical address 0x00000000 (32-bit bankwidth)
    Intel/Sharp Extended Query Table at 0x0031
    Using buffer write method
    cfi_cmdset_0001: Erase suspend on write enabled
    RedBoot partition parsing not available
    Probing Lubbock Application Flash at physical address 0x04000000 (32-bit bankwidth)
    Intel/Sharp Extended Query Table at 0x0031
    Using buffer write method
    cfi_cmdset_0001: Erase suspend on write enabled
    RedBoot partition parsing not available
    Using static partitions on Lubbock Boot ROM
    Creating 3 MTD partitions on "Lubbock Boot ROM":
    0x00000000-0x00040000 : "Bootloader"
    0x00040000-0x00140000 : "Kernel"
    0x00140000-0x02000000 : "Filesystem"
    Registering Lubbock Application Flash as whole device
    pxa2xx_udc: version 14-Dec-2003
    gs_bind: Gadget Serial v2.0 bound
    gs_module_init: Gadget Serial v2.0 loaded
    mice: PS/2 mouse device common for all mice
    NET: Registered protocol family 2
    IP: routing cache hash table of 512 buckets, 4Kbytes
    TCP: Hash tables configured (established 4096 bind 8192)
    NET: Registered protocol family 1
    VFS: Mounted root (jffs2 filesystem).
    Freeing init memory: 88K
    Shell invoked to run file: /bin/init
    Command: #!/bin/sh
    Command: /etc/rc
    Shell invoked to run file: /etc/rc
    Command: #!/bin/sh
    Command: hostname ARMLinux
    Command: mount -t proc proc /proc
    Node totlen on flash (0xffffffff) != totlen from node ref (0x00000030)
    Node totlen on flash (0xffffffff) != totlen from node ref (0x00000044)
    Command: mkdir /var/tmp
    Command: mkdir /var/log
    Command: mkdir /var/run
    Command: mkdir /var/lock
    Command: cat /etc/motd
    Welcome to
         _      _____      __   __    _      _
        / \    /  __ \    /  \_/  \  | |    |_|                 
       / _ \   | |  | |  / /\   /\ \ | |     _ ____  _   _  _  _
      / /_\ \  | |__| | / /  \_/  \ \| |    | |  _ \| | | |\ \/ /
    / /___\ \ | |__\ \ | |       | || |___ | | |_| | |_| |/    \
    /_/     \_\| |   \_\|_|       |_||_____||_|_| |_|\____|\_/\_/
               
    ARMLinux for Skyeye
    For further information check:
    http://hpclab.cs.tsinghua.edu.cn/~skyeye/

    Execution Finished, Exiting
    Command: /bin/sh

    Sash command shell (version 1.1.1)
    />
    /> cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00040000 00040000 "Bootloader"
    mtd1: 00100000 00040000 "Kernel"
    mtd2: 01ec0000 00040000 "Filesystem"
    mtd3: 02000000 00040000 "Lubbock Application Flash"
    />
    /> cat /proc/mounts
    rootfs / rootfs rw 0 0
    /dev/root / jffs2 rw,noatime 0 0
    proc /proc proc rw,nodiratime 0 0
    />
    /> ls -l /dev/root
    lrwxrwxrwx  1 0        0               9  Feb  2 2005  /dev/root -> mtdblock2
    />
    /> ls
    bin
    dev
    etc
    home
    lib
    lost+found
    mnt
    proc
    tmp
    usr
    var
    /> mkdir hello-flash
    /> ls
    bin
    dev
    etc
    hello-flash
    home
    lib
    lost+found
    mnt
    proc
    tmp
    usr
    var
    />
    回复

    使用道具 举报

    发表于 2005-2-4 13:56:42 | 显示全部楼层
    好消息,谢谢halfyear的努力!
    回复

    使用道具 举报

    发表于 2005-8-9 22:41:05 | 显示全部楼层
    照此法生成的内核会崩溃,用skyeye-flash.tar.bz2自带的2.6.10却能正常运行,什么原因呢

    ## Starting application at 0xA0200000 ...
    Uncompressing Linux................................................................ done, booting the kernel.
    Linux version 2.6.10 ([email protected]) (gcc version 3.3.3) #3 Tue Aug 9 22:31:23 CST 2005
    CPU: XScale-PXA250 [69052100] revision 0 (ARMv5TE)
    CPU: D VIVT undefined 5 cache
    CPU: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
    CPU: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
    Machine: Intel DBPXA250 Development Platform (aka Lubbock)
    Memory policy: ECC disabled, Data cache writeback
    Memory clock: 99.53MHz (*27)
    Run Mode clock: 199.07MHz (*2)
    Turbo Mode clock: 199.07MHz (*1.0, inactive)
    Built 1 zonelists
    Kernel command line: root=/dev/ram rw initrd=0xa1000000,0x00400000 console=ttyS0,115200 mem=64M
    PID hash table entries: 512 (order: 9, 8192 bytes)
    Console: colour dummy device 80x30
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 64MB = 64MB total
    Memory: 58656KB available (1605K code, 321K data, 100K init)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
    Freeing initrd memory: 4096K
    NET: Registered protocol family 16
    NetWinder Floating Point Emulator V0.97 (double precision)
    JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = c0004000
    [00000000] *pgd=00000000
    Internal error: Oops: 17 [#1]
    Modules linked in:
    CPU: 0
    PC is at strlen+0xc/0x30
    LR is at strlcpy+0x20/0x58
    pc : [<c00d5f48>]    lr : [<c00d5cfc>]    Not tainted
    sp : c02c1f70  ip : c02c1f80  fp : c02c1f7c
    r10: 00000000  r9 : 00000000  r8 : 00000000
    r7 : c002027c  r6 : 00000000  r5 : c02c0000  r4 : 00000100
    r3 : 00000000  r2 : 00000100  r1 : 00000000  r0 : 00000000
    Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  Segment kernel
    Control: 3937  Table: A0004000  DAC: 0000001D
    Process swapper (pid: 1, stack limit = 0xc02c0190)
    Stack: (0xc02c1f70 to 0xc02c2000)
    1f60:                                     c02c1f9c c02c1f80 c00d5cfc c00d5f48
    1f80: c001e664 c02c0000 00000000 c001e6f0 c02c1fac c02c1fa0 c00ed6b0 c00d5ce8
    1fa0: c02c1fc0 c02c1fb0 c00ed6f4 c00ed6a0 00000000 c02c1fe0 c02c1fc4 c00088d4
    1fc0: c00ed6c8 c018f708 00000000 00000000 00000000 c02c1ff4 c02c1fe4 c0021234
    1fe0: c0008880 00000000 00000000 c02c1ff8 c003a9d8 c002120c 00000000 00000000
    Backtrace:
    [<c00d5f3c>] (strlen+0x0/0x30) from [<c00d5cfc>] (strlcpy+0x20/0x5
    [<c00d5cdc>] (strlcpy+0x0/0x5 from [<c00ed6b0>] (pxafb_setup+0x1c/0x2
    r7 = C001E6F0  r6 = 00000000  r5 = C02C0000  r4 = C001E664
    [<c00ed694>] (pxafb_setup+0x0/0x2 from [<c00ed6f4>] (pxafb_init+0x38/0x4c)
    [<c00ed6bc>] (pxafb_init+0x0/0x4c) from [<c00088d4>] (do_initcalls+0x60/0xd
    [<c0008874>] (do_initcalls+0x0/0xd from [<c0021234>] (init+0x34/0xf0)
    r7 = 00000000  r6 = 00000000  r5 = 00000000  r4 = C018F708
    [<c0021200>] (init+0x0/0xf0) from [<c003a9d8>] (do_exit+0x0/0x37c)
    r4 = 00000000
    Code: e91ba800 e1a0c00d e92dd800 e24cb004 (e5d03000)
    <0>Kernel panic - not syncing: Attempted to kill init!
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    GMT+8, 2024-11-23 11:04 , Processed in 0.041676 second(s), 15 queries .

    © 2021 Powered by Discuz! X3.5.

    快速回复 返回顶部 返回列表