kupferbootstrap/constants.py

111 lines
2.7 KiB
Python
Raw Normal View History

FASTBOOT = 'fastboot'
FLASH_PARTS = {
'ROOTFS': 'rootfs',
'BOOTIMG': 'bootimg',
'LK2ND': 'lk2nd',
'QHYPSTUB': 'qhypstub',
}
EMMC = 'emmc'
EMMCFILE = 'emmc-file'
MICROSD = 'microsd'
LOCATIONS = [EMMC, EMMCFILE, MICROSD]
JUMPDRIVE = 'jumpdrive'
JUMPDRIVE_VERSION = '0.8'
BOOT_STRATEGIES = {
'oneplus-enchilada': FASTBOOT,
'xiaomi-beryllium-ebbg': FASTBOOT,
'xiaomi-beryllium-tianma': FASTBOOT,
'bq-paella': FASTBOOT,
}
DEVICES = {
'oneplus-enchilada': ['device-sdm845-oneplus-enchilada'],
'xiaomi-beryllium-ebbg': ['device-sdm845-xiaomi-beryllium-ebbg'],
'xiaomi-beryllium-tianma': ['device-sdm845-xiaomi-beryllium-tianma'],
'bq-paella': ['device-msm8916-bq-paella'],
}
FLAVOURS = {
'barebone': {
'packages': [],
},
'debug-shell': {
'packages': ['hook-debug-shell'],
},
'gnome': {
'packages': ['gnome', 'archlinux-appstream-data', 'gnome-software-packagekit-plugin'],
'post_cmds': ['systemctl enable gdm'],
'size': 8,
},
}
2021-08-18 12:27:03 +02:00
REPOSITORIES = [
'boot',
2021-10-10 21:21:23 +02:00
'cross',
2021-08-18 12:27:03 +02:00
'device',
'firmware',
'linux',
'main',
]
Arch = str
ARCHES = [
'x86_64',
'aarch64',
]
2021-09-22 02:32:03 +02:00
BASE_DISTROS = {
'x86_64': {
2021-09-22 02:32:03 +02:00
'repos': {
'core': 'http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch',
'extra': 'http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch',
'community': 'http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch',
},
},
'aarch64': {
'repos': {
'core': 'http://mirror.archlinuxarm.org/$arch/$repo',
'extra': 'http://mirror.archlinuxarm.org/$arch/$repo',
'community': 'http://mirror.archlinuxarm.org/$arch/$repo',
'alarm': 'http://mirror.archlinuxarm.org/$arch/$repo',
'aur': 'http://mirror.archlinuxarm.org/$arch/$repo',
},
},
}
KUPFER_HTTPS = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/main/$repo'
DistroArch = TargetArch = Arch
COMPILE_ARCHES: dict[Arch, str] = {
'x86_64': 'amd64',
'aarch64': 'arm64',
}
GCC_HOSTSPECS: dict[DistroArch, dict[TargetArch, str]] = {
'x86_64': {
'x86_64': 'x86_64-pc-linux-gnu',
'aarch64': 'aarch64-linux-gnu',
},
'aarch64': {
'aarch64': 'aarch64-unknown-linux-gnu',
}
}
CFLAGS_GENERAL = ['-O2', '-pipe', '-fstack-protector-strong']
CFLAGS_ARCHES: dict[Arch, list[str]] = {
'x86_64': ['-march=x86-64', '-mtune=generic'],
'aarch64': [
'-march=armv8-a',
'-fexceptions',
'-Wp,-D_FORTIFY_SOURCE=2',
'-Wformat',
'-Werror=format-security',
'-fstack-clash-protection',
]
}
CROSSDIRECT_PKGS = ['crossdirect', 'qemu-user-static-bin', 'binfmt-qemu-static']