hello aravind.m90,
so you’re building source-code on the target. it may not supported.
please download the sources to your local host machine, (i.e. ubuntu-OS) and follow the steps to setup build environment.
thanks
hello aravind.m90,
so you’re building source-code on the target. it may not supported.
please download the sources to your local host machine, (i.e. ubuntu-OS) and follow the steps to setup build environment.
thanks
Hi,
No. I am building source code in my local system only which have Ubuntu OS.
I said i was preparing for Jetson Xavier NX board. And i am following the developer guide given in NVIDIA downloads.
Hi aravind.m90,
Please download r32.5 kernel sources and run below commands on x86_64 host ubuntu machine:
$ export TEGRA_KERNEL_OUT=<outdir>
$ export CROSS_COMPILE=<cross_prefix>
$ export LOCALVERSION=-tegra
$ cd <kernel_source>
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j<n> modules_prepare
Hi,
I am using the same commands. Can you describe below mentioned command.
Replace <release_packagep>/Linux_for_Tegra/kernel/Image with a copy of:
$TEGRA_KERNEL_OUT/arch/arm64/boot/Image
Here i found Image file in the output directory. its saying put this file to a location. Is that Linux_for_tegra folder is same that we get when we extract the downloaded public source kernel (kernal source). For me that path is:
Linux_for_Tegra/source/public/kernel/kernel-4.9
So we need to put that Image file in that kernel-4.9 directory. Right?
Thanks and regards,
Aravind.
Hi aravind.m90,
After build completed, you can copy TEGRA_KERNEL_OUT image to sdkmanager download folder and flash image.
Copy from: $TEGRA_KERNEL_OUT/arch/arm64/boot/Image
TO: /Linux_for_Tegra/kernel/Image
hello aravind.m90,
please refer to below. you’re building kernel images with below sources.
$L4T_Sources/r32.5/Linux_for_Tegra/source/public/kernel$ tree -L 1
.
├── kernel-4.9
├── nvgpu
└── nvidia
it’s output a binary, Image which used by a target.
if you check the CBoot session, there’s LINUX entry in the boot configuration extlinux.conf to load the kernel binary file.
you may also note that, you should have device tree blob update to have device tree changes.
dtb file is by default loaded from the kernel-dtb partition, you may also include FDT entry to make cboot to load kernel-dtb binary file.
thanks
Hi,
When i buiding externel kernel modules using this below mentioned commands, its showing the error “kernel configuration is invalid”. Please go through the following command and errors.
command: make ARCH=arm64 –C $TEGRA_KERNEL_OUT M=$(pwd)
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run ‘make oldconfig && make prepare’ on kernel src to fix it.
make: *** No rule to make target ‘–C’. Stop.
Thanks & regards
hello aravind.m90,
please refer to post #25 for setting up your build environment variables.
thanks
Hi,
Problem 1. Can you provide what will be the path in in the first command.
Problem 2. Also While running the command to create sd card image using customized kernel, its showing jetson-disk-image-creator.sh file/directory not found. I am using below mentioned command:
./jetson-disk-image-creator.sh -o kernal_image.img -b jetson-xavier-nx-devkit
(I am using Jetson Xavier NX)
Error:
bash: ./jetson-disk-image-creator.sh: No such file or directory
How i will get that .sh script. Any solution?
Thanks in Advance.
Hi aravind.m90,
Q1: Please use the same pipeline in #25 post.
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
Q2: Tool path: /Linux_for_Tegra/tools/jetson-disk-image-creator.sh
Hi,
I didn’t found the jetson-disk-image-creator.sh script in the mentioned location. Is that because of my kernel building. I was following the same kernel customization procedure in NVIDIA website.
Thanks
hello aravind.m90,
this script file, jetson-disk-image-creator.sh, is installed with JetPack release image.
you may download NVIDIA SDK Manager to install JetPack release. after that, it’ll save the release image to your local host.
the default path as following, i.e. ~/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra
you should find the script file under tools folder, ./tools/jetson-disk-image-creator.sh
thanks
Hi,
Thank you. I found the script. Now i can able to flash. But as i said earlier i have to edit the device tree and enable Pllaon because i want to make CAN to work in 40 Mhz speed . I am following the procedure provided in the developer guide.
But i have a doubt in editing of clocks-init section. I mentioned the part below:
Here what we need to put inside disable part. Thank you.
Regards,
Aravind.
hello aravind.m90,
so you’ll need to edit the dts file to have customization,
for example, you may disassembler the dtb file into dts file,
$ dtc -I dtb -O dts -o temp.dts tegra.dtb
after that, you may convert it into a new dtb file for updating the board.
$ dtc -I dts -O dtb -o output.dtb temp.dts
Hello jerry,
Yes that i already did. I need to change the frequency of CAN to 40 MHz, For that i am trying to enable the pllaon in the device tree. i Converted the dtb file but now i need to make the edit. I was following the procedure specified in the developer guide. The link i am sharing with this message.
In this link under the pllaon as clock source (5th step) i have a doubt.
clocks-init{
compatible = “nvidia,clocks-config”;
disable {
/* Edit clocks property to remove clock provider + clock id pair for PLLAON. */
};
};
Here what we need to put inside disable part. Thank you.
Regards
remove PLLAON from list of clocks to be disabled
Hi,
PLLAON id is 94/0x5e. You mean to delete the id from the list. But That id is not present in the list.
hello aravind.m90,
you may change BPMP device tree, modify kernel and also kernel device tree.
for your reference, please check below for the steps.
Step-1. Change BPMP device tree
Unpack dtb file
cd $TOP/Linux_for_Tegra/bootloader/t186ref
$ dtc -I dtb -O dts tegra194-a02-bpmp-p3668-a00.dtb > tegra194-a02-bpmp-p3668-a00.dts
Modify CAN clock,
clock@can1 {
allow_fractional_divider = <0x1>;
- allowed-parents = <0x121 0x5b 0x13a>;
+ allowed-parents = <0x121 0x5b 0x13a 0x5e>;
clk-id = <0x9>;
};
Repack dtb file
$ dtc -I dts -O dtb tegra194-a02-bpmp-p3668-a00.dts > tegra194-a02-bpmp-p3668-a00.dtb
Re-flash bpmp-fw-dtb partition
$ sudo ./flash.sh -k bpmp-fw-dtb jetson-xavier-nx-devkit mmcblk0p1
Step-2. Modify kernel and kernel device tree.
diff --git a/hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000.dts b/hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000.dts
index b724f6279..707b5b1d3 100644
--- a/hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000.dts
+++ b/hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000.dts
@@ -22,4 +22,17 @@
nvidia,dtbbuildtime = __DATE__, __TIME__;
compatible = "nvidia,p3449-0000+p3668-0000", "nvidia,p3449-0000+p3668-0001", "nvidia,p3509-0000+p3668-0000", "nvidia,p3509-0000+p3668-0001", "nvidia,tegra194";
+
+ clocks-init {
+ /delete-node/ disable;
+ };
+
+ mttcan@c310000 {
+ pll_source = "pllaon";
+ clock-names = "can_core", "can_host", "can", "pllaon";
+ clocks = <&bpmp_clks TEGRA194_CLK_CAN1_CORE>,
+ <&bpmp_clks TEGRA194_CLK_CAN1_HOST>,
+ <&bpmp_clks TEGRA194_CLK_CAN1>,
+ <&bpmp_clks TEGRA194_CLK_PLLAON>;
+ };
};
diff --git a/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig b/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
index 0fa3a1c86..9fe665e7d 100644
--- a/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
+++ b/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
@@ -227,8 +227,10 @@ CONFIG_DNS_RESOLVER=y
CONFIG_NET_L3_MASTER_DEV=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_BPF_JIT=y
-CONFIG_CAN=m
+CONFIG_CAN=y
CONFIG_CAN_VCAN=m
+CONFIG_CAN_RAW=y
+CONFIG_CAN_DEV=y
CONFIG_CAN_SLCAN=m
CONFIG_CAN_C_CAN=m
CONFIG_CAN_CC770=m
@@ -249,7 +251,7 @@ CONFIG_CAN_GS_USB=m
CONFIG_CAN_KVASER_USB=m
CONFIG_CAN_PEAK_USB=m
CONFIG_CAN_8DEV_USB=m
-CONFIG_MTTCAN=m
+CONFIG_MTTCAN=y
CONFIG_IRDA=m
CONFIG_BT=y
CONFIG_BT_RFCOMM=y
Step-3. there are several ways to trigger a auto boot up task. here’s one for your reference.
$ sudo touch /etc/rc.local; sudo chmod +x /etc/rc.local#!/bin/bash -e
ifconfig can0 down
ip link set can0 up type can bitrate 1000000
exit 0
you may also refer to external wiki page to describes how to enable and verify CAN in Linux on Jetson AGX Xavier.
for example, Jetson/AGX Xavier CAN - eLinux.org
thanks
Hi jerry,
In the above method BPMP device tree i succefully updated but when i try to repack the modified kernel device tree its showing syntax error. Thank you.
Command: dtc -I dts -O dtb tegra194-p2888-0001-p2822-0000.dts > tegra194-p2888-0001-p2822-0000.dtb
Error: tegra194-p2888-0001-p2822-0000.dts:5297.29-30 syntax error
FATAL ERROR: Unable to parse input tree
Regards
hello aravind.m90,
it may caused by the node is used without definition,
there’s line number to indicate the error, please review your device tree property definitions.
thanks