# 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/opi0/dts/sun8i-h2-plus-orangepi-zero-radio.dts` into `files/opi0/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. - `boards/opi0.sh`: add the solar DTB to `BOARD_DTBS`. `build-kernel.sh` already links every `files/opi0/dts/*.dts{,i}` into the kernel tree, builds each DTB in `BOARD_DTBS` with `-@` and stages it in `boot/opi0//`. - 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. ## Banana Pi M2 (bpi-m2): open - U-Boot and kernel are installed on marlena and banana-backup; both boot and are tested and working. - Is marlena an M2 Berry? If yes, boot it on the Berry DTB (`BOOT_DTB=sun8i-v40-bananapi-m2-berry-k4be.dtb`, after changing its `load_dt` name or keeping the Ultra name) and drop the Ultra DTS. - Kernel source: kernel.org 7.3.4 like the OPi0 (`KERNEL_VERSION` in `boards/bpi-m2.sh`); the notes mention gentoo-sources 6.18.63 (LTS) as an alternative. ## 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.