On Jetson TX2 with a custom build Resin OS 2.19.0+rev1 services fail to install

On a Jetson TX2 devkit with a Resin OS 2.19.0+rev1my services can’t be installed:

Failed to install service 'main sha256:97dc4d31f5f18f1e328dd91525250a2b60865d1f222f44239a7580078ceb1f51' due to '(HTTP code 500) server error - --storage-optis supported only for overlay over xfs with 'pquota' mount option '

The image has been built using Docker and the resin-yocto-scripts as described here: ResinOS custom build with Docker?

./jenkins_build.sh -m jetson-tx2 --shared-dir /whatever/persistent/directory/you/want --build-flavor dev

I would guess that the default --storage-opt is defined somewhere inside there? Any other ideas where to start digging?
Thank you :slight_smile:

Hi. Please move to a newer meta-resin version (e.g. 2.24.0). I believe the problem you reported is fixed in a newer release

Hi @floion thank you.

The goal is to add support for another carrier board, the Aetina N510: https://www.aetina.com/products-detail.php?i=234

We started this a while back and didn’t realise that you had already added the Orbitty, Spacely boards. So I just redid the changes for the Aetina board, following the the steps done for the Orbitty and Spacely boards. This time based on 2.24 rev1.

Builds fine and the above issue is gone, too. But I don’t get the correct .dtb loaded in /boot. I’ve setup a WIP PR here: https://github.com/resin-os/resin-jetson-tx2/pull/96

Would you be able to have a look?

Hi @rapha. What do you mean by I don’t get the correct .dtb loaded in /boot.. The dtb is not present in /mnt/boot/ when the board runs?

Hi @floion,

I get a tegra186-quill-p3310-1000-c03-00-base.dtb in /boot, but that one does not have the expected md5. In the image I get 32abe8069f0542375109d58fb533823b, while the file from Aetina has a6921fee2045f63bd001efcdc869c05f:


md5sum /media/rapha/flash-rootA/boot/tegra186-quill-p3310-1000-c03-00-base.dtb
32abe8069f0542375109d58fb533823b  /media/rapha/flash-rootA/boot/tegra186-quill-p3310-1000-c03-00-base.dtb


md5sum ~/Tools/Aetina/R28_2_1_TX2_N510_1/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb
a6921fee2045f63bd001efcdc869c05f  /home/rapha/Tools/Aetina/R28_2_1_TX2_N510_1/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb

I should point out that the .dtb from Aetina has the exact same name as the one that is set in the default jetson-tx2.conf:

KERNEL_DEVICETREE ?= "_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dtb"

Hi. Indeed. And the kernel already has the sources for this. You can find them in your build dir, under tmp/work-shared/n510-tx2/kernel-source/nvidia/platform/t18x/quill/kernel-dts
So the problem seems to be that the build system is using the sources for built-in one instead of the prebuilt one.
Is there a problem if you use the one that comes with the kernel?

Hi, I’m afraid there is a problem. The USB3 ports only operate as USB2 ports…

I see. Will be looking into this next week if I have some time

Great, thank you.
As a workaround in the meantime, is there a way to manually copy the .dtb to the boot folder?
Either once it is running, before the .img is built or injecting it into the img?

Easiest would be to use an USB stick and copy it on a running system in the /mnt/boot/ directory, overwriting the existing one.
You can also modify the produced .img but it required more steps and if it’s just for a test on one machine, I recommend using the USB approach

So for the USB approach do I understand correctly:
Put the .dtb that I want on the USB stick, attach that to the device, ssh in (website or local mode) and copy it to /mnt/boot?

I just checked, the device has no .dtb in /mnt/boot.

I’ve managed to get the .dtb on /mnt/boot. There was not .dtb so nothing was overwritten.
I restarted the device, but the dtb in /boot is still the old one.

I’ve found the file a couple of times on the system:

root@7f9e806:~# find / -iname tegra186-quill-p3310-1000-c03-00-base.dtb

The last one is the desired one. On /boot I can’t write.
@floion Overwriting the
/mnt/sysroot/active/balena/overlay2/3ad9531a18920dd95dc09b52edf860d9c9386c62e70e76308f81db0eb6c16e87/diff/boot/tegra186-quill-p3310-1000-c03-00-base.dtb also changed /boot. That seems to have worked.

After reboot the md5sum in /boot also matched what I expected.

@rapha to copy it to /boot you would need to remount the filesystem as read-write:

mount -o remount,rw /

@floion Yes, I could copy the files on. However, still no luck on the USB3.

I was wondering how the .dtb in /boot interacts with the .dtb.encrypt files in /opt/tegra-binaries.
There is a tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt in /opt/tegra-binaries

Since I copied a different tegra186-quill-p3310-1000-c03-00-base.dtb this ...sigheader.dtb.encrypt doesn’t match. Could that interfere with loading the .dtb correctly?

I think so. We should probably find a way that in the build system, your dtb is used instead.
Do you have the sources for it?

I’m afraid the manufacturer won’t give the sources… They only provide a zip with the dtb, a .common file and a kernel image.
As I mentioned before the kernel image is from unmodified L4T sources though.

I’ve come across a post on the Nvidia forums where they point out that one needs to re-add the reference to the dtb file in the extlinux.conf (https://devtalk.nvidia.com/default/topic/1001443/jetson-tx2/extlinux-conf-fdt-no-longer-used-for-dtb-file-specification-/post/5116102/#5116102)

I’ve given it a quick and dirty try, but my Jetson wouldn’t load. Will try that tomrrow again.

Would you expect it to be necessary to add the reference to the dtb to the extlinux.conf?

@floion I just tried to add the FTD command to the /mnt/boot/extlinux/extlinux.conf:

DEFAULT primary
MENU TITLE Boot Options
LABEL primary
      MENU LABEL primary Image
      LINUX /Image
      FDT /boot/tegra186-quill-p3310-1000-c03-00-base.dtb
      APPEND ${cbootargs} ${resin_kernel_root} ro rootwait

But now the device does not boot. I don’t have a UART adapter here, so a bit tricky to debug.

Hooked up a TTL232-USB converter and getting the serial console:

When I try to boot with the FDT command in /mnt/extlinux/extlinux.conf it tries to retrieve the .dtb file and then complains about 'Unable to read file ‘/boot/…’

Found resin image on mmc 0
Loading resinOS_uEnv.txt from mmc device 0 partition 0xC
reading resinOS_uEnv.txt
** Unable to read file resinOS_uEnv.txt **
Unknown command 'setexpr' - try 'help'
Unknown command 'setexpr' - try 'help'
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:c...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
reading /extlinux/extlinux.conf
232 bytes read in 12 ms (18.6 KiB/s)
Boot Options
1:      primary Image
Enter choice: 1:        primary Image
Retrieving file: /Image
reading /Image
23760016 bytes read in 596 ms (38 MiB/s)
append: console=ttyS0,115200 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0x2772e0000 gpt tegraid= tegra_keep_boot_clocks maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2.1t
Retrieving file: /boot/tegra186-quill-p3310-1000-c03-00-base.dtb
reading /boot/tegra186-quill-p3310-1000-c03-00-base.dtb
** Unable to read file /boot/tegra186-quill-p3310-1000-c03-00-base.dtb **
Skipping primary for failure retrieving fdt
SCRIPT FAILED: continuing...
Scanning MMC and USB devices 0 1 2
reading resin-image-flasher
** Unable to read file resin-image-flasher **
MMC: no card present
** Bad device mmc 1 **
MMC Device 2 not found
** Bad device mmc 2 **
** Bad device usb 0 **
** Bad device usb 1 **
** Bad device usb 2 **
Found resin image on mmc 0