ARM Linux、Android、RaspberryPiでWindowsとアプリをX86エミュで動かそう

1

x86 Emulation on ARM devices,and Wine on ARMhf ExaGear-Desktop

１、 自己紹介 Self introduction
２、x86 Emulation on ARM devices
３、Qemu i386 Emulation on ARM devices
4、x86 Emulation on ARM Andriod
5、x86 Emulation on ExaGear-Desktop & Wine
1 board PC, and ARM Chromebook
６、x８６ Emulation on ExaGear-Desktop & Wine
ARM RspberryPi, RaspberryPi2
7, x86 Emulation on DOSBox and Bochs
8, x86 Emulation on Qemu-user-static
NetBSD Teokure Live Imagedebootstrap and schroot
On chromebook
9, Next My Presentations OSC Nagoya,
This Presentation:
Taiwan MOPCONOSC Hamanako2016
2016/1/23 14:30~
Place：浜松 Hamamatsu
浜松市市民協働センター 2F ギャラリー

Slideshare & PDF files
publication of my HP
http://kapper1224.sakura.ne.jp

Speaker：Kapper

2

Self Introduction●

My name: Kapper●

Twitter account：＠kapper1224●

HP：http://kapper1224.sakura.ne.jp●

Slideshare: http://www.slideshare.net/kapper1224●

My Hobby：Linux、*BSD、and Mobile ARM Devices●

My favorite words：Record than experiment important●●

Test Model：Netwalker(PC-Z1,T1)、Nokia N900、DynabookAZ、RaspberryPi
Nexus7(2012、2013)、Hercules eCAFE EX HD、Jetson TK-1、
OpenPandora、ARM Chromebook、ZTE OPEN C（FirefoxOS）
台湾Android電子辞書 無敵CD-920、CD-928
Recent Activity：
Netwalker on the Linux from Scratch.
Hacking of Android Nexus7.
I have recently often use the ARM Chromebook.

Recent test

こんな事やってます3

1.Linux distributions on Android

2. Hacking with SmartWatch

3. Windows and Wine on ARM

4. Plesentations in Asia(HongKong,Taiwan)
Opensouce Conference

4

今回のテーマ●This Presentation

今回はマニアックにARMからx86をエミュレート
To emulate the x86 from ARM devices●RaspberryPiやARM ChromebookでもWindows
Windows on RaspberryPi and ARM Chromebook●古いアプリや環境をARMでも再現

Operation the old Windows apps and OS on ARM●

LinuxZaurusやNetwalkerなどの12年の経験のまとめ
I put together my 12 years of experience about ARM Linux●

処理速度が上がれば色々と・・・実現出来るかも？

I can be variously realized if rises ARM processing speed?
●

海外で発表する資料と共有する為に一部英語で作っています。
ご了承願います。
I am made presentation materials in English in order to sharecontent and information for oversea presentations.
Please understand.

Target ARM devices on PC Market$1000

MacPCWindowsPC

GoogleGlassApple
Watch

$500

$200

SmartWatch

ChromeBox
Android Stick１board PC
RaspberryPi$100

Desktop PCMacbookiPhoneiPadAndroid
SmartPhone

Windows
Notebook PC

AndroidWindows
TabletChineseTablet

Chromebook$149~$350

Mobile PC

0 inch6 inchDisplay Size

10 inch5

ARM devices Benchmark score
98765
43210

ARM Cortex-A roadmap

Estimation

The same frequency
Relative single

1.0GHzCortex-A8

thread performance

1.6GHzCortex-A9

1.9GHzCortex-A15

2.2GHzCortex-A57

2.5GHzCortex-A72

Reference：A Walk Through the Cortex-A Mobile Roadmap
http://community.arm.com/groups/processors/blog/2013/11/19/a-walk-through-the-cortex-a-mobile-roadmap

ARMdevices BOINC benchmarkx86ARM

Reference：Kapper blog

7ｘ86 Emulation
on ARM Linux Devices

8In 2004,Windows95 on ARM LinuxZaurus●●●I was operated in the bochs
emulator the Windows95
using the first ARM LinuxZaurus in Japan in 2004
ARM LinuxZaurus wasemulated x86 about 486
20MHz on Xscale 400MHz.
My Website documentations
Linux Zaurus上でBochs、Win95を動かす方法について
About the method of using Bochs and Win95 on Li
nux Zaurus

My ARM LinuxZaurus●In 2004, ２ｃｈ board, ARM LinuxZaurus Emulator
http://pc5.2ch.net/test/read.cgi/mobile/1074209920/
221 ：いつでもどこでも名無しさん：04/03/26 13:14 ID:???
Bochsを使ってZaurusでWindows95を起動してみました。
ただ、今の所では凄く遅いです。
起動に10分以上、マイコンピュータを開くのに30秒ほど掛かりますが、思ったほど遅くは無いようです。
気が長い人なら気合いで使えるかもしれません。
とりあえず設定等を最適化してみようと思います。
まともに使うならDOSかWindows3.1で運用するのが良いかと。
とりあえずDOS端末として使ってみる事にします。
225 ：いつでもどこでも名無しさん：04/03/26 20:07 ID:???
>>222,223
昔PC9801FAで９５を動かした時はもっと遅かったので。
Pen266MHｚ位でBochsを動かしたのと似たような動作です。
bochsの体感速度はベンチ取れないので表現しにくいです。
>>224
元々DOS世代のユーザーなんで。
200LXのソフトを動かしたり、アプリを動かしていましたから。

Win95 on bochs/XQt LinuxZaurus

MSDOS on bochs/XQt

ｘ８６ Emulations on ARM Devices9VMWare and Virtualbox are not working on ARM devices.(Only x86)
Emulation

OS

Qemu

LinuxAndroid
RaspberryPi
LinuxAndroid
RaspberryPi
Linux
RaspberryPi
Linux
RaspberryPi
LinuxAndroid
RaspberryPi
iOS,DS,PSPLinux
Android
RaspberryPi
iOS,PSPLinuxAndroid
RaspberryPi
iOS

Qemu+Wine
Exagear-Desktop
Exagear-Desktop+Wine
DOSBoxBochs

XNP2（PC-98
Emulation）

Root
DeviceNo

Emulated OS

Spec

Comment

Windows
MacOSX?
Linux,*BSD
Required +Windows APP

Slow

Required Ubuntu,Debian

Fast

Required Ubuntu+Wine
Windows APP
No
DOS,WIndows9x(i386〜i586）

Fast

No

Windows〜XP(i386〜x86-64)
Linux,*BSD

SlowTegra K-1⇒PenⅡ 266MHz
Ver1.5〜(ARM GUI)
Difficultkernel 3G/1G only
chroot environment
Tegra K-1
⇒Pen4 1.8GHz
Tegra K-1
⇒Pen4 1.8GHz
Tegra K-1
⇒PenⅡ 266MHz
NEON Supports
Voodoo1+Glide
Tegra K-1
⇒PenⅡ 266MHzNoDOS、Windows95？

Slow

Slow

Slow

Tegra K-1⇒？

Internet dogmatic investigation of Kapper (if I wrong it, I'm sorry. )x８６ Qemu Emulation on ARM devices

10●●You can use the x86 emulator will be like can be moved andWine Windows apps and Steam and Skype.
The x86 emulator also works such as Windows and NetBSD.
TegraK-1 in Using Qemu Pentium2 266MHz equivalent Win98
is in HDBench, it was to use and Pentium4 1.8GHz equivalent
to ExaGear-Desktop.

In ARM Devices,Qemu isｘ86：ARM=３：１(proportional to the floating point?)
40,000●35,00030,00025,00020,00015,00010,0005,000
035,526
Qemu
WIndows2000
HDBench

ARMx86floating point MIPS (Whetstone) per CPU
integer MIPS (Dhrystone) per CPU

BOINC Bench
ARMx86

Windows98、2000 on chromebook

12,1191,301
Cortex-A15
Tegra K-1
2.1GHzAcer Chromebook13
Qemu Win2000
HDBench4.6.1

4,062Core i5-2540M
2.60GHz
CF-S10
Qemu Win2000
HDBench4.6.1

6,118914
Cortex-A15
Tegra K-1
2.1GHzAcer Chromebook13
BOINC Benchmarck

8,064
2,941
Core i5-2540M
2.60GHz
CF-S10
BOINC Benchmarck

NetBSD Teokure Live Image
On chromebook

x86 Emulation on Android

11

You can operate the Windows or NetBSD by theuse of Android even x86 emulation●
PC: Bochs,Qemu,DOSBox,Linbo PC emulation
MAC:vMacMini●
In the case of Qemu、Windows and NetBSD, andthe others operation.
●Windows9x、2000(Qemu) on Nexus7

NetBSD Teokure Live Image(Qemu) on Nexus7

x86 Emulation on ExaGear-Desktop
1 board PC, and ARM Chromebook●ExaGear-Desktop is 4.5 times faster than qemu.

●i686 Ubuntu12.04LTS on ARMhf Ubuntu 14.04,12.04●●

Boinc Benchmarchs:@ ARM Chromebook CB5-311 TegraK-1
Integer points (ARMhf Base) : 6118 ⇒ (i686): 1800
29.4%
Flotings points (ARMhf Base) : 914 ⇒（i686): 700
７６.６%
about Pentium4 1.8GHz on ARM.(Qemu =Pentium2 266MHz)
Windows applications on Wine, on ARM devices.
Touhou(Wine) on ARM Chromebook

Bonanza(Wine) on ARM Chromebook

12x86 Emulation on ExaGear-Desktop
ARM RaspberryPi, RaspberryPi2●

ExaGear-Desktop RaspberryPi is 5 times faster than Qemu.

●i386 Debian7Wheezy on ARMhf Raspbian,Ubuntu14.04,Debian7●●

13HDBench Benchmarchs:@ ARM Raspberry Pi2
Integer points (ExaGear i686) : ７５８６ (Qemu i386: 1999 26.4%)
Flotings points (ExaGear i686) :６２２4 (Qemu i386: 384 6.2%)
about MMX Pentium 200MHz on ARM. (Qemu =Pentium 40MHz?)Windows applications on Wine, on ARM devices.

HDBench3.40(Wine) on ARM RaspberryPi2

Maujan(Wine) on ARM RaspberryPi2

x86 Emulation on DOSBox and Bochs

14●DOSBox can operate 〜Windows9x in the i386〜i586 emulator
DOSBox has been ported MobileOSs, about Android, iOS,WindowsMobile, Blackberry, PSP, Vita, 3DS and others.
It is a way to activate the img file in the DOSBox command line
imgmount c hd0.img -size 512,63,16,1021 -fs fat
boot -l c●Bochs will start once 〜WindowsXP is now supports up to i686〜
x86-64.（But too slow)

DOSBox on Android Wearhttps://youtu.be/GZx-LJH5J_I

DOSBox on iOS
https://www.youtube.com/watch?v=ZgX2BkM_6q4

DOSBox on 3DS

x86 Emulation on DOSBox and bochs

15●Old apps and emulator works with DOSBox●Old MacOS、ｔhe OtherOS and APP opereted any ARM devices●DOSBox SVN build can run CD-ROM boot and operate i386Linux?

●To high-speed operation x86 emulator is in RaspberryPi

HP200LX APP on DOSBox
http://masaland.cocolog-nifty.com/blog/2012/10/nokiahp200lx-c1.html

Mini vMAC on DOSBox

Simcity2000 on DOSBox

●x86 Emulation on Qemu-user-static
debootstrapandschroot
Using Qemu and schroot to operate the x86 environment on ARM●

Qemu-i386-static and binfmt-support, you can operate x86 app●

Install schroot and debootstrap in ARM Debian,Ubuntu.

16#sudo -s#apt-get install debootstrap schroot binfmt-support qemu qemu-user-static#cp /etc/schroot/schroot.conf /etc/schroot/schroot.conf.old#mkdir debian_i386_wheezy#debootstrap --foreign --arch i386 wheezy debian_i386_wheezy
http://ftp.debian.org/debian/#cp /usr/bin/qemu-i386-static debian_i386_wheezy/usr/bin
x86 Wine#chroot debian_i386_wheezy /debootstrap/debootstrap --second-stage#apt-get update && upgrade#apt-get install (x86 app)
Linux
#exit
(x86 Chroot)#（Edit /etc/schroot/schroot.conf）
Linux(ARM base)#schroot -c debian_i386_wheezy●●

Debian supports multi-lib,but doesn't support multi-binary. If you
use 「apt-get install ＊:i386」command,overwrite the x86 binary on
the ARM binary(/usr/bin).So Qemu requires chroot environment.
Wine only works with normal user. Wine doesn't work withsuperuser account. So you have to use the schroot command.

RaspberryPi2+Qemu-i386-staticWine patch for 2G/2G kernel

17Next My Presentation
OSC Nagoya、Kyoto、Taiwan MOPCON

18

OSC Nagoya Kyoto、and Taiwan MOPCON
my exhibition schedule●Content:OSC Nagoya:Hacking of Android？
:OverSea:Hacking with ARM devices●FOSSASIA2016 Singapole 3/18〜20
OSC Nagoya 5/28
HongKong OSC 6/M？
OSC Kyoto 8/E？
Taiwan COSCUP 8/M？
KOF(Kansai Open Forum) 11/?
Taiwan MOPCON 10/E？
●●・・・And Tokaido Linux Users Group