[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix load of RHEL ans SUSE images by correctly calculate ELF

From: Manoel Rebelo Abranches
Subject: Re: [PATCH] fix load of RHEL ans SUSE images by correctly calculate ELF entry point
Date: Thu, 04 Nov 2010 13:04:30 -0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20101027 Thunderbird/3.1.6

Fixed some issues reported by Vladimir:

Initial alignment value 1 instead of 0.
Verify error by returning address being -1 since 0 may be valid in memory allocated directly by the Open Firmware.
Use 'end' instead of (addr + len) to search for available memory.
change hardcoded value '1' to GRUB_MEMORY_AVAILABLE.

On 10/19/2010 11:46 AM, Manoel Rebelo Abraches wrote:
This is another version to the same fix.

The first patch 01_mem.patch creates a new function to allocate memory
using the "available" property in the "memory" node.
The second patch 02_offset.patch correctly finds the linux entry point,
also assumes that more segments can exist (made accordingly with sparc

The patch was made passing  -Bbp to diff as suggested by Vladimir.
I tested with RHEL/SUSE images and some RHEL/SUSE kernel I had and
worked correctly. Before the images failed to boot.
Thank you for reviewing this.

On Mon, 2010-09-27 at 04:29 -0300, Manoel Rebelo Abraches wrote:
This Patch loads kernel LOAD segment at the address fixed by PhysAddr
with alignment Align at the ELF program header. Even if this address is
in use other address with the same alignment is found "linuxadr" (since
linux can relocate itself). The linux main function is then find in the
adress linuxaddr + entry + (PhysAddr- Entry), where Entry is  the Entry
point address in the ELF header. (PhysAddr- Entry) gives the offset
where the linux entry point is located after linuxaddr.

Grub-devel mailing list

Grub-devel mailing list

Attachment: 01_mem.patch
Description: Text Data

Attachment: 02_elfoffset.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]