just got the R-01 in the mail - we have snow on the ground so this is a good project - from other threads there have been issues with the keyboard - I think it works great for thumb typing - nice unit - working on some network tools etc on it - will be a great console and good for jotting notes. thanks for the notes on this thread!
The Allwinner D1 doesnāt have cpufreq support, but the clock controller is very easy to poke at, and thereās loads of overclocking headroom (at least on my machine):
use this at your own risk, you are directly poking SOC CCU registers! this should all reset back to safe defaults on a reboot, but it may be possible to cause hardware damage with this(!). the user manual wants you to switch the CPU clock to something that isnāt the PLL before modifying PLL settings (3.2.4.1), but I havenāt seen this crash yet (with reasonable overclocks). At your own risk!
see the Allwinner D1 user manual for the background.
to set the PLL multiplier for CPU domain, poke PLL_CPU_CTRL_REG-
busybox devmem 0x02001000 32 0xFA00XX00 (where XX is your multiplier value (N) - 1, in hex)
to set for DDR domain, poke PLL_CPU_CTRL_REG: busybox devmem 0x02001010 32 0xF800XX00 (where XX is your multiplier value (N) - 1, in hex).
the actual clock frequency for each domain is (24MHz * N). stock values are CPU N=0x30, DDR N=0x42. On my uConsole, I can overclock with reasonable stability to CPU N=0x46 (1700MHz CPU clock!), DDR N=0x61 (2328MHz)
This improves CPU performance by more than 50%, according to my benchmarks. (there may be even more room if youāre brave enough to increase voltages⦠which is also fairly easy to do but is even more likely to cause hardware damage so iām not going to give instructions for it here). Naturally, it will increase power consumption.
Did anyone try or researched osdev with R-01? So no linux, no nothing, just straight up bare metal?
Hi, I tried bare metal in R-01 and unfortunately, it was a complete fiasco, I would be very grateful if someone who succeeded could share the results.
Alwinner has a big Chinese community but I canāt find anything about the problem I tried to solve.
So what I personally have - yes is possible to boot Allwinner D1 by SPL and work with UART and GPIO absolutely fine (example projects like baremetal-lichee-rv or d1-nezha-baremeta), but if you want something more serious is almost not possible. In my case, I want to operate with a ClockworkPi Devterm display
!
Display controlled by MIPI DSI interface in Allwinner documentation nothing about this, and no any open HAL or library.
Only what I found are drivers in the Linux kernel and look like the same drivers but adopted for RT-thread OS. Driver is a thousand lines of code mixed for all Allwinner platforms and with my programming experience is impossible to adapt to bare metal, wonder if someone can do this.
I tried to build a project only with these drivers and cut everything from OS specific, as a result, is compiled great, UART and GPIO work, but the Display is still black, why ? I donāt know.
Debugging is another headache to be solved.
I donāt want to upset you but I am disappointed and thinking of throwing D1 in the trash and buying some ARM.
I would be very grateful if someone could share the project where they managed to assemble the RT-thread for D1 with Sunxi HAL, I have a compilation error now.
any idea whereās the normal blinking cursor at?
jesus christ, this hit the spot!
A generic update ( sorry for my radio silence all, hella busy on this end ). The RISC-V / R-01 unit got me deep into āi3ā, by following rabbit holes with the display, the back-light, and not seeing the cursor⦠Deep into i3 enough that Debian + i3 are my daily driver at work.
That being said I wanted to add to this thread @katmai 's amazing thread and notes.
If youāve put effort in on the R-01 @katmai has some great sd card is imaged ā usable uConsole notes, add to em if you have the notes or configs to spare!
sudo dd if=image.card of=/dev/mmcblk0 bs=512
62333952+0 records in
62333952+0 records out
31914983424 bytes (32 GB, 30 GiB) copied, 6665.29 s, 4.8 MB/s
took only a million fucking years to write
wget https://www.bioget.com/image.card
dd if=image.card of=/dev/mmcblk0 bs=512
Hi, post with my img ready-to-run ubuntu 22.04
OS for R-01 RISC V board (UCONSOLE & DEVTERM) - uConsole - clockworkpi
Just a heads up, iāve made the code available for getting a cleaner terminal/console experience. This is intended to use with a freshly flashed R01 DevTem.
Highlights:
- Added fan control.
- Temp control.
- Bigger font.
- Less ape on disabling services.
- Ability to wind back to how it all was.
- Snappier.
Code available here:
Hi, @midfavila I believe this toolchain can be suitable for your task GitHub - riscv-collab/riscv-gnu-toolchain: GNU toolchain for RISC-V, including GCC. Also, this article in general, is very helpful Building boot software and Debian from sources for a RISC-V board (Sipeed Lichee RV with D1 processor) - Andreas' website and this Allwinner Nezha - linux-sunxi.org.
About centralized community, I donāt know but it is a great idea
Keep at it you are doing amazing work and this will help the community!
I tried to do the same, but didnāt get much further. Those display drivers are a tangle to get through and I wasnāt able to stitch them together in a way that worked. I put up a little post-mortem on my website (http://www.jusentari.com/one-pixel) but suffice it to say, I only got UART and the backlight to work. Still chipping away at it though, so Iāll post something if I have any breakthroughs.
Hi all, I created bare-metal library for R-01 for Allwinner D1H RISC-V SOC.
Is minimal low-level library could be used to run own OS, or Doom or whatever.