I need to create a 3-step macro in U-Boot:
- Use dhcp to download an image to memory. This sets filesize
- Test if $filesize > $SOMELIMIT, print a message, and stop
- Would write the downloaded image to flash.
I know how to do steps 1 and 3, but not 2.
I know that I can use the U-Boot command itest
to test integer values, but I don't know how to create a compound statement in the if/else/endif clause.
And I don't know how to have an "abort macro" step in one of those clauses.
How can I stop a U-Boot command sequence abruptly?
if
,itest
,dhcp
is still missing in U-Boot (cf. docs.u-boot.org/en/latest/usage/index.html#shell-commands). Patches are welcome. – Belakif ... then ... else ...
properly and as intended. There's no need to "stop" (???) or "abort" execution. Your "step #3" is merely the alternative action to theif ... then ...
action, so "step 3" should be theelse ...
action. – CofferdamSuggestions?
, and (it's already the case here) he's asking for help for 2 actions, so it's not focused on one problem, only on one project which have 2 problem – Cohin