Build Micro-Hypervisor Core Framework

  1. Prepare raspberry pi sd-card image
    1. Download https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2016-11-29/2016-11-25-raspbian-jessie-lite.zip
    2. Use win32diskimager under Windows OS to burn contents of .zip
    3. Use ImageWriter tool under Ubuntu
  2. Boot into raspbian using the sd-card on the pi and resize the root filesystem to fit the entire sd card. Use the following commands once logged in:
    1. sudo raspi-config
    2. (optional) run the bottom option update to make sure you have latest version of the configuration software
    3. run the second option expand_rootfs
    4. click finish
    5. select YES when asked for a reboot
  3. Development system (VM, baremetal or Windows/WSL with Ubuntu 16.04.x) setup
    1. sudo apt-get update
    2. sudo apt-get install build-essential autoconf autotools-dev
    3. sudo apt-get install git
    4. sudo apt-get install bc
  4. Install Raspberry PI development tools on development system
    1. git clone https://github.com/raspberrypi/tools
    2. Add ~/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/ to PATH
  5. Install and build RPI kernel on development system
    1. git clone https://github.com/raspberrypi/linux.git
    2. cd linux
    3. git checkout rpi-4.4.y
    4. export KERNEL=kernel7
    5. make ARCH=arm CROSS_COMPILE=~/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf- bcm2709_defconfig
    6. make -j 4 ARCH=arm CROSS_COMPILE=~/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf- zImage modules dtbs
    7. mkdir -p ~/uxmhf-rpi3-staging/mod_install
    8. make -j 4 ARCH=arm CROSS_COMPILE=~/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf- INSTALL_MOD_PATH=~/uxmhf-rpi3-staging/mod_install/ modules_install
    9. ./scripts/mkknlimg arch/arm/boot/zImage ~/uxmhf-rpi3-staging/$KERNEL.img
    10. mkdir -p ~/uxmhf-rpi3-staging/overlays
    11. cp ./arch/arm/boot/dts/overlays/*.dtb* ~/uxmhf-rpi3-staging/overlays/.
    12. cp ./arch/arm/boot/dts/overlays/README ~/uxmhf-rpi3-staging/overlays/.
    13. mkdir -p ~/uxmhf-rpi3-staging/boot
    14. cp ./arch/arm/boot/dts/*.dtb ~/uxmhf-rpi3-staging/boot/.
  6. Build uberXMHF Raspbery PI 3 on development system
    1. cd uxmhf-rpi3
    2. ./bsconfigure.sh
    3. ./configure
    4. make clean
    5. make OSKRNLIMG=~/uxmhf-rpi3-staging/kernel7.img
    6. cp uxmhf-rpi3.img ~/uxmhf-rpi3-staging/.
    7. cp rpi3-config.txt ~/uxmhf-rpi3-staging/config.txt
  7. Note: you can run ./configure above using any combination of the following optional (experimental) parameters as needed:
    1. ./configure --enable-dmaprot to enable DMA protection capabilities
    2. ./configure --enable-secboot --with-boot-partition-start=BP_START_SECTOR --with-boot-partition-end=BP_END_SECTOR to enable secure boot capabilities. In this case BP_START_SECTOR and BP_END_SECTOR are the values of the starting and ending sectors of the boot partition (/dev/mmcblk0p0) as obtained from the output of the following command: sudo fdisk -l /dev/mmcblk0. Replace /dev/mmcblk0 with the sdcard device on the development system.
    3. ./configure --enable-intprot to enable interrupt protection capabilities
    4. ./configure --enable-fiqreflection to enable guest FIQ interrupts to be handled within micro-hypervisor
    5. ./configure --enable-debug-uart to enable debug output via UART; you must additionally either specify, Mini UART (via --enable-uart-mini) or full (PL011) UART (via --enable-uart-pl011). Also, if using PL011 UART, you can specify --enable-uart-pl011-ctsrts to enable UART hardware flow control.