[U-Boot-Users] Arithmetic expansion from shell

Hello all, I wanted to write a script which could parse file image header before booting. Initially we thought Hush script could do the job but it seems the arithmetic expansion is not supported with either the default command parser or the hush shell (no 'let' command either). Could you please confirm if this is correct?
Also, if the above is correct, I am planning to write a bootstrap function/command (board specific code) with something like
bootcmd=<bootsrap init cmd>; bootm
Is this write approach?
Thanks, Hemant.

In message 7114f92a0706070454g38b5d8e9s135236addf46e216@mail.gmail.com you wrote:
I wanted to write a script which could parse file image header before booting. Initially we thought Hush script could do the job but it seems the arithmetic expansion is not supported with either the default command parser or the hush shell (no 'let' command either). Could you please confirm if this is correct?
Yes.
Also, if the above is correct, I am planning to write a bootstrap function/command (board specific code) with something like bootcmd=<bootsrap init cmd>; bootm
What would that be good for?
Is this write approach?
Depends on what you want to do. I've been doing a lot of things with U-Boot, and so far I never needed this.
Best regards,
Wolfgang Denk

Thanks for the info, Wolfgang.
I need to parse the multi-file image (across updates) to form the bootargs (how many mtds to form, rootfs, etc) before u-boot boots the new image.
participants (2)
-
Hemant Pedanekar
-
Wolfgang Denk