From: 甜瓜 <littlesweetmelon@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [uboot] Walnut PPC405GP flash
Date: Mon, 21 Apr 2008 13:49:53 +0800 [thread overview]
Message-ID: <cdb837ea0804202249w453cbb87td879ff09ec138bd4@mail.gmail.com> (raw)
Howdy,
I'm a beginner of embedded system. I'm working on a board of Walnut
PPC405GP which use PPCBOOT 1.1.2.
One day I tried to write some data into unused area of the flash:
>> fli
Bank # 1: AMD AM29F040 (512 Kbit, uniform sector size)
Size: 512 KB in 8 Sectors
Sector Start Addresses:
FFF80000 RO FFF90000 RO FFFA0000 RO FFFB0000 FFFC0000
FFFD0000 FFFE0000 FFFF0000
I use the last sector:
>> md ffff0000
ffff0000: 00000000 00000000 00000000 00000000 ................
ffff0010: 00000000 00000000 00000000 00000000 ................
ffff0020: 00000000 00000000 00000000 00000000 ................
ffff0030: 00000000 00000000 00000000 00000000 ................
ffff0040: 00000000 00000000 00000000 00000000 ................
ffff0050: 00000000 00000000 00000000 00000000 ................
ffff0060: 00000000 00000000 00000000 00000000 ................
ffff0070: 00000000 00000000 00000000 00000000 ................
ffff0080: 00000000 00000000 00000000 00000000 ................
ffff0090: 00000000 00000000 00000000 00000000 ................
ffff00a0: 00000000 00000000 00000000 00000000 ................
ffff00b0: 00000000 00000000 00000000 00000000 ................
ffff00c0: 00000000 00000000 00000000 00000000 ................
ffff00d0: 00000000 00000000 00000000 00000000 ................
ffff00e0: 00000000 00000000 00000000 00000000 ................
ffff00f0: 00000000 00000000 00000000 00000000 ................
>> protected off ffff0000 ffffffff
Un-Protected 1 sectors
>> erase ffff0000 ffffffff
Erase Flash from 0xffff0000 to 0xffffffff
Erasing sector ffff0000
. done
Erased 1 sectors
!! Now I tried to copy a small file data to this area by using tftp.
>> tftp ffff0000 data_file
405GP Eth Status:
data len error 0
rx frames 0
rx 0
rx_prot_err 0
int_err 0
tx_err_log:
[0] 0
[1] 0
[2] 0
[3] 0
[4] 0
[5] 0
[6] 0
[7] 0
[8] 0
[9] 0
rx_err_log:
[0] 0
[1] 0
[2] 0
[3] 0
[4] 0
[5] 0
[6] 0
[7] 0
[8] 0
[9] 0
ENET Speed is 100 Mbps - FULL duplex connection
*** ERROR: `ipaddr' not set
Well, set the target addr first, then:
>> dhcp
405GP Eth Status:
data len error 0
rx frames 0
rx 0
rx_prot_err 0
int_err 0
tx_err_log:
[0] 0
[1] 0
[2] 0
[3] 0
[4] 0
[5] 0
[6] 0
[7] 0
[8] 0
[9] 0
rx_err_log:
[0] 0
[1] 0
[2] 0
[3] 0
[4] 0
[5] 0
[6] 0
[7] 0
[8] 0
[9] 0
ENET Speed is 100 Mbps - FULL duplex connection
BOOTP broadcast 1
DHCPHandler: got packet: (src=67, dst=68, len=548) state: 3
Filtering pkt = 0
DHCPHandler: got DHCP packet: (src=67, dst=68, len=548) state: 3
DHCP: state=SELECTING bp_file: "uImage"
TRANSITIONING TO REQUESTING STATE
Bootfile: uImage
DhcpSendRequestPkt: Sending DHCPREQUEST
Transmitting DHCPREQUEST packet: len = 308
DHCPHandler: got packet: (src=67, dst=68, len=548) state: 4
Filtering pkt = 0
DHCPHandler: got DHCP packet: (src=67, dst=68, len=548) state: 4
DHCP State: REQUESTING
Bootfile: uImage
DHCP client bound to address 192.168.1.201
ARP broadcast 1
Got good ARP - start TFTP
TFTP from server 192.168.1.200; our IP address is 192.168.1.201
Filename 'uImage'.
Load address: 0xffff0000
Loading: *\b##############NIP: 00000200 XER: 00000000 LR: 67E12A71 REGS:
01faea48 TRAP: 0700 DAR: 00080000
MSR: 00000000 EE: 0 PR: 0 FP: 0 ME: 0 IR/DR: 00
GPR00: 00000001 01FAEB38 40000000 01FAEB48 80000000 00000002 01FB016D
01C80764
GPR08: 01FF5060 01FF5074 FFFFFFFF 01FF54B4 00000000 7C6BFE6C 01FF4400
02050000
GPR16: E45EA284 DC212086 02CACA22 F3844306 00001000 01FAEB38 00000000
67E12A71
GPR24: 76585F5E 00000001 00000000 01FAEF8C 00000004 00000000 01FF44CC
01FF52A4
** Illegal Instruction **
Call backtrace:
Program Check Exception
========================
You can see my mistake...>_< A big uImage file is copied to flash, rather
than data_file.
After that, the Walnut board cannot boot anymore... I wonder why. The data
is simply copied to
the unused sector, while other sectors are under protection. It should be
safe even if I made mistakes.
Thank you very much.
---
ShenLei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080421/d359ae8c/attachment.htm
next reply other threads:[~2008-04-21 5:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 5:49 甜瓜 [this message]
2008-04-21 6:24 ` [U-Boot-Users] [uboot] Walnut PPC405GP flash Stefan Roese
2008-04-21 6:42 ` 甜瓜
2008-04-21 8:34 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cdb837ea0804202249w453cbb87td879ff09ec138bd4@mail.gmail.com \
--to=littlesweetmelon@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox