I’ve been unsuccessfully trying for a few days to flash my Jetson Nano with a new pinmux configuration per the instructions given at https://developer.nvidia.com/embedded/dlc/Jetson-Nano-40-Pin-Expansion-Header-1.1. Whilst the flashing process itself is always successful, my Nano doesn’t complete boot up after being flashed but instead gets stuck showing the Nvidia splash screen - it doesn’t register the debug UART or other USB peripherals on my host PC or display any boot messages to the screen, so I am unable to diagnose what is preventing it performing its boot process.
I was originally trying to enable PWM on expansion pins 32 and/or 33 but gave up and went the route of sending serial instructions to an attached Arduio; but I’m interested in understanding why I’m unable to successfully flash my device using the supplied instructions since I’m obviously missing or misunderstanding something fundamental and want to learn.
- doing the compilation and flashing from a clean Ubuntu 18.04 minimal installation on both a Virtualbox VM and a bare metal laptop
- using both the i686 and x86_64 variants of the Linaro toolchain (Nvidia’s doc above recommends the i686 variant, but their L4T docs mention both i686 and x86_64 over at https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-322/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fxavier_toolchain.html)
- flashing using the source files and default values that one gets from pulling down the Nvidia-provided source code in the first doc linked above; flashing using just the default values from the pinmux config template spreadsheet (ie: export without changing anything); as well as using a lightly modified config template with just cell AR32 changed to PWM, AS32 to Output, and AT32 to blank - all with the exact same results
- different 32GB and 16GB SD cards as well as purchasing a brand new one just to be sure
- with and without the root filesystem included in the build
- many different combinations of the above
My Nano is powered via the DC barrel jack, and works perfectly with an SD card flashed using the normal NVidia image.
Looking at the boot flow at https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-322/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fbootflow_jetson_nano.html%23 it seems I make it to Cboot (because the HDMI display initializes and I see the Nvidia boot logo) but then either Cboot don’t hand off to U-boot or I get stuck in Cboot because something is wrong with the device tree passed to Cboot from TegraBoot?
To reproduce what I’ve been attempting, I’ve created a Dockerfile for the build environment with Nvidia sources, and a script to automate the steps in Nvidia’s docs to compile in the new pinmux configurations. The Docker file and script along with simple instructions to build and launch the container, plus execute the script to build the pinmux configs are over at https://github.com/hmmkay/jetson-nano-pinmux.
In essence though, I:
- take a minimal Ubuntu 18.04 installation
- add basic packages for the build process (libc6-i386 and lib32z1 were from my own googling to satisfy failed link dependencies: aarch64-linux-gnu-gcc from the i686 linaro toolchain is 32bit ELF binary that wants to link against a missing /lib/libc.so.6 library which I believe libc6-i386 satisfies, but perhaps this is wrong?)
- pull down and unpack the linaro 7.3.1 i686 toolchain
- set environment variables for CROSS_COMPILE (there’s a typo in the Nvidia doc - I added a trailing hyphen) and PATH (for the correct dtc executable to be found)
- pull down and unpack Nvidia Jetpack 32.2.1 sources
- sync the Nvidia source tree
- git clone the pinmux-scripts
- pull down my own build script
- follow the Nvidia doc to use the .csv and .dtsi files to recompile U-boot and CBoot using my Nano’s device tree version of b00
- put my nano into Force Recovery mode and flash it with ‘sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1’. Interestingly the flash script says mmcblk0p1 is to boot off eMMC which my Nano doesn’t have, but I’ve tried mmcblk1p1 and that didn’t work either.
I’d appreciate some assistance figuring out where I’m going wrong!