Dobrica Pavlinušić's random unstructured stuff
u-boot: Revision 1

How to setup netboot for u-boot easily...



dnsmasq

dpavlin@x200:~$ cat /etc/dnsmasq.d/dhcp.conf 

interface=enp0s25

dhcp-range=192.168.4.50,192.168.4.150,12h

enable-tftp
#tftp-root=/srv/tftp

# Set the boot filename for netboot/PXE. You will only need
# this is you want to boot machines over the network and you will need
# a TFTP server; either dnsmasq's built in TFTP server or an
# external one. (See below for how to enable the TFTP server.)
#dhcp-boot=pxelinux.0

tftp-root=/export/tegra20
dhcp-boot=boot/boot.scr

nfs

apt-get install nfs-kernel-server

dpavlin@x200:~$ grep tegra20 /etc/exports 
/export/tegra20        192.168.4.0/24(rw,sync,no_root_squash,no_subtree_check,fsid=1)

u-boot

dpavlin@x200:/export/tegra20$ ls -al boot.scr.uimg 
lrwxrwxrwx 1 dpavlin dpavlin 13 Jan 13 11:51 boot.scr.uimg -> boot/boot.scr
dpavlin@x200:/export/tegra20$ cat boot/boot.cmd

tftpboot ${kernel_addr_r} /boot/zImage
tftpboot ${fdt_addr_r} /boot/tegra20-ventana.dtb
tftpboot ${ramdisk_addr_r} /boot/uInitrd.new
setenv bootargs ip=192.168.4.100:192.168.4.1:192.168.4.1:255.255.255.0:tegra20: root=/dev/nfs rw nfsroot=192.168.4.1:/export/tegra20
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

# mkimage -C none -A arm -T script -d boot.cmd boot.scr