Jetson-io.py in r32.7.2

Could you apply below patch to try.

diff --git a/jetson-io/Jetson/board.py b/jetson-io/Jetson/board.py
index 8d0eb86..aa540e2 100644
--- a/jetson-io/Jetson/board.py
+++ b/jetson-io/Jetson/board.py
@@ -117,6 +117,22 @@ def _board_get_dtb(compat, model, path):
     return dtbs[0]


+def _board_root_partition_is_block_device():
+    dev = syscall.call_out('mountpoint -q -d /')
+    if not dev or len(dev) != 1:
+        raise RuntimeError("Root partition not found!")
+    return os.path.exists("/dev/block/%s" % dev[0])
+
+
+def _board_root_partition_get_partlabel():
+    entries = syscall.call_out('lsblk -n -r -o mountpoint,partlabel')
+    for entry in entries:
+        mountpoint,label = entry.split(' ')
+        if mountpoint == '/':
+            return label
+    return None
+
+
 def _board_partition_exists(partlabel):
     numparts = 0
     partlabels = syscall.call_out('lsblk -n -r -o partlabel')
@@ -126,16 +142,12 @@ def _board_partition_exists(partlabel):
     return numparts


-def _board_partition_is_mounted(partlabel):
-    mountpoint = None
-    entries = syscall.call_out('lsblk -n -r -o mountpoint,partlabel')
-    for entry in entries:
-        mount,label = entry.split(' ')
-        if partlabel == label:
-            if mountpoint:
-                raise RuntimeError("Multiple %s partitions mounted!" % partlabel)
-            mountpoint = mount
-    return mountpoint
+def _board_partition_is_root_mountpoint(partlabel):
+    if not _board_root_partition_is_block_device():
+        return False
+    if _board_root_partition_get_partlabel() == 'APP':
+        return True
+    return False


 def _board_partition_mount(partlabel):
@@ -195,27 +207,22 @@ class Board(object):
     def __init__(self):
         self.appdir = None
         self.bootdir = '/boot'
+        self.extlinux = '/boot/extlinux/extlinux.conf'
+        dtbdir = os.path.join(self.bootdir, 'dtb')
         fio.is_rw(self.bootdir)

-        # The partition that needs to be updated by Jetson-IO is the APP
-        # partition. In certain cases, such as mounting the rootfs via
-        # NFS, the APP partition is not mounted by default and so needs
-        # to be mounted. Therefore, we first check to see if the APP
-        # partition is mounted and if so where it is mounted. If it is
-        # not mounted then it is necessary to find and mount the 'APP'
-        # partition and copy the generated files back to this partition.
-        mountpoint = _board_partition_is_mounted('APP')
-        if mountpoint:
-            if mountpoint != '/':
-                self.bootdir = mountpoint
-            dtbdir = os.path.join(self.bootdir, 'dtb')
-        else:
+        # When mounting the rootfs via NFS, the root partition is not a
+        # block device. Furthermore, when booting with NFS the partition
+        # that the bootloader reads to parse the extlinux.conf and load
+        # the kernel DTB may not be mounted. Therefore, if the rootfs is
+        # not mounted on a partition called 'APP', then it is necessary
+        # to find and mount the 'APP' partition and copy the generated
+        # files back to this partition.
+        if not _board_partition_is_root_mountpoint('APP'):
             self.appdir = _board_partition_mount('APP')
             dtbdir = os.path.join(self.appdir, 'boot/dtb')
             fio.is_rw(self.appdir)

-        self.extlinux = os.path.join(self.bootdir, 'extlinux/extlinux.conf')
-
         # Import platform specific data
         self.compat = dt.read_prop('compatible')
         self.model = dt.read_prop('model')
1 Like