ClockworkPI Emulated system


anyone whos followed me for any length of time knows I have been working on getting the ClockworkPi running in an emulated system. and I’m happy to say I’m significantly closer to a fully working version. I will post pics/etc very soon. but I have had to take the kernel and initrd from a working debian on armhf and use them to get it to boot. I have been working to modify the clockworkos_v0.3 image to make it work within the qemu environment but I should have something that 100% compatible soon.

however. I would rather the actual clockwork pi image working natively so I’m looking for anyone with any skills/knowledge to getting qemu to accept the uImage kernel and not require an initrd.


let me provide a small update. the Clockwork OS does not contain the kernel source nor anything pertaining to it, therefore I will have to build a completely custom kernel to run this. which is sort of sad, but we can work around it. (I would LOVE if one of the CPI team chimed in, maybe provided the .config) but elsewise I’m going to be providing a modified .img here soon as well as detailed instructions on launching in qemu with full graphical support for native development)

please everyone that comes across this, heart and share the post so we can get the dev teams attention. that .config for the kernel would be a MASSIVE help


isn’t it directly included with the patch file ?

diff --git a/arch/arm/configs/clockworkpi_cpi3_defconfig b/arch/arm/configs/clockworkpi_cpi3_defconfig
new file mode 100644
index 0000000..84774c4
--- /dev/null
+++ b/arch/arm/configs/clockworkpi_cpi3_defconfig
@@ -0,0 +1,3441 @@
+# Automatically generated file; DO NOT EDIT.
+# Linux/arm 4.14.2 Kernel Configuration

if you compile fine, could you try latest kernel with fresh lima included in mainline ?


if i was smart I would have known that lol… looking into that now


you may check this crazy guy awesome work :


here is the patch adapted for latest linux master >

file b/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dts need fix due to some pin rename >

file b/sound/soc/sunxi/sun8i-codec-analog.c need use of regmap read/write functions >

compilation succeed, some warning :

<stdin>:1388:2: warning: #warning syscall open_tree not implemented [-Wcpp]
<stdin>:1391:2: warning: #warning syscall move_mount not implemented [-Wcpp]
<stdin>:1394:2: warning: #warning syscall fsopen not implemented [-Wcpp]
<stdin>:1397:2: warning: #warning syscall fsconfig not implemented [-Wcpp]
<stdin>:1400:2: warning: #warning syscall fsmount not implemented [-Wcpp]
<stdin>:1403:2: warning: #warning syscall fspick not implemented [-Wcpp]

resulting files uploaded here >

first time i compile the kernel, not really know if it work & what to do now %)

1 Like

thanks. your kernel still doesnt boot it but thats not your fault. with all that you’ve provided me i have actually made some progress. now qemu doesnt just crash and kick out it actually gives me a blackscreen AND is driving the CPU a fair bit so it’s not quite there, but its progress none the less.


I figured I should elaborate on the struggles I am having. when it comes to hardware everything has a bus. and this thing does not use the PCI bus which has thrown me for a loop. as well as the main display is an HDMI output via some unknown method to me, but although things are slow to progress I am figuring bits out and will have something soon. now that we can see the patching for the kernel and steward-fu’s details are available i should be able to get somewhere. just means more reverse engineering than i initially intended.


nice :- )

my patch to the dts and analog.c are naive, don’t really know how kernel internal work, write them after a tiny bit of search & read … :S
also i wasn’t include the linux icon overwrite who was into the original kernel 4.12 patch

i just found that adding CONFIG_DRM_LIMA=y in the .config enable & compile the new mainline driver \o/

kernel with lima is here >

i’ll try rebrand a cleaner patch with all fix tomorrow night, until here is some step i done :

git clone --depth 1
mv linux b
curl > linux.5.patch
patch -p0 < linux.5.patch
curl > ./b/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dts
curl > ./b/sound/soc/sunxi/sun8i-codec-analog.c
cd b
cp ./arch/arm/configs/clockworkpi_cpi3_defconfig .config
edit .config & add CONFIG_DRM_LIMA=y (it seem compile overwrite the file, i was need multiple set before really set ?!)
install arm-linux-gnueabi-gcc ,here on arch & aur > pikaur -S arm-linux-gnueabi-gcc
install uboot-tools for mkimage last command, on arch > pacman -S uboot-tools
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -n “Linux kernel” -d arch/arm/boot/zImage uImage