I’m interested in trying to change the behavior of U-Boot by using the boot.scr file. I’d like to have the source code (Probably boot.cmd) for the compiled version of boot.scr which comes with a Toradex Linux image so I can start with a working script and then test making small changes. I’m hoping to be able to use boot.scr to avoid having to compile and use a custom version of U-Boot. I’ve looked for this file in the Toradex Linux source code repo, but can’t find it. Is it in that repo somewhere, or is it available somewhere else?
I am using image Colibri-iMX7-eMMC_Console-Image 3.0b4.254 20200421 and have checked out for the code for the tag Colibri-iMX7-eMMC_Console-Image_3.0b4.254-20200421 on branch toradex_4.14-2.3.x-imx.
Thanks @diego_b.tx, that was the file I was looking for. I had read those two pages before I asked my question but I hadn’t been able to figure out how to do what I needed using the information there. I was able to edit and compile boot.cmd.in, and then replace the boot.scr file in my system but it seemed to me that U-boot was ignoring it as no changes that I made had any effect.
I was interested in using boot.scr as a way to change the UART used by U-boot without having to learn how to edit the U-boot source code and compile it, but I came to the conclusion that editing U-boot was the only way to do what I needed to do. So I followed the instructions on the Toradex website and I was able to figure out how to edit and build U-boot. I then added mu custom u-boot.imx to a TEZI package, install it on a module, and verify that it worked as I wanted.Getting that to work was a steep learning curve, but I learned some very useful things along the way.
I have one more question for you. Is a TEZI package the only way to install a custom version of U-boot? It would be convenient if the u-boot.imx file was exposed in the file system so that I could simply replace it without disturbing the rest of the module, like I can do with the kernel image.
Usually new questions need to be placed in a new thread. With this, other people are better able to find answers to their specific questions. However, I will quickly gonna answer here.
There would probably be a way to replace u-boot from u-boot itself or from Linux. This was already discussed in this or this thread. But as you also can see from this discussions, we do highly recommend to use the Toradex Easy Installer for such. All other ways are risky or sometimes not even possible for some modules, can change without any further notice and are not supported from us.
However, the Toradex Easy Installer should be really fast and secure at the same time. If you prepare an image with the customized u-boot and change the auto-install flag to ‘true’, you can install that image in a few minutes.