Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Getting Started

Álvaro Jurado edited this page Oct 9, 2018 · 99 revisions

There isn't any ready install media for now that you could use for running Harvey in a real machine or Qemu, so this is the basic steps you will need to follow for building the source code later.

How to get Prerequisites

To build Harvey and play with it, you need to have git, golang, qemu, a working compiler gcc, clang or icc (Intel Compiler), binutils and bison installed.

This programs could have different versions across the platforms in what Harvey can be built. As a reference, we're now working with this toolchain versions:

GCC: gcc 6.x, 7.x and 8.x for cross compiling. gcc 4.7 as first attempt of native toolchain.

Clang: 3.9, 4.0 and 6.0

Binutils: 2.29 and higher. Lower versions won't be compatible with some ld flags.

Errors derived from other versions, please report to our List or Slack channels.

Official support

we test with Linux on every commit

Linux

On a Debian, Ubuntu or other .deb system, you should be able to get going with:

sudo apt install git golang build-essential bison qemu-system curl

FreeBSD

(Regulary tested with latest release version)

If you are in a FreeBSD, you should do:

pkg install git go clang6 bison
export PATH=/usr/local/bin:$PATH

Experimental

these aren't tested development platforms

Docker

If you are familiarized with Docker, Harvey has available an updated repo in Docker Hub for you:

docker run harveyos/harvey

to build harvey in your own machine

docker run -v `pwd`:/harvey --entrypoint=/harvey/util/build harveyos/harvey

and run it

docker run -v `pwd`:/harvey harveyos/harvey

OSX

(tested on OS X "El Capitan" and macOS "Sierra", see homebrew-gcc_cross_compilers)

If you try to clone the git repo on Mac, you'll have problems due to files in some folders having names that differ only in case (e.g. HB and Hb). This is due to the Mac filesystem (HFS+) being case-insensitive by default.

The way to work around it is to create a case-sensitive disk image and clone the repo into that. You can then do all your work there:

  • Download the workspace.sh script from here.
  • Use it to create a new disk image (5g in this case, way more than necessary):
    • CASE_SAFE_VOLUME_SIZE=5g workspace.sh create
    • workspace.sh mount
  • Now you can clone the repo and continue with the build steps below.

After this, you should install macports and do

port install x86_64-elf-gcc
port install x86_64-elf-binutils
port install qemu
export TOOLPREFIX=x86_64-elf-

or if you use homebrew

brew tap sevki/gcc_cross_compilers
brew install sevki/gcc_cross_compilers/x86_64-elf-gcc
brew install qemu go
export TOOLPREFIX=x86_64-elf-

Windows 10

You can use the Windows Linux Subsystem to compile and run Harvey. First you need to install it, you can follow the steps in the official Windows documentation.

Once you have a bash terminal on your Windows, just follows the steps for Linux, and when you have Harvey compiled, use the script util/GO9PCPUDOCKER to run it.

Now you need drawtermto connect to your Harvey. To do this, you can download the 9front version.

Let's now to build Harvey


TIP

Helping us