vmwos icon indicating copy to clipboard operation
vmwos copied to clipboard

a simple homebrew operating system for the Raspberry Pi

The VMWos -- an operating system by Vincent M. Weaver

History:

	This project originated from code written for the
	ECE598 Advanced Operating System class
	at the University of Maine.

Building:
You will either need to build natively on an ARM
machine or cross compile.

Quickstart Debian:
	apt-get install genromfs gcc-arm-none-eabi

To build natively, edit Makefile.inc and make
the CROSS variable be empty.

Otherwise, edit Makefile.inc to point to your
cross compiler.

It is possible to build this on OSX and Windows,
I should update with instructions.

Running "make" should build kernel/kernel.img and kernel/kernel7.img

Installing:

	You need an SD card with an existing OS install
	that you don't care about (raspbian works great).

	Mount the boot directory on that SD card, and copy
	the existing kernel.img to a safe place.

	Now copy your vmwos kernel/kernel.img and kernel/kernel7.img overtop
	the existing kernel.img and kernel7.img


Required Hardware:
Currently VMWos runs on any Raspberry Pi 
Model1 ( A, B, B+ or A+), Model 2, and Model 3

I have not tested on Pi Zero.

It has a driver that cna output to the HDMI screen, but that is
disabled by default currently (it is slow and buggy).
It has no support for USB input.

To get full input/output you will need to get a USB/Serial
adapter and connect to another machine running a terminal
program such as minicom.

Configure your serial device for 115200,8N1

Using:

	It is currently fairly limited.
	
	Assuming you have booted properly into the shell, you can
	run "help" to get a list of supported commands.

	Also "ls" should work.

Compiling user programs:
See the examples in ./userspace

Right now you need to create a binary with -fPIC and use
objcopy to create a RAW binary.
I can't seem to find a working ARM binflt toolchain.

There is a simple C library included ("vlibc")

For more information:


	See http://www.deater.net/weave/vmwprod/vmwos


Changes that break older Bare-metal 
See README.hardware

It is hard running a backward compatible bare-metal OS on 
Pi as things keep changing.

Some of this is mitigated if you parse the device tree
found on newer setups.

Hardware Changes:
=================
+ On 1GB systems the IO_BASE moved 
	from 0x20000000 to 0x3f0000000
+ Processor architecture changed from ARMv6 to ARMv7 to ARMv8
+ On Pi3 the pl011 is hooked to bluetooth, so
	mini-uart is the default (pl011 is mapped to gpio 32/33)
+ ACT LED:
	Model B was GPIO16, Active Low
	On 2/B+/A+ was GPIO47, Active High
	On 3 it is on an i2c/GPIO expander controlled by GPU
+ TODO: The Framebuffer address moved on Pi3 (?)

+ Pi3 the Arasan MMC interface is enabled, and mapped to GPIOs 48-53,
	Used by wifi?
+ Pi3 GPCLK2 is mapped to GPIO 43.
+ Pi2/Pi3, firmware brings system up in HYP (hypervisor) mode

Firmware Changes:
=================
+ Older firmware, the framebuffer byte order was GRB instead of RGB
+ Older firmware, the UART_CLOCK was 3MHz, it's 48MHz on newer
+ Older firmware, did ATAGS, newer use device-tree
+ Have issue on older-firmware loading kernel image >15MB
	not sure if bug or not

Vince Weaver [email protected] 5 March 2018