grub-devel
[Top][All Lists]
Advanced

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

Re: Wrong format of kernel.img if build on Cygwin (was: no subject)


From: Christian Franke
Subject: Re: Wrong format of kernel.img if build on Cygwin (was: no subject)
Date: Thu, 02 Sep 2010 15:43:20 +0200

lode leroy wrote:
>      I tried compiling grub from bzr on cygwin.
> 
> grub-mkimage failed with the following error:
> 
> ~/grub/build/grub-core $ ../grub-mkimage -v -O i386-pc -d . -o
> core.img biosdisk part_msdos fat ntfs
> ../grub-mkimage: info: getting the size of ./biosdisk.mod.
> [...]
> ../grub-mkimage: info: getting the size of ./kernel.img.
> ../grub-mkimage: error: invalid ELF header.
> 

In the past (1.98), kernel.img was a raw binary. Now it is an ELF file
which requires extra conversion if build on Cygwin.

I will provide a patch to fix Cygwin build for 1.99.


> I found that the problem can be solved by replacing the following
> line in the Makefile
> 
> strip -v -R .rel.dyn -R .reginfo -R .note -R .comment  -o kernel.img
> kernel.exec.exe
> 
> by
> 
> strip -Felf32-i386 -v -R .rel.dyn -R .reginfo -R .note -R .comment 
> -o kernel.img kernel.exec.exe
>

Did the core.img actually work as expected then?


Thanks for the problem report.

-- 
Regards,
Christian Franke






reply via email to

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