MIPS Hello World Bootloader

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Nathan
Member
Member
Posts: 201
Joined: Sun Jul 19, 2009 1:48 pm
Location: Brazil
Contact:

MIPS Hello World Bootloader

Post by Nathan »

Hello,
I'm learning MIPS Assembly by the book MIPS Assembly Language Programming, but my I've just started learning MIPS because I want to build a MIPS OS, but now as I can see, there isn't many documentation(I that isn't any) talking about boot and these things. Then I'm asking here for someone that have already done this to point me at the right place.

Best Regards,
Nathan Paulino Campos
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: MIPS Hello World Bootloader

Post by Selenic »

One thing to remember here is that there is a major distinction between architecture and platform (of which architecture is one aspect), and boot loaders are *platform* specific - consider a new Apple and a new PC-compatible. They both use the x86 or x86-64 architectures, but the platform is somewhat different, and they use different boot methods (EFI and MBR for Apple and PC respectively)

Non-x86 architectures do not have a single common platform - look at the QEMU documentation, and note what it says about x86 support and how much about ARM support (for example) - the latter lists a lot of platforms it can emulate. This is where your problem is: you need to find a specific MIPS platform to develop your bootloader for; the detail on the wiki here is only possible because most computers which an average OSDever is expected to have programming access to use the PC platform.
User avatar
inx
Member
Member
Posts: 142
Joined: Wed Mar 05, 2008 12:52 am

Re: MIPS Hello World Bootloader

Post by inx »

Selenic is right that you need to choose a platform. For MIPS, I would recommend the ARC standard that was used for Windows NT systems. Qemu supports the emulation of these systems, as does GXEmul (a more in-depth emulation suitable for debugging, somewhat like Bochs). I doubt you're going to find much documentation on them, so I would recommend looking through the NetBSD source, as it's relatively easy to follow, and includes a very easy to understand bootloader, and reading the qemu/gxemul source itself, as that can fill in any holes in your understanding from the opposite angle.
User avatar
Nathan
Member
Member
Posts: 201
Joined: Sun Jul 19, 2009 1:48 pm
Location: Brazil
Contact:

Re: MIPS Hello World Bootloader

Post by Nathan »

I want to develop a OS for this one ;)

Now someone can help?
User avatar
mutex
Member
Member
Posts: 131
Joined: Sat Jul 07, 2007 7:49 pm

Re: MIPS Hello World Bootloader

Post by mutex »

Hi,

I dont know how important it is for you to use this board.

There is another board called "Beagleboard" that is very well supported with manuals, reference designs, howtos etc.

Basically its a ARM Cortex processor. This board has a bootloader already installed so you can download your kernel and get going easily.

The beagleboard has options to boot kernel file from mmc (memory card), serial, flash etc. So its easy for you to try out.

http://beagleboard.org/hardware

I guess you probably could find some of the same for this router-os board, but my recomendations is to go with a board that has support for it for the actual things you want to do. Since you dont want to just install and os on the device, but actually do some low-level programming then i suggest the beagleboard.

Maby if you look into the routerOS system there is a bootloader you can use from there so that you can compile your kernel on your pc and just upload it to a memory card or something. Unless this is possible i think you will use alot of time on booting, and not actual development of your kernel.

Edit; Of course this ARM is not compatible with MIPS.. i forgot to mention that..

regards
Thomas
Post Reply