Apply patch

Hello,

I’m trying to follow instructions of this topic to fix I2S pins configuration on the Jetson Nano.

The problement is that I’m stuck at the step apply patch.

I’m trying to follow the documentation to reboot the kernel but I get the following error when I try to run the script “apply_binaries.sh”:

user@user-desktop:~/Documents/Linux_for_Tegra$ sudo ./apply_binaries.sh
Using rootfs directory of: /home/user/Documents/Linux_for_Tegra/rootfs
find: ‘/home/user/Documents/Linux_for_Tegra/rootfs/etc/passwd’: No such file or directory
||||||||||||||||||||||| ERROR |||||||||||||||||||||||
-----------------------------------------------------
1. The root filesystem, provided with this package,
   has to be extracted to this directory:
   /home/user/Documents/Linux_for_Tegra/rootfs
-----------------------------------------------------
2. The root filesystem, provided with this package,
   has to be extracted with 'sudo' to this directory:
   /home/user/Documents/Linux_for_Tegra/rootfs
-----------------------------------------------------
Consult the Development Guide for instructions on
extracting and flashing your device.
|||||||||||||||||||||||||||||||||||||||||||||||||||||

Is this the correct process to apply a patch on Jetson Nano ?
If so, where do this error come from ?

Thanks in advance.

The apply_binaries.sh is not exactly a patch. What it does is add NVIDIA content to an otherwise purely Ubuntu filesystem. However, you have not installed the software this is applied to.

If you had used JetPack/SDK Manager, then this would be installed for you (including the application of those drivers).

If you manually install, then it goes like this:

  • Unpack the driver package as a regular user without sudo.
    (this produces the Linux_for_Tegra/ directory)
  • Go to the Linux_for_Tegra/rootfs/ subdirectory and unpack the sample rootfs with sudo.
  • Go back to Linux_for_Tegra/ and run “sudo ./apply_binaries.sh

From that point forward you can flash using command line (you don’t need to repeat the above steps).

The above is not a patch. This is for a full flash. I don’t know if this fixes a problem or not, but if you have an older release, then that is possibly the case.

Incidentally, L4T is what one calls Ubuntu once the NVIDIA drivers are present (this is what apply_binaries.sh does). An older Nano is compatible with L4T R32.x. See this to get the most recent release:
https://developer.nvidia.com/linux-tegra

Usually a release of JetPack is also tied to a given L4T release, so picking one usually picks the other.

1 Like

The apply_binaries.sh is not running on Jetson Nano device itself…

The actual process is as linuxdev just mentioned. You need another x86 ubuntu host to develop and flash the jetson nano. “apply_binaries.sh” is running on that x86 host but not your jetson directly.

u must have kernel sources (sources in C language)
then u must modify gpio-tegra.c file in text editor add some lines to it at specific places

then build kernel with make command

and then transfer kernel image and modules to jetson usin flash command through usb cable

po 27. 5. 2024 v 14:43 odesílatel andrejiro via NVIDIA Developer Forums <notifications@nvidia.discoursemail.com> napsal:

Thanks for your answers !

I manage to create the appropriate Linux_for_Tegra package.

Now I’m in the process of flashing the board, but once I execute the flash command:

user@Ubuntu20:/media/user/sedondaryDisk/Linux_for_Tegra$ sudo ./flash.sh jetson-nano-devkit mmcblk0p1

the process stop at the step

Sending BCTs
tegrarcm --download bct P3448_A00_lpddr4_204Mhz_P987.bct

full prompt:

###############################################################################
# L4T BSP Information:
# R32 , REVISION: 7.4
###############################################################################
# Target Board Information:
# Name: jetson-nano-devkit, Board Family: t210ref, SoC: Tegra 210,
# OpMode: production, Boot Authentication: ,
# Disk encryption: disabled ,
###############################################################################
./tegraflash.py --chip 0x21 --applet "/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/nvtboot_recovery.bin" --skipuid --cmd "dump eeprom boardinfo cvm.bin"
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0012 ] Generating RCM messages
[   0.0024 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm /media/user/disqueSecondaire/Linux_for_Tegra/bootloader/nvtboot_recovery.bin 0 0
[   0.0036 ] RCM 0 is saved as rcm_0.rcm
[   0.0050 ] RCM 1 is saved as rcm_1.rcm
[   0.0050 ] List of rcm files are saved in rcm_list.xml
[   0.0050 ]
[   0.0050 ] Signing RCM messages
[   0.0109 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0123 ] Assuming zero filled SBK key
[   0.0224 ]
[   0.0225 ] Copying signature to RCM mesages
[   0.0261 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0289 ]
[   0.0290 ] Boot Rom communication
[   0.0302 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml --skipuid
[   0.0313 ] RCM version 0X210001
[   0.1764 ] Boot Rom communication completed
[   1.7708 ]
[   1.7708 ] dump EEPROM info
[   1.7875 ] tegrarcm --oem platformdetails eeprom /media/user/disqueSecondaire/Linux_for_Tegra/bootloader/cvm.bin
[   1.7929 ] Applet version 00.01.0000
[   1.8881 ] Saved platform info in /media/user/disqueSecondaire/Linux_for_Tegra/bootloader/cvm.bin
[   1.9817 ]
[   1.9829 ] tegrarcm --reboot recovery
[   1.9837 ] Applet version 00.01.0000
[   2.0859 ]
Board ID(3448) version(402)
copying bctfile(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/BCT/P3448_A00_lpddr4_204Mhz_P987.cfg)... done.
copying bootloader(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
copying initrd(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
Making Boot image... done.
Existing sosfile(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
copying tegraboot(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/nvtboot.bin)... done.
copying cpu_bootloader(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
copying bpffile(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/sc7entry-firmware.bin)... done.
copying wb0boot(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/warmboot.bin)... done.
Existing tosfile(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/tos-mon-only.img) reused.
Existing eksfile(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/eks.img) reused.
./flash.sh: ligne 2661 : [:  : nombre entier attendu comme expression
copying dtbfile(/media/user/disqueSecondaire/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
Copying nv_boot_control.conf to rootfs
populating kernel to rootfs... done.
populating initrd to rootfs... done.
populating kernel_tegra210-p3448-0000-p3449-0000-b00.dtb to rootfs... done.
Making system.img...
populating rootfs from /media/user/disqueSecondaire/Linux_for_Tegra/rootfs ... populating /boot/extlinux/extlinux.conf ... done.
Sync'ing system.img ... done.
Converting RAW image to Sparse image... done.
system.img built successfully.
Existing tbcfile(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
copying tbcdtbfile(/media/user/disqueSecondaire/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
copying cfgfile(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/cfg/flash_l4t_t210_max-spi_sd_p3448.xml) to flash.xml... done.
copying flasher(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
Existing flashapp(/media/user/disqueSecondaire/Linux_for_Tegra/bootloader/tegraflash.py) reused.
./tegraflash.py --bl cboot.bin --bct  P3448_A00_lpddr4_204Mhz_P987.cfg --odmdata 0xa4000 --bldtb kernel_tegra210-p3448-0000-p3449-0000-b00.dtb --applet nvtboot_recovery.bin  --cmd "flash; reboot"  --cfg flash.xml --chip 0x21    --bins "EBT cboot.bin; DTB tegra210-p3448-0000-p3449-0000-b00.dtb"
saving flash command in /media/user/disqueSecondaire/Linux_for_Tegra/bootloader/flashcmd.txt
saving Windows flash command to /media/user/disqueSecondaire/Linux_for_Tegra/bootloader/flash_win.bat
assign_value: crc-flash.xml.bin 1 65520 1
printf '\x1' | dd of=crc-flash.xml.bin bs=1 seek=65520 count=1 conv=notrunc
1+0 enregistrements lus
1+0 enregistrements écrits
1 octet copié, 0,000108994 s, 9,2 kB/s
assign_value: crc-flash.xml.bin 0 65521 1
printf '\x0' | dd of=crc-flash.xml.bin bs=1 seek=65521 count=1 conv=notrunc
1+0 enregistrements lus
1+0 enregistrements écrits
1 octet copié, 0,000107213 s, 9,3 kB/s
assign_string: crc-flash.xml.bin PTHD 65528 4
echo PTHD | dd of=crc-flash.xml.bin bs=1 seek=65528 count=4 conv=notrunc
4+0 enregistrements lus
4+0 enregistrements écrits
4 octets copiés, 0,00017983 s, 22,2 kB/s
*** Flashing target device started. ***
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0060 ] tegrasign --getmode mode.txt --key None
[   0.0070 ] Assuming zero filled SBK key
[   0.0124 ]
[   0.0125 ] Generating RCM messages
[   0.0187 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm nvtboot_recovery.bin 0 0
[   0.0199 ] RCM 0 is saved as rcm_0.rcm
[   0.0237 ] RCM 1 is saved as rcm_1.rcm
[   0.0240 ] List of rcm files are saved in rcm_list.xml
[   0.0244 ]
[   0.0244 ] Signing RCM messages
[   0.0276 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0287 ] Assuming zero filled SBK key
[   0.0344 ]
[   0.0345 ] Copying signature to RCM mesages
[   0.0373 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0430 ]
[   0.0431 ] Parsing partition layout
[   0.0448 ] tegraparser --pt flash.xml.tmp
[   0.0462 ]
[   0.0464 ] Using default ramcode: 0
[   0.0464 ] Disable BPMP dtb trim, using default dtb
[   0.0464 ]
[   0.0464 ] Creating list of images to be signed
[   0.0476 ] tegrahost --chip 0x21 0 --partitionlayout flash.xml.bin --list images_list.xml
[   0.0581 ]
[   0.0582 ] Generating signatures
[   0.0619 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.0636 ] Assuming zero filled SBK key
[   0.1246 ]
[   0.1247 ] Generating br-bct
[   0.1301 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.cfg --chip 0x21 0
[   0.1398 ]
[   0.1405 ] Updating boot device parameters
[   0.1418 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatedevparam flash.xml.bin
[   0.1431 ] Warning: No sdram params
[   0.1437 ]
[   0.1438 ] Updating bl info
[   0.1450 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.1482 ]
[   0.1483 ] Updating secondary storage information into bct
[   0.1493 ] tegraparser --pt flash.xml.bin --chip 0x21 0 --updatecustinfo P3448_A00_lpddr4_204Mhz_P987.bct
[   0.1505 ]
[   0.1506 ] Updating Odmdata
[   0.1519 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatefields Odmdata =0xa4000
[   0.1532 ] Warning: No sdram params
[   0.1533 ]
[   0.1533 ] Get Signed section of bct
[   0.1560 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --listbct bct_list.xml
[   0.1578 ]
[   0.1579 ] Signing BCT
[   0.1618 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.1632 ] Assuming zero filled SBK key
[   0.1640 ]
[   0.1641 ] Updating BCT with signature
[   0.1651 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatesig bct_list_signed.xml
[   0.1667 ]
[   0.1668 ] Copying signatures
[   0.1679 ] tegrahost --chip 0x21 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   0.1798 ]
[   0.1799 ] Updating BFS information on BCT
[   0.1832 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatebfsinfo flash.xml.bin
[   0.1848 ]
[   0.1849 ] Boot Rom communication
[   0.1871 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml
[   0.1882 ] BootRom is not running
[   0.2602 ]
[   0.2603 ] Sending BCTs
[   0.2629 ] tegrarcm --download bct P3448_A00_lpddr4_204Mhz_P987.bct

Do you know where this bug comes from ?
I’m using a VirtualBox Ubuntu, I know it isn’t ideal but it’s all I have.


Same problem with a default Linux_for_Tegra repository, found this link dealing with BootRom is not running problem.
If I can manage to get a Linux computer I’ll try to flash and update the topic.

During flash the USB will disconnect and reconnect. Your VM is failing to recognize reconnect. The actual flash software has no control over this, so you’d have to find out how to adjust the VM to always own that USB.

1 Like

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