AArch64 EL2 hypervisor for QEMU virt that boots at EL2
1

Configure Feed

Select the types of activity you want to include in your feed.

ariel / scripts / check_release.py
2.2 kB 80 lines
1from pathlib import Path 2import re 3import sys 4 5 6root = Path(__file__).resolve().parents[1] 7 8required_paths = [ 9 ".gitignore", 10 "Makefile", 11 "README.md", 12 "linker.ld", 13 "arch/aarch64/entry.S", 14 "arch/aarch64/vectors.S", 15 "core/main.c", 16 "core/trap.c", 17 "mm/stage2.c", 18 "drivers/pl011.c", 19 "guest/main.c", 20 "tools/log_decode.py", 21 "scripts/release.sh", 22] 23 24for item in required_paths: 25 path = root / item 26 if not path.exists() or path.stat().st_size == 0: 27 print(f"missing release topology path {item}") 28 sys.exit(1) 29 30text_files = [ 31 *root.glob("core/**/*.c"), 32 *root.glob("drivers/**/*.c"), 33 *root.glob("mm/**/*.c"), 34 *root.glob("arch/**/*.c"), 35 *root.glob("guest/**/*.c"), 36 *root.glob("include/**/*.h"), 37 *root.glob("tools/**/*.py"), 38 *root.glob("scripts/**/*.py"), 39 root / "Makefile", 40 root / "README.md", 41] 42 43blocked = ["HV_" + "VERSION", "0" + ".1.0", "get_hv_" + "version"] 44 45for path in text_files: 46 text = path.read_text() 47 if any(item in text for item in blocked): 48 print(f"project versioning residue in {path.relative_to(root)}") 49 sys.exit(1) 50 51for path in [*root.glob("core/**/*.c"), *root.glob("drivers/**/*.c"), *root.glob("mm/**/*.c"), *root.glob("arch/**/*.c"), *root.glob("guest/**/*.c"), *root.glob("include/**/*.h")]: 52 text = path.read_text() 53 if re.search(r"/\*|//", text): 54 print(f"source comment residue in {path.relative_to(root)}") 55 sys.exit(1) 56 57config = (root / "include/hv/config.h").read_text() 58if "#define CONFIG_MONITOR_MUTATION 0" not in config: 59 print("monitor mutation must default off") 60 sys.exit(1) 61 62monitor = (root / "core/monitor.c").read_text() 63required = [ 64 "write64 disabled", 65 "unmap disabled", 66 "irq disabled", 67 "profile disabled", 68 "restore disabled", 69 "log clear disabled", 70] 71for item in required: 72 if item not in monitor: 73 print(f"missing monitor gate: {item}") 74 sys.exit(1) 75 76makefile = (root / "Makefile").read_text() 77for target in ["test-host", "test-diagnostic-smoke", "test-linux-smoke", "ci", "release"]: 78 if f"{target}:" not in makefile: 79 print(f"missing target {target}") 80 sys.exit(1)