Closed nielsavonds closed 1 year ago
I'm wondering why a buffer of 1GiB is allocated to do that? Can we reduce this size safely?
That's in the original code, and I think I used that as a "temporary" value for the size until I worked out better logic for it. I should have marked it with FIXME or XXX to remind me to do that, but didn't, so it turned out not to be so temporary after all.
It should be safe to use stat()
to get the actual size of the BUP contents, then use that for allocation. If you can manage a patch to do that, great; otherwise, I'll get to it when I have some time.
I've opened a pull request (https://github.com/OE4T/tegra-boot-tools/pull/30) so you can review the code, but haven't tested it yet. I'll test it in the coming week and report back with the results.
Thanks for the prompt response!
I've now tested it on a TX2, TX2 NX, Xavier NX and Jetson Nano and all have successfully updated.
Thanks for the PR, which looks good. I've gone ahead and merged #30, run some further tests, and will release a new version soon.
Hi guys,
We're seeing a lot of failures when we upgrade our devices with the following message:
ERR: cannot perform bootloader update
We then created a build with a patched Mender script. Here's the patch for reference:
We then get the following output in Mender:
This leads me to the following lines in the tegra-bootloader-update.c file. It's the
perror
below that triggers the printed error:Digging into
bup_init
I found this:I've tried to investigate what this buffer is used for, but to me it seems like it's just used to load the bup payload file into memory? I'm wondering why a buffer of 1GiB is allocated to do that? Can we reduce this size safely?
Thanks! Niels