mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/1] x86: retire legacy (non-efi) boot ?
@ 2021-03-09 22:52 Ahmad Fatoum
  2021-03-09 22:52 ` [PATCH 1/1] x86: lib: fix link error for legacy (non-EFI) boot Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2021-03-09 22:52 UTC (permalink / raw)
  To: jbe, barebox; +Cc: uol, Ahmad Fatoum

barebox for legacy BIOS boot was reported broken on IRC nearly a year
ago. With the link error fixed, I can get some early debug output, but
barebox hangs early after when running under qemu-kvm:

  $ ./scripts/setupmbr/setupmbr -s 32 -m build/barebox-flash-image -d img && \
	kvm -drive format=raw,file=img -serial stdio -m 4G -cpu host -smp 2
  
  SeaBIOS (version 1.14.0-2)
  
  iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+07F8F4C0+07ECF4C0 CA00
  
  Booting from Hard Disk...
  BAREBOX JMP

With OSELAS.Toolchain-2013.12.3, but without the patch included here,
I can get a shell if I shrink down barebox, but no luck getting this
to work with a recent toolchain. There also seems to be some transient
issue that's triggered by the barebox size.

I'd assume that because no one stepped up to fix this so far, no one
cares and we could drop legacy BIOS boot support altogether.
New platforms should be using EFI anyway. Thoughts?

Cheers,
Ahmad Fatoum (1):
  x86: lib: fix link error for legacy (non-EFI) boot

 arch/x86/lib/barebox.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.0


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] x86: lib: fix link error for legacy (non-EFI) boot
  2021-03-09 22:52 [PATCH 0/1] x86: retire legacy (non-efi) boot ? Ahmad Fatoum
@ 2021-03-09 22:52 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2021-03-09 22:52 UTC (permalink / raw)
  To: jbe, barebox; +Cc: uol, Ahmad Fatoum

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-09 22:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 22:52 [PATCH 0/1] x86: retire legacy (non-efi) boot ? Ahmad Fatoum
2021-03-09 22:52 ` [PATCH 1/1] x86: lib: fix link error for legacy (non-EFI) boot Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox