bin User commands.
etc Template files for /etc.
include System include files.
lib System libraries.
libexec System binaries.
sbin System administration commands.
share Shared resources.
sys Kernel sources.
tools Build tools and simulators.
- Fubarino SD board.
- Olimex Duinomite, Duinomite-Mini, Duinomite-Mega and Duinomite-eMega boards.
- Olimex Pinguino-Micro board with PIC32MX795F512H microcontroller.
- Maximite and Colour Maximite computers.
- Majenko SDXL board.
- 4D Systems Picadillo-35T board.
- MikroElektronika MultiMedia Board for PIC32MX7.
- chipKIT Max32 board with SD card shield.
- chipKIT WF32 board with 2.4" LCD TFT display shield.
- Sparkfun UBW32 board with SD card slot.
- Microchip Explorer 16 board, with PIC32 CAN-USB plug-in module and SD & MMC pictail.
- Microchip PIC32 USB or Ethernet Starter Kit, with I/O Expansion board and SD & MMC pictail.
To compile everything from sources, you'll need some packages installed, namely: Berkeley YACC, GNU bison, flex, groff, ELF library and FUSE library. Under Ubuntu, for example, you can do it by command:
$ sudo apt-get install bison byacc flex groff-base libelf-dev
You will need to setup multiarch support when building on 64bit systems because currently RetroBSD requires a 32bit build environment. You can run the following command on Debian based systems to see if any alternate architectures are setup:
$ dpkg --print-foreign-architectures
The output from the command will likely be an empty line unless you have already setup your system for developing with alternate architectures.
Use the following command to make 32bit x86 repos available (I think that is what the command does. See the following references - Debian Wiki, Ubuntu Doc and Ubuntu Spec. Much of this information was cribbed from : Linode Help)
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
Check if there are newer libraries of the packages you already have installed:
$ sudo apt-get dist-upgrade
Lastly install the requisite compilers and support libraries if not present:
$ sudo apt-get install build-essential binutils
$ sudo apt-get install binutils-multiarch
$ sudo apt-get install multiarch-support
$ sudo apt-get install gcc-multilib g++-multilib
Finding the packages that contain the required libraries can be a challenge. The following can help when using Debian systems:
Using this website indicates that 32bit versions of libelf and libelf-dev (both required) are found in the following packages:
- libelf1
- libelf-dev
The 32bit version of these files can be installed using:
$sudo apt-get install libelf1:i386
$sudo apt-get install libelf-dev:i386
A cross-compiler toolchain is required to actually compile the RetroBSD kernel and utilities. The file 'target.mk' in the source root directory lists several possible toolchains. The Sourcery CodeBench Lite toolchain is known to work. By default the Sourcery CodeBench Lite install script will try and launch a graphical installer. This may or may not work for you. Use the '-console' option to prevent the graphical installer from launching. The '-h' flag will provide other useful information when invoking the install script.
RetroBSD make files expect to find the Sourcery CodeBench Lite cross-compiler tool chain in one of the following directories:
- /usr/local/mips-2013.11/ or
- /usr/local/mips-2014.05/
depending on the toolchain version installed
The Sourcery ColdeBench Lite install script can create the required directory if it is specified.
Its likely that you will encounter build errors because of missing tools (flex, awk, etc.) when compiling RetroBSD. The easiest way to rectify this is to search the output from the 'make' command for errors and install the missing tools. A tool called 'remake' can help with this.
You can change a desired filesystem size and swap area size, as required. Default is:
FS_MBYTES = 100
SWAP_MBYTES = 2
To compile the kernel and build a filesystem image, run:
$ make
A resulting root filesystem image is in file sdcard.img
.
A kernel is in file unix.hex
in your target boa
8000
rd subdirectory.
You need to put a filesystem image on a SD card. On Windows, use Win32DiskImager utility (https://launchpad.net/win32-image-writer/+download). On Linux, run:
$ sudo dd if=sdcard.img of=/dev/XYZ
Here XYZ
is a device name of SD card, as recognized by Linux (sdb in my case).
Kernel image should be written to PIC32 flash memory. The procedure depends on a board used.
Use a pic32prog utility (http://code.google.com/p/pic32prog/) and a USB cable to install a kernel:
$ pic32prog -d /dev/ttyUSB0 sys/pic32/max32/unix.hex
Here you need to change AVRTOOLS path and tty name according to your system.
Use a pic32prog utility (http://code.google.com/p/pic32prog/) and a USB cable to install a kernel:
$ pic32prog sys/pic32/ubw32/unix.hex
Use the bootload program for Windows, available for download by link: http://geoffg.net/Downloads/Maximite/Maximite_Update_V2.7B.zip
There is an auxiliary PIC18 chip on the Explorer 16 board, which can be used as a built-in programmer device. You will need a PICkit 2 adapter to install a needed firmware, as described in article: http://www.paintyourdragon.com/?p=51 (section "Hack #2: Lose the PICkit 2, Save $35"). This should be done only once.
Then, you can use a pic32prog utility (http://code.google.com/p/pic32prog/) and a USB cable to install a kernel:
$ pic32prog sys/pic32/explorer16/unix.hex
Use PICkit 2 adapter and software to install a boot loader from
file sys/pic32/starter-kit/boot.hex
. This should be done only once.
Then, you can use a pic32prog utility (http://code.google.com/p/pic32prog/) and a USB cable to install a kernel:
$ pic32prog sys/pic32/starter-kit/unix.hex
You can use a MIPS32 simulator to develop a debug a RetroBSD software, without a need for hardware board. By default, a simulator is configured to imitate a Max32 board. To build it:
$ cd tools/virtualmips
$ make
Run it:
$ ./pic32
Configuration of simulated board is stored in file pic32_max32.conf
.