I recently got back into osdev'ing. But I looked at my code and realised it was a big mess. So i started from scratch, copying what useful functions I had written into the new one. Then comes the horror...
I did not change the build script, only the files it compiles. Nothing else. Yet for some reason...
Code: Select all
Blackcomb Codename LikeOS
By Nikolaus Rangos 0x118: Direct colour, 1024x768x24
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
Error 8: Kernel must be loaded before booting
grub> kernel /boot/kernel.bin
Error 25: Disk read error
grub>
Linker script:
Code: Select all
OUTPUT_FORMAT("elf32-i386")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys)
{
code = .;
*(.text)
*(.rodata)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}
Code: Select all
mkdir -p tmp/boot/grub
cp grub/stage2_eltorito tmp/boot/grub/
cp output/kernel.bin tmp/boot/
cp grub/menu.lst tmp/boot/grub/
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o output/disk.iso tmp
Code: Select all
qemu -hda output/hdd.vmdk -m 32 -cdrom output/disk.iso
What's the problem? I have the kernel.bin and disk.iso if it helps. Also note that it doesn't work in whichever emulator I try, neither does it work on real hardware.
Relevant files:
https://dl.dropbox.com/u/20627716/disk.iso
https://dl.dropbox.com/u/20627716/kernel.bin