Bootloader OTA update is not updating uboot sometimes on jetson Tx2 SDK 32.4.3

Hi,

I am using jetson TX2 4GB with SDK 32.4.3.

i am following method to update bootloader on my jetson tx2 device

  1. Put the device into recovery mode.
  2. Run below command to generate BUP:
    $ sudo FAB=300 BOARDID=3489 FUSELEVEL=fuselevel_production ./build_l4t_bup.sh jetson-tx2-4GB mmcblk0p1
    Payload will be saved in this directory of the source code “Tegra186_Linux_R32.4.3_aarch64/Linux_for_Tegra/bootloader/payloads_t18x/”
  3. Copy bootloader payload to /opt/ota_package/

$cp Tegra186_Linux_R32.4.3_aarch64/Linux_for_Tegra/bootloader/payloads_t18x/bl_update_payload /opt/ota_package
Please make sure you are using the same image to generate BUP
4. Enable A/B redundancy
$ sudo nv_update_engine --enable-ab
5. Install Update Engine
$ sudo nv_update_engine –install

=======================

i am seeing logs to bootloader update on console but after reboot when i am reading the slot it is showing bootloader fail.

root@tegra-ubuntu:/home/ubuntu# sudo nv_update_engine --verify
Nvidia A/B-Redundancy Update tool Version 1.2
verifying update
The current slot 1 is marked as boot successful
SM: S22
Previous update on slot 0 failed

================================

can you please tell what is condition of bootloader fail update when i am doing large changes in my uboot code and compiling it and doing bootloader OTA update it is failing…i have different version of uboot source code in different directory i am trying to update if my earlier uboot version is v1.4.0.0 i am trying with new uboot with version v1.5.0.0 but this bootloader is not updating during OTA update…is same source signature matter here for genration of “bl_update_payload”.

Any help will be appreciated.

  1. Could you share the result of this file?

cat /etc/nv_boot_control.conf

  1. What change do you make to your uboot? Was the BUP update working if you don’t update the uboot? (Just a confirmation)

cat /etc/nv_boot_control.conf

TNSPEC 3489-300-0888-J.0-1-0-jetson-tx2-4GB-mmcblk0p1
TEGRA_CHIPID 0x18
TEGRA_OTA_BOOT_DEVICE /dev/mmcblk0boot0
TEGRA_OTA_GPT_DEVICE /dev/mmcblk0boot1

============================================

i added some new enviorment varaible in uboot code and some logic added as per my custom board.

=================================================

after genrating the bl_update_payload using bup script i am able to update the bootloader…but uboot changes are notr reflecting…how to confirm BUP update is working properly or not?

What is the exact problem we have here? SM: S22 Previous update on slot 0 failed error or just uboot env is not updated?

my exact problem is uboot is not updating during bootloader OTA update and when i am running sudo nv_update_engine --verify ,it is showing previous bootloader update is failing…

scenario 1 in which u-boot loader update is working:

1.suppose i have a source code of version v1.1.0.0 and compiled it fully and flashed my jetson Tx2…now i have added some print in my code and compiled U-boot and genrate the BUP and update the bootloader,i am able to see my added uboot prints after OTA update.

=====
scenario in which uboot update is not reflecting

1.suppose i have already flashed above image now i moved to version v1.4.0.0 on my source code where i have changes of uboot also…so after checking out these branch i compiled only uboot and then genrated BUP image and update the bootloader…this time my uboot didnot update…what could be the reason for not updating this time…this is the scenario where i am facing issue.

Ok, so this is not related to uboot env. It is related to uboot binary itself, right? The binary and ENV are stored in different partition, thus I need to clarify this first.

And where does your v1.1 uboot and v1.4 uboot source come from? From our old jetpack public source and new source?
Do you add anything new in the v1.4 source code? debug print?

actually my v1.4 uboot source has some new env variable added for my requirement…i am not sure that is causing the issue or not…but if i am adding some new env variable in uboot source code…the bootloader update will fail or pass?

see v1.1 uboot source code is created from base SDK 32.4.3 and v1.4 source code is created from v1.1…you can say v1.4 is latest code of uboot and v1.1 is old code…all code is added on github on different branch…so suppose i have release v1.1 1 month back and now i am at v1.4 and i want to update only uboot code of v1.4…that is possible through bootloader update right?

Hi,

According to the diagram, SM22 comes because your previous update on slot 0 is failed. You probably have a broken slot 0 and previously it reboot 7 times and all got failure.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/bootloader_update_agx_tx2.html#wwpID0E0XD0HA

Can you clearly tell us what is exact “v1.4” uboot here? Is it from the source code we provided? Or you just download it from upstream?

yes v1.4 uboot taken from source code you provided that is taken from SDk32.4.3 tar file…what is the reason of bootloader update failure?how can this uboot loader code can broke slot 0.

if i did uboot update using sudo ./flash.sh -r -k kernel jetson-tx2-4GB mmcblk0p1

this above command updating the u-boot source code properly so how same code can corrupt slot 0 when we are doing bootloader OTA update.

OK, if this source code is directly from rel-32.4.3, let’s try below test

  1. Flash back to default uboot, which is provided from jetpack. Do not build it from source code.

  2. Try to generate BUP and update the BUP through the same method.

→ Do you see the failure in “–verify” after running these steps?

If you don’t hit error, build the uboot from rel-32.4.3, but do not add any patch from your side. Just build it from pure source. Try the same test again. Will you see error now?

i am not seeing any error when build from rel 32.4.3…but my use case is that i need to do changes in my uboot and need to add env variable.

How i can proceed further…can you update on this.

Just try to figure out whether this is caused by adding change to your uboot or it is caused by adding env variable.

Try them separately so that you can find out what is the exact one that is causing problem.

Hi Wayne,

i am facing issue in both the case with u-boot changes also and env changes separately.

can you please help here what could be the issue.

Can you at least tell us what uboot change you’ve made? I see no such info shared so far.

You already told us the binary built from default source is fine. Then you should tell us what change you’ve made and crash.

my uboot image is fine it doesnot crash.

if my own compiled uboot is updating through below command ,i am able to see my changes after that but same is not happening with OTA update of bootloader.
============command to update the uboot===========

sudo ./flash.sh -r -k kernel jetson-tx2-4GB mmcblk0p1

using above command i am able to update my uboot…is there any difference in both the process.?

Do you really understand what test I was asking you to do in this comment?

Flash.sh is different from BUP update. You already told me your update with flash.sh is good on 7/5. That is good, that is great. But what we care about is whether default uboot from source can be updated with the BUP update method. For example, just adding one print function in the beginning in the uboot. Nothing else needs to be done and just run the BUP update. Will you see the update comes after BUP update during the boot up?

i understand you comment.

======================
see after adding one single print in start of uboot i am able to see the changes after BUP update …that is working fine i am able see changes after BUP update.

=========================

so here is my question:::

simple adding print in start of uboot is working fine for me…but whenever i am adding my customize changes in uboot source code + env changes…after that BUP update is not reflecting…any limitation here for BUP genration here or whatever you change in uboot will reflect in BUP update.

suppose i have two folder and all have same base sdk 32.4.4 source code…from one folder i made a full image and flash it fully by ./flash.sh jetson-tx2-4GB mmcbl0p1.

now in second folder i add some changes in uboot and compiled only uboot and then genrate BUP image…now i copy bl_update_payload to my device and update it…will this work or i need to genrate BUP image in first folder where i genarte the full image and flash it.

see after adding one single print in start of uboot i am able to see the changes after BUP update …that is working fine i am able see changes after BUP update.

Ok, so the default uboot would work in BUP update.

simple adding print in start of uboot is working fine for me…but whenever i am adding my customize changes in uboot source code + env changes…after that BUP update is not reflecting…any limitation here for BUP genration here or whatever you change in uboot will reflect in BUP update.

What you should tell me is what is exactly you added to you uboot and also the boot up log. Otherwise we really don’t know what happens.

now in second folder i add some changes in uboot and compiled only uboot and then genrate BUP image…now i copy bl_update_payload to my device and update it…will this work or i need to genrate BUP image in first folder where i genarte the full image and flash it.

I think both methods should work. If you see something wrong, again share the boot up log.

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