diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-06-17 10:24:14 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-22 10:52:37 +0200 |
commit | 3367ebc55ebe92e21c9a9045e1eab35593cfcf57 (patch) | |
tree | f5d9419128f3c2d29e50eee81b14a56cd3f98eb0 /dts/src/mips/mscc/ocelot_pcb120.dts | |
parent | 15559d8bf46d1778c581ae7c0862b8c8b5876411 (diff) | |
download | barebox-3367ebc55ebe92e21c9a9045e1eab35593cfcf57.tar.gz barebox-3367ebc55ebe92e21c9a9045e1eab35593cfcf57.tar.xz |
scripts: imx-usb-loader: simplify code flow for file size calculations
This change contains several changes that make the code flow easier to
understand (in my eyes at least):
- Rename max_length to firststage_len
In some cases the image is loaded in two stages: First the PBL which
is started after the PBL is loaded completely and then the whole
image. So the size of the first stage isn't about some maximum.
- Drop unintuitive total_size variable
This variable used to be 0 in the one stage case and the filesize
otherwise. Just use firststage_len for the first stage and use the
filesize for the second stage (if needed).
- Don't call the first stage size "fsize" in the debug output.
- Add offset for second stage to debug output.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.barebox.org/20220617082414.323238-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'dts/src/mips/mscc/ocelot_pcb120.dts')
0 files changed, 0 insertions, 0 deletions