U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] 答复: [U-Boot-Users] Re: 答复: [U-Boot-Users] HELP: How to make PPC booting easier
@ 2008-02-03  4:55 tony liu
  2008-02-03  8:10 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: tony liu @ 2008-02-03  4:55 UTC (permalink / raw)
  To: u-boot

Thanks for all your suggestions. I've used the environment to do the auto-booting after enabling the CFI driver for environment storage to FLASH.

One of my important targets to use u-boot is to let my board be able to boot Linux kernel as the following way:
1) Power ON
2) VxWorks Bootrom started from FLASH 0xFEF00100
3) Start U-Boot (BIN) from FLASH 0xFEFC0000
4) U-Boot starts Linux/Initrd/DTB following the command line configured in VxWorks Bootrom (this is still not resolved yet)

Finally, my VxWorks bootrom can be selectable to boot a normal VxWorks image or a super package including Uboot and linux. And vice versa, if I put the U Boot's FLASH address as the CPU starting entry point, the u boot can also be selectable to boot any kinds of images.

Best Regards,
Tony



-----????-----
???: wd at denx.de [mailto:wd at denx.de] 
????: 2008?2?3? 12:10
???: Ben Warren
??: tony liu; u-boot-users at lists.sourceforge.net
??: Re: [U-Boot-Users] Re: ??: [U-Boot-Users] HELP: How to make PPC booting easier

In message <f8328f7c0802021958l7ae8df4dyd30a3f1b894cc280@mail.gmail.com> you wrote:
>
> I'm very, very far from being a device tree expert and am not up to
> date on the wonderful FDT work that Jerry Van Baren and friends have
> worked on over the last several months.  AFAIK, there's no way around
> having the kernel and device tree as separate images.  If both truly

Actually you should be able to use a (classic) multi-file image,
although I have to commit that I haven't tested this for a long time.

Or, you can wait until the new image format gets merged in the next
version of U-Boot (patches have been posted, you are welcome to give
them a try).

> need to be dynamic, of course you're going to have to download both
> each time.  You can certainly minimize the amount of human interaction
> by scripting U-boot to automatically TFTP the blobs to pre-defined
> addresses and then boot from there.

right. You just have to type the commands once and save them as an
environment variable which you can then "run".

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
If some day we are defeated, well, war has  its  fortunes,  good  and
bad.
	-- Commander Kor, "Errand of Mercy", stardate 3201.7

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

* [U-Boot-Users] 答复: [U-Boot-Users] Re: 答复: [U-Boot-Users] HELP: How to make PPC booting easier
  2008-02-03  4:55 [U-Boot-Users] 答复: [U-Boot-Users] Re: 答复: [U-Boot-Users] HELP: How to make PPC booting easier tony liu
@ 2008-02-03  8:10 ` Wolfgang Denk
  2008-02-03 11:25   ` [U-Boot-Users] ide support on arm trimarchi at gandalf.sssup.it
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2008-02-03  8:10 UTC (permalink / raw)
  To: u-boot

In message <BD41C75853FA124BB535FAB82C56E2910196EC7E@sons-exch05.salira.com> you wrote:
> 
> One of my important targets to use u-boot is to let my board be able to
> boot Linux kernel as the following way:
> 1) Power ON
> 2) VxWorks Bootrom started from FLASH 0xFEF00100
> 3) Start U-Boot (BIN) from FLASH 0xFEFC0000
> 4) U-Boot starts Linux/Initrd/DTB following the command line configured
> in VxWorks Bootrom (this is still not resolved yet)
> 
> Finally, my VxWorks bootrom can be selectable to boot a normal VxWorks
> image or a super package including Uboot and linux. And vice versa, if I
> put the U Boot's FLASH address as the CPU starting entry point, the u
> boot can also be selectable to boot any kinds of images.

Why are you making all this so complicated?  What  do  you  need  the
VxWorks  Bootrom  for?  Just  install U-Boot in flash, and let U-Boot
boot either Linux or VxWorks.

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
A door is what a dog is perpetually on the wrong side of.
                                                        - Ogden Nash

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

* [U-Boot-Users] ide support on arm
  2008-02-03  8:10 ` Wolfgang Denk
@ 2008-02-03 11:25   ` trimarchi at gandalf.sssup.it
  2008-02-03 15:47     ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: trimarchi at gandalf.sssup.it @ 2008-02-03 11:25 UTC (permalink / raw)
  To: u-boot

Hi,

I add a few change and an older version on u-boot for support ide on  
arm (about 10 lines of codes). The changes are made in cmd_ide.c file,  
and arm/board.c.
I think that is not present in the latest version of u-boot, it is right?

Regards Michael


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

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

* [U-Boot-Users] ide support on arm
  2008-02-03 11:25   ` [U-Boot-Users] ide support on arm trimarchi at gandalf.sssup.it
@ 2008-02-03 15:47     ` Wolfgang Denk
  2008-02-03 15:57       ` trimarchi at gandalf.sssup.it
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2008-02-03 15:47 UTC (permalink / raw)
  To: u-boot

In message <20080203122508.5ihz9mji80gc0o0g@feanor.sssup.it> you wrote:
> 
> I add a few change and an older version on u-boot for support ide on  
> arm (about 10 lines of codes). The changes are made in cmd_ide.c file,  
> and arm/board.c.

You asked about this in Aug 2007, but you never actually submitted any
code.

> I think that is not present in the latest version of u-boot, it is right?

Indeed. There is no magic way for your code to make it into the
public source tree without you posting proper patches first.

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
The alternative to genuflecting before the  god  of  code-bumming  is
finding  a  better  algorithm.  It should be clear that none such was
available. If your code is too slow, you must make it faster.  If  no
better algorithm is available, you must trim cycles.
                                 - td at alice.UUCP (Tom Duff) 29 Aug 88

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

* [U-Boot-Users] ide support on arm
  2008-02-03 15:47     ` Wolfgang Denk
@ 2008-02-03 15:57       ` trimarchi at gandalf.sssup.it
  2008-02-03 18:08         ` Jean-Christophe PLAGNIOL-VILLARD
  2008-02-03 19:27         ` Wolfgang Denk
  0 siblings, 2 replies; 9+ messages in thread
From: trimarchi at gandalf.sssup.it @ 2008-02-03 15:57 UTC (permalink / raw)
  To: u-boot

Hi,
Quoting Wolfgang Denk <wd@denx.de>:
Hi,
> In message <20080203122508.5ihz9mji80gc0o0g@feanor.sssup.it> you wrote:
>>
>> I add a few change and an older version on u-boot for support ide on
>> arm (about 10 lines of codes). The changes are made in cmd_ide.c file,
>> and arm/board.c.
>
> You asked about this in Aug 2007, but you never actually submitted any
> code.
>
Yes, I know
:), At the end I write and test the code yesterday for u-boot 1.1.4.

>> I think that is not present in the latest version of u-boot, it is right?
>
> Indeed. There is no magic way for your code to make it into the
> public source tree without you posting proper patches first.
>
I have two patches pending:
- ide arm
- ixp465 patch (posted one year ago)

Regards Michael




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

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

* [U-Boot-Users] ide support on arm
  2008-02-03 15:57       ` trimarchi at gandalf.sssup.it
@ 2008-02-03 18:08         ` Jean-Christophe PLAGNIOL-VILLARD
  2008-02-03 19:27         ` Wolfgang Denk
  1 sibling, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-02-03 18:08 UTC (permalink / raw)
  To: u-boot


> Hi,
> Quoting Wolfgang Denk <wd@denx.de>:
> Hi,
>> In message <20080203122508.5ihz9mji80gc0o0g@feanor.sssup.it> you  
>> wrote:
>>>
>>> I add a few change and an older version on u-boot for support ide on
>>> arm (about 10 lines of codes). The changes are made in cmd_ide.c  
>>> file,
>>> and arm/board.c.
>>
>> You asked about this in Aug 2007, but you never actually submitted  
>> any
>> code.
>>
> Yes, I know
> :), At the end I write and test the code yesterday for u-boot 1.1.4.
>
>>> I think that is not present in the latest version of u-boot, it is  
>>> right?
>>
>> Indeed. There is no magic way for your code to make it into the
>> public source tree without you posting proper patches first.
>>
> I have two patches pending:
> - ide arm
> - ixp465 patch (posted one year ago)
>

Could you send and resend it, please?

Best Regards,

J.


> Regards Michael
>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> --- 
> ----------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

* [U-Boot-Users] ide support on arm
  2008-02-03 15:57       ` trimarchi at gandalf.sssup.it
  2008-02-03 18:08         ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-02-03 19:27         ` Wolfgang Denk
  2008-02-09 18:28           ` michael
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2008-02-03 19:27 UTC (permalink / raw)
  To: u-boot

In message <20080203165731.63cn9koo2s4c4wwc@feanor.sssup.it> you wrote:
>
> > Indeed. There is no magic way for your code to make it into the
> > public source tree without you posting proper patches first.
> >
> I have two patches pending:
> - ide arm
> - ixp465 patch (posted one year ago)

I can't find them. Please rebase and resubmit.

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
A student of  probability  soon  realizes  that  by  its  nature  the
billion-to-one  chance  crops  up nine times out of ten, and that the
greatest odds boil down to a double-sided statement: it will  happen,
or it will not.         - Terry Pratchett, _The Dark Side of the Sun_

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

* [U-Boot-Users] ide support on arm
  2008-02-03 19:27         ` Wolfgang Denk
@ 2008-02-09 18:28           ` michael
  2008-02-10 20:23             ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: michael @ 2008-02-09 18:28 UTC (permalink / raw)
  To: u-boot

Hi,

Wolfgang Denk wrote:
> In message <20080203165731.63cn9koo2s4c4wwc@feanor.sssup.it> you wrote:
>   
>>> Indeed. There is no magic way for your code to make it into the
>>> public source tree without you posting proper patches first.
>>>
>>>       
>> I have two patches pending:
>> - ide arm
>> - ixp465 patch (posted one year ago)
>>     
>
> I can't find them. Please rebase and resubmit.
>
> Best regards,
>
> Wolfgang Denk
>
>   
this is the patch and how to use it:

+#define CONFIG_DOS_PARTITION
+#define CFG_IDE_MAXBUS          1       /* max. 1 IDE bus               */
+#define CFG_IDE_MAXDEVICE       1       /* max. 2 drives per IDE bus    */
+
+#define CFG_ATA_IDE0_OFFSET     (0)
+
+#define CFG_ATA_BASE_ADDR       (0x10000000)
+
+/* Offset for data I/O                  */
+#define CFG_ATA_DATA_OFFSET     (0)
+
+/* Offset for normal register accesses  */
+#define CFG_ATA_REG_OFFSET      (0)
+
+/* Offset for alternate registers       */
+#define CFG_ATA_ALT_OFFSET      (0)
+
+/* Interval between 
registers                                                */
+#define CFG_ATA_STRIDE          (1<<21)
+#define __io
+


diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index c38be4f..5b0b738 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -934,7 +934,14 @@ output_data(int dev, ulong *sect_buf, int words)
 static void
 output_data(int dev, ulong *sect_buf, int words)
 {
+#ifndef __ARM__
        outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words<<1);
+#else
+       int i = words;
+       u16 *buf = (u16 *) sect_buf;
+       for (i=0; i < (words << 1); i++, buf++)
+               outw(ATA_CURR_BASE(dev)+ATA_DATA_REG, buf);
+#endif
 }
 #endif /* __PPC__ */
 
@@ -992,7 +999,14 @@ input_data(int dev, ulong *sect_buf, int words)
 static void
 input_data(int dev, ulong *sect_buf, int words)
 {
+#ifndef __ARM__
        insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words << 1);
+#else
+       int i;
+       volatile u16 *buf = (u16 *) sect_buf;
+       for(i = 0; i < (words<<1); i++, buf++)
+               *buf = inw(ATA_CURR_BASE(dev)+ATA_DATA_REG);
+#endif
 }

diff --git a/lib_arm/board.c b/lib_arm/board.c
index 7e7a282..ddf4d5f 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -435,6 +435,12 @@ extern void dm644x_eth_set_mac_addr (const u_int8_t 
*addr);
        reset_phy();
 #endif
 #endif
+
+#if defined(CONFIG_CMD_IDE)
+       puts("IDE:   ");
+       ide_init();
+#endif
+
        /* main_loop() can return to retry autoboot, if so just run it 
again. */
        for (;;) {
                main_loop ();

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

* [U-Boot-Users] ide support on arm
  2008-02-09 18:28           ` michael
@ 2008-02-10 20:23             ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2008-02-10 20:23 UTC (permalink / raw)
  To: u-boot

In message <47ADF0C3.7090808@gandalf.sssup.it> you wrote:
> 
> > I can't find them. Please rebase and resubmit.
...
> this is the patch and how to use it:
> 
> +#define CONFIG_DOS_PARTITION
> +#define CFG_IDE_MAXBUS          1       /* max. 1 IDE bus               */
> +#define CFG_IDE_MAXDEVICE       1       /* max. 2 drives per IDE bus    */
> +
> +#define CFG_ATA_IDE0_OFFSET     (0)
> +
> +#define CFG_ATA_BASE_ADDR       (0x10000000)
> +
> +/* Offset for data I/O                  */
> +#define CFG_ATA_DATA_OFFSET     (0)
> +
> +/* Offset for normal register accesses  */
> +#define CFG_ATA_REG_OFFSET      (0)
> +
> +/* Offset for alternate registers       */
> +#define CFG_ATA_ALT_OFFSET      (0)
> +
> +/* Interval between 
> registers                                                */
> +#define CFG_ATA_STRIDE          (1<<21)
> +#define __io
> +

Sorry, this is not a patch.

> index c38be4f..5b0b738 100644
> --- a/common/cmd_ide.c
> +++ b/common/cmd_ide.c
> @@ -934,7 +934,14 @@ output_data(int dev, ulong *sect_buf, int words)
>  static void
>  output_data(int dev, ulong *sect_buf, int words)
>  {
> +#ifndef __ARM__
>         outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words<<1);
> +#else
> +       int i = words;
> +       u16 *buf = (u16 *) sect_buf;
> +       for (i=0; i < (words << 1); i++, buf++)
> +               outw(ATA_CURR_BASE(dev)+ATA_DATA_REG, buf);
> +#endif
>  }
>  #endif /* __PPC__ */
>  
> @@ -992,7 +999,14 @@ input_data(int dev, ulong *sect_buf, int words)
>  static void
>  input_data(int dev, ulong *sect_buf, int words)
>  {
> +#ifndef __ARM__
>         insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words << 1);
> +#else
> +       int i;
> +       volatile u16 *buf = (u16 *) sect_buf;
> +       for(i = 0; i < (words<<1); i++, buf++)
> +               *buf = inw(ATA_CURR_BASE(dev)+ATA_DATA_REG);
> +#endif
>  }
> 
> diff --git a/lib_arm/board.c b/lib_arm/board.c
> index 7e7a282..ddf4d5f 100644
> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -435,6 +435,12 @@ extern void dm644x_eth_set_mac_addr (const u_int8_t 
> *addr);
>         reset_phy();
>  #endif
>  #endif
> +
> +#if defined(CONFIG_CMD_IDE)
> +       puts("IDE:   ");
> +       ide_init();
> +#endif
> +
>         /* main_loop() can return to retry autoboot, if so just run it 
> again. */
>         for (;;) {
>                 main_loop ();
> 

This has coding style violations, your signed-off-by line if missing,
and it was line-wrapped by your mailer.

Sorry, but please retry.

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
There's no sense in being precise  when  you  don't  even  know  what
you're talking about.                             -- John von Neumann

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

end of thread, other threads:[~2008-02-10 20:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03  4:55 [U-Boot-Users] 答复: [U-Boot-Users] Re: 答复: [U-Boot-Users] HELP: How to make PPC booting easier tony liu
2008-02-03  8:10 ` Wolfgang Denk
2008-02-03 11:25   ` [U-Boot-Users] ide support on arm trimarchi at gandalf.sssup.it
2008-02-03 15:47     ` Wolfgang Denk
2008-02-03 15:57       ` trimarchi at gandalf.sssup.it
2008-02-03 18:08         ` Jean-Christophe PLAGNIOL-VILLARD
2008-02-03 19:27         ` Wolfgang Denk
2008-02-09 18:28           ` michael
2008-02-10 20:23             ` Wolfgang Denk

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