Skip to contentSkip to conversation

Way to combine kernel and initrd on x86 platform?

DISCUSSION Subodh Nijsure 2 participants 4 messages Jul 22, 2009 – Jul 23, 2009

lore
Share & tools
lore
#0 lore raw

I have been using the arch/powerpc/boot/wrapper scripts to combine linux and initrd.gz to create a single image for distribution.

Is there similar wrapper possible for x86 platforms also? This is my first week of working on x86 embedded platform.

I know of initramfs option in 2.6 kernel, however the contents of initrd in my case are created after the kernel is build i.e. will have to "patch in" the initramfs at later point in build process.

/Subodh

#1 lore raw
Quoted 9 lines · Subodh Nijsure

I have been using the arch/powerpc/boot/wrapper scripts to combine linux and initrd.gz to create a single image for distribution.

Is there similar wrapper possible for x86 platforms also? This is my first week of working on x86 embedded platform.

I know of initramfs option in 2.6 kernel, however the contents of initrd in my case are created after the kernel is build i.e. will have to "patch in" the initramfs at later point in build process.

If your bootloader can support ELF, Multiboot, or NBI, you can use Wraplinux:

http://www.kernel.org/pub/linux/utils/boot/wraplinux/

bzImage support would be possible, but it isn't in this version (noone has asked for it).

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
#2 lore raw
Quoted 11 lines · H. Peter Anvin

On 07/22/2009 02:15 PM, Subodh Nijsure wrote:

If your bootloader can support ELF, Multiboot, or NBI, you can use Wraplinux:

       http://www.kernel.org/pub/linux/utils/boot/wraplinux/

bzImage support would be possible, but it isn't in this version (noone has asked for it).

Sorry if I am not being very smart here, confused by the remark " bzImage support would not be possible"

I was able create wrapped image using command

wraplinux -p "console=ttyS0,115200" -i initrd.gz -o vmlinux.initrd.wrap arch/i386/boot/bzImage

I am using wraplinux version 1.6

if I use any other image wraplinux doesn't find the version information and initrd image doesn't get attached.

What file should I be specifying as the 'kernel' when I execute wrapimage if not the bzImage?

( I am working with 2.6.23 kernel)

On my board I can boot the standard bzImage, but not able to load the wrapped image produced by wraplinux command. Would very much appreciate hints...

Regards,
/Subodh

Quoted 7 lines

       -hpa

--
H. Peter Anvin, Intel Open Source Technology Center I work for Intel.  I don't speak on their behalf.

#3 lore raw
Quoted 14 lines · Subodh Nijsure

Sorry if I am not being very smart here, confused by the remark " bzImage support would not be possible"

I was able create wrapped image using command

wraplinux -p "console=ttyS0,115200" -i initrd.gz -o vmlinux.initrd.wrap arch/i386/boot/bzImage

I am using wraplinux version 1.6

if I use any other image wraplinux doesn't find the version information and initrd image doesn't get attached.

Quoted 9 lines

What file should I be specifying as the 'kernel' when I execute wrapimage if not the bzImage?

( I am working with 2.6.23 kernel)

On my board I can boot the standard bzImage, but not able to load the wrapped image produced by wraplinux command. Would very much appreciate hints...

What I mean is that Wraplinux accepts bzImage as input and outputs ELF, NBI or Multiboot. Depending on the bootloader on your board, you may need to select one or the other of these formats, or might not be able to at all. It does not *output* bzImage, and it isn't 100% trivial to make it do so.

-hpa