tolgacakiroglu wrote:Hi guys.
I wonder how to write an operating system for example HTC devices which runs Android or iPhone. Probably, that phones hardware must be same.
Not even close. Every ARM SOC is completely different. Sure, all SOCs from, say, Texas Instruments may use the same peripherals, but they're at different addresses, attached to different VIC lines, and so on.
Because on iPhone, people runs Android. Not all features are supported but it works.
People have specifically added support for the iPhone's hardware
I was working on writing x86 OS so many years ago. Now, I wonder how to write for that devices. Where can i find resources and also if possible a simulator?
Thank you.

For documentation on a shipping phone, umm, good luck. Your best bet is probably something running Android or Maemo, as they're open source so you at least have Linux for reference. For everything else (And even then) there will be lots of reverse engineering involved.
For simulators there are things like Skyeye.
For recommended development hardware, I'd choose either a HawkBoard or BeagleBoard. The BeagleBoard is significantly more powerful, and more popular, so better documented.
Oh yeah, and important note: You will probably
never get the actual cellular hardware working. There is absolutely no documentation on that available.