<deleted>
Posted: Mon Aug 31, 2009 6:46 pm
<deleted>
Sounds like you're just outputting a flat binary - I'd bet that the first 1 MB of that file is nothing but null bytes...My binary comes out at 1MB!
Firstly, you shouldn't need sudo... Secondly, targeting 64-bit won't work with the barebones, as GRUB doesn't load a 64-bit kernel.Code: Select all
sudo yasm -m amd64 -f elf -o loader.o loader.s sudo gcc -B x86_64-elf -v 4.3.3 -o kernel.o -c kernel.c -Wall -Wextra -nostdlib -nostartfiles -nodefaultlibs # -Werror ld -T linker.ld -o kernel.bin loader.o kernel.o
Code: Select all
yasm -f elf -o loader.o loader.s
i586-elf-gcc -o kernel.o -c kernel.c -Wall -Wextra -nostdlib -nostartfiles -nodefaultlibs # -Werror
i586-elf-ld -T linker.ld -o kernel.bin loader.o kernel.o
I generally shoot people at my front door, because sometimes they might be bears.Mr.McNugget (aka CJKay) wrote:Also, I use sudo generally in case it suddenly needs it. Qemu, for example, only loads the acceleration layer with sudo.
I think writing Linux viruses could become quite profitable in the futureGenerally, using sudo doesn't kill anything except a couple of calories (typing in the password).
You're probably better off writing your own bootloader and second-stage to load your 64-bit kernel (with whatever paging you require) and jump to it.But about 64-bit?
The bootloader loads a binary from a filesystem (or specific disk layout), and then runs it. So there shouldn't be a need for "extern" in the bootloader.I just wrote a bootloader but restarted because I couldn't figure out how to link the C kernel to the assembly (binary doesn't support extern and what-not).
Have a look on Google for "64-bit OS GRUB" and see what comes upIs there any possible way to make a 64-bit OS with GRUB?
GRUB error 13...
Well, now I get error 13 >~>.
I get the blasted error 13.
Is there something we don't knowit gives error 13.
All the tutorials on this site use the fact that you can, and there are even guides on bootloaders.I couldn't figure out how to link the C kernel to the assembly
Newbie mistake #1: Always demand a tutorial for doing X, with respect to Y and Z notwithstanding A, but not B, demonstrating µ via ß including the kitchen sink. Bottom line: Do you have what it takes to write an OS.You have to search around a lot for a tutorial that fits exactly what you want.