Somehow, after doing erase verses jerase, the write to flash results in different data for the first 3 longwords.  Note how after erase, the flash to f00000 has 56190527 4399384a 9434a846 while after jerase, the flash has 00010105 00000008 8414a000.  So, the u-boot software is doing something different for jerase or erase even on operations like cp.b that ensue the erasure.

I'm confused.  Please help me.

Copy to Flash... done                                                          
GUM> md f00000                                                                 
00f00000: 56190527 4399384a 9434a846 986a0d00    '..VJ8.CF.4...j.              
00f00010: 008000a0 008000a0 8a12feeb 00020205    ................              
00f00020: 616d4975 00006567 00000000 00000000    uImage..........              
00f00030: 00000000 00000000 00000000 00000000    ................              
00f00040: e1a00000 e1a00000 e1a00000 e1a00000    ................              
00f00050: e1a00000 e1a00000 e1a00000 e1a00000    ................              
00f00060: ea000002 016f2818 00000000 000d6a98    .....(o......j..              
00f00070: e1a07001 e1a08002 e10f2000 e3120003    .p....... ......              
00f00080: 1a000001 e3a00017 ef123456 e10f2000    ........V4... ..              
00f00090: e38220c0 e121f002 e3cf201f e2823801    . ....!.. ...8..              
00f000a0: e4920020 e1320003 1afffffc ee070f9a     .....2.........              
00f000b0: ee070f17 ee110f10 e3c00005 e3c00a01    ................              
00f000c0: ee010f10 00000000 00000000 00000000    ................              
00f000d0: 00000000 00000000 00000000 00000000    ................              
00f000e0: e28f00cc e890307e e0500001 0a00000a    ....~0....P.....              
00f000f0: e0855000 e0866000 e08cc000 e0822000    .P...`....... ..              
GUM> cp.b f00000 a2000000 100000                                               
GUM> md a2000000                                                               
a2000000: 56190527 4399384a 9434a846 986a0d00    '..VJ8.CF.4...j.              
a2000010: 008000a0 008000a0 8a12feeb 00020205    ................              
a2000020: 616d4975 00006567 00000000 00000000    uImage..........              
a2000030: 00000000 00000000 00000000 00000000    ................              
a2000040: e1a00000 e1a00000 e1a00000 e1a00000    ................              
a2000050: e1a00000 e1a00000 e1a00000 e1a00000    ................              
a2000060: ea000002 016f2818 00000000 000d6a98    .....(o......j..              
a2000070: e1a07001 e1a08002 e10f2000 e3120003    .p....... ......              
a2000080: 1a000001 e3a00017 ef123456 e10f2000    ........V4... ..              

On 7/26/07, Peter Lu <plu777@gmail.com> wrote:
Hi,

I used jerase instead of erase and the Bad Magic Number error crops up again.  The bootcmd does a "cp.b f00000 a2000000 100000 && bootm" so the contents at a2000000 are:

## Booting image at a2000000 ...                                               
Bad Magic Number                                                               
GUM> md a2000000                                                               
a2000000: 00010105 00000008 8414a000 986a0d00    ..............j.              
a2000010: 008000a0 008000a0 8a12feeb 00020205    ................              
a2000020: 616d4975 00006567 00000000 00000000    uImage..........              
a2000030: 00000000 00000000 00000000 00000000    ................              
a2000040: e1a00000 e1a00000 e1a00000 e1a00000    ................              
a2000050: e1a00000 e1a00000 e1a00000 e1a00000    ................              
a2000060: ea000002 016f2818 00000000 000d6a98    .....(o......j..              
a2000070: e1a07001 e1a08002 e10f2000 e3120003    .p....... ......              
a2000080: 1a000001 e3a00017 ef123456 e10f2000    ........V4... ..              
a2000090: e38220c0 e121f002 e3cf201f e2823801    . ....!.. ...8..              
a20000a0: e4920020 e1320003 1afffffc ee070f9a     .....2.........              
a20000b0: ee070f17 ee110f10 e3c00005 e3c00a01    ................              
a20000c0: ee010f10 00000000 00000000 00000000    ................              
a20000d0: 00000000 00000000 00000000 00000000    ................              
a20000e0: e28f00cc e890307e e0500001 0a00000a    ....~0....P.....              
a20000f0: e0855000 e0866000 e08cc000 e0822000    .P...`....... ..              
GUM> ls                                                                        
Scanning JFFS2 FS: ............... done.                                       
 drwxr-xr-x        0 Thu Jul 26 08:37:56 2007 bin                              
 drwxr-xr-x        0 Thu Jul 26 08:35:43 2007 dev                              
 drwxr-xr-x        0 Thu Jul 26 08:37:57 2007 etc                              
 drwxr-xr-x        0 Mon Nov 22 17:20:58 1999 home                             
 drwxr-xr-x        0 Thu Jul 26 08:37:45 2007 include                          
 drwxr-xr-x        0 Thu Jul 26 08:37:57 2007 lib                              
 drwxr-xr-x        0 Thu Jul 26 04:25:30 2007 mnt                              
 drwxr-xr-x        0 Mon Nov 22 17:21:08 1999 opt                              
 drwxr-xr-x        0 Wed Nov 03 00:54:07 1999 proc                             
 drwxr-xr-x        0 Thu Jul 26 04:25:30 2007 root                             
 drwxr-xr-x        0 Thu Jul 26 08:37:57 2007 sbin                             
 drwxr-xr-x        0 Thu Jul 26 04:25:30 2007 sys                              
 drwxr-xr-x        0 Thu Jun 29 23:20:38 2000 tmp                              
 drwxr-xr-x        0 Thu Jul 26 06:53:52 2007 usr                              

It looks like the rootfs can be found via the u-boot ls scan.

I don't know why jerase would work differently from erase as far as detection of the uImage is concerned, since it seems to apply only to the rootfs scan.  My autoscr script to program flash is:

protect on 1:0-1 && jerase all
tftp a2000000 uImage
cp.b a2000000 f00000 ${filesize}
tftp a2000000 rootfs.arm_nofpu.jffs2
cp.b a2000000 40000 ${filesize}

Thanks for any suggestions.



On 7/26/07, Craig Hughes <craig@gumstix.com > wrote:
On Jul 26, 2007, at 9:56 AM, Peter Lu wrote:

> Hi,
>
> The root=1f01 seems to get me further, with rootfs found, but I'm
> still stuck on:
>
> XScale DSP coprocessor detected.
> VFS: Mounted root (jffs2 filesystem) readonly.
> Freeing init memory: 120K

That's because you're using "erase" to erase the rootfs space in
flash, rather than jerase.  jerase writes the JFFS2 "cleanmarker"
into empty sectors, which means linux doesn't need to scan all of
that space, erase it, then write the cleanmarkers in before mounting
the FS for the first time.  If you let the thing run for a few
minutes when you get to this point in your booting, it'll work -- it
just needs time to scan all of flash and erase/write cleanmarkers in
there.

C

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>   http://get.splunk.com/
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users