Contents of the flash.sh script

Can anyone show the contents of theflash.sh script (which writes the u-boot to the SD card) for Jetson Nano ?

Or does anyone know the options for the DD command to write u-boot.bin directly to SD card ?

Hi,

You can directly use “-r -k partition_name” to write your uboot file with flash.sh.

Please check the section “Flashing U-Boot Only”
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/uboot_guide.html

Unfortunately, I do not have the ability to use standard tools, including flash.sh (I’m working on translating the Armbian build for Jetson Nano to the main core and u-boot). Maybe someone can help me, write a new u-boot to the SD card (using standard tools flash.sh) and then make a simple copy of the mmcblk0p9 partition with the DD utility and throw me the resulting copy of the partition. You can get a new u-boot from the link.

I tried to write this u-boot directly to the 9 partition (utilite dd), but the system does not start, it gives an error. I think it’s because of the wrong entry

[0011.757] device_query_partition_size: failed to open partition sd0:USP !

[0011.764] USP partition read failed!
[0011.767] blob_init: blob-partition USP header read failed
[0011.773] android_boot Unable to update recovery partition
[0011.778] kfs_getpartname: name = LNX
[0011.782] Loading kernel from LNX
[0011.796]
[0011.797] -----------------------------------------------
[0011.802] Synchronous Exception: DATA ABORT (FAR: 17ffffeb8)
[0011.808] -----------------------------------------------
[0011.813] PAR_ELX: 0x80b
[0011.816]
[0011.817] ESR 0x96000005: ec 0x25, il 0x1, iss 0x5
[0011.822] -----------------------------------------------
[0011.827] [Stack Trace]
[0011.830]
[0011.831] => pc:0x92C4C3D4, sp:0x92CB21A0
[0011.835] => pc:0x92C175E4, sp:0x92CB23D0
[0011.839] => pc:0x92C03904, sp:0x92CB2410
[0011.843] => pc:0x92C043DC, sp:0x92CB2690
[0011.847] => pc:0x92C03394, sp:0x92CB27E0
[0011.850] => pc:0x92C029E8, sp:0x92CB28F0
[0011.854] => pc:0x92C029BC, sp:0x92CB2900
[0011.858] -----------------------------------------------
[0011.864] iframe 0x92cb20b0:
[0011.867] x0 0x 0 x1 0x 2 x2 0x 10 x3 0x fffffda0
[0011.876] x4 0x 0 x5 0x 92ca7ce8 x6 0x 9b693607 x7 0x 24
[0011.885] x8 0x 83000000 x9 0x 2543e x10 0x 25434 x11 0x 92cb279c
[0011.894] x12 0x 83000000 x13 0x 92ca1f2c x14 0x 83000000 x15 0x 3c0
[0011.904] x16 0x ffff0 x17 0x 10000 x18 0x 0 x19 0x 17ffffeb8
[0011.913] x20 0x 92cb2588 x21 0x 10 x22 0x 92cb2588 x23 0x 92cb0518
[0011.922] x24 0x 0 x25 0x 0 x26 0x 0 x27 0x 0
[0011.932] x28 0x 0 x29 0x 92cb23d0 lr 0x 92c175e8 sp 0x 92cb21a0
[0011.941] elr 0x 92c4c3d4
[0011.944] spsr 0x 80000309
[0011.947] -----------------------------------------------
[0011.953] panic (caller 0x92c01238): die
[0011.957] HALT: spinning forever…

With the new u-boot, everything was much easier. :)
After running the latest version of the official Ubuntu image for Jetson Nano from the SD card, u-boot was automatically updated (in SPI ?) and now u-boot on the SD card is not needed at all. Also with the new u-boot-2020.04, there is an option to start the system immediately from a USB drive. I managed to build and run a new version of Armbian with the main kernel 5.10.22. But so far there is one significant problem. USB does not work and there is no wired network. You can only manage the system via UART. When starting the kernel, an error is generated related to the firmware for USB. I tried to add these files to the system, but it doesn’t help. I don’t understand, maybe a new kernel needs a new firmware or I’m doing something wrong with adding and configuring the firmware ?

[    0.000000] psci: PSCIv1.0 detected in firmware.

[ 3.943607] tegra-xusb 70090000.usb: Direct firmware load for /lib/firmware/nvidia/tegra210/xusb.bin failed with error -2
[ 3.954631] tegra-xusb 70090000.usb: Falling back to sysfs fallback for: /lib/firmware/nvidia/tegra210/xusb.bin
[ 64.483028] tegra-xusb 70090000.usb: failed to request firmware: -11
[ 64.489385] tegra-xusb 70090000.usb: failed to request firmware: -11

The usb firmware should come along with the initrd. Did you build your own initrd?
The bootloader should read the same firmware from initrd here.

No, I didn’t add the firmware to the initrd. Thank you for your recommendations. I’ll try adding it. By the way, maybe you have recommendations on how to add the firmware directly to the kernel, so that it would be monolithic in the kernel ?

I figured out, the Armbian build system for Jetson Nano works. The question can be closed. For more information, follow the link.

Thank for help and suggestions.

1 Like