From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] RFC: create u-boot-common.lds
Date: Sun, 5 Feb 2012 16:01:22 -0500 [thread overview]
Message-ID: <201202051601.24261.vapier@gentoo.org> (raw)
In-Reply-To: <1328410966-13946-1-git-send-email-troy.kisky@boundarydevices.com>
On Saturday 04 February 2012 22:02:45 Troy Kisky wrote:
> arch/blackfin/cpu/u-boot.lds
> is warranted.
yes, this change will break Blackfin boards for sure
> --- a/arch/blackfin/cpu/u-boot.lds
> +++ b/arch/blackfin/cpu/u-boot.lds
>
> MEMORY
> {
> #if CONFIG_MEM_SIZE
> - ram : ORIGIN = CONFIG_SYS_MONITOR_BASE, LENGTH = CONFIG_SYS_MONITOR_LEN
> # define ram_code ram
> # define ram_data ram
> + ram (rwx) : ORIGIN = CONFIG_SYS_MONITOR_BASE, LENGTH = CONFIG_SYS_MONITOR_LEN
> + l1_code : ORIGIN = L1_CODE_ORIGIN, LENGTH = L1_INST_SRAM_SIZE
> + l1_data : ORIGIN = L1_DATA_B_SRAM, LENGTH = L1_DATA_B_SRAM_SIZE
> #else
> # define ram_code l1_code
> # define ram_data l1_data
> + l1_code (rx) : ORIGIN = L1_CODE_ORIGIN, LENGTH = L1_INST_SRAM_SIZE
> + l1_data (!rx) : ORIGIN = L1_DATA_B_SRAM, LENGTH = L1_DATA_B_SRAM_SIZE
> #endif
> - l1_code : ORIGIN = L1_CODE_ORIGIN, LENGTH = L1_INST_SRAM_SIZE
> - l1_data : ORIGIN = L1_DATA_B_SRAM, LENGTH = L1_DATA_B_SRAM_SIZE
> }
i don't understand ... why is this change necessary ?
i'm not sure the attr's are correct ... the manual says "r" is "read-only"
while "w" is "read/write". so i'd expect:
ram (wx)
l1_code (x)
l1_data (w)
> + INCLUDE u-boot-common.lds
since we preprocess our linker scripts now, i'd suggest using #include rather
than INCLUDE
> --- /dev/null
> +++ b/u-boot-common.lds
>
> + . = ALIGN(4);
> + __u_boot_cmd_start = .;
> + .u_boot_cmd : {
> + KEEP(*(.u_boot_cmd))
> + }
> + __u_boot_cmd_end = .;
rather than storing this in the top level dir, i'd suggest going the linux
route and add a include/asm-generic/u-boot.lds.h header. then we can migrate
people over time and piece by piece without having to worry about breaking
everyone at once ...
that also allows us to cater to arches (like Blackfin) that have a symbol prefix
(underscore in the Blackfin case). add the VMLINUX_SYMBOL() macro, and then
this code will look like:
VMLINUX_SYMBOL(__u_boot_cmd_end) = .;
(i picked VMLINUX_SYMBOL() only because that's what Linux already has defined)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120205/24a77e89/attachment.pgp>
next prev parent reply other threads:[~2012-02-05 21:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 3:02 [U-Boot] [PATCH 1/2] RFC: create u-boot-common.lds Troy Kisky
2012-02-05 3:02 ` [U-Boot] [PATCH 2/2] RFC: Let linker create phy array Troy Kisky
2012-02-05 3:38 ` Mike Frysinger
2012-02-05 6:16 ` Dirk Behme
2012-02-05 13:26 ` Albert ARIBAUD
2012-02-05 20:40 ` Mike Frysinger
2012-02-06 20:53 ` Albert ARIBAUD
2012-02-06 18:48 ` Troy Kisky
2012-02-06 19:07 ` Mike Frysinger
2012-02-06 20:17 ` Troy Kisky
2012-02-06 20:56 ` Albert ARIBAUD
2012-02-06 20:57 ` Mike Frysinger
2012-02-06 21:01 ` Albert ARIBAUD
2012-02-07 15:20 ` Mike Frysinger
2012-02-10 19:39 ` Albert ARIBAUD
2012-02-10 20:32 ` Mike Frysinger
2012-02-10 20:57 ` Albert ARIBAUD
2012-02-10 21:41 ` Mike Frysinger
2012-02-12 14:45 ` Albert ARIBAUD
2012-02-06 21:44 ` Troy Kisky
2012-02-07 15:21 ` Mike Frysinger
2012-02-05 21:01 ` Mike Frysinger [this message]
2012-02-05 22:07 ` [U-Boot] [PATCH 1/2] RFC: create u-boot-common.lds Graeme Russ
2012-02-06 3:24 ` Mike Frysinger
2012-02-06 3:43 ` Graeme Russ
2012-02-06 4:27 ` Mike Frysinger
2012-02-06 4:34 ` Graeme Russ
2012-02-06 5:48 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201202051601.24261.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox