# Notes: planned and open ## Solar boards: their own DTS (planned) `solar1.lo` and `solar2.lo` are Orange Pi Zeros without the radio panel (see "Other systems" in the README). Plan: - Move what both boards need out of `files/dts/sun8i-h2-plus-orangepi-zero-radio.dts` into `files/dts/orangepi-zero-common.dtsi`: `ehci2`/`ohci2`, `ehci3`/`ohci3` and the `xr819` block (xradio compatible, PG10 host-wake). - `sun8i-h2-plus-orangepi-zero-radio.dts` = mainline board file + common `.dtsi` + codec, i2c1, panel, U2, radio-keys. - `sun8i-h2-plus-orangepi-zero-solar.dts` = mainline board file + common `.dtsi`, nothing else. - `build-kernel.sh`: turn `BOARD_DTS`/`BOARD_DTB` into a list (e.g. `BOARD_DTS_LIST`). `prepare_source` links each into the kernel tree, `do_build` builds each with `DTC_FLAGS=-@` and `do_package` copies each to `boot/opi0//`. Also link the `.dtsi`. - Solar install: `BOOT_DTB=sun8i-h2-plus-orangepi-zero-solar.dtb ./install-kernel.sh ssh:root@solar1.lo`. Their `KERNEL_CONSOLE` can drop `console=tty1 fbcon=…`. ## Automatic fallback to the previous kernel (idea) Right now a kernel that fails to boot is booted again on every reset (see "If a new kernel does not boot" in the README). For an unattended radio: - U-Boot `CONFIG_BOOTCOUNT_LIMIT` with a counter that survives a watchdog reset. `BOOTCOUNT_ENV` needs `saveenv`, and there is no FAT partition for `uboot.env`. Better: `BOOTCOUNT_GENERIC` in one of the RTC's general-purpose registers (H3 RTC base 0x01f00000, GP registers from 0x100), which keep their value over a reset. - `bootlimit=3` and an `altbootcmd` that boots the second-newest extlinux label. `sysboot`/`pxe` has no "boot label N" option, so it needs a second file (e.g. `extlinux/fallback.conf`, generated by `install-kernel.sh` with the previous release as `default`), loaded with `sysboot mmc 0:1 any ${scriptaddr} /boot/extlinux/fallback.conf`. - Userspace must reset the counter once the system is up: a small systemd unit that writes 0 to that register (via `/dev/mem` or `devmem2`) after `multi-user.target`, and systemd's `RuntimeWatchdogSec=` on the sunxi watchdog so a hang also counts as a failed boot. - Needs testing on the hardware with the serial console attached. ## radio-ui and tty1 (radio-ui repository) radio-ui should switch its VT to `KD_GRAPHICS` (`ioctl(fd, KDSETMODE, KD_GRAPHICS)` on `/dev/tty1` or the active VT) while it owns the panel and restore `KD_TEXT` on exit. Then neither fbcon nor a getty/journald writer on tty1 can draw over it. Until then: `systemctl mask getty@tty1.service` on the target. ## Untested - Armbian's `boot.scr` under the new U-Boot (fallback when `extlinux.conf` is missing). - journald forwarding to tty1 while radio-ui owns the display.