[U-Boot-Users] U-Boot-NG ?

Sascha Hauer
2007-07-03T11:02:42Z

On Mon, Jul 02, 2007 at 09:54:47PM +0200, Carsten Schlote wrote:
> Hi,
>
> and just the first patch for NG :-) When I tried to compile the linux
> sandbox, LD aborted with an error.
>
> The cause is the use of CONSTANT( x ) in the linker script. This isn't a
> built-in of LD, at least not for 2.17 on debian/etch. I grep-ed the
> sources and found nothing, which handles the issue.
>
> So I tweaked u-boot.lds.h a bit. Now it links and loads. I just guessed
> some values for the pagesizes - no idea what value they should have. Did
> you forget something to commit?

No, the scripts work here, but I did not find where MAXPAGESIZE and
COMMONPAGESIZE are defined, they must come from the linker.

>
> Regards
> Carsten
>
>
> include/asm-generic/u-boot.lds.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/linux/lib/u-boot.lds.S b/arch/linux/lib/u-boot.lds.S
> diff --git a/include/asm-generic/u-boot.lds.h
> b/include/asm-generic/u-boot.lds.h
> index e8e9ce1..931074a 100644
> --- a/include/asm-generic/u-boot.lds.h
> +++ b/include/asm-generic/u-boot.lds.h
> @@ -9,4 +9,8 @@
> *(.initcall.6) \
> *(.initcall.7)
>
> +#define MAXPAGESIZE 0x10000
> +#define COMMONPAGESIZE 4096
> +#define CONSTANT( x ) x

Do you need to define MAXPAGESIZE and COMMONPAGESIZE aswell or only
CONSTANT? I would prefer hardcoding the values directly in the linker
script. They are needed only for the sandbox target, but u-boot.lds.h
is included for all architectures.

btw I just read your wiki and 'sandbox' really is the better name for
this target ;)

Regards,
Sascha

--
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de