[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bootloader problems



Hi,

I have a MCM2+8 with external 8MByte flash and some troubles with it.
My ptablespec file looks like this:

[ptable]
# name size     rw-options  type      image-file
rescue 0x010000 ro          rescue    rescue.img
flash1 0x1F0000 ro          kernel    flash1.img
flash2 0x800000 rw          jffs      flash2.img


Because of the bootloader cannot load more than 8MB at one time (though, 
8 MB shows some problems, too), I decided to split my 10MB fimage (2MB + 
8MB) init several pieces like that:


dd if=./fimage of=./fimage_1 bs=1024 count=2048
dd if=./fimage of=./fimage_2 bs=1024 count=4096 skip=2048
dd if=./fimage of=./fimage_3 bs=1024 count=4096 skip=6144


Then I download the pieces in three steps (powercycling between the 
steps, of course). I took the register settings from "flashitall -p":


#etrax100boot --setreg b0000000 000095f8 --setreg b0000004 00000104 
--setreg b000000c 00601515 --setreg b0000008 8000c002 --pause 20000 
--setreg b0000008 8000c602 --setreg b0000008 8000c002 --setreg +0 7 
--label label1 --setreg b0000008 8000c402 --setreg b0000008 8000c002 
--loop +0 label1 --setreg b0000008 8060c202 --setreg b0000008 8000c002 
--setreg b0000008 80008002 --setreg b0000030 0000ff00 --setreg b0000038 
0000ffff --file fimage_1 c0004000 --flash c0004000 0 200000

#etrax100boot --setreg b0000000 000095f8 --setreg b0000004 00000104 
--setreg b000000c 00601515 --setreg b0000008 8000c002 --pause 20000 
--setreg b0000008 8000c602 --setreg b0000008 8000c002 --setreg +0 7 
--label label1 --setreg b0000008 8000c402 --setreg b0000008 8000c002 
--loop +0 label1 --setreg b0000008 8060c202 --setreg b0000008 8000c002 
--setreg b0000008 80008002 --setreg b0000030 0000ff00 --setreg b0000038 
0000ffff --file fimage_2 c0004000 --flash c0004000 200000 400000

#etrax100boot --setreg b0000000 000095f8 --setreg b0000004 00000104 
--setreg b000000c 00601515 --setreg b0000008 8000c002 --pause 20000 
--setreg b0000008 8000c602 --setreg b0000008 8000c002 --setreg +0 7 
--label label1 --setreg b0000008 8000c402 --setreg b0000008 8000c002 
--loop +0 label1 --setreg b0000008 8060c202 --setreg b0000008 8000c002 
--setreg b0000008 80008002 --setreg b0000030 0000ff00 --setreg b0000038 
0000ffff --file fimage_2 c0004000 --flash c0004000 600000 400000


This SEEMS to work, but after writing some data to a file using a small 
test program, the file system crashes. It seems that the fs image is 
corrupted in some way.

If I change the flash2 partition to something less than 6MB, say 5.5MB 
(which gives a total image sizes of 7.5MB) and download this with 
"flashitall", everything works fine. But I dont't want to waste 2.5MB of 
flash :-(

Whats wrong here? What about this HWID and checksum, should I append the 
right values to each image chunk like "make fimage" do it?
What are hwid and checksum good for, the bootloader seems not to use or 
check it.

Strange, strange ;-)


Regards,

-- 
Bernhard Roessmann
Don't Fear The Penguins!