Commit c65428c6 authored by thiolliere's avatar thiolliere
Browse files

add vexpress-boot in data

parent 974ad6d1
......@@ -15,6 +15,10 @@ matrix:
- python3 -m pip install -r requirements-macos.txt
- python3 -m pip install pyinstaller==3.2.1
# Download pibox-installer-vexpress-boot
- wget http://download.kiwix.org/dev/pibox-installer-vexpress-boot.zip
- unzip pibox-installer-vexpress-boot.zip
# Bundle QEMU
- git clone https://github.com/auriamg/macdylibbundler/
- cd macdylibbundler/
......@@ -79,6 +83,10 @@ matrix:
- QEMU_DIR=qemu-$QEMU_VERSION
- QEMU_ARCHIVE=$QEMU_DIR.tar.xz
script:
# Download pibox-installer-vexpress-boot
- wget http://download.kiwix.org/dev/pibox-installer-vexpress-boot.zip
- unzip pibox-installer-vexpress-boot.zip
# Compile QEMU statically
- wget http://download.qemu-project.org/$QEMU_ARCHIVE
- tar -xf $QEMU_ARCHIVE
......
......@@ -35,9 +35,10 @@ you can read package pibox-installer to get help setting the environment
install dependencies:
* [python3](https://www.python.org/downloads/): version >= 3.4
* [qemu](http://www.qemu.org/download/): version >= 2.8
* [qemu](http://www.qemu.org/download/): version >= 2.8, qemu-img and qemu-system-arm must be present in the directory (symlink or install there)
* [pygobject](https://pygobject.readthedocs.io/en/latest/getting_started.html):
on windows you can also install it using [pygi-aio](https://sourceforge.net/projects/pygobjectwin32/)
* [pibox-installer-vexpress-boot]("http://download.kiwix.org/dev/pibox-installer-vexpress-boot.zip"): unzip in the directory
create a virtual a virtual environment that includes pygobject: `python3 -m venv --system-site-packages my_venv`
......@@ -52,7 +53,7 @@ run CLI application: `python3 pibox-installer/cli.py`
## Build pibox-installer-vexpress-boot
pibox-installer download a linux kernel for the QEMU emulation of vexpress machine.
pibox-installer use a linux kernel for the QEMU emulation of vexpress machine.
This vexpress boot can be compiled on linux using make-vexpress-boot python3 script.
requirements: `gcc-arm-linux-gnueabihf` and `zip`
......
......@@ -19,6 +19,10 @@ install:
- nuget install secure-file -ExcludeVersion
- secure-file\tools\secure-file -decrypt pibox_installer_ci_rsa.appveyor_enc -secret %certificate_secret% -out pibox_installer_ci_rsa
# Download pibox-installer-vexpress-boot
- appveyor DownloadFile "http://download.kiwix.org/dev/pibox-installer-vexpress-boot.zip"
- 7z.exe x pibox-installer-vexpress-boot.zip
# Install pygobject
# pygi-aio provides a way to install from cmd even if it is not documented
# the only package to install is GTK with GIR
......
......@@ -6,7 +6,8 @@ block_cipher = None
a = Analysis(['pibox-installer/__main__.py'],
pathex=['.'],
binaries=[('qemu-system-arm', '.'), ('qemu-img', '.')],
datas=[('ui.glade', '.')],
datas=[('ui.glade', '.'),
('pibox-installer-vexpress-boot', 'pibox-installer-vexpress-boot')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
......
......@@ -9,7 +9,8 @@ block_cipher = None
a = Analysis(['pibox-installer/__main__.py'],
pathex=['.'],
binaries=[("qemu/" + file, '.') for file in files],
datas=[('ui.glade', '.')],
datas=[('ui.glade', '.'),
('pibox-installer-vexpress-boot', 'pibox-installer-vexpress-boot')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
......
......@@ -69,7 +69,8 @@ a = Analysis(['pibox-installer/__main__.py'],
('C:\Program Files\qemu\libgnutls-openssl-27.dll', '.'),
('C:\Program Files\qemu\liblzma-5.dll', '.'),
('C:\Program Files\qemu\libpixman-1-0.dll', '.')],
datas=[('ui.glade', '.')],
datas=[('ui.glade', '.'),
('pibox-installer-vexpress-boot', 'pibox-installer-vexpress-boot')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
......
......@@ -69,7 +69,8 @@ a = Analysis(['pibox-installer/__main__.py'],
('C:\Program Files\qemu\libgnutls-openssl-27.dll', '.'),
('C:\Program Files\qemu\liblzma-5.dll', '.'),
('C:\Program Files\qemu\libpixman-1-0.dll', '.')],
datas=[('ui.glade', '.')],
datas=[('ui.glade', '.'),
('pibox-installer-vexpress-boot', 'pibox-installer-vexpress-boot')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
......
import os
import sys
if getattr(sys, "frozen", False):
data_dir = sys._MEIPASS
else:
data_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
ui_glade = os.path.join(data_dir, "ui.glade")
vexpress_boot_dir = "pibox-installer-vexpress-boot"
vexpress_boot_kernel = os.path.join(data_dir, vexpress_boot_dir, "zImage")
vexpress_boot_dtb = os.path.join(data_dir, vexpress_boot_dir, "vexpress-v2p-ca9.dtb")
......@@ -12,11 +12,7 @@ from util import CancelEvent
import sd_card_list
from util import human_readable_size
from datetime import datetime
if getattr(sys, "frozen", False):
DATA_DIR = sys._MEIPASS
else:
DATA_DIR = ""
import data
class Logger:
def __init__(self, text_buffer, step_label):
......@@ -78,7 +74,7 @@ class Application:
self.catalog = catalog
builder = Gtk.Builder()
builder.add_from_file(os.path.join(DATA_DIR, "ui.glade"))
builder.add_from_file(data.ui_glade)
self.component = Component(builder)
......
......@@ -4,6 +4,7 @@ from backend import qemu
import os
import sys
import shutil
import data
def run_installation(name, timezone, wifi_pwd, kalite, zim_install, size, logger, cancel_event, sd_card, output_file, done_callback=None):
......@@ -19,10 +20,9 @@ def run_installation(name, timezone, wifi_pwd, kalite, zim_install, size, logger
try:
downloader = Downloader(logger)
vexpress_boot_kernel_path, vexpress_boot_dtb_path = downloader.download_vexpress_boot()
raspbian_image_path = downloader.download_raspbian()
emulator = qemu.Emulator(vexpress_boot_kernel_path, vexpress_boot_dtb_path, raspbian_image_path, logger)
emulator = qemu.Emulator(data.vexpress_boot_kernel, data.vexpress_boot_dtb, raspbian_image_path, logger)
if size < emulator.get_image_size():
logger.err("cannot decrease image size")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment