I am trying to run a simple u-boot script that will load a file from an SD card into RAM before the Linux kernel starts to boot, and so far has successfully worked with the "load" command.
Unfortunately, I need to hardcode the file name into this u-boot script, so I would like to use a wildcard (e.g. *) to ignore the build date, which is added to all my file names. I don't see wildcard references in the U-Boot environment, so I wondered if anyone knew if that was possible.
I know that U-Boot is cut out and not intended for this kind of thing, but we need this function for a short time after the release of reset, and we cannot wait for Linux to boot.
I added a simple example of my code below:
"if test -e mmc 0:1 <filename>.img; then " \
"load mmc 0:1 0x81000000 <filename>.img; echo Image loaded into DRAM; " \
"<RUN C PROGRAM HERE>;" \
"else echo No firmware image found; fi;"
Thanks for any help.
source
share