# Build the kernel Orin

**URL:** <https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562>\
**Category:** Jetson AGX Orin\
**Tags:** kernel\
**Created:** [September 21, 2022, 3:12am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562 "2022-09-21T03:12:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![811218060](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@811218060](https://forums.developer.nvidia.com/u/811218060)\
**Post date:** [September 21, 2022, 3:12am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/1 "2022-09-21T03:12:00Z")

</div>

I followed the documentation [Kernel Customization — Jetson Linux\<br/\>Developer Guide 34.1 documentation](https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html)  
to build the kernel and ran into a problem at step 5 .

 ![2022-09-21_10-59](https://global.discourse-cdn.com/nvidia/original/3X/0/3/031042edf2e02e528582d92aeb3b1226ac3cb8db.png)  
But I can’t find the modules folder under this path.  
I have unzipped this archive Tegra\_Linux\_Sample-Root-Filesystem\_R35.1.0\_aarch64.tbz2“” and placed it in the rootfs folder.  
Do I need to do anything else?

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [September 21, 2022, 5:22am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/3 "2022-09-21T05:22:35Z")

</div>

Hi,  
Please download the system image through SDKManager and you shall see it in

```auto
~/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra$ sudo find -name nvgpu.ko
./rootfs/usr/lib/modules/5.10.104-tegra/kernel/drivers/gpu/nvgpu/nvgpu.ko

```

---

<div class="post-metadata">

**Author:** ![811218060](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@811218060](https://forums.developer.nvidia.com/u/811218060)\
**Post date:** [September 21, 2022, 7:58am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/4 "2022-09-21T07:58:36Z")

</div>

Ok I found it thanks.  
But I have one more question, how do I get this file if I don’t use SDKmanager?  
Thanks!

---

<div class="post-metadata">

**Author:** ![811218060](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@811218060](https://forums.developer.nvidia.com/u/811218060)\
**Post date:** [September 23, 2022, 2:55am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/5 "2022-09-23T02:55:17Z")

</div>

I found it thanks.  
But I have one more question, how do I get this file if I don’t use SDKmanager?  
Thanks!

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [September 23, 2022, 3:19am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/6 "2022-09-23T03:19:34Z")

</div>

Hi,  
It is in debian package and will be installed after executing:

> r35\_1/Linux\_for\_Tegra$ sudo ./apply\_binaries.sh

---

<div class="post-metadata">

**Author:** ![811218060](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@811218060](https://forums.developer.nvidia.com/u/811218060)\
**Post date:** [September 27, 2022, 1:08am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/9 "2022-09-27T01:08:59Z")

</div>

I built the kernel accoding to the documentation [Kernel Customization — Jetson Linux  
Developer Guide 34.1 documentation](https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html#building-the-kernel).  
When i flash to the USB device ,it failed.

![image](https://global.discourse-cdn.com/nvidia/original/3X/d/6/d6c50b69d67cb3fe5c9871badb87e4c79e764c77.png)

I compared the compiled folder with the folder generated by SDKmanager.  
this is the folder generating by SDKmanager.

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/3/d/3d3043ae077f695534822c2bf8249d9ef7ec7abe.png)

but in this path “Jetson\_Linux\_R35.1.0\_aarch64/Linux\_for\_Tegra/bootloader/signed”, it has nothing

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/c/9/c92fb859e4de76d1a60a058cabb9ca143ac38a9b.png)

What should I run to get these files?  
Thanks

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [September 27, 2022, 1:20am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/10 "2022-09-27T01:20:14Z")

</div>

Hi,  
You would need to download the complete package through SDKManager or manually download/extract the packages:  
[https://developer.nvidia.com/embedded/l4t/r35\_release\_v1.0/release/jetson\_linux\_r35.1.0\_aarch64.tbz2](https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/release/jetson_linux_r35.1.0_aarch64.tbz2)  
[https://developer.nvidia.com/embedded/l4t/r35\_release\_v1.0/release/tegra\_linux\_sample-root-filesystem\_r35.1.0\_aarch64.tbz2](https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/release/tegra_linux_sample-root-filesystem_r35.1.0_aarch64.tbz2)

And then follow the steps in [document](https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html#building-the-kernel) to replace self-built kernel image/device tree. So that no files are missed.

---

<div class="post-metadata">

**Author:** ![811218060](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@811218060](https://forums.developer.nvidia.com/u/811218060)\
**Post date:** [September 27, 2022, 1:34am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/12 "2022-09-27T01:34:28Z")

</div>

Following the steps in document We have successfully compiled the kernel and replaced the image and device tree.  
But when i want to flash into the USB device ,it failed.

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/c/6/c6e76a649f4e6d8d60952e1b1a38df949040d699.png)

In the folders generating from SDKmanager,I flashed successfully using the same command

---

<div class="post-metadata">

**Author:** ![123456987](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@123456987](https://forums.developer.nvidia.com/u/123456987)\
**Post date:** [September 27, 2022, 6:05am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/13 "2022-09-27T06:05:14Z")

</div>

Following the steps in document We have successfully compiled the kernel and replaced the image and device tree.  
But when i want to flash into the USB device ,it failed.

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/c/6/c6e76a649f4e6d8d60952e1b1a38df949040d699.png)

In the folders generating from SDKmanager,I flashed successfully using the same command

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [September 27, 2022, 6:53am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/14 "2022-09-27T06:53:08Z")

</div>

Hi,  
You need to use _initrd_ to flash to external storage. Please refer to this README:

> Linux\_for\_Tegra\tools\kernel\_flash\README\_initrd\_flash.txt

---

<div class="post-metadata">

**Author:** ![811218060](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@811218060](https://forums.developer.nvidia.com/u/811218060)\
**Post date:** [September 27, 2022, 7:25am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/16 "2022-09-27T07:25:45Z")

</div>

I have read this documentation and have successfully flashed to the USB device using the workflow11 command, under the folder generated by SDKmanager. I have followed the official documentation and link above to download the source code, compiled it successfully and flashed it to the USB but encountered the problem as shown in the picture. Please tell me how to solve this problem.

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/c/6/c6e76a649f4e6d8d60952e1b1a38df949040d699.png)

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [September 27, 2022, 8:14am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/17 "2022-09-27T08:14:52Z")

</div>

Hi,  
Do you use Orin developer kit or your own custom board?

---

<div class="post-metadata">

**Author:** ![123456987](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@123456987](https://forums.developer.nvidia.com/u/123456987)\
**Post date:** [September 27, 2022, 8:22am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/19 "2022-09-27T08:22:31Z")

</div>

It is Orin developer kit

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [September 27, 2022, 9:12am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/20 "2022-09-27T09:12:32Z")

</div>

Hi,  
So you insert a USB disk to a type-A port on Orin developer kit, execute _initrd_ to flash rootfs to the disk, and it gets stuck in middle of flashing. Is it correct?

---

<div class="post-metadata">

**Author:** ![123456987](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@123456987](https://forums.developer.nvidia.com/u/123456987)\
**Post date:** [September 28, 2022, 1:07am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/22 "2022-09-28T01:07:49Z")

</div>

I insert the USB to the pc. I execute initrd to flash rootfs to the disk,  
I use the command:sudo BOARDID=3701 BOARDSKU=0000 FAB=TS4 BOARDREV=A.0 ./tools/kernel\_flash/l4t\_initrd\_flash.sh -c tools/kernel\_flash/flash\_l4t\_external.xml -S 20GiB --external-device sda1 --direct sdb jetson-agx-orin-devkit external  
it gets stuck in middle of flashing.

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [September 28, 2022, 2:54am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/23 "2022-09-28T02:54:30Z")

</div>

Hi,  
Your setup looks not right. Should insert one USB disk to Orin developer kit. Please try to flash through SDKManager. `USB` is an option for storage in SDKManager.

---

<div class="post-metadata">

**Author:** ![123456987](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@123456987](https://forums.developer.nvidia.com/u/123456987)\
**Post date:** [September 28, 2022, 6:58am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/26 "2022-09-28T06:58:30Z")

</div>

We used the same connection method and command and ran it in the folder generated by SDKmanager and it has been successfully flashed into the USB.But after we successfully compiled the folder swipe ourselves, we encountered the problem in the image above.  
I copied the signed file which is generated by SDKmanager to my own compiled folder, so that it can be successfully flashed into the USB. How did the files in this folder get generated?

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/3/d/3d3043ae077f695534822c2bf8249d9ef7ec7abe.png)  
[/quote]

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [September 28, 2022, 8:44am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/27 "2022-09-28T08:44:38Z")

</div>

Hi,

I am not sure why this command needs to be done by you. Could you try to run

“sudo ./flash.sh --no-flash xxxx mmcblk0p1” Replace xxx to your board config and it shall generate those files.

---

<div class="post-metadata">

**Author:** ![123456987](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@123456987](https://forums.developer.nvidia.com/u/123456987)\
**Post date:** [September 28, 2022, 9:03am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/29 "2022-09-28T09:03:57Z")

</div>

I tried, but still not exist.

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [September 28, 2022, 9:19am UTC](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562/30 "2022-09-28T09:19:59Z")

</div>

How about this?

> [@I want to sign kernel and dtb files](https://forums.developer.nvidia.com/t/i-want-to-sign-kernel-and-dtb-files/224420/11):
>
> hello jw.cs.park, I can execute l4t\_sign\_image.sh to generate files correctly. for example, $ sudo ./l4t\_sign\_image.sh --file kernel/Image --chip 0x23 --type kernel $ sudo ./l4t\_sign\_image.sh --file kernel/dtb/tegra234-p3701-0000-p3737-0000.dtb --chip 0x23 --type kernel\_dtb

[Next page](https://forums.developer.nvidia.com/t/build-the-kernel-orin/228562.md?page=2)
