So far, my makefile is giving me .bin files "os-image.bin". Now, I want to make a bootable ISO out of it, is there an easy way to do this ?
Thanks in advance.
BIN to ISO ?
Re: BIN to ISO ?
Hello, dude you can do it in makefile. Just add a target with these commands:
Just remember to setup grub.cfg properly o/
Code: Select all
mkdir -p isodir/boot/grub
cp grub.cfg isodir/boot/grub/
cp your-kernel-name.bin isodir/boot/
grub2-mkrescue -o your-kernel-name.iso isodir/
OS Development is awesome!
|AetherOS Project|
|AetherOS Project|
Re: BIN to ISO ?
I am not using GRUB, I did my own bootloader. Will it work anyway ?
-
- Member
- Posts: 5586
- Joined: Mon Mar 25, 2013 7:01 pm
Re: BIN to ISO ?
Maybe. (Not with grub2-mkrescue, that only works with GRUB.)
You can boot a CD with INT 0x13 floppy disk emulation, INT 0x13 hard disk emulation, or no emulation. With emulation, you can use an existing floppy disk or hard disk bootloader, but you must build a floppy/hard disk image and then put that image into the ISO, and there are some limitations that might make your existing bootloader incompatible.
The wiki page for bootable CDs is here.
You can boot a CD with INT 0x13 floppy disk emulation, INT 0x13 hard disk emulation, or no emulation. With emulation, you can use an existing floppy disk or hard disk bootloader, but you must build a floppy/hard disk image and then put that image into the ISO, and there are some limitations that might make your existing bootloader incompatible.
The wiki page for bootable CDs is here.
Re: BIN to ISO ?
If you're not using GRUB, then you could try to use a cdrom image creator like mkisofs.
https://wiki.osdev.org/Mkisofs
Or if you want a dependency-less solution, you can create the image yourself with a little C code, it isn't that hard. But you have to read the aforementioned El Torito spec very carefully. This is a good doc with byte offset tables. I've choosen this method because I'm creating a hybrid USB stick/GPT/MBR/CDROM/UEFI images in no-emulation mode.
A relatively easy to read example ISO creator in C from FreeBSD's makefs.
Cheers,
bzt
https://wiki.osdev.org/Mkisofs
Or if you want a dependency-less solution, you can create the image yourself with a little C code, it isn't that hard. But you have to read the aforementioned El Torito spec very carefully. This is a good doc with byte offset tables. I've choosen this method because I'm creating a hybrid USB stick/GPT/MBR/CDROM/UEFI images in no-emulation mode.
A relatively easy to read example ISO creator in C from FreeBSD's makefs.
Cheers,
bzt