Before the Lab the development was going in total darkness…, um I meant using serial ftdi usb cable. But time comes to have a
light screen. Amazingly it wasn’t so complicated. Yes, we just used codes from 9pi project (thanks to Richard Miller).
Our expected result is:
To achieve we need first to expand our “rpi” configuration and add draw and screen to dev section, tk draw memlayer memdraw into the lib section and draw and tk to mod:
dev root cons env mnt pipe prog srv dup uart draw screen lib interp tk draw memlayer memdraw sec math kern mod math sys draw tk port alarm alloc allocb chan dev dial dis discall exception exportfs inferno latin1 mul64fract nocache nodynld parse pgrp print proc qio qlock random sysfile taslock tod xalloc code int kernel_pool_pcnt = 10; int main_pool_pcnt = 40; int heap_pool_pcnt = 20; int image_pool_pcnt = 40; int cflag = 0; int consoleprint = 1; int redirectconsole = 1; char debug_keys = 1; int panicreset = 0; init rpiinit root /chan / /dev / /dis / /env / /fd / /net / /prog / /dis/lib /dis/disk /osinit.dis
We add from 9pi and have slight modifications of vcore.c and screen.c. Very good that Inferno and Plan9 have almost common codebase.
Also we add screeninit() just after poolsizeinit() in main(). All other changes are mostly polishing to fit imported sources.
What is very good about this Lab is that there is no more real need to have USB-FTDI cable connected, all debug messages and some indications can come just to our connected display! So if there anybody else would like to join Inferno OS porting to RPI, it became much simpler because no more need for specialized hardware.