Jetson TX2 NX module u-boot environment variable pre-flash problem


I am using TX2 NX (P3636-0001) module with Jetpack 4.6 rev 2.
I was a problem with the extlinux.conf FDT feature.
I found a solution here:

I changed the u-boot.bin for the attached one:
This solves the FDT problem.

I want to pre-flash the u-boot env vars, so I dump the the env vars with this command:
sudo dd if=/dev/mmcblk0boot1 of=ubenv.bin bs=32k count=1 skip=123
This works for Jetson Nano modules.

In the flash.xml the following parameters added for UBENV partition:

    <partition name="UBENV" type="data">
        <allocation_policy> sequential </allocation_policy>
        <filesystem_type> basic </filesystem_type>
        <start_location> 0x7D8000 </start_location>
        <size> 32768 </size>
        <file_system_attribute> 0 </file_system_attribute>
        <allocation_attribute> 8 </allocation_attribute>
        <percent_reserved> 0 </percent_reserved>
        <description> **Required.** Reserved for U-Boot environment. </description>

The start offset is 0x7D8000, but the u-boot actually saves the environment variables at 0x7FE000 absolute address (0x3FE000 in /dev/mmcblk0boot1).
This address is out of range defined in the flash.xml.

How can I fix this problem?
I think it should save the data at 0x7D8000 as the Nano module does.
I see the CONFIG_ENV_OFFSET=0xFFFFE000 in the p3636-0001_defconfig.
Maybe this cause the problem.
I can fix this in the r32.6.1 u-boot source, and I can recompile.
Does the FDT work in this source with TX2 NX?
If it is not, how can I fix the “silence panic” problem in the source?
A source patch file would have been better than binary upload.

Best regards,
Laszlo Parrag

I cannot answer what you really want to know, but understand you referenced a link to a TX2 solution. The TX2 uses U-Boot, but the NX does not have U-Boot. Both platforms have CBoot, but on the TX2 CBoot chain loads into U-Boot. The NX directly loads the kernel from CBoot without using U-Boot, so configuration of environment will differ (although I suppose it is possible someone abstracted the “.conf” files related to this to a point where changes could appear the same…don’t know).


The uboot issue on TX2-NX should be related on this issue.


that binary works with FDT, but the UBENV address is wrong in that.
I cannot fix both issue, if I won’t get source patch, only binary.

Oh, sorry that I thought it was the patch.

The patch is here:

diff --git a/include/configs/p3636-0001.h b/include/configs/p3636-0001.h
index 1a8051b..712ae7b 100644
--- a/include/configs/p3636-0001.h
+++ b/include/configs/p3636-0001.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
- * Copyright (c) 2020, NVIDIA CORPORATION.
+ * Copyright (c) 2021, NVIDIA CORPORATION.
 #ifndef _P3636_0001_H
@@ -31,7 +31,7 @@
 		"ramdisk_addr_r\0" \
 	"kernel_addr_r_align=00200000\0" \
 	"kernel_addr_r_offset=00080000\0" \
-	"kernel_addr_r_size=02000000\0" \
+	"kernel_addr_r_size=08000000\0" \
 	"kernel_addr_r_aliases=loadaddr\0" \
 	"fdt_addr_r_align=00200000\0" \
 	"fdt_addr_r_offset=00000000\0" \

Thank you very much. This patch works on FDT problem.
Here is my patch, that solves the UBENV address problem:

diff -urN -x .git sources-r32.6.1/u-boot/configs/p3636-0001_defconfig sources/u-boot/configs/p3636-0001_defconfig
--- sources-r32.6.1/u-boot/configs/p3636-0001_defconfig	2021-10-13 19:09:54.170822001 +0200
+++ sources/u-boot/configs/p3636-0001_defconfig	2021-10-27 12:46:41.437000000 +0200
@@ -2,7 +2,7 @@

Now I can pre-flash the u-boot environment variables with changing flash.xml file:

        <partition name="UBENV" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <start_location> 0x7D8000 </start_location>
            <size> 32768 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> ubenv.bin </filename>
            <description> **Required.** Reserved for U-Boot environment. </description>

Both issue solved.

Thanks for sharing this patch. Will try to merge it to codebase.

I know anything Xavier does not use U-Boot. Is there a difference in how CBoot and U-Boot are used in the TX2 NX as compared to the TX2 full dev kit on the larger carrier board? I’m just wondering if the different TX2 variants sometimes use U-Boot, but sometimes do not. My thought was that all TX2 variants do not use U-Boot. Then again, since CBoot has inherited some of the U-Boot functionality I suppose that even without U-Boot there might be cases where CBoot has similar bugs.

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