Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/zador-blood-stained/lib
- Loading branch information
Showing
3 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# FEL/NFS boot explanation | ||
|
||
### What is FEL/NFS boot? | ||
|
||
FEL/NFS boot mode is a possibility to test freshly created Armbian distribution without using SD card. It is implemented by loading u-boot, kernel, boot script and .bin/.dtb file via [USB FEL mode](https://linux-sunxi.org/FEL/USBBoot) and providing root filesystem via NFS share. | ||
|
||
Note, this mode is designed only for testing. To use root on NFS permanently, use `ROOTFS_TYPE=nfs` option. | ||
|
||
### Requirements | ||
|
||
- Allwinner device that supports FEL mode. Check [wiki](https://linux-sunxi.org/FEL) to find out how to enter FEL mode with your device | ||
- USB connection between build host and board OTG port (VM USB passthrough or USB over IP may work too) | ||
- Network connection between build host and board. For target board **wired** Ethernet connection is required (either via onboard Ethernet or via USB ethernet adapter that has required kernel modules built-in) | ||
- NFS ports on build host should be reachable from board perspective (you may need to open ports in firewall or change network configuration of your VM) | ||
- Selected kernel should have built-in support for DHCP and NFS root filesystem | ||
|
||
#### Additional requirements (recommended) | ||
|
||
- DHCP server in local network | ||
- UART console connected to target board | ||
|
||
### Build script options | ||
|
||
- KERNEL_ONLY=no | ||
- EXTENDED_DEBOOTSTRAP=yes | ||
- ROOTFS_TYPE=fel | ||
|
||
Example: | ||
``` | ||
./compile.sh KERNEL_ONLY=no BOARD=cubietruck BRANCH=next PROGRESS_DISPLAY=plain USE_MAINLINE_GOOGLE_MIRROR=yes RELEASE=jessie BUILD_DESKTOP=no EXTENDED_DEBOOTSTRAP=yes ROOTFS_TYPE=fel | ||
``` | ||
|
||
### Shutdown and reboot | ||
|
||
Once you start FEL boot, you will see this prompt: | ||
|
||
``` | ||
[ o.k. ] Press <b> to boot again, <q> to finish [ FEL ] | ||
``` | ||
|
||
Pressing `q` (or any key other than `b`) deletes current rootfs and finishes build process, so you need to shut down or reboot your board to avoid possible problems. All changes to root filesystem will persist until you exit FEL mode. | ||
|
||
To reboot again into testing system, switch your board into FEL mode and press `b`. | ||
|
||
Because kernel and .bin/.dtb file are loaded from rootfs each time, it's possible to update kernel or its configuration (via `apt-get`, `dtc`, `fex2bin`/`bin2fex`) from within running system. | ||
|
||
### Advanced configuration | ||
|
||
If you don't have DHCP server in your local network or if you need to alter kernel command line, use `lib/scripts/fel-boot.cmd.template` as a template and save modified script as `userpatches/fel-boot.cmd`. Check [this](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/Documentation/filesystems/nfs/nfsroot.txt) for configuring static IP for NFS root | ||
|
||
Set `FEL_DTB_FILE` to relative path to .dtb or .bin file if it can't be obtained from u-boot config (mainline kernel) or boot/script.bin (legacy kernel) | ||
|
||
You may need to set these additional options (it's a good idea to put them in `userpatches/lib.config`: | ||
|
||
Set `FEL_NET_IFNAME` to name of your network interface if you have more than one non-loopback interface with assigned IPv4 address on your build host | ||
|
||
Set `FEL_LOCAL_IP` to IP address that can be used to reach NFS server on your build host if it can't be obtained from ifconfig (i.e. port forwarding to VM guest) | ||
|
||
Set `FEL_AUTO=yes` to skip prompt before trying FEL load |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters