I placed the kernel source on /usr/src and added the environment variables in the /etc/environment.
I did sudo ./nvbuild.sh -o $PWD/kernel_out, and it’s finished successfully.
I have another question:
$ cd <path_to_kernel_source>
$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=<top>/Linux_for_Tegra/rootf
Where is the path_to_kernel_source?
Which path should I set as $TEGRA_KERNEL_OUT?
In your case, it seems /usr/src as you said.
Please note it the environment variable you exported is temporary and only available in your current console.
It can be any directory. Normally, we would create a directory call kernel_out under the path of your kernel source. There’s an example in the guide.
I added the environment variables in the file /etc/environment, so I don’t think it’s temporary.
One more question, sorry:
On this document, it says I should untar nvidia_kernel_display_driver_source.tbz2 but I can’t find this file. I can find this file in public_source.tbz2 but the directory name of output of untar nvidia_kernel_display_driver_source.tbz2 is NVIDIA-kernel-module-source-TempVersion/. Is it ok that the version name is TempVersion or am I doing it wrong way?
I created modules successfully with the Makefile in NVIDIA-kernel-module-source-TempVersion/.
But there is one thing I confused
According to this guide doc, I should copy the modules to <top>/Linux_for_Tegra/rootfs/usr/lib/modules/$(uname -r)/extra/opensrc-disp/, but I can see two directories:
The one is /usr/src/MIC-713_OrinNX_5.1.2_V1.0.1_SDK/rootfs/usr/lib/modules/5.10.120-tegra/
The other one is /usr/src/MIC-713_OrinNX_5.1.2_V1.0.1_SDK/rootfs/usr/lib/modules/5.10.120-rt70-tegra/
Should I copy the modules to both?
I did RT-patch.
Yes. I will use 5.10.120-rt70-tegra.
So I created extra/opensrc-disp/ directory in it and copy the modules in it.
Thanks to your support, I finally flashed!
But after the flash, the screen is just black.
My target device is jetson orin NX.
After booting with NVIDIA logo, nothing shows up.
I found the step in the official doc like In Orin, fix the black screen. This is not required on Xavier.
It says that type the command sudo depmod -a, but how can I type it? even the tty also doesn’t work…
Log in via serial console and run this command.
This is only required on Orin series because graphics drivers are handled differently between Orin and Xavier.
Setting the username and password with a command ./l4t_create_default_user.sh -u <username> -p <password>as it says.
I connected to Jetson orin to my host PC with micro-usb cable .
Opened Putty for serial console and login with the username and password I registered on 1.
Did sudo depmod -a
reboot.
Unfortunately, the result is all the same… After booting with Nvidia logo, it’s black screen.
I tried three times but nothing changed.
Did I do something wrong?
At least the modules I copied during the kernel-building steps are on the list like nvidia.ko, nvidia_modeset.ko, and nvgpu.ko.
I tried to follow the kernel-building steps the official document offers including RT-patch.
Could you give me any hints?
$cat /var/log/Xorg.0.log
[ 24.849] (--) Log file renamed from "/var/log/Xorg.pid-1959.log" to "/var/log/Xorg.0.log"
[ 24.850]
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
[ 24.850] Build Operating System: linux Ubuntu
[ 24.850] Current Operating System: Linux tegra-ubuntu 5.10.120-rt70-tegra #1 SMP PREEMPT RT Tue Jul 16 16:49:10 KST 2024 aarch64
[ 24.851] Kernel command line: pcie_aspm=off root=PARTUUID=5f0167e2-66c4-4371-b962-a3be9367bea5 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb
[ 24.851] Build Date: 29 March 2023 12:53:02PM
[ 24.851] xorg-server 2:1.20.13-1ubuntu1~20.04.8 (For technical support please see http://www.ubuntu.com/support)
[ 24.851] Current version of pixman: 0.38.4
[ 24.851] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 24.851] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 24.851] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 18 05:08:23 2024
[ 24.852] (==) Using config file: "/etc/X11/xorg.conf"
[ 24.852] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 24.852] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 24.854] (==) No Layout section. Using the first Screen section.
[ 24.854] (==) No screen section available. Using defaults.
[ 24.854] (**) |-->Screen "Default Screen Section" (0)
[ 24.854] (**) | |-->Monitor "<default monitor>"
[ 24.854] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 24.854] (**) | |-->Device "Tegra0"
[ 24.854] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 24.854] (==) Automatically adding devices
[ 24.854] (==) Automatically enabling devices
[ 24.854] (==) Automatically adding GPU devices
[ 24.854] (==) Automatically binding GPU devices
[ 24.854] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 24.856] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 24.856] Entry deleted from font path.
[ 24.856] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 24.856] Entry deleted from font path.
[ 24.856] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 24.856] Entry deleted from font path.
[ 24.856] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 24.856] Entry deleted from font path.
[ 24.856] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 24.856] Entry deleted from font path.
[ 24.856] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 24.856] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 24.856] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 24.856] (II) Loader magic: 0xaaaab9c3a010
[ 24.856] (II) Module ABI versions:
[ 24.856] X.Org ANSI C Emulation: 0.4
[ 24.856] X.Org Video Driver: 24.1
[ 24.856] X.Org XInput driver : 24.1
[ 24.856] X.Org Server Extension : 10.0
[ 24.858] (++) using VT number 1
[ 24.862] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[ 24.865] (II) no primary bus or device found
[ 24.865] (WW) "dri" will not be loaded unless you've specified it to be loaded elsewhere.
[ 24.865] (II) "glx" will be loaded by default.
[ 24.865] (II) LoadModule: "extmod"
[ 24.865] (II) Module "extmod" already built-in
[ 24.865] (II) LoadModule: "glx"
[ 24.866] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 24.872] (II) Module glx: vendor="X.Org Foundation"
[ 24.872] compiled for 1.20.13, module version = 1.0.0
[ 24.872] ABI class: X.Org Server Extension, version 10.0
[ 24.872] (II) LoadModule: "nvidia"
[ 24.872] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 24.882] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 24.882] compiled for 1.6.99.901, module version = 1.0.0
[ 24.882] Module class: X.Org Video Driver
[ 24.882] (II) NVIDIA dlloader X Driver 35.4.1 Release Build (bugfix_main) (buildbrain@mobile-u64-6422-d7000) Tue Aug 1 12:40:10 PDT 2023
[ 24.882] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 24.883] (WW) Falling back to old probe method for NVIDIA
[ 24.884] (II) Loading sub module "fb"
[ 24.884] (II) LoadModule: "fb"
[ 24.884] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 24.885] (II) Module fb: vendor="X.Org Foundation"
[ 24.885] compiled for 1.20.13, module version = 1.0.0
[ 24.886] ABI class: X.Org ANSI C Emulation, version 0.4
[ 24.886] (II) Loading sub module "wfb"
[ 24.886] (II) LoadModule: "wfb"
[ 24.886] (II) Loading /usr/lib/xorg/modules/libwfb.so
[ 24.887] (II) Module wfb: vendor="X.Org Foundation"
[ 24.887] compiled for 1.20.13, module version = 1.0.0
[ 24.887] ABI class: X.Org ANSI C Emulation, version 0.4
[ 24.887] (II) Loading sub module "ramdac"
[ 24.887] (II) LoadModule: "ramdac"
[ 24.887] (II) Module "ramdac" already built-in
[ 24.890] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 24.890] (II) NVIDIA(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 24.890] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[ 24.890] (==) NVIDIA(0): RGB weight 888
[ 24.890] (==) NVIDIA(0): Default visual is TrueColor
[ 24.890] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[ 24.890] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[ 24.890] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration" "true"
[ 24.890] (**) NVIDIA(0): Enabling 2D acceleration
[ 24.890] (II) Loading sub module "glxserver_nvidia"
[ 24.890] (II) LoadModule: "glxserver_nvidia"
[ 24.891] (II) Loading /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so
[ 24.922] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[ 24.922] compiled for 1.6.99.901, module version = 1.0.0
[ 24.922] Module class: X.Org Server Extension
[ 24.922] (II) NVIDIA GLX Module 35.4.1 Release Build (bugfix_main) (buildbrain@mobile-u64-6422-d7000) Tue Aug 1 12:38:45 PDT 2023
[ 24.924] (II) NVIDIA: The X server supports PRIME Render Offload.
[ 24.949] (EE) NVIDIA(GPU-0): Failed to select a display subsystem.
[ 24.949] (EE) NVIDIA(0): Failing initialization of X screen
[ 24.949] (II) UnloadModule: "nvidia"
[ 24.949] (II) UnloadSubModule: "glxserver_nvidia"
[ 24.949] (II) Unloading glxserver_nvidia
[ 24.949] (II) UnloadSubModule: "wfb"
[ 24.949] (II) UnloadSubModule: "fb"
[ 24.949] (EE) Screen(s) found, but none have a usable configuration.
[ 24.949] (EE)
Fatal server error:
[ 24.949] (EE) no screens found(EE)
[ 24.949] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 24.949] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 24.949] (EE)
[ 24.955] (EE) Server terminated with error (1). Closing log file.