User Tools

Site Tools


developersguide:netbootingarm

Netbooting Minix on ARM

This page describes how to boot Minix on an ARM-based computer over the network. In other words, when the ARM based computer is powered on, it will download the kernel and servers and use them to boot.

Network Setup

Hardware

The setup is fairly straightforward. You will need an ethernet hub or switch, a supported ARM based computer (BeagleBone, BeagleBone Black, BeagleBoard-xM, etc), a computer to act as a tftp server, and 2 ethernet cables. Connect the ARM computer to the hub/switch using one ethernet cable, connect the tftp server to the hub/switch using the other ethernet cable, and apply power to the hub/switch.

Network Configuration

The default netboot configuration is based around the 192.168.12.0/24 network with the TFTP server's IP address being 192.168.12.10 and the ARM board's IP address being 192.168.12.62. You can change the defaults by editing $HOME/minixsrc/releasetools/gen_uEnv.txt.sh. Setup the network interface that you plan on using on the TFTP server to have the proper IP address using your operating system's network configuration tool.

Software Setup - ARM Computer

The steps required to build an SD card image for netbooting are very similar to the regular steps. Thus, they won't be repeated here. This is to prevent duplication and things getting out of sync. For the “normal” build instructions see Minix on ARM.

The only difference to the build instructions is that before you run ./releasetools/arm_sdimage.sh, you have to change one line in the script. Edit the line in the file which executes gen_uEnv.txt.sh, adding a -n. The resulting line in $HOME/minix/src/releasetools/arm_sdimage.sh should look like this:

./releasetools/gen_uEnv.txt.sh -n > ${IMG_DIR}/uEnv.txt

Then, continue following the instructions to produce an SD card image, write it to an SD card, pop it in your ARM based system, and wait to power it on until you're TFTP server is setup.

Software Setup - TFTP Server

The end goal is to share the object directory ($HOME/minix/obj.evbearm-el) via TFTP. There are several TFTP servers available. If you choose to use a TFTP server software not listed below, please add the configuration procedure to this wiki page.

dnsmasq TFTP

dnsmasq provides a built-in TFTP server. Note, if installing on Gentoo, you'll need to set the tftp USE flag. Here's what my /etc/dnsmasq.conf file looks like:

# Listen only to this interface
interface=eth0
# Enable the TFTP server and set the root directory.
enable-tftp
tftp-root=/home/tcort/minix/obj.evbearm-el/

Putting it all Together

Once the TFTP server is up and running and the SD card with the proper u-boot configuration is loaded, you simply need to apply power to the ARM board. It should automatically attempt a netboot. If successful, there should be messages that look like this scrolling by:

...
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.12.10; our IP address is 192.168.12.62
Filename 'kernel.bin'.
Load address: 0x80200000
Loading: #################
          -2 MiB/s
done
...
developersguide/netbootingarm.txt · Last modified: 2014/11/11 14:52 (external edit)