Device tree overlay tool config-by-hardware.py fails

I’m trying to use a device tree overlay and I’m having trouble getting it to work due to the config-by-hardware.py script failing.

I’m using an unmodified JetPack 4.6.3 and when I try to list the available overlays as described here I get:

root@ziks:~# /opt/nvidia/jetson-io/config-by-hardware.py -l
Traceback (most recent call last):
  File "/opt/nvidia/jetson-io/config-by-hardware.py", line 125, in <module>
    main()
  File "/opt/nvidia/jetson-io/config-by-hardware.py", line 94, in main
    jetson = board.Board()
  File "/opt/nvidia/jetson-io/Jetson/board.py", line 207, in __init__
    mountpoint = _board_partition_is_mounted('APP')
  File "/opt/nvidia/jetson-io/Jetson/board.py", line 136, in _board_partition_is_mounted
    raise RuntimeError("Multiple %s partitions mounted!" % partlabel)
RuntimeError: Multiple APP partitions mounted!

When I check the mounted partitions I see:

root@ziks:~# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/mmcblk0p1  14384136 5395516   8238236  40% /
none             1577988       0   1577988   0% /dev
tmpfs            1962676       4   1962672   1% /dev/shm
tmpfs            1962676   20780   1941896   2% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs            1962676       0   1962676   0% /sys/fs/cgroup
tmpfs             392532      12    392520   1% /run/user/120
tmpfs             392532       0    392532   0% /run/user/1000
root@ziks:~# cat /etc/mtab
/dev/mmcblk0p1 / ext4 rw,relatime,data=ordered 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /dev devtmpfs rw,relatime,size=1577988k,nr_inodes=394497,mode=755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/debug cgroup rw,nosuid,nodev,noexec,relatime,debug 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
sunrpc /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
tmpfs /run/user/120 tmpfs rw,nosuid,nodev,relatime,size=392532k,mode=700,uid=120,gid=124 0 0
gvfsd-fuse /run/user/120/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=120,group_id=124 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=392532k,mode=700,uid=1000,gid=1000 0 0

I only see the app partition mounted once.

I’m using an unmodified JetPack 4.6.3 sample root filesystem, flashed with the standard flash tool as described in the quick start guide.

Hi,
Could you try jetson-io.py? This looks to be sub file of jetson-io.py

When I run jetson-io.py it also says “Fatal error / Multiple APP partitions mounted”.

config-by-hardware.py is a bit different from jetson-io, even though it’s in the same directory. I’m using config-by-hardware.py to configure a device tree overlay.

config-by-hardware is described in this section of the manual, along with the other config-by-* programs:
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3271/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/hw_setup_jetson_io.html#wwpID0E0ED0HA

In case it helps:

root@ziks:~# cat /etc/nv_tegra_release
# R32 (release), REVISION: 7.3, GCID: 31982016, BOARD: t186ref, EABI: aarch64, DATE: Tue Nov 22 17:32:54 UTC 2022

Hi,
Probably you don’t run with sudo or use python3. We can run the command successfully:

nvidia@nvidia-desktop:~$ sudo /opt/nvidia/jetson-io/config-by-hardware.py -l
Header 1 [default]: Jetson 40pin Header
  Available hardware modules:
  1. Adafruit SPH0645LM4H
  2. Adafruit UDA1334A
  3. FE-PI Audio V1 and Z V2
  4. ReSpeaker 4 Mic Array
  5. ReSpeaker 4 Mic Linear Array
Header 2: Jetson AGX Xavier CSI Connector
  No hardware configurations found!
Header 3: Jetson M.2 Key E Slot
  No hardware configurations found!
nvidia@nvidia-desktop:~$ python --version
Python 2.7.17

Any other ideas? I’m really scratching my head over this one.

jeteye@ziks:~$ sudo /opt/nvidia/jetson-io/config-by-hardware.py -l
[sudo] password for jeteye:
Traceback (most recent call last):
  File "/opt/nvidia/jetson-io/config-by-hardware.py", line 125, in <module>
    main()
  File "/opt/nvidia/jetson-io/config-by-hardware.py", line 94, in main
    jetson = board.Board()
  File "/opt/nvidia/jetson-io/Jetson/board.py", line 207, in __init__
    mountpoint = _board_partition_is_mounted('APP')
  File "/opt/nvidia/jetson-io/Jetson/board.py", line 136, in _board_partition_is_mounted
    raise RuntimeError("Multiple %s partitions mounted!" % partlabel)
RuntimeError: Multiple APP partitions mounted!
jeteye@ziks:~$ python --version
Python 2.7.17

Hi,
Could you re-flash the system and try again? We don’t observe the issue on TX2 developer kit + Jetpack 4.6.3.

I re-flashed and re-tested with the same results. ie. Multiple APP partitions mounted

Could this be related to the fact that while I used flash.sh to flash it for this test I normally flash the device with the l4t_initrd_flash.sh script with ROOTFS_AB=1? This method uses a fairly different formatting method. Is it possible that it’s left something behind that’s affecting a subsequent re-flash with flash.sh?

Hi,
It may be specific to using l4t_initrd_flash.sh with ROOTFS_AB=1. It looks similar to
Jetson/L4T/r32.7.x patches - eLinux.org

[Jetson-IO] FATAL ERROR when there’re multiple APP partitions mounted

Please apply the patch for a try.

Thanks. The patch fixes the problem.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.