I'm still playing with access RAM in 32-bit mode, most because I do
don't want to halve the amount of RAM.. ;)
I got very strange trouble on a pair of sim1 v1.3.
I can program (write to flash memory) only a kernel made with minimal
set of drivers, if I try to program one of the Debian EABI Kernel
proposed on download area to flash memory I get "Bad Data CRC". the
kernel image is ok, if i try to fetch the same file by tftp it boot
fine.
Everything is fine also with my own kernel but the dot config have to
be made with simone_defconfig flag.
Only one time I successful write a bigger kernel, on the same session
I was also using a usb BT dongle without any "USB disconnect".
Because of this I think this problem can be connected again with RAM timing.
what follow is a minicom log with this error, i made test with 2 images:
uImage_NM is made from simone_defconfig
uImage is a Debian EABI Kernel
ciao
federico
SIM.ONE>
................ done
Erased 16 sectors
SIM.ONE> tftp 60080000 uImage_NM
TFTP from server 192.168.20.252; our IP address is 192.168.20.100
Filename 'uImage_NM'.
Load address: 0x60080000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##########
done
Bytes transferred = 2046680 (1f3ad8 hex)
SIM.ONE> bootm 60080000
## Booting image at 60080000 ...
Image Name: Linux-2.6.36
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2046616 Bytes = 2 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
OK
Starting kernel ...
<POWER OFF>
U-Boot 1.1.6-cirrus-edb93xx-platform (Oct 24 2007 - 12:46:21)
DRAM total 2 banks:
bank base-address size
0 c0000000 02000000
1 c4000000 02000000
DRAM: 64 MB
Flash: 8 MB,16-bits
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
SIM.ONE> OM
Unknown command 'OM' - try 'help'
SIM.ONE>
SIM.ONE> erase 60080000 6027ffff
................ done
Erased 16 sectors
SIM.ONE> tftp 60080000 uImage
TFTP from server 192.168.20.252; our IP address is 192.168.20.100
Filename 'uImage'.
Load address: 0x60080000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
################################################################
done
Bytes transferred = 2323256 (237338 hex)
SIM.ONE> bootm 60080000
## Booting image at 60080000 ...
Image Name: Linux-2.6.36
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2323192 Bytes = 2.2 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... Bad Data CRC
SIM.ONE> tftp c0200000; bootm
TFTP from server 192.168.20.252; our IP address is 192.168.20.100
Filename 'uImage'.
Load address: 0xc0200000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
################################################################
done
Bytes transferred = 2323256 (237338 hex)
## Booting image at c0200000 ...
Image Name: Linux-2.6.36
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2323192 Bytes = 2.2 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
OK
Starting kernel ...
Erm. OK. What's your question?
M
Hi Martin.
Why i got CRC errors? Are you able to correctly program a Debian
Kernel into flash?
Thanks! :) Sorry, the brain-dump overwhelmed me at 4am!
I've never seen this error and yes, I use the Debian kernel in flash.
Ah, ok, I've managed to reproduce the failure
> SIM.ONE> erase 60080000 6027ffff
> SIM.ONE> tftp 60080000 uImage
> Bytes transferred = 2323256 (237338 hex)
60080000
+ 237338
========
602b7338
so the set bits of the old image will have remained set, giving you
the inclusive or of the two images in the unerased region.
Try erasing to 602b7ffff
I can't understand why i never got this error, since I always
copy-paste from the wiki pages - I can only guess I always used kernel
from tftp and only ever programmed the most recent image into flash,
which was already erased. Dunno.
Also, the most recent debian kernel, uImage-2.6.36-debian-20101118 gives me
Bytes transferred = 2325704 (237cc8 hex)
not your
Bytes transferred = 2323256 (237338 hex)
so you may also have a different uImage in /srv/tftp or /tftpboot
Many thanks. I've corrected the erase size on the wiki pages. However,
I notice that the old 2.6.34-debian image overflows even this, running
into what u-boot's variable "mtdparts" calls the ramdisk area, so if
you use that you'nn need to erase even more. however, none of the
rest of the flash is used at present, except the first 768K for
u-boot.
Let me know if that fixes the problem for you
M
2011/10/11 Martin Guy <marti...@gmail.com>:
>> Why i got CRC errors? Are you able to correctly program a Debian
>> Kernel into flash?
> Try erasing to 602b7ffff
Thanks! This solved the problem! :D
> I can't understand why i never got this error, since I always
> copy-paste from the wiki pages - I can only guess I always used kernel
> from tftp and only ever programmed the most recent image into flash,
> which was already erased. Dunno.
yes it can be possible.. ;)
> Also, the most recent debian kernel, uImage-2.6.36-debian-20101118 gives me
> Bytes transferred = 2325704 (237cc8 hex)
> not your
> Bytes transferred = 2323256 (237338 hex)
> so you may also have a different uImage in /srv/tftp or /tftpboot
don't care about that, I had to compile my own debian kernel because
I'm testing sim1 with wiimote controller.
> Many thanks. I've corrected the erase size on the wiki pages. However,
> I notice that the old 2.6.34-debian image overflows even this, running
> into what u-boot's variable "mtdparts" calls the ramdisk area, so if
> you use that you'nn need to erase even more. however, none of the
> rest of the flash is used at present, except the first 768K for
> u-boot.
>
> Let me know if that fixes the problem for you
yes I confirm you fix it!
What about ramdisk? Do you think it can be possible to program it on
flash after a kernel image?
thanks again
federico
yes, if it will fit, but I haven't tried this, and you'd need to make a
Nuccio's notes on the wiki about programming the bootloader have a
first example that does this but I haven't tried it.
There are more efficient alternatives to a ramdisk, such as compressed
rom filesystems like CRAMFS. To create writeable areas, you then mount
ramdisks where necessary (/tmp, /var) as well as /proc /dev and their
friends.
Maybe if you succeed you can write a wiki page describing the solution
and the procedure of commands to achieve it
M
oops, finger trouble
> yes, if it will fit, but I haven't tried this, and you'd need to make a
...new micro root filesystem for it, since the Debian one won't fit in 6 MB.
> Nuccio's notes on the wiki about programming the bootloader have a
> first example that does this but I haven't tried it.
M
Why are they called word processors?
Well, you know what food processors do to food...