Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.
C
Checks in step with 30 October's arguments: common_defconfig lists press_power, fb_ca_hz, fb_pri (and fb_measure, var_hfs); hakios-config-test expects redwood's fb_hz=120 ca_vbl=1; docs-gen's driver page again
shimoku7498a534a09ffb
diff --git a/configs/common_defconfig b/configs/common_defconfigindex 43a370e..e702006 100644--- a/configs/common_defconfig+++ b/configs/common_defconfig@@ -2,7 +2,7 @@# HakiOS common defconfig: every setting there is, with what it does.# Made by tools/hakios-config.py listing common -o <this file>; the values are the ones that file sets, and tests/CI check that it names every symbol.#-# 341 symbols in 18 groups; 34 are set, 25 of them drivers built in.+# 347 symbols in 18 groups; 34 are set, 25 of them drivers built in.##@@ -301,7 +301,7 @@ CONFIG_UFS=2# CONFIG_VIRTIO_BLK is not set#-# Touch and buttons (8)+# Touch and buttons (10)## the touch screen, and the power and volume buttons@@ -313,6 +313,12 @@ CONFIG_TOUCHSCREEN=y# read by hakios.buttons.c (kernel)# CONFIG_BUTTONS_STEPS is not set+# a short press of the power key that many seconds after boot, and another ten seconds later, given to Darwin as the ...+# CONFIG_PRESS_POWER is not set++# read by hakios.buttons.c (kernel)+# CONFIG_PRESS_POWER_MS is not set+# read by hakios.goodix.c (kernel)# CONFIG_TOUCH_FLIP is not set@@ -329,7 +335,7 @@ CONFIG_TOUCHSCREEN=y# CONFIG_VIRTIO_INPUT is not set#-# GPU and display (68)+# GPU and display (71)## rendering on Adreno (an image built with GL=1; the GPU's firmware from your phone) [needs fw-gpu/ from the phone]@@ -377,6 +383,9 @@ CONFIG_GPU=y# read by MiniIOMobileFramebuffer.cpp (kernel)# CONFIG_FB_BEAT is not set+# the refresh rate told to CoreAnimation (IOMFBDisplayRefresh) when it is not to be fb_hz's+# CONFIG_FB_CA_HZ is not set+# which pixels of the panel each frame changed (it costs: the panel's memory is slow to read)# CONFIG_FB_DIFF is not set@@ -386,6 +395,12 @@ CONFIG_GPU=y# read by MiniIOMobileFramebuffer.cpp (kernel)# CONFIG_FB_HZ is not set+# how often the panel is really refreshed+# CONFIG_FB_MEASURE is not set++# read by MiniIOMobileFramebuffer.cpp (kernel)+# CONFIG_FB_PRI is not set+# read by MiniIOMobileFramebuffer.cpp (kernel)# CONFIG_FB_QUEUE is not set@@ -1051,7 +1066,7 @@ CONFIG_MODEM_AGAIN=y# CONFIG_UFS_PROBE is not set#-# User space (13)+# User space (14)## read by inject_sb.c (user space)@@ -1066,7 +1081,7 @@ CONFIG_MODEM_AGAIN=y# CoreAnimation's frame clock from the display driver's refresh notifications# CONFIG_CA_VBL is not set-# read by inject.c (user space)+# CoreAnimation's switches here as in the window server (inject.c), set before QuartzCore reads them# CONFIG_CAENV is not set# read by inject_sb.c (user space)@@ -1093,6 +1108,9 @@ CONFIG_MODEM_AGAIN=y# read by inject_sb.c (user space)# CONFIG_SWITCHER_WALLPAPER is not set+# read by init.c (user space)+# CONFIG_VAR_HFS is not set+## Extra arguments (1)#diff --git a/docs/reference/drivers.md b/docs/reference/drivers.mdindex 6dc25ba..6241a20 100644--- a/docs/reference/drivers.md+++ b/docs/reference/drivers.md@@ -67,7 +67,7 @@ Every driver the kernel can be built with. `CONFIG_HAKIOS_<NAME>=y` in a defconf|---|---|---|---|---|---|| **`HAKIOS_VIRTIO_INPUT`**<br>QEMU's virtio tablet and keyboard as the touch screen and the buttons (virtio_input=1). QEMU only | `hakios.virtio_input.c` | | `virtio_input=` | built | built | || **`HAKIOS_GOODIX`**<br>the touch screen: a Goodix GT9916 ("Berlin-D") or a FocalTech FT3680 on SPI (touchscreen=1). The bus, pins and supplies are the POCO X5 Pro's; another phone with one of these controllers changes those | `hakios.goodix.c` | | `touch_flip=`, `touch_poll_us=`, `touch_rate=`, `touch_spi_hz=`, `touchscreen=` | | built | |-| **`HAKIOS_BUTTONS`**<br>the power and volume keys, read from the PMIC through the SPMI arbiter (buttons=1) | `hakios.buttons.c` | | `buttons=`, `buttons_steps=`, `touchscreen=` | | built | |+| **`HAKIOS_BUTTONS`**<br>the power and volume keys, read from the PMIC through the SPMI arbiter (buttons=1) | `hakios.buttons.c` | | `buttons=`, `buttons_steps=`, `press_power=`, `press_power_ms=`, `touchscreen=` | | built | |## modemdiff --git a/tools/hakios-config-test.py b/tools/hakios-config-test.pyindex 159cea7..b65ae74 100755--- a/tools/hakios-config-test.py+++ b/tools/hakios-config-test.py@@ -59,9 +59,12 @@ try:r = run("defconfig", "redwood", "-o", cfg)check("defconfig redwood: makes the .config", r.returncode == 0 and os.path.isfile(cfg), r.stdout + r.stderr)a = args_of(run("args", "--config", cfg))- # the phone line from before there were configurations, plus the two things the SC7280 fragment turns on: the chip's identity and the sensors- check("redwood: the project's phone line before configurations, plus socinfo and thermal", sorted(a) == sorted(OLD_PHONE_LINE + ["socinfo=1", "thermal=1"]),- "got %s\nwant %s" % (sorted(a), sorted(OLD_PHONE_LINE + ["socinfo=1", "thermal=1"])))+ # the phone line from before there were configurations, plus the two things the SC7280 fragment turns on (the chip's identity+ # and the sensors) and the two of redwood.config's panel (120 Hz frames, CoreAnimation clocked by the driver)+ PANEL = ["fb_hz=120", "ca_vbl=1"]+ check("redwood: the project's phone line before configurations, plus socinfo and thermal, and the panel's 120 Hz",+ sorted(a) == sorted(OLD_PHONE_LINE + ["socinfo=1", "thermal=1"] + PANEL),+ "got %s\nwant %s" % (sorted(a), sorted(OLD_PHONE_LINE + ["socinfo=1", "thermal=1"] + PANEL)))check("redwood: kernel.ver carries the SoC", "-sc7280-" in r.stdout, r.stdout)check("redwood: the .config is in Linux's form","CONFIG_GPU=y" in open(cfg).read() and "# CONFIG_CAM is not set" in open(cfg).read() and 'CONFIG_FIRMWARE="device"' in open(cfg).read())@@ -76,7 +79,7 @@ try:r = run("defconfig", "redwood", "open", "-o", o)check("redwood + open: passes", r.returncode == 0, r.stdout + r.stderr)check("redwood + open: nothing of the phone's own is loaded",- sorted(args_of(run("args", "--config", o))) == sorted("cpus=8 bootcpu=7 cpufreq=1 ufs=2 touchscreen=1 socinfo=1 thermal=1".split()),+ sorted(args_of(run("args", "--config", o))) == sorted(("cpus=8 bootcpu=7 cpufreq=1 ufs=2 touchscreen=1 socinfo=1 thermal=1".split() + PANEL)),run("args", "--config", o).stdout)r = run("needs", "--config", o)check("redwood + open: needs nothing", r.returncode == 0 and "nothing of the phone's own" in r.stdout, r.stdout)@@ -101,7 +104,7 @@ try:# the arguments straight from a defconfig, with no .config made (what `make qemu-open` asks for)check("args --defconfig defconfig: cpus=1", args_of(run("args", "--defconfig", "defconfig")) == ["cpus=1"], run("args", "--defconfig", "defconfig").stdout)check("args --defconfig redwood --fragment open: the open phone",- sorted(args_of(run("args", "--defconfig", "redwood", "--fragment", "open"))) == sorted("cpus=8 bootcpu=7 cpufreq=1 ufs=2 touchscreen=1 socinfo=1 thermal=1".split()))+ sorted(args_of(run("args", "--defconfig", "redwood", "--fragment", "open"))) == sorted(("cpus=8 bootcpu=7 cpufreq=1 ufs=2 touchscreen=1 socinfo=1 thermal=1".split() + PANEL)))check("args --defconfig redwood: the same as the .config's", sorted(args_of(run("args", "--defconfig", "redwood"))) == sorted(a))# the order of the arguments is the table's: cpus first, as in the README's lines