[PATCH 0/2] x86 minor fixes and questions

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Nov 11 04:50:42 EST 2013

Dear Sascha Hauer,

On Mon, 11 Nov 2013 08:57:38 +0100, Sascha Hauer wrote:

> > Also, I've tested the x86 support under Qemu, it starts fine. Thanks
> > to the bios disk driver, it detects one hard disk drive. However,
> > since the driver doesn't set num_blocks, the disk size is zero, and no
> > partition can be detected. Is this bios disk driver supposed to work
> > to read the entire hard drive, access a filesystem and load the kernel
> > image, or is the x86 support generally too limited for this at the
> > moment?
> Does your disk contain a valid partition table? There's no way to
> properly detect the disk size, so barebox guesses the size based on the
> last partition on the disk. This fails of course on an unpartitioned
> device. See disk_guess_size().

Yes, my disk had a partition table. However, I see that
disk_guess_size() is only called if you have a DOS partition table, and
not a GPT type of partition table, and I don't remember which type I've
used during my testing.

I'll test again, and with the info that disk_guess_size() is the
important part, I'll have a closer look.

> But indeed, the x86 support is quite limited.

Yeah, no problem. I'm not really planning on making any real use of it,
was just curious to see whether it worked, and if yes, how :-)

> > Thomas Petazzoni (2):
> >   scripts/setupmbr: fix documentation
> >   arch/x86: fix link with recent gcc
> Applied, thanks


Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering

More information about the barebox mailing list