Skip to contentSkip to conversation

Support new object format for powerpc-ieee1275

GITGRUB Bean 3 participants 7 messages Aug 21, 2009 – Aug 29, 2009

lore
Share & tools
lore

Bean

author
#0 lore raw

Hi,

Support new object format for powerpc-ieee1275 platform, I create the image with cross compile in i386 environment, so that the elf converter should be endianness safe.

There are still some problem, but they don't seems to be related to the new object format, as it also exist in svn code. Claim memory seems to fail, so the image halts pretty soon, tested with OpenBios with qemu-ppc and ppc mac mini. And the calls to "output-device output" in ofconsole would generate an exception, just comment it out for now.

Signature · 4 lines
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/
author
#1 lore raw

Hi,

Add support for OpenBIOS. it would detect OpenBIOS and add flags for the OpenBIOS platform.

The problem with OpenBIOS:

/memory/available is present, but the value is different from olpc, instead of start-size pair, it's four number consist of:

0 min_mem max_mem total_mem

The current mmap enumerator would generate incorrect data. This is handled by setting the force claim flag so that it just claim memory directly.

nextprop method is not implemented, this caused a infinite loop when probing aliases, fixed by checking the return value.

With these, it's all right to boot into grub shell, but there are no disk device, this is another unimplemented feature of OpenBIOS, as you also can't list device in the openbios shell.

Signature · 4 lines
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/
author
#2 lore raw

Hi,

Update:

Support ppc mach-o object file, now you can compile grub2 powerpc-ieee1275 in OSX.

As Xcode have included powerpc cross compiler, you don't need to install extra software, just use the following configure command:

./configure --with-platform=ieee1275 --target=powerpc TARGET_CC=powerpc-apple-darwin9-gcc-4.0.1

With this patch, new object format support is basically finished, now you can compile the following targets in Windows, OSX and Linux:

Windows:
all i386 targets, x86_64 targets (needs mingw-w64)

OSX:
all i386, x86_64 and powerpc targets.

Linux:
all i386, x86_64 (needs multilib), and powerpc (need cross compiler) targets

Signature · 4 lines
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/
author
#3 lore raw

Hi,

Update: fix a few endian and relocation issue, I can now build all i386/x64_64/powerpc targets from x86/powerpc OSX Tiger/Leopard.

Note: when building on OSX, I recommend adding configure option --disable-grub-fstest --disable-grub-emu --disable-mkfont. grub-fstest can be built successfully, but OSX don't allow executing code from stack, running grub-fstest would cause a segment fault. grub-emu can be broken occasionally, and even if it's compiled ok, it has the same problem as grub-fstest. grub-mkfont is currently broken on OSX.

Here are some information on configure parameter:

x86 OSX 10.5 (Leopard), Xcode 3.0, gcc 4.0 i386-pc:
./configure --with-platform=pc --disable-grub-fstest --disable-grub-emu --disable-mkfont

x86_64-efi:
./configure --with-platform=efi --target=x86_64 --disable-grub-fstest --disable-grub-emu --disable-mkfont

powerpc-ieee1275:
./configure --with-platform=ieee1275 --target=powerpc TARGET_CC=powerpc-apple-darwin9-gcc-4.0.1 --disable-grub-fstest --disable-grub-emu --disable-mkfont

powerpc OSX 10.4 (Tiger), Xcode 2.5, gcc 4.0 i386-pc:
./configure --with-platform=pc --target=i386 TARGET_CC=i686-apple-darwin8-gcc-4.0.1 --disable-grub-fstest --disable-grub-emu --disable-mkfont

x86_64-efi:
./configure --with-platform=efi --target=x86_64 TARGET_CC=i686-apple-darwin8-gcc-4.0.1 --disable-grub-fstest --disable-grub-emu --disable-mkfont

powerpc-ieee1275:
./configure --with-platform=ieee1275 --disable-grub-fstest --disable-grub-emu --disable-mkfont

BTW, the default bison installed on OSX tiger would cause compile error, install bison from macport and it would be ok.

Signature · 4 lines
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/
#4 lore raw
Quoted 9 lines · Bean

Hi,

Update: fix a few endian and relocation issue, I can now build all i386/x64_64/powerpc targets from x86/powerpc OSX Tiger/Leopard.

Note: when building on OSX, I recommend adding configure option --disable-grub-fstest --disable-grub-emu --disable-mkfont. grub-fstest can be built successfully, but OSX don't allow executing code from stack, running grub-fstest would cause a segment fault.

sysctl kern.nx=0

Quoted 46 lines

Here are some information on configure parameter:

x86 OSX 10.5 (Leopard), Xcode 3.0, gcc 4.0 i386-pc:
./configure --with-platform=pc --disable-grub-fstest --disable-grub-emu --disable-mkfont

x86_64-efi:
./configure --with-platform=efi  --target=x86_64 --disable-grub-fstest --disable-grub-emu --disable-mkfont

powerpc-ieee1275:
./configure --with-platform=ieee1275  --target=powerpc TARGET_CC=powerpc-apple-darwin9-gcc-4.0.1 --disable-grub-fstest --disable-grub-emu --disable-mkfont

powerpc OSX 10.4 (Tiger), Xcode 2.5, gcc 4.0 i386-pc:
./configure --with-platform=pc --target=i386 TARGET_CC=i686-apple-darwin8-gcc-4.0.1 --disable-grub-fstest --disable-grub-emu --disable-mkfont

x86_64-efi:
./configure --with-platform=efi  --target=x86_64 TARGET_CC=i686-apple-darwin8-gcc-4.0.1 --disable-grub-fstest --disable-grub-emu --disable-mkfont

powerpc-ieee1275:
./configure --with-platform=ieee1275 --disable-grub-fstest --disable-grub-emu --disable-mkfont

BTW, the default bison installed on OSX tiger would cause compile error, install bison from macport and it would be ok.

--
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
#5 lore raw

zfsinfo branch

Hi,

Any chance I could convince you to merge that in with the nested partition
and sunpc changes + the current trunk? It would definitely make it easier for me to merge the changes into my workspace...

Thanks,
--S

#6 lore raw

Re: zfsinfo branch

Sorry -- this was meant as a private message :). Ignore.

--S

Quoting Seth Goldberg, who wrote the following on Fri, 28 Aug 2009:

Quoted 15 lines

Hi,

Any chance I could convince you to merge that in with the nested partition
and sunpc changes + the current trunk? It would definitely make it easier for me to merge the changes into my workspace...

Thanks,
--S

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel