mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <ahmad@a3f.at>
To: jbe@pengutronix.de, barebox@lists.infradead.org
Cc: uol@pengutronix.de, Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH 1/1] x86: lib: fix link error for legacy (non-EFI) boot
Date: Tue,  9 Mar 2021 23:52:23 +0100	[thread overview]
Message-ID: <20210309225223.1687415-2-ahmad@a3f.at> (raw)
In-Reply-To: <20210309225223.1687415-1-ahmad@a3f.at>

The mbr and barebox memory regions defined in the linker script overlap,
which leads recent linkers to complain loudly and abort the build:

	ld: section .bootstrapping VMA [0000000000007e00,000000000000841f]
	overlaps section .bootsector VMA [0000000000007c00,0000000000007fff]

Correcting the region boundaries fixes the error. barebox can still not
boot completely, boot it at least build and shows early debug output.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/x86/lib/barebox.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S
index b24c4807b59d..0747d40d752b 100644
--- a/arch/x86/lib/barebox.lds.S
+++ b/arch/x86/lib/barebox.lds.S
@@ -10,7 +10,7 @@ ENTRY(_start)
 MEMORY
 {
 	mbr(rwx): ORIGIN = TEXT_BASE, LENGTH = 2 * SECTOR_SIZE
-	barebox (rwx) : ORIGIN = TEXT_BASE + SECTOR_SIZE, LENGTH = (256 * 1024 * 1024)
+	barebox (rwx) : ORIGIN = TEXT_BASE + 2 * SECTOR_SIZE, LENGTH = (256 * 1024 * 1024)
 }
 
 SECTIONS
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2021-03-09 22:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 22:52 [PATCH 0/1] x86: retire legacy (non-efi) boot ? Ahmad Fatoum
2021-03-09 22:52 ` Ahmad Fatoum [this message]

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=20210309225223.1687415-2-ahmad@a3f.at \
    --to=ahmad@a3f.at \
    --cc=barebox@lists.infradead.org \
    --cc=jbe@pengutronix.de \
    --cc=uol@pengutronix.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