Booting from Network
To boot completely over the network you need:
- usb ethernet compiled into the Freerunner's kernel
- NFS client compiled into the Freerunner's kernel
- a NFS server installed
- dfu-utils installed
- minicom or similar to connect to uboot
- patience
- luck
Root filesystem over NFS
To boot over NFS, please enable NFS root and usb ethernet in the Freerunner's kernel config. (TODO: Kernel settings are missing here. ) Then type the following into your uboot console (inspired by http://wiki.openmoko.org/wiki/Booting_from_NFS):
setenv bootargs_nfs root=/dev/nfs nfsroot=192.168.0.200:/nfsexports/Gentoo ip=192.168.0.202:192.168.0.200::255.255.255.0:Hugin:usb0:off rootdelay=5 console=tty0 console=/dev/tty0 loglevel=8 regular_boot
setenv menu_4 Boot from NFS (Gentoo rootfs): setenv bootargs \${bootargs_nfs} \${mtdparts}\; mmcinit\; ext2load mmc 0 0x32000000 /boot/uImage-experimental\; bootm 0x32000000
saveenv
and substitute the values in the example:
| Example | Meaning |
| 192.168.0.200 | IP address of your NFS server |
| 192.168.0.202 | IP address of the Freerunner |
| Hugin | Hostname of the Freerunner |
| usb0 | Interface to use. Right now only usb works. |
| /nfsexports/Gentoo | Exported location. See below. |
| menu_4 | Menu entry you want to use. |
To setup your NFS fileserver see http://en.gentoo-wiki.com/wiki/NFS/Server. The /etc/exports file in my example looks as follows:
# /etc/exports: NFS file systems being exported. See exports(5). # Freerunner Gentoo rootfs /nfsexports/Gentoo 192.168.0.0/24(rw,no_subtree_check,no_root_squash)
After confirming that your rootfs works from RAM, we are comming to the next geek stage: Booting completely from network. :-)
Kernel over Network
Compile yourself a kernel. Make sure you are able to boot over NFS. Make sure this kernel is smaller than 2MB! This is important, as otherwise your kernel won't boot and you don't get an error message. Before transferring the kernel to the Freerunner create a uboot image (I will call it uImage). Afterwards, call the following command from within your kernel directory:
dfu-util -a 0 -R -D <put the name of your uImage file here>
Now, dfu-utils should upload your kernel. Again, please make sure it is smaller than 2MB! To boot the kernel from RAM you need to add the following line to your uboot environment:
menu_5 Boot from NFS (Gentoo RAM): setenv bootargs \${bootargs_nfs} \${mtdparts} \; bootm 0x32000000
Please make sure you have the bootargs_nfs variable set as shown above.
