Skip to content

Setup Instructions for Windows

Siwadon Saosoong edited this page May 8, 2018 · 17 revisions

Prerequisites

Python 3

  1. Download the latest version of Python from Python.org.

  2. Run the installer, and check Add Python 3.6 to PATH before you proceed.

USB TTL Serial Cable Driver

Download Standard Driver from Prolific, and install it.

GNU Toolchain for ARM Embedded Processors

  1. Download the toolchain from Arm (the first link should be fine).

  2. Run the installer.

  3. Check Add path to environment variable on the last screen.

GNU Make

  1. Download and install from http://gnuwin32.sourceforge.net

  2. Add make to your Path

  • Open Control Panel > System > Advanced system settings > Environment Variables (Or Search for Environment variables)
  • Click on Path, then click Edit...
  • Browse for GnuWin32 folder. It should be C:\Program Files (x86)\GnuWin32\bin.
  • Click OK

PuTTY

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Verifying

  1. Restart your computer one time after finished installing tools.

  2. Open Command Prompt

  3. Type python --version. You should see Python 3.6.x. Then run pip install pyserial xmodem

  4. Type arm-none-eabi-gcc --version. You should see

arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1. Type make --version. You should see GNU Make 3.81 ....

  2. You should be able to compile kernel and send it to your RPi using rpi-install.py by now.

rpi-xboot and rpi-install.py

You need to know the correct path for your USB serial cable. Just open Device Manager and look under Ports. It will be COMx where x is a number.

Now go to rpi-xboot directory using Git Bash or something similar due to GNU Make doesn't work well with Command Prompt.

  1. Run make to build bootloader.img and uart.img.

  2. Run

python rpi-install.py \\\\.\\COMx uart.img && putty -serial COMx -sercfg 115200,8,n,1,N

Note: If you are using Command Prompt instead of Git Bash, you need to remove extra backslashes, so it will be \\.\COMx

If this command doesn't work, you can run python rpi-install.py \\\\.\\COMx uart.img. After that, just open PuTTY and follow the instructions here.

xv6

You need an extra step to modify the Makefile to be compatible with Windows.

Modify $(BUILD): section at line 112:

// before
	mkdir $@

// after
	cmd /E:ON /C if not exist $@ mkdir $(subst /,\,$@)

After this, you can run make loader and get the kernel7.img to send to your RPi. 🎉

uprogs workaround

  1. Follow the instruction here https://yichaoou.github.io/tutorials/software/2016/06/28/git-bash-install-gcc , and also install msys-gcc (bin)

  2. Add C:\MinGW\bin and C:\MinGW\msys\1.0\bin to Environment Variables

  3. Get new Makefile and usys.S from https://gist.github.com/idewz/2c6020d6e936cc01769958888bf9d958