Boot Time Optimization JP 6 | Custom Logo | Disabling default imx219 probe | Custom dtbo file not found after flash

Hello,

I am working on boot time optimization of Jetson Orin NX 16GB with 128GB Nvme. I faced a number of issues as you can see from title, all related to uefi and kernel customization for boot time optimization in one way or another.

Initially, the device was taking around 40 seconds from plugging in to main screen. I went through different forum threads and the chapters on UEFI Adaptation, Kernel Customization and Boot Time Optimization, compiled the UEFI and replaced uefi_jetson.bin and BOOTAA64.efi in Linux_for_Tegra/bootloader, compiled the kernel, in-tree modules and external modules, replaced the new Image with the original at Linux_for_Tegra/kernel/Image, installed the modules in Linux_for_Tegra/rootfs/, compiled and copied the dtb from nvidia-oot to kernel/dtb/. Lastly, I flashed the board with

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 jetson-orin-nano-devkit internal

The flash was successful and the device now boots up in about 20 to 25 seconds.

However,

  1. I had changed the nvidia logo files with custom image at nvidia-uefi/edk2-nvidia/Silicon/NVIDIA/Assets/ and their names in the corresponding file, but it does not appear. The screen remains blank until the last moment when the nvidia logo is shown for a second before the main screen appears.

  2. I had disabled the compiling of imx219 and other cam drivers from the Makefile at Linux_for_Tegra/source/nvidia-oot/drivers/media/i2c as shown in the following

ifdef CONFIG_MEDIA_SUPPORT
obj-m += ar1335_common.o
# obj-m += lt6911uxc.o
# obj-m += nv_imx185.o
# obj-m += nv_imx219.o
# obj-m += nv_imx274.o
# obj-m += nv_imx318.o
# obj-m += nv_imx390.o
# obj-m += nv_imx477.o
# obj-m += nv_ov5693.o
# obj-m += nv_ar0234.o
obj-m += nv_hawk_owl.o
endif

and correspondingly disabled all the camera dtbo files in Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/overlay/Makefile , reason being that I had enabled a video decoder driver in drivers/media/i2c/adv7180.c. I had also included the custom device tree for adv7180 at nv-public/overlay/ and compiled it, copied it to Linux_for_Tegra/kernel/dtb/ alongwith other dtbos. AFter the flash, I can locate the module driver at /lib/modules/…/media/i2c/adv7180.ko, but cannot find its dtbo at /boot/dtb/, why would it happen?

  1. Another reason to disable imx219 driver and camera dtbo files from compiling was to disable the probe of imx219 at boot-up. But since it still probes for it, let me ask what’s the actual way to disable imx219 probe either completely, or instead of imx219, make the jetson probe for some other cam device on csi connectors at boot-up?

I have doubts that some of my issues are related to the flash command that I used. Is the command that I listed above is correct for the full flash of customized kernel, dtb and bootloader, or there should be other parameters included in it? Also, how would I edit the command to only flash the Uefi on the jetson orin nx device?

Lastly, how much is the lowest boot time that I can achieve on Jetson Orin NX 16GB with Nvme SSD and Jetson Orin Nano 8GB with Nvme SSD as well, both with JP 6?

Although I have listed multiple issues in this message, all are related to customization for boot time optimization. I’m hoping to hear from you soon.

Thank you.

Hello @tornado1100,

Glad to hear that you managed to cut down the boot time almost in half, great job!

Now, with regards to your questions.

  1. What steps did you follow to change the boot logo ? As a reference, in this post KevinFFF provides a detailed step by step procedure to follow.
  2. The reason why you might not be able to find a dtbo file for adv7180 is because the DTB for a Jetson board is actually one large device tree file compiled from all the dtsi files that describe the HW setup, therefore, it is not expected to see a singular dtbo file for your adv7180 device, unless you name your board dtb file with that name. If you want to try to locate your module on the dtb you can check /proc/device-tree/. Or you can even start by verifying that the system is loading your custom DTB dmesg | grep dts (you should see that the dtb was compiled on your pc).
  3. In order to remove the imx219 driver from loading, I would suggest locating where the imx219 dtsi files are being imported for your platform and just removing the import. I would also suggest you not only remove the imx219 but also the imx477.

In order to help you further, would it be possible for you to share the output of dmesg?

regards,
Andrew
Embedded Software Engineer at ProventusNova

To start with, thank you for getting back to me,

  1. Regarding boot logo, it was solved using the solution given in other posts, by resizing the custom images using MS Paint.

  2. The adv7180 driver was enabled via menuconfig located at .../drivers/media/i2c/, I can locate adv7180.ko file after the flash at lib/modules/.../drivers/media/i2c/. To compile and include its device-tree, I wrote it in imx219 device tree files and copied the .dtsi and .dts file to Linux_for_Tegra/source/hardware/nvidia/t23x/v-public/overlay/, edited the Makefile of the same folder to only compile the dt of adv7180 among the camera device tree overlays present. After kernel compilation, I confirmed the dtbo file’s presence at Linux_for_Tegra/source/device-tree/platform/generc-dts/dtbs/. Afterwards I copied the dtbs as per instructions provided in kernel customization chapter.

    However, after the flash, I can neither locate it at /boot/ along with other dtbo files (even those that I did not compile such that of imx219), nor can I locate it at /proc/device-tree/, which could only mean that it was not flashed. Is there any config or some other file that I need to edit to include/exclude desired dtb or dtbo files? Or maybe I need to dit the flash command respectively?

    One thing I noted is that when I run ./apply_binaries.sh, it generates default kernel files and populates the lib/modules/ (module drivers) as well as /kernel/dtb/, so even if I perform kernel customization, it just copies additional drivers along side the default kernel build. And running ./apply_binaries.sh is necessary in order to run sudo ./tools/l4t_update_initrd.sh after compiling out-of-tree kernel modules. There must be some work-around for this which is not in my knowledge as I am not very experienced in embedded linux, and I will appreciate it if I am guided to it.

  3. After a very long search, I found one link in the file jetson-orin-nano-devkit.conf, which is setting a parameter OVERLAY_DTB_FILE+=",tegra234-p3768-0000+p3767-0000-dynamic.dtbo"; , which is present at 3 locations- Linux_for_Tegra/kernel/dtb/, Linux_for_Tegra/rootfs/boot/ and Linux_for_Tegra/bootloader/. I also located its dts file at Linux_for_Tegra/source/hardware/nvidia/t23x/v-public/overlay/ whose contents are as follows. I guess even if I change the contents here and direct it to include adv7180 device tree, previous problem would still follow due to running apply_binaries.sh?

/dts-v1/;
/plugin/;

#include "tegra234-p3768-camera-rbpcv2-imx219.dtsi"

/ {
	overlay-name = "Tegra234 p3768-0000+p3767-xxxx Dynamic Overlay";
};

/*
 * Include this file last in the device tree.  It manages run-time
 * pruning of peripherals that are not available across the various
 * SKUs of p3767.  For example PVA can be enabled in the device tree
 * and it will automatically be disabled for SKUs without PVA support.
 */
#include "tegra234-p3767-sku-handling.dtsi"

Lastly, I have attached dmesg log for your reference. Waiting to hear from you again soon.

Thank you.
dmesg_log.txt (60.6 KB)

Hi tornado1100,

I would suggest you separate your issues to different topics so that we can check them more specifically.

It seems you have managed to optimize the boot time with several methods you referred.

Is your current issue about switching the boot logo?
If you’ve removed 5s delay in UEFI, then there may not the logo in UEFI since it has been skipped.
Please also refer to Failed changing boot logo Orin NX JP 5.1.1 - #9 by KevinFFF for the logo showed in kernel.

1 Like

Hi Kevin,

Logo issue has been solved by resizing the custom image with MS Paint. The current issue is this,

Basically, disabling default imx219 probe, and instead of imx219, compilation and inclusion of adv7180 (video decoder) camera device tree, and the details that follows in the attached link.

Since all the issues were in the main topic of boot time optimization, I wanted to keep it in a single post for future reference.

Hello @tornado1100,

Thanks for getting back with further details.
Now that the boot logo issue is fixed, we can focus on adv7180 driver support.

Lets start with a few questions:

  1. Could you please share the output of: dmesg | grep dts and dmesg | grep DTB?
  2. Can you share your adv7180 .dtsi file ?
  3. Can you share the output of: ls /proc

regards,
Andrew
Embedded Software Engineer at ProventusNova

Hello, Andrew,

jetson@jetson-desktop:~$ sudo dmesg | grep dts
jetson-desktop:~$ sudo dmesg | grep DTB
jetson-desktop:~$
jetson@jetson-desktop:~$ ls /proc
1     1431  1731  19    216   3110  347   3891  56   847          ioports
10    1432  1736  1905  217   312   348   39    560  849          irq
100   1442  1743  1909  2175  313   35    3904  562  875          kallsyms
1005  148   1753  1917  22    314   351   394   57   899          keys
1008  149   1755  194   2218  315   3517  4     578  9            key-users
101   15    1769  195   23    317   352   40    579  93           kmsg
1017  150   177   196   24    318   353   400   58   94           kpagecgroup
102   151   1775  197   242   319   354   4088  583  95           kpagecount
1020  152   1780  1983  247   32    357   4089  584  956          kpageflags
103   1522  1783  1990  2479  320   3581  41    585  957          loadavg
104   1528  1789  2     25    321   36    412   586  958          locks
105   153   179   20    2589  322   360   416   587  959          meminfo
106   1534  1790  201   26    323   361   42    59   96           misc
1074  154   1792  2029  262   324   3614  420   590  961          modules
11    1544  1793  2032  27    325   363   423   6    963          mounts
1165  155   1795  2033  274   326   364   43    60   97           mtd
1173  1553  1796  2034  2751  327   365   433   606  98           net
12    1554  1797  2035  2782  328   366   44    61   99           pagetypeinfo
1202  156   1798  2036  279   329   3665  441   616  992          partitions
1211  157   18    2037  28    33    367   443   617  994          schedstat
13    1578  1801  2038  2805  330   368   445   618  999          self
134   158   1803  2039  281   331   369   447   619  asound       slabinfo
135   159   1805  204   282   332   37    45    62   buddyinfo    softirqs
136   16    1807  2040  284   333   370   46    63   bus          stat
1388  160   1809  2041  2884  334   371   47    64   cgroups      swaps
1389  161   1814  2042  29    335   372   48    65   cmdline      sys
139   1646  1815  2043  290   336   373   481   653  config.gz    sysrq-trigger
1390  1648  182   2044  293   337   3730  484   66   consoles     sysvipc
14    1657  1821  2045  294   338   374   49    67   cpuinfo      thread-self
140   1665  1822  2047  298   339   375   5     68   crypto       timer_list
1403  1667  183   2048  3     34    376   50    7    devices      tty
1408  1673  184   2049  30    340   38    508   77   device-tree  uptime
141   1683  185   205   305   3404  382   51    779  diskstats    version
1419  1693  1869  2050  306   341   3821  52    780  driver       vmallocinfo
142   1698  1872  2051  307   342   383   53    788  execdomains  vmstat
1423  17    1889  2054  308   3422  384   54    8    fb           zoneinfo
1425  1702  1890  2058  309   343   385   55    810  filesystems
1429  1714  1891  206   31    344   3857  557   811  fs
143   1720  1896  21    310   345   3860  558   812  interrupts
1430  1727  1897  215   311   346   3863  559   813  iomem

As for the dtsi files, these were written by editing the imx219 dtsi files. Though not proven on JP6, they are suppose to work as per different forum threads on the topic of interfacing adv7280m chip with Jetson.

adv7280m_DT.zip (5.4 KB)

PS. adv7xxx devices are a series of video decoders with varying input and output formats. The linux provided device driver adv7180.c is compatible for a range of devices including adv7280m, which is what I am using.

Please help to open a new topic to discuss about camera issue in details.
You can provide the following information.

  1. devkit or custom board
  2. Jetpack release
  3. what you have done to disable default IMX219
  4. the device tree(extracted_proc.dts) you used now through running the following command on your board.
$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree
  1. full dmesg

Hi,

Please continue this topic on this thread.

Okay!

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