Thread (11 messages) 11 messages, 4 authors, 2011-01-10

RE: [PATCHv1 01/12] unicore32 core architecture: build infrastructure

From: Guan Xuetao <hidden>
Date: 2011-01-10 12:12:33
Also in: lkml

-----Original Message-----
From: Sam Ravnborg [mailto:sam@ravnborg.org]
Sent: Saturday, January 08, 2011 7:48 PM
To: Guan Xuetao
Cc: 'Paul Mundt'; linux-arch@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCHv1 01/12] unicore32 core architecture: build infrastructure
quoted
quoted
quoted
+textofs-y	:= 0x00408000
+
+# The byte offset of the kernel image in RAM from the start of RAM.
+TEXT_OFFSET := $(textofs-y)
If you are going to have different TEXT_OFFSET's then I suggest to move
this to KConfig as an "hex "Text offset" config option.
You can set default values dependign on BSP etc.
There is no different TEXT_OFFSET.
quoted
Also defiing stuff here just to export it for use in boot/
has always looked like a strange concept - but many archs do so today.
You do not export TEXT_OFFSET but I guess this is a bug?
I need TEXT_OFFSET for kernel/ and boot/, so export it.
I would suggest to move this to you Kconfig file.
something like this:

# The byte offset of the kernel image in RAM from the start of RAM
config UNICORE32_TEXT_OFFSET
	hex
	default 0x00408000

Then you have the symbol available as CONFIG_UNICORE32_TEXT_OFFSET
both in your Makefiles and in your source files.
Thanks.
Because TEXT_OFFSET is not changed in different machines or in configuration time,
I move it into mach-spec memory.h and rename it KERNEL_IMAGE_START.

Guan Xuetao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help