Booting TX1 via network - I don't get it.

I’m missing a piece in the TX1 boot process from network.

I’ve got a Ubuntu x64 host on 192.168.100.2 with nfs,dhcp and tftp services.
I’ve got an TX1 devkit with USB2 Ethernet adapters. (RTL8152, MOSCHIP 7830, ASIX88179 chipsets). I recompiled U-Boot, and all adapters work after “usb start”.

Btw: the RTL8152 and ASIX88129 drivers from L4T Sources 28.1 don’t compile. I fetched working copies from the lates u-boot sources from the Denx ftp server. (the guys who make u-boot)

My problem: How do I boot from here?

“dhcp” starts, gets an IP address and tries to load some image via tftp. But what image to get? Kernel?

“pxe” would need an pxelinux to boot, but where to get?

“nfs”? no idea how to use it. boot_targets ist set to “mmc1 mmc0 usb0 pxe dhcp”, so won’t try nfs.

How do I boot the board from ethernet?

I’ve flashed the board with this script:

!/bin/bash
sudo ./flash.sh -N 192.168.100.2:/jetson_root -n 192.168.100.10:192.168.100.2:192.168.100.2:255.255.255.0 -r OP-TX1 eth1

The U-Boot environment looks like this:

Tegra210 (OP-TX1) # printenv
arch=arm
baudrate=115200
board=OP-TX1
board_name=OP-TX1
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_pci_enum=pci enum
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc1 mmc0 usb0 pxe dhcp
bootcmd_dhcp=run boot_net_usb_start; run boot_net_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd=run distro_bootcmd
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; run boot_net_pci_enum; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
cbootargs=root=/dev/nfs rw netdevwait ip=192.168.100.10:192.168.100.2:192.168.100.2:255.255.255.0::eth1:off nfsroot=192.168.100.2:/jetson_root console=ttyS0,115200n8 console=tty0 OS=l4t fbcon=map:0 net.ifnames=0 androidboot.modem=none androidboot.serialno=03215160595710808401 androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff2bf000 nvdumper_reserved=0xff23f000 core_edp_mv=1075 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootloader=00.00.2014.50-t210-fadd1be5 androidboot.verifiedbootstate=orange
cpu=armv8
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr=83100000
fdt_addr_r=0x82000000
fdt_high=ffffffffffffffff
fdtcontroladdr=fc81dba0
initrd_high=ffffffffffffffff
kernel_addr_r=0x80080000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x80080000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
pxefile_addr_r=0x90100000
ramdisk_addr_r=0x83200000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}…; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing…; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing…; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing…; fi; done
scriptaddr=0x90000000
soc=tegra210
stderr=serial
stdin=serial
stdout=serial
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
vendor=nvidia

What’s wrong?

Frank-Christian Kruegel
Embedded Engineer
OptoPrecision GmbH, Bremen, Germany

hello fchk,

there’s 28.1 Release Development Guide,
you could get it from the Jetson Download Center here: [url]https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-1[/url]
please refer to the U-Boot Customization session, try searching for NFS keywords.
thanks

Sorry. I’ve read this documentation, but there are still some pieces missing.

I tried this:

In U-Boot:
setenv boot_targets dhcp
saveenv

in Server’s /tftpboot:
default: (that’s the filename the TX1 gets from the DHCP server)

echo Booting via DHCP/TFTP…
setenv fdtfile OP-TX1.dtb
setenv kernelfile kernel.img
setenv ramdiskfile initrd.img

tftp ${fdt_addr_r} ${fdtfile}
tftp ${kernel_addr_r} ${kernelfile}
tftp ${ramdisk_addr_r} ${ramdiskfile}

setenv bootargs ${cbootargs}

bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

Loading the files actually works…

U-Boot 2016.07 (Aug 15 2017 - 14:40:05 +0200)

TEGRA210
Model: NVIDIA P2371-2180
Board: NVIDIA OP_TX1
DRAM: 4 GiB
MMC: Tegra SD/MMC: 0, Tegra SD/MMC: 1
In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0
starting USB…
USB0: USB EHCI 1.10
scanning bus 0 for devices… 4 USB Device(s) found
BOOTP broadcast 1
DHCP client bound to address 192.168.100.10 (5 ms)
Using eth_rtl8169 device
TFTP from server 192.168.100.2; our IP address is 192.168.100.10
Filename ‘default’.
Load address: 0x90000000
Loading: #
93.8 KiB/s
done
Bytes transferred = 386 (182 hex)

Executing script at 90000000

Booting via DHCP/TFTP…
Using eth_rtl8169 device
TFTP from server 192.168.100.2; our IP address is 192.168.100.10
Filename ‘OP-TX1.dtb’.
Load address: 0x82000000
Loading: #################################################################
######################
1.5 MiB/s
done
Bytes transferred = 441816 (6bdd8 hex)
Using eth_rtl8169 device
TFTP from server 192.168.100.2; our IP address is 192.168.100.10
Filename ‘kernel.img’.
Load address: 0x80080000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
####
1.9 MiB/s
done
Bytes transferred = 20984432 (1403270 hex)
Using eth_rtl8169 device
TFTP from server 192.168.100.2; our IP address is 192.168.100.10
Filename ‘initrd.img’.
Load address: 0x83200000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###################################################
1.8 MiB/s
done
Bytes transferred = 6247980 (5f562c hex)

Booting kernel from Legacy Image at 80080000 …

Image Name: kernel
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 20984368 Bytes = 20 MiB
Load Address: 08008000
Entry Point: 08008000
Verifying Checksum … OK

Loading init Ramdisk from Legacy Image at 83200000 …

Image Name: ramdisk
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 6247916 Bytes = 6 MiB
Load Address: 83200000
Entry Point: 83200000
Verifying Checksum … OK

Flattened Device Tree blob at 82000000

Booting using the fdt blob at 0x82000000
Loading Kernel Image … Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover
resetting …

But when I saw the message “Image too large: increase CONFIG_SYS_BOOTM_LEN” I knew this was not how I was supposed to do it.

So please tell me how it it supposed to work:

  • What files do I have to put onto the tftp server and where to get them
  • How to modify the NFS root (which contains a copy of an sdcard that actually boots)
  • anything to configure in dhcpd (options…)?
  • how to setup the u-boot environment variables?
  • is dhcp the correct boot target or should I use pxe? How to configure pxe?

The documentation is a bit too sketchy for me. A working example configuration would be helpful.

Frank-Christian Kruegel
Embedded Engineer
OptoPrecision GmbH, Bremen, Germany

I can’t answer this, I have not set up for PXE boot. However, what is the source of your kernel.img, is it Image, or zImage? I don’t think the boot loader understands compression in arm64, so it would use Image.

Also, what is the size of your initrd? Is less than 128MB when decompressed? Within this initrd, what is the sum total size of the modules?