打印

W90P950bootloader启动内核的小问题

[复制链接]
3229|8
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
想实习去|  楼主 | 2010-8-14 21:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
小问题,**烦。
把950kernel下到0x8000,然后执行g 0x8000,系统可以正常启动。
把950kernel.zip下载到Flash中:
ft 1 kernel 0xa0020000 0x8000 -azcx

然后reboot,结果显示下面的内容后就没有反应了:
W90X900 Bootloader 1.2.1 [rev 1 built on Aug 05 2009]
Running on a W90X900 platform [SDRAM: 32MB, Flash: 4MB]
Copyright (c) 2008 Nuvoton Technology Corp. All rights reserved.

Bootloader Configuration:

        Network Phy Chip    : IC PLUS IP101A
        MAC Address         : 09:23:32:42:DD:AC
        IP Address          : 192.168.0.101
        DHCP Client         : Disabled
        BL Buffer Base      : 0x00500000
        BL Buffer Size      : 0x00100000
        Baud Rate           : 115200
        Turbo Mode          : Disabled
        Serial Number       : 0x00000000

Press ESC to enter debug mode ..
Processing image 1 ...
Unzip image 1 ...
Executing image 1 ...

怎么办?
内核下载到0x8000后能正常启动,说明内核文件是正确的.
Unzip image 1也没有报错,说明解压缩也是正常的,可执行的时候结果就不对.

Flash中的内容:
ootloader > ls
Image: 0 name:BOOT INFO base:0xA0010000 size:0x0000FFCC exec:0xA0010000 -f
Image: 1 name:kernel base:0xA0020000 size:0x000ED790 exec:0x00008000 -acxz
Image: 2 name:rootfs base:0xA0140000 size:0x00223000 exec:0xA0140000 -fr
rootfs是一个cramfs格式的系统.

系统正常启动的输出如下:
W90X900 Bootloader 1.2.1 [rev 1 built on Aug 05 2009]
Running on a W90X900 platform [SDRAM: 32MB, Flash: 4MB]
Copyright (c) 2008 Nuvoton Technology Corp. All rights reserved.

Bootloader Configuration:

        Network Phy Chip    : IC PLUS IP101A
        MAC Address         : 09:23:32:42:DD:AC
        IP Address          : 192.168.0.101
        DHCP Client         : Disabled
        BL Buffer Base      : 0x00500000
        BL Buffer Size      : 0x00100000
        Baud Rate           : 115200
        Turbo Mode          : Disabled
        Serial Number       : 0x00000000

Press ESC to enter debug mode .

bootloader > ls
Image: 0 name:BOOT INFO base:0xA0010000 size:0x0000FFCC exec:0xA0010000 -f
Image: 1 name:kernel base:0xA0020000 size:0x000ED790 exec:0x00008000 -acxz
Image: 2 name:rootfs base:0xA0140000 size:0x00223000 exec:0xA0140000 -fr

bootloader >
bootloader > mt 0x8000
OK
Waiting for download ...
TFTP client: 192.168.0.165
Download OK, file size:2018448        

Download successed!

bootloader >
bootloader > g 0x8000
Linux version 2.6.17.14 (root@localhost.localdomain) (gcc version 4.2.1) #9 PREEMPT Wed Aug 19 16:15:39 CST 2009
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
Machine: W90P950
Memory policy: ECC disabled, Data cache writeback
CPU W90P950 (id 0x02900910  system clock:200MHZ)
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists
Kernel command line: root=/dev/mtdblock1 console=ttyS0,115200n8 mem=32M
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 30352KB available (1704K code, 290K data, 68K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
********************************************
* You selcet W90P950,Start Init W90P950EVB *
********************************************
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 256 (order: -2, 1024 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 1024 bind 512)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
W90X900 USB 2.0 Device Driver Initilization Success
W90X900 uart driver has been initialized successfully!
w90x900-uart.0: w90x900_serial0 at MMIO 0xb8000000 (irq = 7) is a W90X900
w90x900-uart.1: w90x900_serial1 at MMIO 0xb8000100 (irq = 8) is a W90X900
w90x900-uart.2: w90x900_serial2 at MMIO 0xb8000200 (irq = 9) is a W90X900
loop: loaded (max 8 devices)
W90X900 Ethernet(eth0) driver has been initialized successfully!
The ports of EMC are available in that range.
W90X900 SD driver has been initialized successfully!
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
w90x900nor: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
w90x900 flash device: 4MiB at 0xa0000000
Creating 2 MTD partitions on "w90x900nor":
0x00020000-0x00140000 : "W90X900 NOR Partition 1 for kernel (960K)"
0x00140000-0x00400000 : "W90X900 NOR Partition 2 for image (1M)"
W90X900 USB host driver has been initialized successfully!
w90x900-ehci w90x900-ehci: Nuvoton w90x900 EHCI Host Controller
w90x900-ehci w90x900-ehci: new USB bus registered, assigned bus number 1
w90x900-ehci w90x900-ehci: irq 15, io mem 0xb0005000
w90x900-ehci w90x900-ehci: USB 2.0 started, EHCI 0.95, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
w90x900-ohci w90x900-ohci: Nuvoton w90x900 ohci Host Controller
w90x900-ohci w90x900-ohci: new USB bus registered, assigned bus number 2
w90x900-ohci w90x900-ohci: io mem 0xb0007000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usb 2-2: new full speed USB device using w90x900-ohci and address 2
usb 2-2: not running at top speed; connect to a high speed hub
usb 2-2: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
w90x900-i2c-p0 w90x900-i2c-p0: bus frequency set to 100 KHz
w90x900-i2c-p0 w90x900-i2c-p0: i2c-0: w90x900 I2C port0 adapter
w90x900-i2c-p1 w90x900-i2c-p1: bus frequency set to 100 KHz
w90x900-i2c-p1 w90x900-i2c-p1: i2c-1: w90x900 I2C port1 adapter
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 68K
init started: BusyBox v1.9.1 (2008-04-08 22:02:06 CST)
eth0 is OPENED
udhcpc (v1.9.1) started
execute lcm_demo
Cannot open fb0!

Please press Enter to activate this console. Sending discover...
MAC Line-off...
MAC Line-on...
  Vendor: Kingmax   Model: USB2.0 FlashDisk  Rev: 0.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 7897088 512-byte hdwr sectors (4043 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
SCSI device sda: 7897088 512-byte hdwr sectors (4043 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
sda: unknown partition table
sd 0:0:0:0: Attached scsi removable disk sda
Sending discover...
OK
100MB - FULL
Sending discover...
Sending select for 192.168.0.167...
Lease of 192.168.0.167 obtained, lease time 604800
deleting routers
route: SIOCDELRT: No such process
adding dns 202.101.172.35
adding dns 192.168.0.1

sh-3.2#

相关帖子

沙发
3B1105| | 2010-8-14 22:01 | 只看该作者
你能不能帮我看下J-LINK调试710的问题,我用的是710的开发板,那个.gdbinit我怎么弄都同有初始化正确啊

使用特权

评论回复
板凳
6019实验室| | 2010-8-14 22:25 | 只看该作者
不压缩下载到flash里面看看。

使用特权

评论回复
地板
想实习去|  楼主 | 2010-8-15 12:03 | 只看该作者
3# 6019实验室
不压缩直接下到Flash:
ft 1 kernel 0xa0020000 0x8000 -acx

结果还是一样,无法启动。
是不是因为启动的时候没有设置r0、r1、r2三个寄存器所致?
原来用W90P710/745做项目的时候就碰到过这个问题,后来是自己写了个加载内核的程序搞定的,当然我但是使用的内核是zImage,而不是.zip格式的。

在W90X900系列MCU上启动Linux,R0、R1、R2需要分别设置成哪个值?

使用特权

评论回复
5
想实习去|  楼主 | 2010-8-15 12:04 | 只看该作者
2# 3B1105
给个文件,接着!这个是我在W90P710上移植eCOS/Redboot的时候用的.gdbinit文件。以后有缘见面请俺米西米西哦!
#
# J-LINK GDB SERVER initialization
#
# This file is modified by Chen Weiwen, YOU
# CAN MODIFY THIS FILE BY YOURSELF WITH YOUR
# OWN WAYS IF YOU WANT. BUT YOU SHOULD SHARE
# SOME TEXT LINE WITH ME OR OTHER GUYS IF WE
# NEEDED.
# This connects to a GDB Server listening
# for commands on localhost at tcp port 2331
target remote 127.0.0.1:2331
# Set JTAG speed to 30 kHz
monitor speed 8000
# Set GDBServer to little endian
monitor endian little
# Reset the chip to get to a known state.
monitor reset
#
# CPU core initialization (to be done by user)
#
# Set the processor mode
monitor reg cpsr = 0xd3
# Initialize the CPU regiser including EBI, SDRAM, ROM and so on.
monitor memU32 0xFFF01000 = 0x000530C0
monitor memU32 0xFFF01004 = 0xFE040080
monitor memU32 0xFFF01008 = 0x000090ED
monitor memU32 0xFFF0100C = 0x000090E0
monitor memU32 0xFFF01010 = 0x0000014B
monitor memU32 0xFFF01014 = 0x0000014B

# Set auto JTAG speed
# monitor speed auto
# Setup GDB FOR FASTER DOWNLOADS
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
# Load the program executable called "image.elf"
# load redboot.elf

使用特权

评论回复
6
linux1| | 2010-8-15 22:05 | 只看该作者
你现在用的是zimage的?
这个不行的,你要用Image这个文件。

解释下我为什么没有设置R0、R1、R2.
由于华邦的bootloader是单独的,不会和任何内核进行沟通,所以新唐bootloader里面不会向kernel传递任何参数。
但是linux要求必须bootloader负责完成这个工作,所以我在移植linux的时候r0,r1是在kernel里面钉死了的。至于r2似乎最新的linux才需要设置r2的。所以你一定要用Image这个。因为zimage需要bootoader去解码的。而我们bootloader没这个功能。

使用特权

评论回复
7
yoyowodeai| | 2010-8-16 22:22 | 只看该作者
本帖最后由 yoyowodeai 于 2010-8-16 22:40 编辑

路过,学习了

使用特权

评论回复
8
想实习去|  楼主 | 2010-8-16 22:39 | 只看该作者
用Image,直接下到Flash,可以启动.
不过,Flash就没有空间来放rootfs了.
bootloader > ft 1 kernel 0xa0020000 0x8000 -acx
OK
Waiting for download ...
TFTP client: 192.168.0.128
Download OK, file size:2018448        

Flash programming ...  
...............................
bootloader >
bootloader > boot

Rebooting the system ...



W90X900 Bootloader 1.2.1 [rev 1 built on Aug 05 2009]
Running on a W90X900 platform [SDRAM: 32MB, Flash: 4MB]
Copyright (c) 2008 Nuvoton Technology Corp. All rights reserved.

Bootloader Configuration:

        Network Phy Chip    : IC PLUS IP101A
        MAC Address         : 09:23:32:42D:AC
        IP Address          : 192.168.0.101
        DHCP Client         : Disabled
        BL Buffer Base      : 0x00500000
        BL Buffer Size      : 0x00100000
        Baud Rate           : 115200
        Turbo Mode          : Disabled
        Serial Number       : 0x00000000

Press ESC to enter debug mode ..
Processing image 1 ...
Executing image 1 ...
Linux version 2.6.17.14 (root@localhost.localdomain) (gcc version 4.2.1) #9 PREEMPT Wed Aug 19 16:15:39 CST 2009
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
Machine: W90P950
Memory policy: ECC disabled, Data cache writeback
CPU W90P950 (id 0x02900910  system clock:200MHZ)
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists
Kernel command line: root=/dev/mtdblock1 console=ttyS0,115200n8 mem=32M
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 30352KB available (1704K code, 290K data, 68K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
********************************************
* You selcet W90P950,Start Init W90P950EVB *
********************************************
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 256 (order: -2, 1024 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 1024 bind 512)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
W90X900 USB 2.0 Device Driver Initilization Success
W90X900 uart driver has been initialized successfully!
w90x900-uart.0: w90x900_serial0 at MMIO 0xb8000000 (irq = 7) is a W90X900
w90x900-uart.1: w90x900_serial1 at MMIO 0xb8000100 (irq = 8) is a W90X900
w90x900-uart.2: w90x900_serial2 at MMIO 0xb8000200 (irq = 9) is a W90X900
loop: loaded (max 8 devices)
W90X900 Ethernet(eth0) driver has been initialized successfully!
The ports of EMC are available in that range.
W90X900 SD driver has been initialized successfully!
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
w90x900nor: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
w90x900 flash device: 4MiB at 0xa0000000
Creating 2 MTD partitions on "w90x900nor":
0x00020000-0x00140000 : "W90X900 NOR Partition 1 for kernel (960K)"
0x00140000-0x00400000 : "W90X900 NOR Partition 2 for image (1M)"
W90X900 USB host driver has been initialized successfully!
w90x900-ehci w90x900-ehci: Nuvoton w90x900 EHCI Host Controller
w90x900-ehci w90x900-ehci: new USB bus registered, assigned bus number 1
w90x900-ehci w90x900-ehci: irq 15, io mem 0xb0005000
w90x900-ehci w90x900-ehci: USB 2.0 started, EHCI 0.95, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
w90x900-ohci w90x900-ohci: Nuvoton w90x900 ohci Host Controller
w90x900-ohci w90x900-ohci: new USB bus registered, assigned bus number 2
w90x900-ohci w90x900-ohci: io mem 0xb0007000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
w90x900-i2c-p0 w90x900-i2c-p0: bus frequency set to 100 KHz
w90x900-i2c-p0 w90x900-i2c-p0: i2c-0: w90x900 I2C port0 adapter
w90x900-i2c-p1 w90x900-i2c-p1: bus frequency set to 100 KHz
w90x900-i2c-p1 w90x900-i2c-p1: i2c-1: w90x900 I2C port1 adapter
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
No filesystem could mount root, tried:  cramfs msdos vfat
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1)

使用特权

评论回复
9
yybj| | 2010-8-17 08:39 | 只看该作者
这个不算小问题了

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

111

主题

500

帖子

1

粉丝