uConsole - R-01 and RISC-V thread

final post before I publish something actually usable since I’m sure you’re all sick of me spamming the thread :stuck_out_tongue:

progress has been slow but steady on a port of the KISS Linux root filesystem to RISC-V, and we’re at a point where I have packages for everything except gcc, binutils, and git working. those are hopefully gonna build before the end of the month. after that, i need to set up some packages to provide basic functionality and configure those, and then it’s time to get an actually booting image.

i’ve got some initial ideas for software but i’d like suggestions if anyone has any.
-finch for IM (curses, easily configured into an irssi-like UX, very flexible) and possibly SMS if a plugin for libpurple can be written to interface with an SMS daemon
-links2 or lynx for web browsing
-cmus for music
-fbv for image viewing
-fbpdf for pdfs
-fbpad if it can be configured properly to replace the terribad tty UX

and so on. but, like i said, suggestions very welcome for a 0.1 release.

i’ve returned, this time in disgrace. i did get a risc-v rootfs working, but i just can’t figure out the boot process - i don’t have any experience with embedded systems like this, and the, erm, let’s say lacklustre documentation doesn’t help. i’m going to keep picking away at this, especially once i get my workstation set back up, but for now i have to admit defeat. the current state of the docs is both too vague and too specific. it’s really frustrating because a number of things i want to do e.g. hotspotting are very viable with the uconsole’s hardware, but the software for the r01 just isn’t there.

all that being said, i remain confident that given concerted effort a decent system could be built. i also found some software from the librem people - they wrote an SMS plugin for libpurple, meaning finch can 100% handle messaging and contacts and such.

anyway, i’ll be lurking. hope you’re all doing well.

1 Like

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.

1 Like