ARM Mobile OS Development

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
SpireOSDevTeam
Posts: 4
Joined: Sun Jan 05, 2014 4:20 am

ARM Mobile OS Development

Post by SpireOSDevTeam »

We are planning to launch a mobile version of our operating system (SpireOS) but there isn't a wide range of tutorials/resources on this site. OSDev seems more x86 oriented. We were wondering if we could get some urls for ARM programming. Also, if possible, could the admins maybe make some new pages dedicated to ARM?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: ARM Mobile OS Development

Post by Combuster »

could the admins maybe make some new pages dedicated to ARM
You must have misunderstood the idea of a wiki: if you want to see something in it, add it yourself. :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
SpireOSDevTeam
Posts: 4
Joined: Sun Jan 05, 2014 4:20 am

Re: ARM Mobile OS Development

Post by SpireOSDevTeam »

Btw. We don't want to have to write a tutorial. We're just asking, if possible, to create a series of articles dedicated to ARM. I don't want to force it down anyone's throats, just if anyone is interested.
Last edited by SpireOSDevTeam on Thu Feb 06, 2014 4:24 am, edited 1 time in total.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: ARM Mobile OS Development

Post by iansjack »

You sure know how to make friends and influence people don't you.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: ARM Mobile OS Development

Post by Combuster »

SpireOSDevTeam wrote:Combuster, why are you even on here? You seem so $&@!ing useless.
<Insert demotivational poster image of prince zuko raging at his dead calm uncle here>
How about a cup of calming Jasmine tea?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: ARM Mobile OS Development

Post by iansjack »

We were wondering if we could get some urls for ARM programming.
Are you saying that Google returned nothing?
SpireOSDevTeam
Posts: 4
Joined: Sun Jan 05, 2014 4:20 am

Re: ARM Mobile OS Development

Post by SpireOSDevTeam »

We've never programmed for any ARM system before and we don't really know if it's the same as x86 development. Google returns results such as 'Hello World on ARM'. Not what we had in mind..
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: ARM Mobile OS Development

Post by iansjack »

You're not trying hard enough. Googling "ARM Programming" returns a host of hits, very few - if any - being "Hello world on ARM". The entry on this Wiki for "ARM" gives some useful information, including links to the ARM Programmer's Reference manual.

If you can't do basic research I don't hold out any high hopes for your developing an ARM-based OS. The fact that there are not a huge number of tutorials on this subject should warn you that it is advanced stuff, partially because of the wide variety of hardware platforms. You dont even tell us which platform you are going to develop for.

I'd stick with the x86 stuff, which is relatively standard, for the time being unless you are prepared to do a fair amount more research.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: ARM Mobile OS Development

Post by Bender »

but there isn't a wide range of tutorials/resources
There is your problem. :)
All the people who wrote about x86 on the wiki have used Intel Manual as
a reference. If you really want to port your OS to ARM, ARMARM is probably is best choice.
You sure know how to make friends and influence people don't you.
Well that reply couldn't have been more awesome. 8)
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
User avatar
dmatlack
Posts: 12
Joined: Tue Dec 17, 2013 12:32 am

Re: ARM Mobile OS Development

Post by dmatlack »

I'm (currently) finding ARM System Developer's Guide to be a good introduction to the ARM platform. I don't think it's detailed enough to use as a reference like the Intel manuals are though.
User avatar
Pancakes
Member
Member
Posts: 75
Joined: Mon Mar 19, 2012 1:52 pm

Re: ARM Mobile OS Development

Post by Pancakes »

About the only major stuff I know of in the wiki. Not sure if you have checked it out is:
http://wiki.osdev.org/Category:ARM

I added some stuff and expanded some things. But, basically, for phones it is the same type stuff. The ARM core on a phone is going to start execution at a specific address and this area of memory it starts can be mapped to a ROM chip which would contain the main boot code for loading the rest of the system from whatever storage devices exist such as a SD card.

I would check out QEMU and a port of linux for ARM. The problem is the boot code for each actual device may be different and very hard to find. You know most phones have some sort of security protection to keep you from easily loading a custom ROM. You could get around that by finding an interface directly into a specific phone such as by actually wiring into the phone or directly to the serial (most common) ROM chip. I have done this with x86 ROM chips using an FTDI device/chip and basically bit bang it

Each phone device may boot differently or have a different ROM. So your first goal is actually finding a way to write your own code into the ROM and from there the standard ARM architecture follows. As for the hardware well it is going to be different for each device/phone so your not going to find a one solution works for all devices. But, basically this right here is what keeps you from finding a tutorial out there unless it is written for a specific device.

But, if you can find a way to get your code executed either from start up of the processor or in some way afterward you can get your foot in the door to start experimenting.

ARM is just the processor just like X86/X64 is just the processor. You do not have BIOS on an ARM platform like you do on the X86/X64 platforms, and the BIOS is what gives you that ability to have at least some standard functionality for various hardware from the beginning with out needing specific device drivers. So on ARM you have to talk directly to the hardware from the beginning to get it to do anything.

All these reasons are why there is no standard way or tutorial that works for every device, and the reason many tutorials do not exist. But, starting where Linux starts would be a good start to trying to target a lot of devices since you could just leverage their existing boot process, but like I said you have to find a way to write to the storage device to put your own kernel in there (even if its not a Linux kernel).

<edit>
Just to give you an example. I have a Samsung SCH-i510 Droid Charge 4G LTE which runs on an Samsung S5PC111 Exynos 3110 which is a SOC (system on a chip). I am unable to find a datasheet anywhere? I mean if I looked long enough I could find one, but why? Well, Samsung has no need to devote resources to publish the datasheet for their custom SOC. So basically I would have to find the drivers that the Linux kernel is using and then hope they are open source so I can see how they work, and if they are not I would be left having to reverse compile the binary code to find out how they worked. Then, I have to find a way to root the phone so I can modify the kernel with my own, or modify the ROM which initially boots the phone. These steps are difficult as there is likely not any information all laid out nice and neat on how to do this. Now, if I could accomplish this then, yeah, I could write an OS or port my hopefully simple OS to run on it with custom drivers to work with the display, storage device, and everything else. But, I am going to have to repeat this process for almost every phone out there. Now, a lot of phones might be similar by Samsung so I might be able to use the same technique on a few of them, but that requires actually having the devices to actually test and tweak it.

Writing a OS for x86 is already hard because you have to write a device driver for just about every piece of hardware, but now you take a phone/tablet/device and it is kind of like writing a driver for each device.

I think picking up where Linux starts is really a great solution, but the fact that each device out there uses some type of protection to keep you from easily replacing the kernel is creating the biggest hurdle because each user would have a different series of steps and that in conjunction with the ability to brick the device makes it even harder. It would be nice if device makers made an easy way to upload ROMs or kernels with some nice fail safes to recover but that requires support, resources, and time on their part and they have no motivation to do so.

So, that is why you do not see a tutorial for a wide range of devices like you do with the X86/X64 platforms. But, you know if all devices had a system boot menu item to select an arbitrary kernel image then it would make it more like developing for the X86/X64 platforms and you would likely find more tutorials. But, you still have to figure the hardware out! Which would be fun of course!
</edit>
User avatar
Pancakes
Member
Member
Posts: 75
Joined: Mon Mar 19, 2012 1:52 pm

Re: ARM Mobile OS Development

Post by Pancakes »

Do you guys think we need a section or a page in the wiki that might explain this (basically what I said but expanded a bit more, organized, and structured)? I will write it.

I am just not sure exactly where to put it. Perhaps, I could put a small section in http://wiki.osdev.org/ARM_Overview with a summary then link to another page with a more detailed explanation. Or, just put it all in ARM overview?

Or, any other ideas or suggestions?
Post Reply