Issues remove uboot as the secondary bootloader to remove boot time of u-boot

The L4T_R28.2_Documentation say:
Secondary Bootloader
You can remove uboot as the secondary bootloader to remove boot time of u-boot. The following modifications are required before flashing:
1.Edit the common configuration file at:
/tegra_for_linux/ p2771-000.conf
2.Set USE_UBOOT to 0.

To configure whether to use U-Boot,

do either of the following before running flash.sh:

1) Set environment variable USE_UBOOT to 0 or 1.

2) Edit the line below to set USE_UBOOT to 0 or 1.

if [ -z “${USE_UBOOT}” ]; then
USE_UBOOT=0;
fi;

**With USE_UBOOT =1, I can use the command “scp” to copy kernel Image to /boot/ of TX2, But when remove uboot, the scp way is not working **
Someone can tell me know how to flash kernel image, When I remove uboot as the secondary bootloader?

Also, Currently our system have installed many application and library,
I just know , when change USE_UBOOT =1 config, I need to run the command
“flash.sh jetson-tx2 mmcblk1p1” to flash whole system image to active the feature. if run the above command , I will lost all app and library installed in the rootfs.
Are there any more simplest way to active the feature?

You could try to flash the “kernel” partition when uboot is gone.

Just an additional note to what @WayneWWW mentions on flashing the kernel partition…

Not all flash.sh commands flash the rootfs partition. Many do, and if you are not confident of leaving rootfs alone, then you can use a clone as both backup and cause any flash of rootfs to simply reflash its own content (takes time for flashing a rootfs even if the content is 100% an exact match, but it is safe).

If you clone you will end up with both a “.img” and a “.img.raw” file. I keep “.img.raw” and throw away “.img”. Both can be used to flash, but only the raw (larger) image can be examined and modified on the host PC. An example clone under R32.x with the TX2 in recovery mode:
sudo ./flash.sh -r -k APP -G my_backup.img jetson-tx2 mmcblk0p1

If you put a copy of “my_backup.img.raw” in place of “Linux_for_Tegra/bootloader/system.img”, then any flash using that image will simply be rewriting the content with what was already there. To avoid losing “bootloader/system.img” you must use the “-r” option when flashing…which reuses the system.img already present. Otherwise system.img is overwritten. An example of a full flash which reuses that clone, when “system.img” is actually the raw clone:
sudo ./flash.sh -r jetson-tx2 mmcblk0p1
…the “-r” is very important.

When you are looking at flash commands for just the kernel partition, and if you have a “-r” option and a clone as “system.img”, then it won’t matter if rootfs is overwritten or not…the content will still match what it used to be. Hopefully you find a command to flash just the kernel partition without rootfs, but while experimenting that clone will guarantee no loss.

Beware clones are very large files.

flash the “kernel” partition when uboot is gone is work.
I still not know the way how to switch to boot mode without uboot from using uboot mode. under the condition that do not flash the rootfs.

Hi,

When uboot is present, it will search the kernel under rootfs. That is why you could replace kernel by replace /boot/Image.

However, when uboot is gone, cboot needs to take this work. However, rel-28.2 cboot has no such capability and it only reads the kernel from partition “kernel”. Such function on cboot is implemented after rel-32.3.

so, I can only replace the rel-32.3 cboot to replace kernel by replace /boot/Image?

But rel-32.3 cboot cannot be used on rel-28 either. So, what you could do now is putting file in kernel partition.

My requirement is switch to boot mode without uboot present , but I need to keep the rootfs is not change.

Then, rel-28 cannot fulfill this request. Please upgrade to rel-32.4. Or implement this feature on cboot by yourself since rel-28 cboot src is public.

so,for rel32.3, to disable&enable uboot boot kernel , just need re-build cboot and flash it, my understand is correctly?

No, no need to re-build cboot. Just need to disable uboot by USE_UBOOT =0.

Also, if you want to upgrade, better using rel-32.4.2.

After set USE_UBOOT =0, I no need to flash cboot image to TX2?

Hi,

You need to flash, but that step is not flash “cboot”.

Also, need to correct my previous command, this feature seems only support on rel-32.4.

Can you let me know what’s the flash command after change USE_UBOOT value on rel-32.4?

HI,

Please just do the full flash.

Are there one mini command to flash those USE_UBOOT config?
expect do the full flash.