2017-05-26 20:08:45 +00:00
|
|
|
"""
|
2018-01-04 03:53:35 +00:00
|
|
|
Copyright 2018 Oliver Smith
|
2017-05-26 20:08:45 +00:00
|
|
|
|
|
|
|
This file is part of pmbootstrap.
|
|
|
|
|
|
|
|
pmbootstrap is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
pmbootstrap is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
"""
|
2017-08-06 12:50:38 +00:00
|
|
|
import multiprocessing
|
2017-05-26 20:08:45 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
#
|
|
|
|
# Exported functions
|
|
|
|
#
|
|
|
|
from pmb.config.load import load
|
|
|
|
from pmb.config.save import save
|
2017-11-19 15:04:08 +00:00
|
|
|
from pmb.config.merge_with_args import merge_with_args
|
2017-05-26 20:08:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Exported variables (internal configuration)
|
|
|
|
#
|
2018-01-27 17:53:27 +00:00
|
|
|
version = "0.5.0"
|
2017-05-26 20:08:45 +00:00
|
|
|
pmb_src = os.path.normpath(os.path.realpath(__file__) + "/../../..")
|
|
|
|
apk_keys_path = pmb_src + "/keys"
|
|
|
|
|
|
|
|
# Update this frequently to prevent a MITM attack with an outdated version
|
2017-06-08 16:02:00 +00:00
|
|
|
# (which may contain a vulnerable apk/libressl, and allows an attacker to
|
2017-05-26 20:08:45 +00:00
|
|
|
# exploit the system!)
|
2018-01-04 03:49:39 +00:00
|
|
|
apk_tools_static_min_version = "2.9.0-r0"
|
2017-05-26 20:08:45 +00:00
|
|
|
|
2017-10-12 20:08:10 +00:00
|
|
|
# Version of the work folder (as asked during 'pmbootstrap init'). Increase
|
|
|
|
# this number, whenever migration is required and provide the migration code,
|
|
|
|
# see migrate_work_folder()).
|
|
|
|
work_version = "1"
|
|
|
|
|
2017-11-19 15:04:08 +00:00
|
|
|
# Only save keys to the config file, which we ask for in 'pmbootstrap init'.
|
2017-12-21 16:42:29 +00:00
|
|
|
config_keys = ["ccache_size", "device", "extra_packages", "jobs", "keymap",
|
2018-01-08 15:18:37 +00:00
|
|
|
"qemu_native_mesa_driver", "timestamp_based_rebuild", "timezone",
|
2017-12-21 16:42:29 +00:00
|
|
|
"ui", "user", "work"]
|
2017-11-19 15:04:08 +00:00
|
|
|
|
2017-05-26 20:08:45 +00:00
|
|
|
# Config file/commandline default values
|
|
|
|
# $WORK gets replaced with the actual value for args.work (which may be
|
|
|
|
# overriden on the commandline)
|
|
|
|
defaults = {
|
|
|
|
"alpine_version": "edge", # alternatively: latest-stable
|
2017-05-26 20:26:25 +00:00
|
|
|
"aports": os.path.normpath(pmb_src + "/aports"),
|
2017-12-21 16:42:29 +00:00
|
|
|
"ccache_size": "5G",
|
|
|
|
# aes-xts-plain64 would be better, but this is not supported on LineageOS
|
|
|
|
# kernel configs
|
|
|
|
"cipher": "aes-cbc-plain64",
|
2017-05-26 20:08:45 +00:00
|
|
|
"config": os.path.expanduser("~") + "/.config/pmbootstrap.cfg",
|
|
|
|
"device": "samsung-i9100",
|
2017-08-01 15:31:33 +00:00
|
|
|
"extra_packages": "none",
|
2017-12-21 16:42:29 +00:00
|
|
|
# A higher value is typically desired, but this can lead to VERY long open
|
|
|
|
# times on slower devices due to host systems being MUCH faster than the
|
|
|
|
# target device: <https://github.com/postmarketOS/pmbootstrap/issues/429>
|
|
|
|
"iter_time": "200",
|
2017-08-06 12:50:38 +00:00
|
|
|
"jobs": str(multiprocessing.cpu_count() + 1),
|
2017-12-21 16:42:29 +00:00
|
|
|
"keymap": "",
|
2017-05-26 20:08:45 +00:00
|
|
|
"log": "$WORK/log.txt",
|
2017-11-14 19:02:27 +00:00
|
|
|
"mirror_alpine": "http://dl-cdn.alpinelinux.org/alpine/",
|
2017-11-19 15:04:08 +00:00
|
|
|
"mirror_postmarketos": "http://postmarketos.brixit.nl",
|
2017-05-26 20:08:45 +00:00
|
|
|
"port_distccd": "33632",
|
2018-01-08 15:18:37 +00:00
|
|
|
"qemu_native_mesa_driver": "dri-virtio",
|
2017-12-21 16:42:29 +00:00
|
|
|
"timestamp_based_rebuild": True,
|
|
|
|
"timezone": "GMT",
|
2017-07-24 20:55:55 +00:00
|
|
|
"ui": "weston",
|
2017-10-12 20:08:10 +00:00
|
|
|
"user": "user",
|
2017-12-21 16:42:29 +00:00
|
|
|
"work": os.path.expanduser("~") + "/.local/var/pmbootstrap",
|
2017-05-26 20:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# CHROOT
|
|
|
|
#
|
|
|
|
|
|
|
|
# Usually the ID for the first user created is 1000. However, we want
|
|
|
|
# pmbootstrap to work even if the 'user' account inside the chroots has
|
|
|
|
# another UID, so we force it to be different.
|
|
|
|
chroot_uid_user = "12345"
|
|
|
|
|
|
|
|
# The PATH variable used inside all chroots
|
|
|
|
chroot_path = ":".join([
|
|
|
|
"/usr/lib/ccache/bin",
|
|
|
|
"/usr/local/sbin",
|
|
|
|
"/usr/local/bin",
|
|
|
|
"/usr/sbin:/usr/bin",
|
|
|
|
"/sbin",
|
|
|
|
"/bin"
|
|
|
|
])
|
|
|
|
|
Debian Jessie/Python 3.4 support for the most part (#6)
* automatically find the chroot binary on Debian, even if it is not
in the user's PATH
* don't use subprocess.run anymore (remove related testcase, that explicitly
checked for subprocess.run usage, and used recursive globbing, another
post 3.4 Python feature, for the checks. A similar case can be added in the
future, but right now it's more important to get Debian 3.4 working and all
PRs are reviewed anyway.)
* pytest fixtures: don't use the newer "yield" feature, as this is only
supported in a newer version of pytest, than provided on Debian Jessie
From manually testing, most stuff works in Debian Jessie. However, the
testsuite does not run through - creating an empty .tar.gz with Python
fails for some reason (this is done in test_apk_static.py).
2017-05-29 18:38:11 +00:00
|
|
|
# The PATH variable used on the host, to find the "chroot" and "sh"
|
|
|
|
# executables. As pmbootstrap runs as user, not as root, the location
|
|
|
|
# for the chroot executable may not be in the PATH (Debian).
|
|
|
|
chroot_host_path = os.environ["PATH"] + ":/usr/sbin/"
|
|
|
|
|
2017-05-26 20:08:45 +00:00
|
|
|
# Folders, that get mounted inside the chroot
|
|
|
|
# $WORK gets replaced with args.work
|
|
|
|
# $ARCH gets replaced with the chroot architecture (eg. x86_64, armhf)
|
|
|
|
chroot_mount_bind = {
|
|
|
|
"/proc": "/proc",
|
|
|
|
"$WORK/cache_apk_$ARCH": "/var/cache/apk",
|
2017-10-12 20:08:10 +00:00
|
|
|
"$WORK/cache_ccache_$ARCH": "/mnt/pmbootstrap-ccache",
|
2017-05-26 20:08:45 +00:00
|
|
|
"$WORK/cache_distfiles": "/var/cache/distfiles",
|
2017-10-12 20:08:10 +00:00
|
|
|
"$WORK/cache_git": "/mnt/pmbootstrap-git",
|
|
|
|
"$WORK/config_abuild": "/mnt/pmbootstrap-abuild-config",
|
2017-05-26 20:08:45 +00:00
|
|
|
"$WORK/config_apk_keys": "/etc/apk/keys",
|
2017-10-12 20:08:10 +00:00
|
|
|
"$WORK/packages": "/mnt/pmbootstrap-packages",
|
|
|
|
}
|
|
|
|
|
|
|
|
# Building chroots (all chroots, except for the rootfs_ chroot) get symlinks in
|
|
|
|
# the "pmos" user's home folder pointing to mountfolders from above.
|
|
|
|
chroot_home_symlinks = {
|
|
|
|
"/mnt/pmbootstrap-abuild-config": "/home/pmos/.abuild",
|
|
|
|
"/mnt/pmbootstrap-ccache": "/home/pmos/.ccache",
|
|
|
|
"/mnt/pmbootstrap-git": "/home/pmos/git",
|
|
|
|
"/mnt/pmbootstrap-packages": "/home/pmos/packages/pmos",
|
2017-05-26 20:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# The package alpine-base only creates some device nodes. Specify here, which
|
|
|
|
# additional nodes will get created during initialization of the chroot.
|
|
|
|
# Syntax for each entry: [permissions, type, major, minor, name]
|
|
|
|
chroot_device_nodes = [
|
|
|
|
[666, "c", 1, 5, "zero"],
|
|
|
|
[666, "c", 1, 7, "full"],
|
|
|
|
[644, "c", 1, 8, "random"],
|
|
|
|
[644, "c", 1, 9, "urandom"],
|
|
|
|
]
|
|
|
|
|
2017-11-19 15:04:08 +00:00
|
|
|
# Age in hours that we keep the APKINDEXes before downloading them again.
|
|
|
|
# You can force-update them with 'pmbootstrap update'.
|
|
|
|
apkindex_retention_time = 4
|
2017-05-26 20:08:45 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# BUILD
|
|
|
|
#
|
2018-01-23 00:26:33 +00:00
|
|
|
# Officially supported host/target architectures for postmarketOS. Only
|
|
|
|
# specify architectures supported by Alpine here. Fro cross-compiling,
|
|
|
|
# we need to generate the "musl-$ARCH", "binutils-$ARCH" and "gcc-$ARCH"
|
|
|
|
# packages (use "pmbootstrap aportgen musl-armhf" etc.).
|
|
|
|
build_device_architectures = ["armhf", "aarch64", "x86_64", "x86"]
|
2017-06-15 00:26:32 +00:00
|
|
|
|
2017-06-08 16:02:00 +00:00
|
|
|
# Packages, that will be installed in a chroot before it builds packages
|
2017-05-26 20:08:45 +00:00
|
|
|
# for the first time
|
|
|
|
build_packages = ["abuild", "build-base", "ccache"]
|
|
|
|
|
|
|
|
# fnmatch for supported pkgnames, that can be directly compiled inside
|
|
|
|
# the native chroot and a cross-compiler, without using distcc
|
2017-12-21 16:42:29 +00:00
|
|
|
build_cross_native = ["linux-*", "arch-bin-masquerade"]
|
2017-05-26 20:08:45 +00:00
|
|
|
|
2017-09-18 21:36:54 +00:00
|
|
|
# Necessary kernel config options
|
|
|
|
necessary_kconfig_options = {
|
2017-10-11 15:11:05 +00:00
|
|
|
"ANDROID_PARANOID_NETWORK": False,
|
2017-09-18 21:36:54 +00:00
|
|
|
"DEVTMPFS": True,
|
|
|
|
"DEVTMPFS_MOUNT": False,
|
|
|
|
"DM_CRYPT": True,
|
2017-10-27 20:41:44 +00:00
|
|
|
"PFT": False,
|
2017-10-23 19:25:40 +00:00
|
|
|
"SYSVIPC": True,
|
|
|
|
"VT": True
|
2017-09-18 21:36:54 +00:00
|
|
|
}
|
|
|
|
|
2017-07-10 18:17:31 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# PARSE
|
|
|
|
#
|
|
|
|
|
2017-05-26 20:08:45 +00:00
|
|
|
# Variables in APKBUILD files, that get parsed
|
|
|
|
apkbuild_attributes = {
|
|
|
|
"arch": {"array": True},
|
|
|
|
"depends": {"array": True},
|
2017-07-19 19:24:03 +00:00
|
|
|
"depends_dev": {"array": True},
|
2017-05-26 20:08:45 +00:00
|
|
|
"makedepends": {"array": True},
|
|
|
|
"options": {"array": True},
|
|
|
|
"pkgname": {"array": False},
|
2017-10-16 20:01:21 +00:00
|
|
|
"pkgdesc": {"array": False},
|
2017-05-26 20:08:45 +00:00
|
|
|
"pkgrel": {"array": False},
|
|
|
|
"pkgver": {"array": False},
|
|
|
|
"subpackages": {"array": True},
|
|
|
|
|
|
|
|
# cross-compilers
|
|
|
|
"makedepends_build": {"array": True},
|
|
|
|
"makedepends_host": {"array": True},
|
|
|
|
|
|
|
|
# kernels
|
|
|
|
"_flavor": {"array": False},
|
|
|
|
"_device": {"array": False},
|
|
|
|
"_kernver": {"array": False},
|
|
|
|
|
|
|
|
# mesa
|
|
|
|
"_llvmver": {"array": False},
|
2017-12-11 20:24:30 +00:00
|
|
|
|
|
|
|
# Overridden packages
|
|
|
|
"_pkgver": {"array": False},
|
2017-05-26 20:08:45 +00:00
|
|
|
}
|
|
|
|
|
2017-07-10 18:17:31 +00:00
|
|
|
# Variables from deviceinfo. Reference: <https://postmarketos.org/deviceinfo>
|
|
|
|
deviceinfo_attributes = [
|
2018-01-17 17:53:58 +00:00
|
|
|
# general
|
2017-07-10 18:17:31 +00:00
|
|
|
"format_version",
|
|
|
|
"name",
|
|
|
|
"manufacturer",
|
|
|
|
"date",
|
|
|
|
"dtb",
|
|
|
|
"modules_initfs",
|
|
|
|
"external_disk_install",
|
|
|
|
"arch",
|
2018-01-17 17:53:58 +00:00
|
|
|
"nonfree",
|
|
|
|
|
|
|
|
# device
|
|
|
|
"keyboard",
|
|
|
|
"external_disk",
|
|
|
|
"screen_width",
|
|
|
|
"screen_height",
|
|
|
|
"dev_touchscreen",
|
|
|
|
"dev_touchscreen_calibration",
|
|
|
|
"dev_keyboard",
|
|
|
|
|
|
|
|
# bootloader
|
|
|
|
"flash_method",
|
2017-07-10 18:17:31 +00:00
|
|
|
|
|
|
|
# flash
|
|
|
|
"flash_heimdall_partition_kernel",
|
2017-09-09 13:53:06 +00:00
|
|
|
"flash_heimdall_partition_initfs",
|
|
|
|
"flash_heimdall_partition_system",
|
2018-01-17 17:53:58 +00:00
|
|
|
"generate_legacy_uboot_initfs",
|
|
|
|
"kernel_cmdline",
|
|
|
|
"generate_bootimg",
|
|
|
|
"bootimg_qcdt",
|
2017-07-10 18:17:31 +00:00
|
|
|
"flash_offset_base",
|
|
|
|
"flash_offset_kernel",
|
|
|
|
"flash_offset_ramdisk",
|
|
|
|
"flash_offset_second",
|
|
|
|
"flash_offset_tags",
|
|
|
|
"flash_pagesize",
|
2018-01-17 17:53:58 +00:00
|
|
|
"flash_fastboot_max_size",
|
|
|
|
"flash_fastboot_vendor_id",
|
2017-08-02 16:21:50 +00:00
|
|
|
"flash_sparse",
|
2017-07-10 18:17:31 +00:00
|
|
|
|
|
|
|
# weston
|
|
|
|
"weston_pixman_type",
|
2017-08-19 21:40:20 +00:00
|
|
|
|
|
|
|
# keymaps
|
|
|
|
"keymaps",
|
2017-07-10 18:17:31 +00:00
|
|
|
]
|
|
|
|
|
2017-06-09 17:22:25 +00:00
|
|
|
#
|
|
|
|
# INITFS
|
|
|
|
#
|
|
|
|
initfs_hook_prefix = "postmarketos-mkinitfs-hook-"
|
2017-07-19 18:05:34 +00:00
|
|
|
default_ip = "172.16.42.1"
|
2017-06-09 17:22:25 +00:00
|
|
|
|
|
|
|
|
2017-05-26 20:08:45 +00:00
|
|
|
#
|
|
|
|
# INSTALL
|
|
|
|
#
|
|
|
|
|
|
|
|
# Packages, that will be installed inside the native chroot to perform
|
|
|
|
# the installation to the device.
|
|
|
|
# util-linux: losetup, fallocate
|
|
|
|
install_native_packages = ["cryptsetup", "util-linux", "e2fsprogs", "parted"]
|
|
|
|
install_device_packages = [
|
|
|
|
|
|
|
|
# postmarketos
|
2017-07-24 20:55:55 +00:00
|
|
|
"postmarketos-base",
|
2017-05-26 20:08:45 +00:00
|
|
|
|
|
|
|
# other
|
|
|
|
"ttf-droid"
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# FLASH
|
|
|
|
#
|
|
|
|
|
2017-11-25 02:57:58 +00:00
|
|
|
flash_methods = ["fastboot", "heimdall", "0xffff", "none"]
|
2017-11-20 16:40:16 +00:00
|
|
|
|
2017-05-26 20:08:45 +00:00
|
|
|
# These folders will be mounted at the same location into the native
|
|
|
|
# chroot, before the flash programs get started.
|
|
|
|
flash_mount_bind = [
|
|
|
|
"/sys/bus/usb/devices/",
|
2017-08-24 21:07:36 +00:00
|
|
|
"/sys/dev/",
|
2017-05-26 20:08:45 +00:00
|
|
|
"/sys/devices/",
|
|
|
|
"/dev/bus/usb/"
|
|
|
|
]
|
|
|
|
|
2017-07-04 20:47:03 +00:00
|
|
|
"""
|
|
|
|
Flasher abstraction. Allowed variables:
|
|
|
|
|
|
|
|
$BOOT: Path to the /boot partition
|
|
|
|
$FLAVOR: Kernel flavor
|
|
|
|
$IMAGE: Path to the system partition image
|
2017-09-13 17:50:06 +00:00
|
|
|
$PARTITION_SYSTEM: Partition to flash the system image
|
2017-07-04 20:47:03 +00:00
|
|
|
|
2017-11-03 23:20:55 +00:00
|
|
|
Fastboot specific: $KERNEL_CMDLINE, $VENDOR_ID
|
2017-09-13 17:50:06 +00:00
|
|
|
Heimdall specific: $PARTITION_KERNEL, $PARTITION_INITFS
|
2017-07-04 20:47:03 +00:00
|
|
|
"""
|
2017-05-26 20:08:45 +00:00
|
|
|
flashers = {
|
|
|
|
"fastboot": {
|
|
|
|
"depends": ["android-tools"],
|
|
|
|
"actions":
|
|
|
|
{
|
2017-11-03 23:20:55 +00:00
|
|
|
"list_devices": [["fastboot", "-i", "$VENDOR_ID",
|
|
|
|
"devices", "-l"]],
|
|
|
|
"flash_system": [["fastboot", "-i", "$VENDOR_ID",
|
|
|
|
"flash", "$PARTITION_SYSTEM", "$IMAGE"]],
|
|
|
|
"flash_kernel": [["fastboot", "-i", "$VENDOR_ID",
|
|
|
|
"flash", "boot", "$BOOT/boot.img-$FLAVOR"]],
|
|
|
|
"boot": [["fastboot", "-i", "$VENDOR_ID",
|
|
|
|
"-c", "$KERNEL_CMDLINE", "boot",
|
|
|
|
"$BOOT/boot.img-$FLAVOR"]],
|
2017-07-25 18:56:10 +00:00
|
|
|
},
|
2017-05-26 20:08:45 +00:00
|
|
|
},
|
2017-07-25 18:56:10 +00:00
|
|
|
# Some Samsung devices need the initramfs to be baked into the kernel (e.g.
|
|
|
|
# i9070, i9100). We want the initramfs to be generated after the kernel was
|
|
|
|
# built, so we put the real initramfs on another partition (e.g. RECOVERY)
|
|
|
|
# and load it from the initramfs in the kernel. This method is called
|
|
|
|
# "isorec" (isolated recovery), a term coined by Lanchon.
|
|
|
|
"heimdall-isorec": {
|
2017-05-26 20:08:45 +00:00
|
|
|
"depends": ["heimdall"],
|
|
|
|
"actions":
|
2017-07-25 18:56:10 +00:00
|
|
|
{
|
|
|
|
"list_devices": [["heimdall", "detect"]],
|
|
|
|
"flash_system": [
|
|
|
|
["heimdall_wait_for_device.sh"],
|
2017-09-09 13:53:06 +00:00
|
|
|
["heimdall", "flash", "--$PARTITION_SYSTEM", "$IMAGE"]],
|
2017-07-25 18:56:10 +00:00
|
|
|
"flash_kernel": [["heimdall_flash_kernel.sh",
|
|
|
|
"$BOOT/initramfs-$FLAVOR", "$PARTITION_INITFS",
|
|
|
|
"$BOOT/vmlinuz-$FLAVOR", "$PARTITION_KERNEL"]]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
# Some Samsung devices need a 'boot.img' file, just like the one generated
|
|
|
|
# fastboot compatible devices. Example: s7562, n7100
|
|
|
|
"heimdall-bootimg": {
|
|
|
|
"depends": ["heimdall"],
|
|
|
|
"actions":
|
|
|
|
{
|
|
|
|
"list_devices": [["heimdall", "detect"]],
|
|
|
|
"flash_system": [
|
|
|
|
["heimdall_wait_for_device.sh"],
|
2017-09-09 13:53:06 +00:00
|
|
|
["heimdall", "flash", "--$PARTITION_SYSTEM", "$IMAGE"]],
|
2017-07-25 18:56:10 +00:00
|
|
|
"flash_kernel": [
|
|
|
|
["heimdall_wait_for_device.sh"],
|
|
|
|
["heimdall", "flash", "--$PARTITION_KERNEL", "$BOOT/boot.img-$FLAVOR"]],
|
2017-05-26 20:08:45 +00:00
|
|
|
},
|
|
|
|
},
|
2017-08-24 21:07:36 +00:00
|
|
|
"adb": {
|
|
|
|
"depends": ["android-tools"],
|
|
|
|
"actions":
|
|
|
|
{
|
|
|
|
"list_devices": [["adb", "-P", "5038", "devices"]],
|
|
|
|
"sideload": [["echo", "< wait for any device >"],
|
|
|
|
["adb", "-P", "5038", "wait-for-usb-sideload"],
|
|
|
|
["adb", "-P", "5038", "sideload",
|
|
|
|
"$RECOVERY_ZIP"]],
|
|
|
|
}
|
|
|
|
},
|
2017-05-26 20:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# GIT
|
|
|
|
#
|
|
|
|
git_repos = {
|
|
|
|
"aports_upstream": "https://github.com/alpinelinux/aports",
|
|
|
|
"apk-tools": "https://github.com/alpinelinux/apk-tools",
|
|
|
|
}
|
2017-10-30 19:56:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# APORTGEN
|
|
|
|
#
|
|
|
|
aportgen = {
|
|
|
|
"cross": {
|
|
|
|
"prefixes": ["binutils", "busybox-static", "gcc", "musl"],
|
|
|
|
"confirm_overwrite": False,
|
|
|
|
},
|
|
|
|
"device": {
|
|
|
|
"prefixes": ["device", "linux"],
|
|
|
|
"confirm_overwrite": True,
|
|
|
|
}
|
|
|
|
}
|
Close #453: Support mesa-dri-virtio in Qemu (#861)
The mesa driver, which ends up in the installation image, needs to be known
before the installation is done (in other words: when running the qemu action,
it is to late as the image has already been generated). That's why one can
choose the Qemu mesa driver in `pmbootstrap init` now:
```
Device [qemu-amd64]:
Which mesa driver do you prefer for your Qemu device? Only select something other
than the default if you are having graphical problems (such as glitches).
Mesa driver (dri-swrast/dri-virtio) [dri-virtio]:
```
It is still possible to select `dri-swrast`, because `dri-virtio` may not work
in all cases, and that way we could easily debug it or experiment with other
mesa drivers (e.g. the "vmware" one, which is supported by mesa and Qemu).
Other changes:
* `pmbootstrap qemu` accepts a `--display` variable now, which passes the value
directly to `qemu`'s `display` option. It defaults to `sdl,gl=on` (@PureTryOut
reported that to work best with plasma mobile on his PC). `--display` and
`--spice` (which is still working) are mutually exclusive.
* Removed obsolete telnet port pass-through: We only use the debug telnet port
since osk-sdl has been merged.
* Add show-cursor to the Qemu command line, so it shows a cursor in X11
* Refactored the spice code (`command_spice` only returns the spice command,
because it has all necessary information already) and the spice port can be
specified on the commandline now (previously it was hardcoded in one place and
then always looked up from there).
* Start comments with capital letters.
* Keep the log on the screen a bit shorter (e.g. Qemu command is written to the
"pmbootstrap log" anyway, so there's no need to display it again).
* linux-postmarketos-stable: Adjust kernel configs
x86_64, armhf: enable as modules:
CONFIG_DRM_VIRTIO_GPU, CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_BALLOON
aarch64: all 3 options were already enabled as built-in (no change)
* Set '-vga virtio' for mesa-dri-virtio
2017-11-05 13:48:49 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# QEMU
|
|
|
|
#
|
2018-01-08 15:18:37 +00:00
|
|
|
qemu_native_mesa_drivers = ["dri-swrast", "dri-virtio"]
|