qemu.rst 2.72 KB
Newer Older
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
1
2
3
4
5
6
7
8
9
10
11
12

.. _qemu:

QEMU
====

There's an experimental QEMU image available that includes:

- phosh: phone graphical shell
- Common apps: geary, ephiphany, contacts, calls
- phone / network services: NetworkManager, ModemManager, ...

13
14
Linux Environments
------------------
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
15

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
16
1. Open the Jenkins job building QEMU images on the CI server: https://arm01.puri.sm/job/Images/job/Image%20Build/
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
17

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
18
2. Find the latest successful build which has the description *qemu-x86_64 image*, e.g. https://arm01.puri.sm/job/Images/job/Image%20Build/172/ . The number at the end of the URL is the build number, in this case ``172``.
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
19

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
20
3. Download the build artifact called ``qemu-x86_64.img.xz``. For the build numbered ``172``, it's at the following URL::
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
21

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
22
23
24
		wget https://arm01.puri.sm/job/Images/job/Image%20Build/172/artifact/qemu-x86_64.img.xz

4. Decompress it::
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
25
26
27

        unxz qemu-x86_64.img.xz

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
28
5. Run it::
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
29

30
        qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.img,format=raw -vga virtio -display sdl -m 1G -enable-kvm
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
31
32
33
34
35
36

   If you prefer a GUI:

        - install org.gnome.Boxes from flatpak: https://flathub.org/apps/details/org.gnome.Boxes
        - Create a new Box from archive selecting qemu-x86_64.img

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
37
6. Use it
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
38
39
40
41

.. image:: librem5fromqemu.gif
   :alt: QEMU VM running phosh and default apps

42
43
Microsoft Windows
-----------------
44

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
45
46
47
1. Open the Jenkins job building QEMU images on the CI server: https://arm01.puri.sm/job/Images/job/Image%20Build/

2. Find the latest successful build which has the description *qemu-x86_64 image*, e.g. https://arm01.puri.sm/job/Images/job/Image%20Build/172/
48
   
Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
49
3. Save the build by right-clicking on the file called ``qemu-x86-64.img`` and choosing "Save As".
50

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
51
4. Choose a folder on your computer with 4gb of free space.
52

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
53
5. After the download is complete, extract the file with 7zip or other untar program.
54

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
55
6. Open an instance of PowerShell and navigate to the extracted file's folder.
56

Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
57
7. The following command can be executed in PowerShell after modifying the path to the qemu
58
   executable and the path to the downloaded qemu-x86-64.img file.::
59

60
         C:\Program Files\qemu\qemu-system-x86_64.exe -drive file=c:\downloads\qemu-x86_64.img,index=0,media=disk,format=raw -vga virtio -display sdl,gl=off -m 2G -L Bios -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name PureOS -no-reboot
61

62
63
64
7. Note: You may also download and modify the following PowerShell script for your environment. The file
   can executed on the command line, or by right-clicking launch-librem5.ps1 file from file explorer. The script is
   fully commented to explain the command line variables that are used.
65

66
67
68
PowerShell script: :download:`launch-librem5.ps1 <launch-librem5.ps1>`

Resources
Guido Gunther's avatar
Guido Gunther committed
69
---------
Alberto Fanjul Alonso's avatar
Alberto Fanjul Alonso committed
70
71

- repo: https://source.puri.sm/Librem5/image-builder