Close

Introduction

A project log for Orange Pi Zero native network boot

Tutorial describing steps to make Orange Pi Zero boot natively from network

andriymalyshenkoandriy.malyshenko 08/11/2021 at 19:380 Comments

Recently I was playing around Orange Pi Zero (actually checking if I'd be able to boot it without any storage). Almost accidentally I found out that recent u-boot able to use onboard Ethernet for boot purposes. Checked everything and it did indeed worked. I want to note my steps for anyone willing to repeat that process.


First of all prerequisites:

- Orange Pi Zero - tutorial would not work for just any Orange Pi out there. I'm using onboard SPI flash to start boot process, and per my knowledge only Orange Pi Zero has both SPI flash and Ethernet PHY.

- To configure Orange Pi we need SD card. One finished it will be no longer required. It is not strictly necessary, but makes things easier.

- (optional) To debug whole process it is really helpful to have USB-UART adapter. It will cost you around $1 if you still don't have one. It is not strictly necessary, but will help a lot in understanding the process

From your network perspective

- (A) Some router serving as DHCP server. When Pi will bot it will need clear instruction where boot components should be taken from.

- (B) Some network server with storage, preferably fast one. It will store Pi filesystems

- (C) Some network server with boot artifacts exposed via TFTP server.

All of the above can be combined in single physical machine, or split roles in every possible combination. 

From the perspective of going through this tutorial we would need some wokrplace PC or laptop with access to the same network. This is where we're sitting and deploying all the magic.

The process in general will look like this

1. We prepare standard bootable image on SD card and boot it on our Pi. We will need it to (a) flash u-boot to onboard SPI flash and (b) to take filesystem snapshot

2. We will configure NFS (network accessible filesystem) and take snapshot from running system.

3. We will configure TFTP service on network boot server and configure DHCP to instruct our Pi to use it.

Boot process in short:

Discussions