[U-Boot-Users] 答复: [U-Boot-Users] Re: 答复: [U-Boot-Users] HELP: How to make PPC booting easier

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@denx.de [mailto:wd@denx.de] 发送时间: 2008年2月3日 12:10 收件人: Ben Warren 抄送: tony liu; u-boot-users@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

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:
- Power ON
- VxWorks Bootrom started from FLASH 0xFEF00100
- Start U-Boot (BIN) from FLASH 0xFEFC0000
- 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

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.

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

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.

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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

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 ();

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
participants (5)
-
Jean-Christophe PLAGNIOL-VILLARD
-
michael
-
tony liu
-
trimarchi@gandalf.sssup.it
-
Wolfgang Denk