public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Help about a simplified bootloader.
@ 2009-04-03  6:44 os user
  2009-04-03 11:57 ` Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: os user @ 2009-04-03  6:44 UTC (permalink / raw)
  To: u-boot

Hi all,

I want to boot linux by a simplified bootloader. I use Atmel's ARM
chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
program. The small program will parse the image generaed by "mkimage"
and copy the kernel bianry from NAND flash to SDRAM, construct the tag
list, disable I/D cache, disable interrupt and then jump to kernel
entry point. The system can startup, but when accessing rootfile
system(the rootfile system was also in the NAND chip), a lot of CRC
errors were found. See below,
mtd->read(0x1fb2c bytes from 0x1804d4) returned ECC error
mtd->read(0x1fa38 bytes from 0x3e05c8) returned ECC error
mtd->read(0x1f7dc bytes from 0x7c0824) returned ECC error
jffs2_scan_inode_node(): CRC failed on node at 0x007c37a4: Read
0xd9b2bc33, calculated 0xda4805c1

and sometimes the sytem even crashed when R/W filesystem.

But with the same linux kernel and rootfile system, if I use U-Boot to
boot linux, everything seems OK.

Can anyone tell is there any trick that's related with linux NAND
driver in U-Boot? Or any suggestion to help me moving on?

Thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-03  6:44 [U-Boot] Help about a simplified bootloader os user
@ 2009-04-03 11:57 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-04-07  5:30   ` os user
  2009-04-03 16:53 ` Scott Wood
  2009-04-03 17:51 ` Wolfgang Denk
  2 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-04-03 11:57 UTC (permalink / raw)
  To: u-boot

On 14:44 Fri 03 Apr     , os user wrote:
> Hi all,
> 
> I want to boot linux by a simplified bootloader. I use Atmel's ARM
> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
> program. The small program will parse the image generaed by "mkimage"
> and copy the kernel bianry from NAND flash to SDRAM, construct the tag
> list, disable I/D cache, disable interrupt and then jump to kernel
> entry point. The system can startup, but when accessing rootfile
> system(the rootfile system was also in the NAND chip), a lot of CRC
> errors were found. See below,
> mtd->read(0x1fb2c bytes from 0x1804d4) returned ECC error
> mtd->read(0x1fa38 bytes from 0x3e05c8) returned ECC error
> mtd->read(0x1f7dc bytes from 0x7c0824) returned ECC error
> jffs2_scan_inode_node(): CRC failed on node at 0x007c37a4: Read
> 0xd9b2bc33, calculated 0xda4805c1
> 
> and sometimes the sytem even crashed when R/W filesystem.
> 
> But with the same linux kernel and rootfile system, if I use U-Boot to
> boot linux, everything seems OK.
> 
> Can anyone tell is there any trick that's related with linux NAND
> driver in U-Boot? Or any suggestion to help me moving on?
use U-Boot or Atmel Bootstrap

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-03  6:44 [U-Boot] Help about a simplified bootloader os user
  2009-04-03 11:57 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-04-03 16:53 ` Scott Wood
  2009-04-07  5:32   ` os user
  2009-04-03 17:51 ` Wolfgang Denk
  2 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2009-04-03 16:53 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 03, 2009 at 02:44:03PM +0800, os user wrote:
> I want to boot linux by a simplified bootloader. I use Atmel's ARM
> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
> program. The small program will parse the image generaed by "mkimage"
> and copy the kernel bianry from NAND flash to SDRAM, construct the tag
> list, disable I/D cache, disable interrupt and then jump to kernel
> entry point. The system can startup, but when accessing rootfile
> system(the rootfile system was also in the NAND chip), a lot of CRC
> errors were found. See below,
> mtd->read(0x1fb2c bytes from 0x1804d4) returned ECC error
> mtd->read(0x1fa38 bytes from 0x3e05c8) returned ECC error
> mtd->read(0x1f7dc bytes from 0x7c0824) returned ECC error
> jffs2_scan_inode_node(): CRC failed on node at 0x007c37a4: Read
> 0xd9b2bc33, calculated 0xda4805c1
> 
> and sometimes the sytem even crashed when R/W filesystem.
> 
> But with the same linux kernel and rootfile system, if I use U-Boot to
> boot linux, everything seems OK.
> 
> Can anyone tell is there any trick that's related with linux NAND
> driver in U-Boot? Or any suggestion to help me moving on?

Are you using the same software to program the NAND in each case?  If
not, perhaps they have a different OOB layout?

-Scott

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-03  6:44 [U-Boot] Help about a simplified bootloader os user
  2009-04-03 11:57 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-04-03 16:53 ` Scott Wood
@ 2009-04-03 17:51 ` Wolfgang Denk
  2009-04-07  5:31   ` os user
  2 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2009-04-03 17:51 UTC (permalink / raw)
  To: u-boot

Dear os user,

In message <34f262ce0904022344u6e27ad07g8263785dd36acb58@mail.gmail.com> you wrote:
> 
> I want to boot linux by a simplified bootloader. I use Atmel's ARM
> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
> program. The small program will parse the image generaed by "mkimage"
...
> and sometimes the sytem even crashed when R/W filesystem.
> 
> But with the same linux kernel and rootfile system, if I use U-Boot to
> boot linux, everything seems OK.
> 
> Can anyone tell is there any trick that's related with linux NAND
> driver in U-Boot? Or any suggestion to help me moving on?

Well, you already mentioned the solution: either use U-Boot, which
seems to be working fine, or fix your own program such that it
performs the same intializations like U-Boot.

Be careful when copying code from U-Boot - U-Boot is under GPL, and
you may quickly find that you have to release your program under GPL,
too.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Maintain an awareness for contribution --  to  your  schedule,  your
project, our company."                         - A Group of Employees

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-03 11:57 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-04-07  5:30   ` os user
  0 siblings, 0 replies; 9+ messages in thread
From: os user @ 2009-04-07  5:30 UTC (permalink / raw)
  To: u-boot

Hi,
Actually the code is based on Atmel's bootstrap.

On Fri, Apr 3, 2009 at 7:57 PM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 14:44 Fri 03 Apr ? ? , os user wrote:
>> Hi all,
>>
>> I want to boot linux by a simplified bootloader. I use Atmel's ARM
>> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
>> program. The small program will parse the image generaed by "mkimage"
>> and copy the kernel bianry from NAND flash to SDRAM, construct the tag
>> list, disable I/D cache, disable interrupt and then jump to kernel
>> entry point. The system can startup, but when accessing rootfile
>> system(the rootfile system was also in the NAND chip), a lot of CRC
>> errors were found. See below,
>> mtd->read(0x1fb2c bytes from 0x1804d4) returned ECC error
>> mtd->read(0x1fa38 bytes from 0x3e05c8) returned ECC error
>> mtd->read(0x1f7dc bytes from 0x7c0824) returned ECC error
>> jffs2_scan_inode_node(): CRC failed on node at 0x007c37a4: Read
>> 0xd9b2bc33, calculated 0xda4805c1
>>
>> and sometimes the sytem even crashed when R/W filesystem.
>>
>> But with the same linux kernel and rootfile system, if I use U-Boot to
>> boot linux, everything seems OK.
>>
>> Can anyone tell is there any trick that's related with linux NAND
>> driver in U-Boot? Or any suggestion to help me moving on?
> use U-Boot or Atmel Bootstrap
>
> Best Regards,
> J.
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-03 17:51 ` Wolfgang Denk
@ 2009-04-07  5:31   ` os user
  0 siblings, 0 replies; 9+ messages in thread
From: os user @ 2009-04-07  5:31 UTC (permalink / raw)
  To: u-boot

Sure, the Code will be GPL based.

On Sat, Apr 4, 2009 at 1:51 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear os user,
>
> In message <34f262ce0904022344u6e27ad07g8263785dd36acb58@mail.gmail.com> you wrote:
>>
>> I want to boot linux by a simplified bootloader. I use Atmel's ARM
>> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
>> program. The small program will parse the image generaed by "mkimage"
> ...
>> and sometimes the sytem even crashed when R/W filesystem.
>>
>> But with the same linux kernel and rootfile system, if I use U-Boot to
>> boot linux, everything seems OK.
>>
>> Can anyone tell is there any trick that's related with linux NAND
>> driver in U-Boot? Or any suggestion to help me moving on?
>
> Well, you already mentioned the solution: either use U-Boot, which
> seems to be working fine, or fix your own program such that it
> performs the same intializations like U-Boot.
>
> Be careful when copying code from U-Boot - U-Boot is under GPL, and
> you may quickly find that you have to release your program under GPL,
> too.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> "Maintain an awareness for contribution -- ?to ?your ?schedule, ?your
> project, our company." ? ? ? ? ? ? ? ? ? ? ? ? - A Group of Employees
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-03 16:53 ` Scott Wood
@ 2009-04-07  5:32   ` os user
  2009-04-08  6:42     ` Shankar Ganesh
  0 siblings, 1 reply; 9+ messages in thread
From: os user @ 2009-04-07  5:32 UTC (permalink / raw)
  To: u-boot

Hi,

The data in NAND chip(linux kernel and RootFS)  is the same when
booting linux from U-Boot and from the simple loader. :-(

On Sat, Apr 4, 2009 at 12:53 AM, Scott Wood <scottwood@freescale.com> wrote:
> On Fri, Apr 03, 2009 at 02:44:03PM +0800, os user wrote:
>> I want to boot linux by a simplified bootloader. I use Atmel's ARM
>> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
>> program. The small program will parse the image generaed by "mkimage"
>> and copy the kernel bianry from NAND flash to SDRAM, construct the tag
>> list, disable I/D cache, disable interrupt and then jump to kernel
>> entry point. The system can startup, but when accessing rootfile
>> system(the rootfile system was also in the NAND chip), a lot of CRC
>> errors were found. See below,
>> mtd->read(0x1fb2c bytes from 0x1804d4) returned ECC error
>> mtd->read(0x1fa38 bytes from 0x3e05c8) returned ECC error
>> mtd->read(0x1f7dc bytes from 0x7c0824) returned ECC error
>> jffs2_scan_inode_node(): CRC failed on node at 0x007c37a4: Read
>> 0xd9b2bc33, calculated 0xda4805c1
>>
>> and sometimes the sytem even crashed when R/W filesystem.
>>
>> But with the same linux kernel and rootfile system, if I use U-Boot to
>> boot linux, everything seems OK.
>>
>> Can anyone tell is there any trick that's related with linux NAND
>> driver in U-Boot? Or any suggestion to help me moving on?
>
> Are you using the same software to program the NAND in each case? ?If
> not, perhaps they have a different OOB layout?
>
> -Scott
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-07  5:32   ` os user
@ 2009-04-08  6:42     ` Shankar Ganesh
  2009-04-08  7:12       ` os user
  0 siblings, 1 reply; 9+ messages in thread
From: Shankar Ganesh @ 2009-04-08  6:42 UTC (permalink / raw)
  To: u-boot

On Tue, Apr 7, 2009 at 11:02 AM, os user <gnusercn@gmail.com> wrote:

> Hi,
>
> The data in NAND chip(linux kernel and RootFS)  is the same when
> booting linux from U-Boot and from the simple loader. :-(
>
> On Sat, Apr 4, 2009 at 12:53 AM, Scott Wood <scottwood@freescale.com>
> wrote:
> > On Fri, Apr 03, 2009 at 02:44:03PM +0800, os user wrote:
> >> I want to boot linux by a simplified bootloader. I use Atmel's ARM
> >> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
> >> program. The small program will parse the image generaed by "mkimage"
> >> and copy the kernel bianry from NAND flash to SDRAM, construct the tag
> >> list, disable I/D cache, disable interrupt and then jump to kernel
> >> entry point. The system can startup, but when accessing rootfile
> >> system(the rootfile system was also in the NAND chip), a lot of CRC
> >> errors were found. See below,
> >> mtd->read(0x1fb2c bytes from 0x1804d4) returned ECC error
> >> mtd->read(0x1fa38 bytes from 0x3e05c8) returned ECC error
> >> mtd->read(0x1f7dc bytes from 0x7c0824) returned ECC error
> >> jffs2_scan_inode_node(): CRC failed on node at 0x007c37a4: Read
> >> 0xd9b2bc33, calculated 0xda4805c1
> >>
> >> and sometimes the sytem even crashed when R/W filesystem.
> >>
> >> But with the same linux kernel and rootfile system, if I use U-Boot to
> >> boot linux, everything seems OK.
> >>
> >> Can anyone tell is there any trick that's related with linux NAND
> >> driver in U-Boot? Or any suggestion to help me moving on?
>

How about ECC calculation ? is it h/w  (GPMC) or s/w ECC ?

Regards,
Shankar


>
> >
> > Are you using the same software to program the NAND in each case?  If
> > not, perhaps they have a different OOB layout?
> >
> > -Scott
> >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>



-- 
With Regards,
ShankarGanesh K .







"The most beautiful thing we can experience is the mysterious. It is the
source of all true art and science."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] Help about a simplified bootloader.
  2009-04-08  6:42     ` Shankar Ganesh
@ 2009-04-08  7:12       ` os user
  0 siblings, 0 replies; 9+ messages in thread
From: os user @ 2009-04-08  7:12 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 8, 2009 at 2:42 PM, Shankar Ganesh <shankarganeshk@gmail.com> wrote:
>
>
> On Tue, Apr 7, 2009 at 11:02 AM, os user <gnusercn@gmail.com> wrote:
>>
>> Hi,
>>
>> The data in NAND chip(linux kernel and RootFS) ?is the same when
>> booting linux from U-Boot and from the simple loader. :-(
>>
>> On Sat, Apr 4, 2009 at 12:53 AM, Scott Wood <scottwood@freescale.com>
>> wrote:
>> > On Fri, Apr 03, 2009 at 02:44:03PM +0800, os user wrote:
>> >> I want to boot linux by a simplified bootloader. I use Atmel's ARM
>> >> chip (AT91SAM9RL64EK board). Now, I can boot linux with my small
>> >> program. The small program will parse the image generaed by "mkimage"
>> >> and copy the kernel bianry from NAND flash to SDRAM, construct the tag
>> >> list, disable I/D cache, disable interrupt and then jump to kernel
>> >> entry point. The system can startup, but when accessing rootfile
>> >> system(the rootfile system was also in the NAND chip), a lot of CRC
>> >> errors were found. See below,
>> >> mtd->read(0x1fb2c bytes from 0x1804d4) returned ECC error
>> >> mtd->read(0x1fa38 bytes from 0x3e05c8) returned ECC error
>> >> mtd->read(0x1f7dc bytes from 0x7c0824) returned ECC error
>> >> jffs2_scan_inode_node(): CRC failed on node at 0x007c37a4: Read
>> >> 0xd9b2bc33, calculated 0xda4805c1
>> >>
>> >> and sometimes the sytem even crashed when R/W filesystem.
>> >>
>> >> But with the same linux kernel and rootfile system, if I use U-Boot to
>> >> boot linux, everything seems OK.
>> >>
>> >> Can anyone tell is there any trick that's related with linux NAND
>> >> driver in U-Boot? Or any suggestion to help me moving on?
>
> How about ECC calculation ? is it h/w? (GPMC) or s/w ECC ?
>

I used software ECC.

I don't think this problem is related to ECC calculation. As metioned
before, I used the same OS kernel image and root filesystem
image(JFFS2). Both are stored in NAND flash. For the good case,
Atmel's bootstrap code will launch U-Boot, and U-Boot will copy kernel
image from NAND chip to SDRAM, build tag list, do some clean
job(diable interrupt, flush/disable cache), and then jump to kernel
entry point. If I follow this path, everything is OK. This means my
linux kernel(2.6.27) and root filesystem are OK.

But In my small loader(based on Atmel's bootstrap), I also copy kernel
image from NAND chip to SDRAM, build tag list, do some clean
job(diable interrupt, flush/disable cache), and then jump to kernel
entry point. The kernel image can be decompressed without any error
and can startup sometimes. But I can see a lot of errors complained by
MTD layer. And sometimes, the system even crashed.

Hope to receive your suggestions, Thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-04-08  7:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-03  6:44 [U-Boot] Help about a simplified bootloader os user
2009-04-03 11:57 ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-07  5:30   ` os user
2009-04-03 16:53 ` Scott Wood
2009-04-07  5:32   ` os user
2009-04-08  6:42     ` Shankar Ganesh
2009-04-08  7:12       ` os user
2009-04-03 17:51 ` Wolfgang Denk
2009-04-07  5:31   ` os user

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox