Random mumblings of ARM/AArch64 developer.

Nokia N8x0 emulation part II

My previous post about Nokia N800 tablet emulation became one of popular ones. On LinuxTag I shown Maemo booting in QEmu and it was met with nice response from community. But the problem remained — how to boot it when config.mtd which I used was not distributable…

Yesterday I solved that part. After studying how Maemo boots and why does QEmu restarts with wrong config.mtd I grabbed that partition from my N810 and tried again. This time OS2008/Chinook booted fine :)

What is needed? Tablet needs to have “no-lifeguard-reset” flag set. IT can be done by using flasher as this is one of R&D flags. I had it set on my N810 because I did experiments with booting from internal SD card in past.

Thanks to Faheem Pervez (more widely known as “qwerty12″) who sent me config.mtd dumps (without R&D and with “no-lifeguard-reset”) from his N800 I was able to confirm that this is all what is needed.

Next step will be updating qemu to more recent revision to get N810 emulation (which is present in HEAD) and getting Diablo booted.

UPDATE: Diablo booted on emulated N800 and N810:

Nokia N810 emulation is more useful as there is a keyboard attached so no need for use of onscreen input methods. There are some things to remember anyway:

Alt(Gr) behave like Fn (with sticky status)

no CapsLock (but Shift works like on N810 so no big loss)

no numeric row — to get “5” press “Alt+t” like on N810

some of other keys are also in weird places

Right Shift does not work (N810 has 2 Left Shifts)

NOTE: This is QEmu HEAD — no extra patches were needed to boot Chinook on emulated N800. To boot Diablo “hw/nseries.c” file needs to be edited to change partition info (initfs is twice as big compared to Chinook).

Extremely neat. I wonder if this would make an extra sbrsh target for scratchbox or even more; a better way to test sw besides arm targets and actual device. You might be able to make the jump from that to semi-automatic install/run/test on different software and hardware combinations.

It would all have to get far enough downstream, though. “Get and build qemu head and edit..” would be an annoying extra step in SDK installs :)

@XTL: I hope that one day someone will release normal SDK for Maemo instead of scratchbox stuff which is now used.

Having Maemo in full QEMU emulation is really handy for testing own applications. The way which is used in Scratchbox is insane for me — using emulation which lack full NPTL support so devels gets messages about unhandled syscalls…