depletionmode wrote:How do I convert my flat kernel into this format?
I'm thinking about it. Meanwhile you can use following boot sequence: your boot loader -> GRUB Legacy (or GRUB 2) in Linux kernel format -> your kernel in ELF format (with short Multiboot header).
File lnxgrub.bin from archive is a complete stage2 of GRUB Legacy. You can use it right now. Just edit boot disk number (offset 0x260), boot partition number (offset 0x261, use value 0xFF for whole disks), config file name (offset 0x617, it's zero-terminated string) if it is need. I used following command to build this image:
Code: Select all
mkimage -d 0x80,0 ldgrub.bin stage2 lnxgrub.bin
File lnxgrub2.bin from archive is a core of GRUB 2. To use it you should put additional modules and other files into /boot/grub/i386-pc (you can find a minimal file collection in sys-grubldr-2.13-compact-add.zip). You can edit boot disk number and boot partition number in same way as mentioned above. But config file name is fixed: /boot/grub/grub.cfg. I used following command to build this image:
Code: Select all
copy /b lnxboot.img+core.img lnxgrub2.bin
Project loadbin contains ldgrub2.bin too but I should check this file first to include it into loadbin-0.1-bin-win32-patched.zip.
Edited. Links deleted.
If you have seen bad English in my words, tell me what's wrong, please.