After some thought, I think we can use the following heuristic to determine the frame buffer address:
0x40000000, 0x40010000, ... 0x40070000
0x80000000, 0x80010000, ... 0x80070000
0xc0000000, 0xc0010000, ... 0xc0070000
The high number, 4, 8 or c, is perhaps depended on physical memory, 4 for 1g, 8 for 2g, c for 3/4g.
The low number, 0..7, is depended on the video card memory.
This new grub.efi uses this method to scan frame buffer, please test it in various mac model to see how well it works.
I will check for 2GB and 4GB on imac81 and mbp41.
The frame buffer address high number in all cases I have seen, could be inferred from the EFI header or system table address, which is known. The 1GB 2GB and 4GB fitted RAM cases fit that. IDK about 3GB fitted ram or > 4GB available in some later models I think.
I dont know if the video card vendor is relevant as well?
BTW many thanks for all this, it is great to see a dev here helping us out, awesome.
Really need to get linux actually running to encourage people to use grub.efi.
Oh, thanks for the testing, I couldn't have solved such problem without eager user like you.
The agp and libata problem is more tricky, as it involves the linux kernel. Perhaps I'd check out the kernel source some other time to see what goes wrong.
BTW, with the latest grub.efi, the mysterious random reboot issue seems to go away, can you verify it ?
Will keep at it and report, I find both the imac and the mbp restarts seem a bit buggy, especially after any sort of bootup error. Cure is just to restart again, usually best to use the Option key and Apple boot screen, or shut down restart.
I have not seen the random reboot yet.
Have you got a patch for the latest grub.efi?
I want to look at the kernel startup problem, maybe try kernel config or initramfs changes. Also will recheck with the basic debian install kernel.
All good so far -
(booting macosx, MBR, linux)
MBP41 2GB RAM
IMAC81 4GB RAM
For anyone else wanting to try this grub.efi for 64bit firmware, ubuntu 810 with kernel 2.6.27 boots to startup text, however at present there is a kernel/EFI problem with ata: libata stuck in a timeout loop before it gets to mount the root system, then there is finally a keyboard problem ).
menuentry "OSX" {
search --set /usr/standalone/i386/boot.efi
chainloader /usr/standalone/i386/boot.efi
}
menuentry "MBR" {
appleloader HD
}
menuentry "Linux" {
search --set /vmlinuz
linux /vmlinuz video=efifb root=/dev/sda3
initrd /initrd.img
}
Last edited by pxwpxw; February 20th, 2009 at 06:09 AM. Reason: step21 and the keyboard bug
Update-
Using svn trunk/grub2 -r 1996.
with patch
http://lists.gnu.org/archive/html/gr.../msg00227.html
../configure --with-platfrom=efi --target=x86_64
and also --target=i386 for 32bit MacBook21 version.
Using /efi/grub/grub.efi and modules, with rEFIt.
64bit Macs have ongoing problems with linux kernel initializtion (pci, libata) and keyboard.Code:x86_64 Imac81 256M VRAM 4GB RAM Video frame buffer at 0xc0010000 Line length 7680 Video mode 1920x1200 - 32@60 MBP41 512M VRAM 2GB RAM Vfb 0x80060000 Line length 8192 4GB RAM Vfb 0xc0060000 Video mode 1920x1200 - 32@0 ----------------- 32bit MacBook21 1GB RAM 64M vram shared system ram VFB 0x40000000 Line Length 8192 Viodeo mode 1200x800 - 32@59
32bit MacBook21 is all good.
grub.efi is now case insensitive so lower case /efi with refit works.
(maybe refit still needs /EFI for external).
These are the full < grub.efi + modules> I am using,
can go in /efi with refit or probably need to go in /EFI if on another partition.
Or you can just pull out the grub.efi and should run standalone, it has preloaded modules.
Preloaded modules -
Code:apple appleldr boot cat chain configfile cpio date ext2 echo fat gpt help hexdump hfs hfsplus iso9660 linux ls normal pc reboot reiserfs scsi search sleep xfs
Last edited by pxwpxw; February 21st, 2009 at 03:38 AM.
Bookmarks