2008-05-23 10:14:01 BF548 EZKIT u-boot fails after saveenv/reset
Erick Hemphill (UNITED STATES)
Message: 56213
I haven't been able to find any matches for this problem in my searching.
I'm using u-boot-bf548-ezkit-uart-2008R1.ldr, and writing it to asynchronous memory using the flash programmer in VisualDSP 5 with no offset. It writes fine, boots fine, and works fine until I try to saveenv. I'm pulling SVN for everything today, so maybe it won't do this once I've built my own files, but I thought it was worth mentioning.
Here's the output from a healthy boot:
U-Boot 1.1.6-svn1112 (ADI-2008R1) (Jan 22 2008 - 20:31:03)
CPU: ADSP bf548-0.0 (Detected Rev: 0.0)
Board: ADI BF548 EZ-Kit board
Support: http://blackfin.uclinux.org/
Clock: VCO: 525 MHz, Core: 525 MHz, System: 131 MHz
RAM: 64 MB
Flash: 32 MB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
NAND: 256 MiB
Net: LAN9x18 (0x118a0000) detected at 0x24000000
MAC: 00:E0:22:FE:B7:18
I2C: ready
bfin>
Here's a printenv in case it helps:
bfin> printenv
bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF0,57600
bootcmd=run ramboot
baudrate=57600
loads_echo=1
ipaddr=192.168.0.15
serverip=192.168.0.2
autoload=no
rootpath=/romfs
gatewayip=192.168.0.1
netmask=255.255.255.0
hostname=1
loadaddr=0x1000000
ubootfile=u-boot.ldr
update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 0x2003FFFF;erase 0x20000000 0x2003FFFF;cp.b $(loadaddr) 0x20000000 $(filesize)
addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:off
ramargs=set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF0,57600
ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm
nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3
nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm
flashboot=bootm 0x20100000
ethaddr=00:E0:22:FE:B7:18
stdin=serial
stdout=serial
stderr=serial
Environment size: 957/8188 bytes
And here's the explosion after saveenv/reset:
bfin> setenv bootcmd bootelf 0x20060000
bfin> saveenv
Saving Environment to Flash...
. done
Un-Protected 1 sectors
Erasing Flash...
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
bfin> reset
Net:
Ack! Something bad happened to the Blackfin!
SEQUENCER STATUS:
SEQSTAT: 00002021 IPEND: 3fa00b2 SYSCFG: 0032
HWERRCAUSE: 0x0
EXCAUSE : 0x21
physical IVG7 asserted : <0x03fa0470> { _evt_default + 0x0 }
RETE: <0x04001020> { ___udivdi3 + 0x47e5c }
RETN: <0x04628501> { ___udivdi3 + 0x66f33d }
RETX: <0x03fa3e54> { _NfsHandler + 0x18c }
RETS: <0x03fa0fd2> { _board_init_r + 0x1aa }
PC : <0x03fa00b2> { _start + 0xb2 }
DCPLB_FAULT_ADDR: <0x03efc000> /* unknown address */
ICPLB_FAULT_ADDR: <0x03fa3e54> { _NfsHandler + 0x18c }
PROCESSOR STATE:
R0 : 03efc028 R1 : 0000000a R2 : 03efbe2f R3 : 00000134
R4 : 0000020d R5 : 07d2b750 R6 : 1f4add40 R7 : 00000006
P0 : 00000003 P1 : 00000128 P2 : ffc02014 P3 : 03efc02e
P4 : 03efc028 P5 : 03efc000 FP : 03efbffc SP : 03efbe78
LB0: 03fb90c8 LT0: 03fb90bc LC0: 00000000
LB1: 03fb2862 LT1: 03fb285c LC1: 00000000
B0 : 6ca024b9 L0 : 00000000 M0 : fed33a25 I0 : 01000000
B1 : ebf2ee21 L1 : 00000000 M1 : 4ccdcc35 I1 : 03fc1b9c
B2 : b8f1ec6f L2 : 00000000 M2 : 4fe9707b I2 : 20812a16
B3 : ffec4861 L3 : 00000000 M3 : 76716017 I3 : 48857a96
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : ffb00ffc ASTAT: 00001025
Hardware Trace:
0 Target : <0x03fa0940> { _bfin_panic + 0x0 }
Source : <0x03fa0b04> { _trap_c + 0x188 }
1 Target : <0x03fa0afa> { _trap_c + 0x17e }
Source : <0x03fa0998> { _trap_c + 0x1c }
2 Target : <0x03fa097c> { _trap_c + 0x0 }
Source : <0x03fa0416> { _trap + 0x56 }
3 Target : <0x03fa03c0> { _trap + 0x0 }
Source : <0x03fa3e52> { _NfsHandler + 0x18a }
4 Target : <0x03fa35a8> { _eth_initialize + 0x0 }
Source : <0x03fa0fce> { _board_init_r + 0x1a6 }
5 Target : <0x03fa0fcc> { _board_init_r + 0x1a4 }
Source : <0x03fafe0e> { _printf + 0x42 }
6 Target : <0x03fafe04> { _printf + 0x38 }
Source : <0x03fb5910> { _serial_puts + 0x1c }
7 Target : <0x03fb5904> { _serial_puts + 0x10 }
Source : <0x03fb58e0> { _serial_putc + 0x48 }
8 Target : <0x03fb58cc> { _serial_putc + 0x34 }
Source : <0x03fb58d8> { _serial_putc + 0x40 }
9 Target : <0x03fb58cc> { _serial_putc + 0x34 }
10 Target : <0x03fb58cc> { _serial_putc + 0x34 }
11 Target : <0x03fb58cc> { _serial_putc + 0x34 }
12 Target : <0x03fb58cc> { _serial_putc + 0x34 }
13 Target : <0x03fb58cc> { _serial_putc + 0x34 }
14 Target : <0x03fb58cc> { _serial_putc + 0x34 }
15 Target : <0x03fb58cc> { _serial_putc + 0x34 }
Please reset the board
QuoteReplyEditDelete
2008-05-23 10:43:18 Re: BF548 EZKIT u-boot fails after saveenv/reset
Robin Getz (UNITED STATES)
Message: 56214
Erick:
>I'm using u-boot-bf548-ezkit-uart-2008R1.ldr, and writing it to asynchronous memory using the flash programmer
That makes no sense.
the UART ldr is for booting from the UART. The parallel flash version is for booting from parallel flash.
-Robin
2008-05-23 15:37:13 Re: BF548 EZKIT u-boot fails after saveenv/reset
Mike Frysinger (UNITED STATES)
Message: 56224
yeah, the UART ldr has no gap in it to account for the env ... so when you save, you actually clobber u-boot code
i could change it so versions booting from the UART, the saveenv command doesnt work .... but the current idea was that the UART ldr is most often used to recover/initial bringup before switching over to parallel mode ...
2008-05-23 20:45:02 Re: BF548 EZKIT u-boot fails after saveenv/reset
Message: 56235
Mike:
UART ldr should not have save enabled - since it really doesn't know in which flash things should be saved in (parallel or SPI).
I think the existing functionality is OK.
2008-05-23 20:56:17 Re: BF548 EZKIT u-boot fails after saveenv/reset
Message: 56237
current UART boots for all parts is that save/update/etc... commands have the same configuration as booting out of parallel flash as all of our boards typically support parallel flash (and optionally SPI) ... thus the soft-assumption that UART defaults to parallel flash
it makes developing and flipping between UART and parallel flash boot modes (which all of our boards support unlike SPI) easier
2008-05-28 13:23:31 Re: BF548 EZKIT u-boot fails after saveenv/reset
Message: 56361
Thanks for the replies guys,
I'm kinda getting my feet wet here, so I appreciate being pushed in the right direction Robin. It's amazing how well things work when I use the right ldr file.
I don't need to be using the uart image Mike, so don't make any changes on my account. Just a noob moment. Maybe the Analog Devices tech writers should call it parallel flash instead of burst flash?
danke,
Erick
2008-05-30 11:30:23 Re: BF548 EZKIT u-boot fails after saveenv/reset
Message: 56475
No problem - yeah, just (mostly) stick with the docs at https://docs.blackfin.uclinux.org/doku.php - and you will find life easier...