[#3878] parallel flash partition problem on bf561
Submitted By: Mingquan Pan
Open Date
2008-02-01 02:32:42 Close Date
2008-02-15 00:51:22
Priority:
Medium Assignee:
Mike Frysinger
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
08r1-6
App binary format:
N/A
Summary: parallel flash partition problem on bf561
Details:
current parallel flash partition on bf561:
sing physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00020000 : "Bootloader"
0x00020000-0x00100000 : "Kernel"
0x00100000-0x00800000 : "RootFS"
And when flashing vmImage and rootfs into it,it looks the earlier environment params values are lost:
est@uclinux47-bf561ezkit:~/work/cruise/checkouts/uclinux-dist/testsuites/jffs2> ./flash_images.exp BF561-EZKIT
Starting ./flash_images.exp
*******************************************************************
STEP 1: Spawn kermit
spawn kermit
C-Kermit 8.0.211, 10 Apr 2004, for Linux
Copyright (C) 1985, 2004,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
Linux Kermit> set line /dev/ttyS0
Linux Kermit> set speed 57600
/dev/ttyS0, 57600 bps
Linux Kermit> set carrier-watch off
Linux Kermit> set handshake none
Linux Kermit> set flow-control none
Linux Kermit> robust
Linux Kermit> set file type bin
Linux Kermit> set file name lit
Linux Kermit> set rec pack 1000
Linux Kermit> set send pack 1000
Linux Kermit> set window 5
Linux Kermit> set escape 255
Linux Kermit> connect
Connecting to /dev/ttyS0, speed 57600
Escape character: Code 255 (每): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
*******************************************************************
STEP 2: Reset the uboot.
Try to figure out if we are in u-boot or the kernel----------------------------------------------------
bootcmd=run ramboot
bootdelay=5
baudrate=57600
loads_echo=1
autoload=no
rootpath=/arm-cross-build/BF561/uClinux-dist/romfs
gatewayip=192.168.0.1
netmask=255.255.255.0
hostname=1
loadaddr=0x1000000
ubootfile=u-boot.bin
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,uart0,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:B2:01
bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
serverip=10.100.4.174
ipaddr=10.100.4.50
stdin=serial
stdout=serial
stderr=serial
Environment size: 936/65532 bytes
bfin> version
U-Boot 1.1.6-svn1136 (ADI-2008R1) (Feb 1 2008 - 17:03:15)
bfin> We are in u-boot
sending reset
reset
U-Boot 1.1.6-svn1136 (ADI-2008R1) (Feb 1 2008 - 17:03:15)
CPU: ADSP bf561-0.3 (Detected Rev: 0.3)
Board: ADI BF561 EZ-Kit Lite board
Support: blackfin.uclinux.org/
Clock: VCO: 600 MHz, Core: 600 MHz, System: 100 MHz
RAM: 64 MB
Flash: 8 MB
In: serial
Out: serial
Err: serial
Net: SMC91111 at 0x2C010300
MAC: 00:E0:22:FE:B2:01
Hit any key to stop autoboot: 0
bfin> set bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 earlyprintk=serial,uart0,57600
bfin> save
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
bfin>
*******************************************************************
STEP 3: Flash images.
tftp 0x1000000 vmImage
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'vmImage'.
Load address: 0x1000000
Loading: T #################################################################
#################################################################
####################################
done
Bytes transferred = 845440 (ce680 hex)
Image size is ce680
bfin> protect off 0x20020000 0x200fffff
Un-Protected 14 sectors
bfin> erase 0x20020000 0x200fffff
.............. done
Erased 14 sector erase success
s
bfin> cp.b 0x1000000 0x20020000 0xce680
Copy to Flash... done
bfin> cp success
tftp 0x1000000 rootfs.jffs2
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'rootfs.jffs2'.
Load address: 0x1000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############
done
Bytes transferred = 2067004 (1f8a3c hex)Image size is 1f8a3c
bfin> protect off 0x20100000 0x207fffff
Un-Protected 112 sectors
bfin> erase 0x20100000 0x207fffff
................................................................................................................ done
Erased 1 erase success
12 sectors
bfin> cp.b 0x1000000 0x20100000 0x1f8a3c
Copy to Flash... done
bf cp success
in> reset
U-Boot 1.1.6-svn1136 (ADI-2008R1) (Feb 1 2008 - 17:03:15)
CPU: ADSP bf561-0.3 (Detected Rev: 0.3)
Board: ADI BF561 EZ-Kit Lite board
Support: blackfin.uclinux.org/
Clock: VCO: 600 MHz, Core: 600 MHz, System: 100 MHz
RAM: 64 MB
Flash: 8 MB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: SMC91111 at 0x2C010300
MAC: 00:E0:22:FE:B2:01
Hit any key to stop autoboot: 0
bfin> successful reset attempt
And in last release, the partition for uboot is:
0x00000000-0x00040000 : "Bootloader"
Follow-ups
--- Mike Frysinger 2008-02-05 19:58:31
it really doesnt matter to me what the default partition map is ... at the
moment, it's mostly a copy and paste from other boards. if 0x40000 for u-boot
is easier for you, it can be easily updated.
how about this ... what would be a good map for you ? 256k for u-boot, 768k
for the kernel, and the rest for the rootfs ?
--- Mingquan Pan 2008-02-13 02:55:32
Since 561 ezkit has 8M flash, we can give 256k for
u-boot,1792k(0x00040000-0x001fffff) for kernel,the rest for rootfs.
Plus question,the partition size for u-boot on bf537/533 is 128k, how to get a
u-boot smaller than that? with disable debug dump info, the u-boot still has
131k.
--- Mike Frysinger 2008-02-13 15:12:11
ive increased u-boot on bf561 to 256k
i dont know what you're looking at, but the default bf537 u-boot.bin is 120802
bytes and after disabling the debug info, it's 110304 bytes which should easily
fit inside of 128k default partition
--- Mingquan Pan 2008-02-14 05:10:16
So we need to shink rootfs partion for u-boot, I would like bf537 stamp board
partions like:
Creating 4 MTD partitions on "physmap-flash.0":^M
0x00000000-0x00040000 : "Bootloader"^M
0x00040000-0x00120000 : "Kernel"^M
0x00120000-0x003f0000 : "RootFS"^M
0x003f0000-0x00400000 : "MAC Address"^M
bf533 stamp board:
Creating 3 MTD partitions on "BF5xx-Flash":^M
0x00000000-0x00040000 : "Bootloader"^M
0x00040000-0x00120000 : "Kernel"^M
0x00120000-0x00400000 : "RootFS"^M
bf561 ezkit board:
Creating 3 MTD partitions on "physmap-flash.0":^M
0x00000000-0x00040000 : "Bootloader"^M
0x00040000-0x00200000 : "Kernel"^M
0x00200000-0x00800000 : "RootFS"^M
bf548 ezkit remains at:
Creating 3 MTD partitions on "physmap-flash.0":^M
0x00000000-0x00040000 : "uboot"^M
0x00040000-0x00200000 : "kernel"^M
0x00200000-0x00600000 : "rootfs"^M
Would you update svn partition like above?
I would modify test script then to have a test.
--- Mike Frysinger 2008-02-14 14:14:02
the 4 boards should have a 256k partition for u-boot now in trunk
--- Mingquan Pan 2008-02-15 03:00:36
Partition size updated.Close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found