Upgrade EKB(eks.img) for TX2

I want to upgrade the eks.img,and I modify the bootloader/l4t_bup_gen.func file as the follow command for t18x

"${signed_dir}"/eks_sigheader.img.${signed_ext} eks 2 0 $_common_spec; \

then generate the BUP, copy the bup packages on to TX2 this dir /opt/ota_package.
After I run the nv_update_agent to upgrade,I got failed as follow:

Slot could not be opened eks
eks fail to write 
Writing to partitions failed.
OTA Blob update failed. Status: 5
/usr/sbin/nv_bootloader_payload_updater --no-dependent-partition failed.
Slot 1 update failed
Error: installing bootloader updates failed: 1280

Please help me out.

My Board: Jetson TX2
Soft version: L4T R32.5.1

hello xl19862005,

may I know what’s the use-case?
could you please use gen_ekb.py for Tool for EKB Generation, this will generate eks image file.
besides, could you please share the TNSPEC for reference, i.e. $ cat /etc/nv_boot_control.conf
thanks

1、Yes I can use gen_ekb.py for Tool for EKB Generation,and can generate eks image file successful.
2、The TNSPEC for reference as below
TNSPEC 3310-B02-1000–1-0-buzzard-tx2-mmcblk0p1
COMPATIBLE_SPEC 3310-B01—1–buzzard-tx2-mmcblk0p1
TEGRA_CHIPID 0x18
TEGRA_OTA_BOOT_DEVICE /dev/mmcblk0boot0
TEGRA_OTA_GPT_DEVICE /dev/mmcblk0boot1

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

hello xl19862005,

how about using flash script to update eks partition.
for example, $ sudo ./flash.sh -r -k eks jetson-tx2-devkit mmcblk0p1
could you please also share the result for reference,
thanks