How to flush to L4T and get access to bootloader of orin dev board?

No, my point is

  1. I don’t know why you run “apply_binaries.sh”. If the “Linux_for_Tegra” folder is downloaded by sdkmanamger, then you don’t need to run this script again. This script is for someone creating the whole Linux_for_Tegra manually.

  2. dtb and kernel image are two different things. You said you only change “Image” and “nvgpu.ko” to your L4T folder. But you didn’t mention you copied “dtb” too. If that is true, and you only changed software in dts files, then this issue is not related to your change because you didn’t copy dtb at all.
    And didn’t copy it means you didn’t update the device tree yet.

  1. let’s say I have two L4T folder, one is what is created by sdkmanager (L4T1) and one is I downloaded from source (L4T2). The second one contains the dtb file I need. I ran apply_binaries.sh because I thought that’s what would implement my changes in the dtb file, I thought that could make my changes work.

  2. So if the previous approach is wrong, do you suggest I should copy the dtb file I need from L4T2 into L4T1 and maintain everything else in L4T1? I haven’t copied anything yet.

  3. If I can’t get L4T1 back into the original phase which is downloaded by the sdkmanager, can I delete it manually and re-downloaded through sdkmanager? That sounds doable.

  1. Please just consider your L4T1 to be the real “Linux_for_Tegra”. When we talk about “Linux_for_Tegra”, actually we are talking about the BSP folder. Which is the one that is able to flash board.
    Thus, the L4T2 is just a folder with same name. It is just a source code folder and has nothing special.

  2. If you want to update dtb, make sure you know what dtb is getting flashed to your board, and then copy that dtb to Linux_for_Tegra/kerenl/dtb and replace the old one. It will take effect after reflash.

  3. Yes. you can remove it and let sdkm download it again.

Hi, I roll back to the original L4T1 folder and re-flash the board to solve the problem of not be able to boot. Now my problem is still not be able to boot it in lock mode. According to the instructions, I need to follow two steps.
1.I need to modify the num_clusters_2core_pair_lockstep in tegra234-mb1-bct-misc-common.dtsi file, which I’m able to do.

2.I need to modify the min-residency-us in tegra234-cpuidle.dtsi, this file does not exist in L4T1. I found it in L4T2, which is the one I downloaded from L4T archive. It is in the directory of Linux_for_Tegra/source/public/kernel_src/hardware/nvidia/platform/t23x/common/kernel-dts/t234-common-cvm. Notice that in L4T1, there is no common directory under source/hardware/nvidia/platform/t23x. Should I just copy the entire common directory into L4T1 and modify the corresponding tegra234-cpuidle.dtsi? Is that all I need to do? I think I also need to manually “compile” the .dtsi file into .dtb file right?

Please just don’t care about those L4T1 or L4T2 naming.

L4T2 is just a folder name. It does not represent anything special. If this folder name confused you, just rename it to other name, for example, rename it to “kernel_source”.

What I was trying to say is, you need to build your dtb in this “kernel_source” folder. After you build out, just as basic knowledge of compilation, your source code will become binary.

Copy that binary to L4T1/kernel/dtb and replace the old one that is in use. Do the reflash and let it take effect.

Hi,

I’m one step closer to the end I believe. I figure out I need to finally replace tegra234-p3701-0000-p3737-0000.dtb file, which in my Linux_for_Tegra/bootloader. By decompile it, this file was generated from xxx/hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dts file, which I also found, and it has included the tegra234-cpuidle.dtsi file which I need to modify. Everything looks in a correct logic now.

My problem is that, I can’t compile the tegra234-p3701-0000-p3737-0000.dts file into the dtb file I want. I tried dtc -I dts -O dtb xxx, which gives me an error of

“ERROR: tegra234-p3701-0000-p3737-0000.dts: 17. 1-9 syntax error”
“FATAL ERROR: Unable to parse input tree”.

and line 17 is

#include "cvm/tegra234-p3701-0000.dtsi"

I also tried to use the makefile under the concord/kernel-dts folder, get an error of “No rule to make target ‘dtbs’. Stop.”

Do you know how should I compile my dtsi file?

Hi,

What is the exact thing you try to do? Just add few lines in the existing dts file or you want to add a new one?

The exact thing I want to do is to replace this number 3000 in the following DT node:
cpus{
cpu_core_power_states {
c7 {

min-residency-us = <30000>;
status = “okay”;
};
};
to 0xFFFFFFFF.

Then I don’t know why you need to change anything in makefile…

Just change that value under your kernel_source folder dtsi file and rebuild the dtb…

yeah, I’m not changing anything in makefile… I did change that value in the dtsi file and rebuild the dtb. That error occurs when I try to rebuild the dtb file…

Hi,

What is your method to “build” the dtb? I mean, you should follow the document to build dtb but not running dtc tool…

I tried both using dtc tool and the command make dtbs under the kernel folder, both failed. Do we have a document for building dtb?

please follow the document and use nvbuild.sh

https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html#to-build-the-kernel

Thanks Wayne, I’m now able to compile the kernel and use the compiled dtb when flashing my board. I’m now be able to update my device tree.

I’m still having troubles of enabling the lock mode of the core, I have a question on the answer in Enable Dual-core Lock Step for ARM CPU on Orin chips. According to this post, I need to modify my device tree, I have done this. I also need to modify the tegra234-mb1-bct-misc-common.dtsi file in bootloader. My question is, should I also modify the corresponding tegra234-mb1-bct-misc-common.dtsi file in the source when compiling the dtb file? Or just simple change the one in the bootloader? I’m asking because every time I modify this .dtsi file in the bootloader, I’m not be able to boot, but if I only use the modified dtb, I’m ok.

To make things simple, you can treat this question as: what could make my boot fail when I change something in the .dtsi file in the Linux_for_Tegra/bootloader/ folder?

I can open a new topic if you think that’s correct. It’s not that relevant to this topic. This topic I think is solved.

Hi,

Please read my post from last week again.

Not every dtsi is for the same software. What you saw, those dtsi under your Linux_for_Tegra, are for the MB1 bootloader software but not kernel.

You don’t need to modify this in your source code. This file is not part of kernel dtb. Even if you rebuild the kernel dtb, this file won’t be included.

I would suggest you can file a new topic if your problem is boot failure after you modify the MB1 BCT file.

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