[coreboot] [PATCH] mkelfImage: set kernel_alignment so 2.6.31+ work

Eric W. Biederman ebiederm at xmission.com
Thu May 20 23:32:36 CEST 2010

Troy Telford <ttelford.groups at gmail.com> writes:

> On Thursday, May 20, 2010 12:56:48 pm Eric W. Biederman wrote:
>> Troy Telford <ttelford.groups at gmail.com> writes:
>> > On Wednesday, May 19, 2010 05:42:36 am Eric W. Biederman wrote:
>> >> The kernel initialization code as of boot protocol 2.10 is now reading
>> >> the kernel_alignment field.  With the field left the kernel attempts to
>> >> align things to 4GB which is unlikely to work, so change the alignment
>> >> to the kernels normal value of 16MB so newer kernels process by
>> >> mkelfImage will boot.
>> >> 
>> >> Signed-off-by: "Eric W. Biederman" <ebiederm at xmission.com>
>> > 
>> > I've applied the patch and built it.  (Twice - once against svn, and once
>> > against 2.7.0.  It doesn't seem to matter).
>> > 
>> > The change to work for any of the machines I'm trying it on (mostly the
>> > old HDAMA LinuxBIOS machines, but some newer hardware as well).
>> Odd.  That change was enough to get it to work in my testing.
>> In the case that doesn't reboot now could you try adding
>> an earlyprintk=ttyS0,115200 to your command line?  With a little
>> luck that will give you some output.
> Lady luck rarely smiles upon me.  This looks like this is no exception.
> I modified the kernel command line to add the 'earlyprintk=<foo>' at the end 
> of the command line, and the result is the same:
>  - no output until the system rebooted (when using kexec)
>  - no output at all (etherboot)


I can think of two things that might be useful.

1) Add a print statement into mkelfImage that prints the value of
   kernel_alignment Most of the fields are already printed so this
   just requires tweaking linux-i386/convert_params.c

   Where you still have a reboot in the kexec case I am a little curious
   if everything applied ok.

2) What needs to happen is to get a kernel instrumented up with a bunch of
   debug prints to see where it is failing.  The attached linux-debug.S is
   a serial console print statement that I cut and past into early boot
   to get print statements before the normal print statement infrastructure
   initializes.  I am posting this more as documentation than anything else.

There are some deep issues with mkelfimage that looks like they need to be fixed
for it to survive long term.   The current bug with kernel_alignment was caused
by not initializing the kernel parameters like the normal kernel does.  I think
that needs to be fixed, but I'm not going to have time to look at that for a
little while yet.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linux-debug.S
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100520/852b839c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linux-debug.c
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100520/852b839c/attachment.c>

More information about the coreboot mailing list