The whole boot strategy stuff in our environment is just a sequence of executing the bootcmd. This command simply does the following
So the whole magic lies in the variables set_bootargs, kernel and fdt. Each value is set depending on the boot strategy. If you just want to add an own script, you can simply call it in bootcmd as first call in front of run set_bootargs for example.
There is also a variable preboot that we typically do not set. There you can also call your script. But please note the difference. The content of preboot is executed immediately at start, before the boot delay counts down (which is probably exactly what you want). The content of bootcmd is executed when the Linux system is started, which is considerably later.