Difference between revisions of "QEMU Nokia N900 (qemu-rx51)"

From postmarketOS
Jump to: navigation, search
(Created page with "With 4.6 kernel, Pali's patch to mmc ( https://github.com/pali/linux-n900/commit/eb080ecdcfc5868d8e36d0f5f42d9cb7f13b4db9 ) and right config with command line inside, qemu wor...")
 
m (wiki formatting)
Line 1: Line 1:
With 4.6 kernel, Pali's patch to mmc ( https://github.com/pali/linux-n900/commit/eb080ecdcfc5868d8e36d0f5f42d9cb7f13b4db9 ) and right config with command line inside, qemu works for N900 emulation, including running Weston.
+
With 4.6 kernel, [https://github.com/pali/linux-n900/commit/eb080ecdcfc5868d8e36d0f5f42d9cb7f13b4db9 Pali's patch to mmc] and right config with command line inside, qemu works for N900 emulation, including running Weston.
  
 
I'm using this config option to configure kernel:
 
I'm using this config option to configure kernel:
  
CONFIG_CMDLINE="console=ttyO2,115200 console=tty root=/dev/mmcblk1p2 rootdelay=5 no-omap-wd no-ext-wd console=tty0 nokia-modem.pm=1 1 single"
+
CONFIG_CMDLINE="console=ttyO2,115200 console=tty root=/dev/mmcblk1p2 rootdelay=5 no-omap-wd no-ext-wd console=tty0 nokia-modem.pm=1 1 single"
  
 
And this script to prepare image / run it:
 
And this script to prepare image / run it:
  
 +
<syntaxhighlight lang="python">
 
#!/usr/bin/python
 
#!/usr/bin/python
  
Line 33: Line 34:
 
r = Run()
 
r = Run()
 
r.run()
 
r.run()
 +
</syntaxhighlight>
  
 
Special qemu version with n900 support is likely needed.
 
Special qemu version with n900 support is likely needed.

Revision as of 17:24, 5 November 2017

With 4.6 kernel, Pali's patch to mmc and right config with command line inside, qemu works for N900 emulation, including running Weston.

I'm using this config option to configure kernel:

CONFIG_CMDLINE="console=ttyO2,115200 console=tty root=/dev/mmcblk1p2 rootdelay=5 no-omap-wd no-ext-wd console=tty0 nokia-modem.pm=1 1 single"

And this script to prepare image / run it:

#!/usr/bin/python

import os
import time

def cmd(f):
    os.system(f)

class Run:
    def __init__(m):
        m.qemudir = "/data/l/maemo/qemu/"
        m.pmb_tmp = "/data/tmp/pmbootstrap"
        m.boot = m.pmb_tmp+"/chroot_rootfs_nokia-rx51/boot/"
        
    def run(m):
        # kernel = m.boot+"vmlinuz-postmarketos-dtb"
        kernel = "/data/l/linux-n900/arch/arm/boot/zImage-dtb"
        cmd("%s/qflasher -m rx51 -x %s/xloader-qemu.bin -s %s/secondary-qemu.bin -k %s -o n900.img -p k=16072" %
            (m.qemudir, m.qemudir, m.qemudir, kernel))

        #time.sleep(10)
        os.system("%s/qemu-system-arm -s -M n900 -mtdblock n900.img -sd /data/tmp/pmos.img -serial stdio -clock unix -redir tcp:5555:10.0.2.15:22" %
                  m.qemudir)

r = Run()
r.run()

Special qemu version with n900 support is likely needed.