OSDev.org
https://forum.osdev.org/

Creating kernel.img
https://forum.osdev.org/viewtopic.php?f=8&t=30042
Page 1 of 1

Author:  art6050 [ Tue Feb 02, 2016 5:15 am ]
Post subject:  Creating kernel.img

Hi,

I am trying to build new OS for raspberry according to http://wiki.osdev.org/Raspberry_Pi_Bare_Bones. I did steps until "Booting the kernel" section, I cannot understand what to do.
Quote:
So now we replace the original kernel.img with our own, umount, sync, stick the SD card into RPi and turn the power on

How can I create my own kernel.img file or where can I find it ?

Author:  Nutterts [ Tue Feb 02, 2016 9:34 am ]
Post subject:  Re: Creating kernel.img

If you'd read the tutorial you'd know that kernel.img is what you get after compiling the assembler and C example in it and linking them together. Please read this: http://wiki.osdev.org/Required_Knowledge

The RPi isn't something you'd want to do if you've never tried writing a kernel for i686. First off the documentation for the RPi hardware is sparse and partially wrong. You'll have to figure almost everything out yourself with little to no help. i686 is very well documented with tons of examples and people who could give advice about it in they're sleep.

That said, you'll have quite some RPi example code here: https://github.com/dwelch67/raspberrypi

Something to also keep in mind is that models do not all work the same. The memory mapped peripherals might be at a different address. Also the RPi 2B uses a whole different processor. For the RPi 2B you could look at my old code and take what you need: https://bitbucket.org/nutterts/linloader/src

Edit: If you haven't figured it out in the meantime... rename myos.bin to kernel.img. But trust me, if you can't figure that out by yourself then you shouldn't write a kernel for the RPi. You need to have great problem solving skills.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/