]> glassweightruler.freedombox.rocks Git - waydroid.git/blob - tools/helpers/arch.py
lxc: Mount /dev/null for container
[waydroid.git] / tools / helpers / arch.py
1 # Copyright 2021 Oliver Smith
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 import platform
4
5 def host():
6 machine = platform.machine()
7
8 mapping = {
9 "i686": "x86",
10 "x86_64": "x86_64",
11 "aarch64": "arm64",
12 "armv7l": "arm"
13 }
14 if machine in mapping:
15 return mapping[machine]
16 raise ValueError("platform.machine '" + machine + "'"
17 " architecture is not supported")