multiple architectures support

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

ok, how to define the target group...

its for workstations used by people who doesnt really know that much about computer, they just need something they can browse the net with, the may use office and play a few games and stuff, but hte dont know a thing about computers. They run windows, or simular and doesnt really know the difference or maybe even that alternatives are avalible. e.g., the avarage joe.

it is not ment for mobilephones and simular.

I dont really see other architectures than x86 and pps used by this group, but maybe im wrong?
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

I know I'm late to the party but this has been done before, about 6 years ago. It was mentioned in Phrack 57.

http://www.phrack.org/issues.html?issue ... 14#article

They get it to work on 4 architectures.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

fantastic, i knew it would be possible somehow ;)
thanks for the link.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
Candy wrote:I know I'm late to the party but this has been done before, about 6 years ago. It was mentioned in Phrack 57.
It'd be a bit easier if you don't have to have an 80x86 JMP instruction at the very start of the file....

For an 80x86 boot loader you have to have a JMP as the first instruction, otherwise it won't work on some computers (Compaqs).

I did a little EFI research though. It seems executable files (including boot loaders) use a modified form of PE32+. This file format begins with a MS-DOS 2.0 EXE header at the very start of the file (even for non-80x86 systems), which means that for EFI the first 2 bytes in an executable file should be the ASCII characters "MZ" or "ZM" (which can't be made to look like an 80x86 JMP instruction).

However, some implementations of EFI might not check if the MS-DOS 2.0 EXE header is valid, and you might not care if the OS boots on all 80x86 machines or just most of them, so it might still be possible to have an 80x86 and Itanium boot loader...

Of course to install a "universal boot loader", you'd need to use an architecture specific "boot loader installer", so it really doesn't make much sense - it's much easier to make the "boot loader installer" auto-select and install an architecture specific boot loader.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

Brendan wrote:However, some implementations of EFI might not check if the MS-DOS 2.0 EXE header is valid, and you might not care if the OS boots on all 80x86 machines or just most of them, so it might still be possible to have an 80x86 and Itanium boot loader...
So if I get this right, to boot on your brand new computer that did AWAY with legacy bullshit, you need to have an MSDOS 2.0 compatible executable?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Candy wrote:So if I get this right, to boot on your brand new computer that did AWAY with legacy bullshit, you need to have an MSDOS 2.0 compatible executable?
Haha, Wow! That's kinda funny :)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
Candy wrote:
Brendan wrote:However, some implementations of EFI might not check if the MS-DOS 2.0 EXE header is valid, and you might not care if the OS boots on all 80x86 machines or just most of them, so it might still be possible to have an 80x86 and Itanium boot loader...
So if I get this right, to boot on your brand new computer that did AWAY with legacy bullshit, you need to have an MSDOS 2.0 compatible executable?
Yes.

I'd guess that when Intel was first designing EFI one of their main concerns was trying to get Itanium market share. Rather than making up an executable format that nothing currently supports or choosing an executable format that a relatively small amount of the market uses, they decided to use the executable format that Microsoft uses (probably also hoping to see an eventual "Windows for Itanium", which IIRC did/does actually exist).

In choosing to use Microsoft's PE32+ format, they ended up with Microsoft's baggage - the MS-DOS stub that is responsible for displaying the "This program won't run on MS-DOS" message when you try to run a Windows executable on DOS...

AFAIK EFI also uses a FAT file system to store everything in. I'm not sure what they were thinking - probably the same logic (use something that exists and is supported by a large part of the target market, rather than making up something).

I think it's funny, especially when you think about Apple (the only people that use EFI on 80x86). Apple must've loved using Microsoft file formats and obsolete Microsoft file systems when they wrote the EFI boot loader for their shiny new Intel/Macs... ;)


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply