No "-reuse_fv" option in L4T 36.4.4 gen_ekb.py

Hi,

According to documentation:

gen_ekb.py should handle a “-reuse_fv” option:

$ python3 gen_ekb.py -chip t234
                     -oem_k1_key <oem_k1.key> \
                     -in_sym_key <sym_t234.key> \
                     -in_sym_key2 <sym2_t234.key> \
                     -in_auth_key <auth_t234.key> \
                     -reuse_fv <old_eks_t234.img> \
                     -out <eks_t234.img>

But the script in the source package downloaded from:

https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.4/sources/public_sources.tbz2

does not manage such option. Has it been removed?

Thanks

Hi,

Please have a look to this thread: Please put back the '-fv' option in gen_ekb.py - #3 by chad.mcquillen Behaviour was changed.

Hi,

I saw that post, it says about EKBV2 requiring random FV. Problem is that when you need to reuse FV, you need to avoid regenerating it. That is what -reuse_fv option should do and what is described [at least] in L4T 36.4.4 documentation (see links in first post). But in 36.4.4 source package, gen_ekb.py internally generates FV from random (line 229), so it seems that the only way to reuse FV is to pass it manually to the script by patching it.

[edit: wrong link]

hello hen77,

please see-also Topic 342201, it reads FV from the input EKS image at offset 16.

Hello JerryChang,

I’ve read the post you linked and digged into gen_ekb.py, but I didn’t found anything that could point to a reading of FV from (existing?) EKS image, so I made a test. After generating required keys, I called gen_ekb.py multiple times, and this is the contents of the generated eks_t234.img files:

After first call (higlighted is FV area):

After second call (without regenerating any key):

Then, I patched gen_ekb.py as follows:

After calling patched script:

So it seems to me that gen_ekb.py (from L4T36.4.4) is still in charge of FV generation.

What am I missing?

Thanks

hello hen77,

please refer to EKB Header, FV is a randomly generated value now.

Hello JerryChang,

So, does this excerpt of the official documentation still holds true then?

Thanks

hello hen77,

let me track this internally, I’ll update this thread after confirmation.

hello hen77,

it should be documentation erroneous,
please try gen_ekb.py with the -input option to load FV from EKS image,
for instance,
parser.add_argument('-input', nargs=1, required=False, help="input eks image")

Hello JerryChang,

Thanks for the -input ;-)

Please note: there is no “-input” option on the L4T 36.4.4 version of gen_ekb.py. I found it on L4T 36.5.0 version, though. Handling of that option is the only change between the two revisions, so I think it should be safe to use the newer script also on 36.4.4.

Thanks
Enrico