so after taking a short break and re-examining all of my notes thus far, and starting over from a blank slate with an iterative approach instead of trying to nail everything right from the start, i’ve achieved much better results. i don’t have an image that’s ready for release yet - i want to get all the basics working - but i can officially say that i have a booting KISS Linux image on real hardware, with working WLAN, a browser, a toolchain (albeit a binary borrowed from skarnet.org), and so on.
i’ve also managed to get a debootstrap debian to boot, but unfortunately it can’t run on the uconsole as-is due to (according to a debian bug report) an incorrect implementation of riscv microcode. tl;dr, apt’s runtime support library, when built with a modern release of gcc, contains instructions that the D1 chip is unable to execute, in violation of the spec (or that’s my takeaway anyway).
KISS can neatly sidestep this due to its package manager being written in portable shell. furthermore, KISS performs far, far better on the R01 than ubuntu or debian - i went around 10-11 hours of active usage (on-device development work over busybox’s telnetd) yesterday and battery usage was only about 25% according to sysfs, from 100 at the start of the day. latency is also practically nonexistent, even over the network, and boot times and shutdown times are significantly improved (~7 and ~3-4 seconds respectively). also, that weird issue where poweroff doesn’t actually poweroff the device sometimes is gone. furthermore, battery charging seems to be much faster - albeit from first observations. i need to actually measure this and do a proper comparison.
all in all, KISS on the R01 presents a significant gain in performance and, owing to its simple design and from-source nature, is significantly easier to tweak and maintain compared to the factory standard ubuntu image.
my eventual goals, if possible, are the following in no particular order:
- have a native, self-hosting RISCV64 KISS rootfs
- have a KISS repository for building supplementary software for the uconsole r01
- have a KISS repository containing binaries equivalent to the above
- be able to build the SPI, bootloader(s), and kernel, without relying on pulling anything from the factory image
- have all peripherals work out of the box (wlan, wwan, bluetooth [maybe, i’ve never fiddled with DTCs and etc before], audio [ideally in a sane manner - any ALSA experts would be appreciated here], etc)
- reduce the number of partitions to 3 so the user can retain p4 for /home, or investigate the viability of a logical partition 4 or the use of GPT instead of MBR partition tables
- include necessary software to achieve minimum viability as a PDA/smartphone replacement, including a browser, scheduling tools, sophisticated text editor, multimedia players, a menu-based interface, and so on, and to do this without relying on a graphics subsystem (e.g. X11, Wayland)
- eventually, have a script to automate the build processes for all of the above
- centralise documentation and code for the uConsole and its modules
- bring up display during boot to allow for possibility of multiboot?
- create an installer akin to alpine’s that allows the user to select packages to install, set up LUKS FDE, etc?
current challenges include, but are not limited to:
- a suitable interface for regular usage (dialog-based shell script maybe?)
- accessing the source code for the kernel (patches don’t seem to apply?)
- accessing the source code for the upstream BSP (seems to be locked behind NDA in violation of the GPL, and in addition you need to be able to read Chinese to navigate the site, which isn’t something I can do)
- getting clockwork’s patched wiringpi to build, or an alternative, as this is necessary to bring up the 4G module (or, preferably, find a way to do this using sysfs)
- probably other things i can’t think of at the moment
apologies for being a windbag again, i’ve spent the past week doing almost nothing but hacking at this thing and i’m braindead as a result. still, i’m proud of the progress that i’ve made, and wanted to solicit suggestions and feedback from the community.