mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefan Reinauer <stefan.reinauer@coresystems.de>
To: Juergen Beisert <jbe@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: barebox on x86
Date: Tue, 31 Aug 2010 21:09:08 +0200	[thread overview]
Message-ID: <4C7D5354.7000702@coresystems.de> (raw)
In-Reply-To: <201008311745.27052.jbe@pengutronix.de>

 On 8/31/10 5:45 PM, Juergen Beisert wrote:
> Hi Stefan,
>
> Stefan Reinauer wrote:
>> here's some initial work on getting barebox working on x86 (again?).
>>
>> The patch is very ugly, and it makes some assumptions on me using
>> Darwin/Mac OS X to compile barebox.
>> What kind of becomes clear though, is that there is no clear distinction
>> between which set of headers are used for the user space utilities and
>> which set of headers are used for the barebox binary. I think that's the
>> reason why barebox features an include/linux directory which seems to
>> duplicate about half of what Linux usually has in there, but more than
>> barebox uses (or should use, ftm).
>>
>> With the attached patch I get as far as the linking stage.
>>
>>> i386-elf-ld -Map barebox.map -o barebox -T arch/x86/lib/barebox.lds
>> --start-group common/built-in.o drivers/built-in.o commands/built-in.o
>> lib/built-in.o net/built-in.o fs/built-in.o
>> arch/x86/boards/x86_generic/built-in.o arch/x86/mach-i386/built-in.o
>> arch/x86/lib/built-in.o arch/x86/boot/built-in.o --end-group
>>
>> When I define CONFIG_X86_HDBOOT
>> I get:
>>
>> i386-elf-ld: barebox section `.initcall.8' will not fit in region `mbr'
>> i386-elf-ld: section .initcall.8 loaded at
>> [0000000000000400,000000000000040b] overlaps section .bootstrapping
>> loaded at [0000000000000400,00000000000008e7]
>> i386-elf-ld: region `mbr' overflowed by 12 bytes
> -> MBR -> 16 Bit boot loader.

Yes, I wanted to compile the "known working" version first, but it seems
to choke on the "late_initcall" mechanism somehow.

>> If I choose "native", I get
>>
>> arch/x86/lib/barebox.lds:124: nonconstant expression for load base
> The 'native' case is not finished yet. It does not use any 16 bit code nor 
> BIOS calls. But need adaptions to get some vital information about the system 
> (for example memory size).
Ok, will try to figure this one out.

>> Since barebox is not really specialized in doing complex hardware
>> initialization like it's needed on x86 machines, and coreboot is not
>> really specialized in providing any kind of user interface I would like
>> to work on making barebox available as a coreboot payload. For that I
>> need to produce an ELF file that does no BIOS calls because coreboot is
>> not a BIOS or UEFI but only does the most necessary hardware
>> initialization on x86 systems.
> The 'native' case is the correct direction to get it work with coreboot.

Great! That's what I assumed. Thanks for the input.


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

      reply	other threads:[~2010-08-31 19:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-31 10:25 Stefan Reinauer
2010-08-31 13:18 ` Jean-Christophe PLAGNIOL-VILLARD
2010-08-31 13:50   ` Stefan Reinauer
2010-08-31 15:18     ` Jean-Christophe PLAGNIOL-VILLARD
2010-08-31 15:59       ` Stefan Reinauer
2010-08-31 16:23         ` Juergen Beisert
2010-08-31 17:08         ` Jean-Christophe PLAGNIOL-VILLARD
2010-08-31 19:06           ` Stefan Reinauer
2010-08-31 15:45 ` Juergen Beisert
2010-08-31 19:09   ` Stefan Reinauer [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=4C7D5354.7000702@coresystems.de \
    --to=stefan.reinauer@coresystems.de \
    --cc=barebox@lists.infradead.org \
    --cc=jbe@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