[U-Boot] [patch] make hello world example work for at91sam9261ek and make readme clearer about this

This patch fixes the hello_world example to be able to run it on a AT91SAM9261-EK board.
Signed-off-by: Remy Bohmer linux@bohmer.net --- README | 4 +++- examples/Makefile | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-)
Index: u-boot-usb.new/examples/Makefile =================================================================== --- u-boot-usb.new.orig/examples/Makefile 2008-12-04 22:01:14.000000000 +0100 +++ u-boot-usb.new/examples/Makefile 2008-12-04 22:01:20.000000000 +0100 @@ -33,9 +33,13 @@ ifeq ($(ARCH),arm) ifeq ($(BOARD),omap2420h4) LOAD_ADDR = 0x80300000 else +ifeq ($(BOARD),at91sam9261ek) +LOAD_ADDR = 0x21400000 +else LOAD_ADDR = 0xc100000 endif endif +endif
ifeq ($(ARCH),mips) LOAD_ADDR = 0x80200000 -T mips.lds Index: u-boot-usb.new/README =================================================================== --- u-boot-usb.new.orig/README 2008-12-04 22:01:14.000000000 +0100 +++ u-boot-usb.new/README 2008-12-04 22:01:20.000000000 +0100 @@ -3568,7 +3568,9 @@ Two simple examples are included with th
'examples/hello_world.c' contains a small "Hello World" Demo application; it is automatically compiled when you build U-Boot. -It's configured to run at address 0x00040004, so you can play with it +The address it will run on is determined by the LOAD_ADDR for +your board in examples/Makefile. +If it's configured to run at address 0x00040004, you can play with it like that:
=> loads

On 22:25 Thu 04 Dec , Remy Bohmer wrote:
This patch fixes the hello_world example to be able to run it on a AT91SAM9261-EK board.
Signed-off-by: Remy Bohmer linux@bohmer.net
README | 4 +++- examples/Makefile | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-)
Index: u-boot-usb.new/examples/Makefile
--- u-boot-usb.new.orig/examples/Makefile 2008-12-04 22:01:14.000000000 +0100 +++ u-boot-usb.new/examples/Makefile 2008-12-04 22:01:20.000000000 +0100 @@ -33,9 +33,13 @@ ifeq ($(ARCH),arm) ifeq ($(BOARD),omap2420h4) LOAD_ADDR = 0x80300000 else +ifeq ($(BOARD),at91sam9261ek) +LOAD_ADDR = 0x21400000 +else LOAD_ADDR = 0xc100000 endif endif +endif
Honestly I'll prefer to remove all arch and board ifdef and let the board ovewrite it or the arch if the board do not not already define it and do here LOAD_ADDR ?= <default addr>
Best Regards, J.

Hello Jean-Christophe,
@@ -33,9 +33,13 @@ ifeq ($(ARCH),arm) ifeq ($(BOARD),omap2420h4) LOAD_ADDR = 0x80300000 else +ifeq ($(BOARD),at91sam9261ek) +LOAD_ADDR = 0x21400000 +else LOAD_ADDR = 0xc100000 endif endif +endif
Honestly I'll prefer to remove all arch and board ifdef and let the board ovewrite it or the arch if the board do not not already define it and do here LOAD_ADDR ?= <default addr>
I completely agree about this. This was just a minor patch I had on the stack for months and yesterday I just put them all out. The most important part of this patch was the comment about the load-addr in the readme file. Frequently questions misunderstandings about the examples appear on the ML, and the readme change would help there.
I can look into it later on to improve it and find a more generic solution. In the mean time, I do not think this patch hurts anyone ;-)
Remy
Best Regards, J.

On 09:41 Fri 05 Dec , Remy Bohmer wrote:
Hello Jean-Christophe,
@@ -33,9 +33,13 @@ ifeq ($(ARCH),arm) ifeq ($(BOARD),omap2420h4) LOAD_ADDR = 0x80300000 else +ifeq ($(BOARD),at91sam9261ek) +LOAD_ADDR = 0x21400000 +else LOAD_ADDR = 0xc100000 endif endif +endif
Honestly I'll prefer to remove all arch and board ifdef and let the board ovewrite it or the arch if the board do not not already define it and do here LOAD_ADDR ?= <default addr>
I completely agree about this. This was just a minor patch I had on the stack for months and yesterday I just put them all out. The most important part of this patch was the comment about the load-addr in the readme file. Frequently questions misunderstandings about the examples appear on the ML, and the readme change would help there.
I can look into it later on to improve it and find a more generic solution. In the mean time, I do not think this patch hurts anyone ;-)
I'll prefer to wait because I've other patch in queued that will do the samethink
Best Regards, J.

Dear "Remy Bohmer",
In message 3efb10970812050041y199ae0a4la4f4c3589a07fa1@mail.gmail.com you wrote:
This was just a minor patch I had on the stack for months and yesterday I just put them all out. The most important part of this patch was the comment about the load-addr in the readme file. Frequently questions misunderstandings about the examples appear on the ML, and the readme change would help there.
We should take greater care than to really make this right - you probably want to copy & paste from the FAQ.
Best regards,
Wolfgang Denk

Dear Remy Bohmer,
In message 49384d2e.2805420a.5c7b.ffff8d3b@mx.google.com you wrote:
'examples/hello_world.c' contains a small "Hello World" Demo application; it is automatically compiled when you build U-Boot. -It's configured to run at address 0x00040004, so you can play with it +The address it will run on is determined by the LOAD_ADDR for +your board in examples/Makefile. +If it's configured to run at address 0x00040004, you can play with it like that:
Um... the new text is as misleading as the old one was. LOAD_ADDR obviously plays a role for the entry point address, abut it's not a 1:1 relation. Probablky nobody would set LOAD_ADDR to 0x00040004 ...
Best regards,
Wolfgang Denk
participants (3)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Remy Bohmer
-
Wolfgang Denk