Last edited by pxwpxw; February 17th, 2009 at 06:28 AM.
Perhaps you can try this one.
It it still hangs, you can rename grub.cfg and see if it can boot to command line.
BTW, the "cannot load image" issue is compiler related ! Previously, I use gcc 4.2.3 which generate a working image. But when I switch to 4.3.2, this problem occurs. Unfortunately, the old 4.2.3 doesn't support large memory modal which is essential for the workaround on 4G memory. I'm looking at the source code more closely and try to figure it out.
That leaves me with the blank linux boot and init screen, and I would need to try changing the source video settings again to see the linux init text.
The video settings shown for 4GB RAM are now
I expect the VFB value needs changing again.Code:Video mode 1920x1200 - 32@60 Video frame buffer: d0520000 ( was 0x90520000 for 2GB RAM )
So I cant try that until I can build with your fix for the 4GB.
I am using gcc-4.3
pxw@im81:~$ aptitude search gcc | grep ^i
i gcc - The GNU C compiler
i gcc-4.3 - The GNU C compiler
i gcc-4.3-base - The GNU Compiler Collection (base package)
i A gcc-4.3-multilib - The GNU C compiler (multilib files)
i gcc-multilib - The GNU C compiler (multilib files)
i A lib64gcc1 - GCC support library (64bit)
i libgcc1 - GCC support library
I have posted more (as 'Cros' ) about the video problem on grub-devel list in reply to you.
This is the patch file, you may need to ignore white space when applying it. After the patch is applied, run ./autogen.sh to update the makefiles.
Last edited by bean123; February 17th, 2009 at 03:11 PM.
Oh, it seems the pci scan method doesn't work very well. Fortunately, there are only a few different frame buffer addresses, we can try them one by one. Currently, I check the following location:
0x40000000, 0x80000000, 0x80010000
If your model uses a different frame buffer address, please let me known.
This new version also detect line length instead of using fixed number 8192.
Patched rev 1996 now running on Imac81 with 4GB RAM.
pxw@im81:~/src/grub1996b$ patch -p1 <efi.diff
patching file conf/x86_64-efi.rmk
patching file include/grub/efi/pe32.h
patching file kern/x86_64/dl.c
patching file kern/x86_64/efi/startup.S
patching file loader/efi/appleloader.c
patching file util/i386/efi/grub-mkimage.c
pxw@im81:~/src/grub1996b/build$ ../configure --with-platform=efi --target=x86_64
... make ...
pxw@im81:~/src/grub1996b/build$ ./grub-mkimage -d . -o grub4g.efi `cat ../../modules`
pxw@im81:~/src/grub1996b/build$ cat ../../modules
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
Initially Video frame buffer d0520000, no linux video
Change to 0xc0000000, giving visible raw video
params->lfb_line_len = 8192;
/*pxwdebug*/ params->lfb_line_len = width*4;
giving clear linux text, horiz shifted 1/2 screen, but all readable.