All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] SteppingStone
@ 2011-01-25 18:33 Matt Johnson
  2011-01-26  3:39 ` Cunsuo Guo
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Johnson @ 2011-01-25 18:33 UTC (permalink / raw)
  To: u-boot

Hello.

I have a custom board with a Samsung s3c2410 (arm920t) processor.  I have
been unable to get the main branch of u-boot to work with this board.
However, I have been successful with the old OpenMoko fork.  (I believe it
is because of the "SteppingStone" microcode. See
http://wiki.openmoko.org/wiki/S3C2410_Steppingstone if you're unfamiliar.)

I'd prefer to use the main branch, because the OpenMoko fork is old and
unmaintained.  The OpenMoko project abandoned u-boot some time ago, in favor
of their "Qi" bootloader.

Has anyone looked at merging the SteppingStone code back in to the main
branch?  Is there some other workaround that is unclear to me?

Are there other bootloaders that support SteppingStone that I could try?
I'm looking for something as full-featured as u-boot, but actively
maintained. The only other that I've found is Vivi - which is super ancient.
Any advice is appreciated.

Thanks,
Matt

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

* [U-Boot] SteppingStone
  2011-01-25 18:33 [U-Boot] SteppingStone Matt Johnson
@ 2011-01-26  3:39 ` Cunsuo Guo
  2011-01-26  7:23   ` Albert ARIBAUD
  0 siblings, 1 reply; 7+ messages in thread
From: Cunsuo Guo @ 2011-01-26  3:39 UTC (permalink / raw)
  To: u-boot

2011/1/26 Matt Johnson <mj1856@hotmail.com>

> Hello.
>
> I have a custom board with a Samsung s3c2410 (arm920t) processor.  I have
> been unable to get the main branch of u-boot to work with this board.
> However, I have been successful with the old OpenMoko fork.  (I believe it
> is because of the "SteppingStone" microcode. See
> http://wiki.openmoko.org/wiki/S3C2410_Steppingstone if you're unfamiliar.)


> I'd prefer to use the main branch, because the OpenMoko fork is old and
> unmaintained.  The OpenMoko project abandoned u-boot some time ago, in
> favor
> of their "Qi" bootloader.
>
> Has anyone looked at merging the SteppingStone code back in to the main
> branch?  Is there some other workaround that is unclear to me?
>
> Are there other bootloaders that support SteppingStone that I could try?
> I'm looking for something as full-featured as u-boot, but actively
> maintained. The only other that I've found is Vivi - which is super
> ancient.
> Any advice is appreciated.


> Thanks,
> Matt
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


Steppingstone is just a 4KBytes buffer which works together with some kinda
HW mechanism to copy the first 4KBytes of NAND to it. IMH, you can just
treat it as a feature provided by S3C2410 to support NAND boot. If you have
NOR flash in th board, you can simply boot from NOR flash and ignore this
feature.
I'm not sure whether there is some patches to support this feature or not,
if not, may be you could provide one. The following is my advice to
implement NAND boot for S3C2410:
1. write your NAND device driver, simply read operation is OK;
2. in the relocation part in  Start.S, read code from NAND to RAM use your
NAND device driver, and make sure the relocation part is in the very
beginning 4KBytes range of NAND (by Loader script). In this way, the
first 4KBytes in NAND will be read into Steppingstone buffer and executed,
after execution of relocation code, your bootloader code will be read into
RAM, and then the code can be executed in RAM, the full bootup procedure is
over.

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

* [U-Boot] SteppingStone
  2011-01-26  3:39 ` Cunsuo Guo
@ 2011-01-26  7:23   ` Albert ARIBAUD
  2011-01-26  8:39     ` Cunsuo Guo
  0 siblings, 1 reply; 7+ messages in thread
From: Albert ARIBAUD @ 2011-01-26  7:23 UTC (permalink / raw)
  To: u-boot

Le 26/01/2011 04:39, Cunsuo Guo a ?crit :
> 2011/1/26 Matt Johnson<mj1856@hotmail.com>
>
>> Hello.
>>
>> I have a custom board with a Samsung s3c2410 (arm920t) processor.  I have
>> been unable to get the main branch of u-boot to work with this board.
>> However, I have been successful with the old OpenMoko fork.  (I believe it
>> is because of the "SteppingStone" microcode. See
>> http://wiki.openmoko.org/wiki/S3C2410_Steppingstone if you're unfamiliar.)
>
>
>> I'd prefer to use the main branch, because the OpenMoko fork is old and
>> unmaintained.  The OpenMoko project abandoned u-boot some time ago, in
>> favor
>> of their "Qi" bootloader.
>>
>> Has anyone looked at merging the SteppingStone code back in to the main
>> branch?  Is there some other workaround that is unclear to me?
>>
>> Are there other bootloaders that support SteppingStone that I could try?
>> I'm looking for something as full-featured as u-boot, but actively
>> maintained. The only other that I've found is Vivi - which is super
>> ancient.
>> Any advice is appreciated.
>
>
>> Thanks,
>> Matt
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>
>
> Steppingstone is just a 4KBytes buffer which works together with some kinda
> HW mechanism to copy the first 4KBytes of NAND to it. IMH, you can just
> treat it as a feature provided by S3C2410 to support NAND boot. If you have
> NOR flash in th board, you can simply boot from NOR flash and ignore this
> feature.
> I'm not sure whether there is some patches to support this feature or not,
> if not, may be you could provide one. The following is my advice to
> implement NAND boot for S3C2410:
> 1. write your NAND device driver, simply read operation is OK;
> 2. in the relocation part in  Start.S, read code from NAND to RAM use your
> NAND device driver, and make sure the relocation part is in the very
> beginning 4KBytes range of NAND (by Loader script). In this way, the
> first 4KBytes in NAND will be read into Steppingstone buffer and executed,
> after execution of relocation code, your bootloader code will be read into
> RAM, and then the code can be executed in RAM, the full bootup procedure is
> over.

Why try to read from NAND to RAM in the relocation part of start.S, 
where you would not be able to use C or BSS variables?

I thought the whole idea of the NAND SPL was to allow writing the 
NAND-to-RAM bootloader as a standalone "kind-of-U-boot", in C, with all 
the bells and whistles (that can fit in the NAND boot sector).

Do I miss something?

If not, then my opinion is that Matt should look into the NAND SPL code 
and fit it to initialize and use the stepping stone for initial SPL 
loading if he feels this is worth it.

Amicalement,
-- 
Albert.

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

* [U-Boot] SteppingStone
  2011-01-26  7:23   ` Albert ARIBAUD
@ 2011-01-26  8:39     ` Cunsuo Guo
  2011-01-26  9:41       ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Cunsuo Guo @ 2011-01-26  8:39 UTC (permalink / raw)
  To: u-boot

2011/1/26 Albert ARIBAUD <albert.aribaud@free.fr>

> Le 26/01/2011 04:39, Cunsuo Guo a ?crit :
> > 2011/1/26 Matt Johnson<mj1856@hotmail.com>
> >
> >> Hello.
> >>
> >> I have a custom board with a Samsung s3c2410 (arm920t) processor.  I
> have
> >> been unable to get the main branch of u-boot to work with this board.
> >> However, I have been successful with the old OpenMoko fork.  (I believe
> it
> >> is because of the "SteppingStone" microcode. See
> >> http://wiki.openmoko.org/wiki/S3C2410_Steppingstone if you're
> unfamiliar.)
> >
> >
> >> I'd prefer to use the main branch, because the OpenMoko fork is old and
> >> unmaintained.  The OpenMoko project abandoned u-boot some time ago, in
> >> favor
> >> of their "Qi" bootloader.
> >>
> >> Has anyone looked at merging the SteppingStone code back in to the main
> >> branch?  Is there some other workaround that is unclear to me?
> >>
> >> Are there other bootloaders that support SteppingStone that I could try?
> >> I'm looking for something as full-featured as u-boot, but actively
> >> maintained. The only other that I've found is Vivi - which is super
> >> ancient.
> >> Any advice is appreciated.
> >
> >
> >> Thanks,
> >> Matt
> >>
> >> _______________________________________________
> >> U-Boot mailing list
> >> U-Boot at lists.denx.de
> >> http://lists.denx.de/mailman/listinfo/u-boot
> >>
> >
> >
> > Steppingstone is just a 4KBytes buffer which works together with some
> kinda
> > HW mechanism to copy the first 4KBytes of NAND to it. IMH, you can just
> > treat it as a feature provided by S3C2410 to support NAND boot. If you
> have
> > NOR flash in th board, you can simply boot from NOR flash and ignore this
> > feature.
> > I'm not sure whether there is some patches to support this feature or
> not,
> > if not, may be you could provide one. The following is my advice to
> > implement NAND boot for S3C2410:
> > 1. write your NAND device driver, simply read operation is OK;
> > 2. in the relocation part in  Start.S, read code from NAND to RAM use
> your
> > NAND device driver, and make sure the relocation part is in the very
> > beginning 4KBytes range of NAND (by Loader script). In this way, the
> > first 4KBytes in NAND will be read into Steppingstone buffer and
> executed,
> > after execution of relocation code, your bootloader code will be read
> into
> > RAM, and then the code can be executed in RAM, the full bootup procedure
> is
> > over.
>
> Why try to read from NAND to RAM in the relocation part of start.S,
> where you would not be able to use C or BSS variables?
>
> Because S3C2410 can _ONLY_ take the first 4KBytes into RAM (Basically some
hidden microcode in the S3C2410 takes care of copying the first 4KB of NAND
flash into RAM), so the rest code must be relocated into RAM from NAND by
the U-Boot code itself. Of course, there's no C environment set up yet, all
job should be done by assembly code.


> I thought the whole idea of the NAND SPL was to allow writing the
> NAND-to-RAM bootloader as a standalone "kind-of-U-boot", in C, with all
> the bells and whistles (that can fit in the NAND boot sector).


> Do I miss something?
>
> If not, then my opinion is that Matt should look into the NAND SPL code
> and fit it to initialize and use the stepping stone for initial SPL
> loading if he feels this is worth it.


> Amicalement,
> --
> Albert.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

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

* [U-Boot] SteppingStone
  2011-01-26  8:39     ` Cunsuo Guo
@ 2011-01-26  9:41       ` Wolfgang Denk
  2011-01-26 15:42         ` Matt Johnson
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2011-01-26  9:41 UTC (permalink / raw)
  To: u-boot

Dear Cunsuo Guo,

In message <AANLkTin=D7T-JQB4BFNYiZPT8WbZX5Kjy-fqyabyZRAZ@mail.gmail.com> you wrote:
>
> > Why try to read from NAND to RAM in the relocation part of start.S,
> > where you would not be able to use C or BSS variables?
> >
> > Because S3C2410 can _ONLY_ take the first 4KBytes into RAM (Basically some
> hidden microcode in the S3C2410 takes care of copying the first 4KB of NAND
> flash into RAM), so the rest code must be relocated into RAM from NAND by
> the U-Boot code itself. Of course, there's no C environment set up yet, all
> job should be done by assembly code.

This is not really different from how NAND booting works on many other
boards.

It is definitely not a reason to use assembly only.

Instead, the standard nand_spl approach should be used.

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
Documentation is like sex: when it is good, it is  very,  very  good;
and when it is bad, it is better than nothing.         - Dick Brandon

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

* [U-Boot] SteppingStone
  2011-01-26  9:41       ` Wolfgang Denk
@ 2011-01-26 15:42         ` Matt Johnson
  2011-01-26 15:59           ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Johnson @ 2011-01-26 15:42 UTC (permalink / raw)
  To: u-boot

>
>This is not really different from how NAND booting works on many other
>boards.
>
>It is definitely not a reason to use assembly only.
>
>Instead, the standard nand_spl approach should be used.
>

Does this work when the board is NAND only?  There is no NOR flash on the
board.

Where can I find more about nand_spl?   Is this already coded for another
board that I can copy from?

Thanks,
Matt

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

* [U-Boot] SteppingStone
  2011-01-26 15:42         ` Matt Johnson
@ 2011-01-26 15:59           ` Wolfgang Denk
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2011-01-26 15:59 UTC (permalink / raw)
  To: u-boot

Dear Matt Johnson,

In message <BAY145-ds8BD2332E6DD5B203B1BA5C2FF0@phx.gbl> you wrote:
>
> >Instead, the standard nand_spl approach should be used.
> 
> Does this work when the board is NAND only?  There is no NOR flash on the
> board.

Yes, this for boards that boot from NAND (usually these have only NAND
and no NOR).

> Where can I find more about nand_spl?   Is this already coded for another
> board that I can copy from?

See directory nand_spl.

Boards that use this:

	-> grep -l CONFIG_NAND_SPL include/configs/*
	include/configs/MPC8313ERDB.h
	include/configs/MPC8315ERDB.h
	include/configs/MPC8536DS.h
	include/configs/MPC8569MDS.h
	include/configs/MPC8572DS.h
	include/configs/P1_P2_RDB.h
	include/configs/PMC440.h
	include/configs/SIMPC8313.h
	include/configs/acadia.h
	include/configs/bamboo.h
	include/configs/canyonlands.h
	include/configs/hawkboard.h
	include/configs/kilauea.h
	include/configs/mx31pdk.h
	include/configs/sequoia.h
	include/configs/smdk6400.h
	include/configs/smdkc100.h
	include/configs/tx25.h


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
"It ain't so much the things we don't know that get  us  in  trouble.
It's  the  things  we know that ain't so." - Artemus Ward aka Charles
Farrar Brown

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

end of thread, other threads:[~2011-01-26 15:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 18:33 [U-Boot] SteppingStone Matt Johnson
2011-01-26  3:39 ` Cunsuo Guo
2011-01-26  7:23   ` Albert ARIBAUD
2011-01-26  8:39     ` Cunsuo Guo
2011-01-26  9:41       ` Wolfgang Denk
2011-01-26 15:42         ` Matt Johnson
2011-01-26 15:59           ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.