Trouble Reintegrating Technexion Pico-PI imx6ull with Zeus

I’m working on integrating a Technexion Pico-PI imx6ull with zeus. I previously had it working under Rocko since we had help from Mender to do the original integration.

The problem I’m having is that auto patching isn’t working. Specifically some variables under mender_pre_setup_commands aren’t getting set and as a result the board won’t boot. Here is the line from doing printenv in u-boot (uboot-tn-imx_2020.04).

mender_pre_setup_commands=run loadbootenv; run importbootenv; setenv kernel_addr_r ; setenv bootargs console=,; run setfdt; setenv mender_dtb_name ;

In this line kernel_addr_r, console, and mender_dtb_name are all unset.

I looked through the file and I found that the proper kernel load address for kernel_addr_r is in a variable called loadaddr which according to the autopatcher source should be found. Console is not found although the data needed for it is in bootargs. Finally, the mender_dtb_name is found in the variable fdtfile.

I was able to get the board to boot by manually modifying the line that I showed above so that it reads:

mender_pre_setup_commands=run loadbootenv; run importbootenv; setenv kernel_addr_r ${loadaddr}; setenv bootargs console=${console},115200; run setfdt; setenv mender_dtb_name ${fdtfile};

These changes seem pretty basic but I can’t figure out how to get started modifying the autopatcher’s patch. I started out by trying to use devtool on u-boot-tn-imx but it doesn’t pick up the autopatcher’s patch when it copies the recipe to the workspace so I can’t just add the changes and then have it create a .bbappend file.

It looks to me like there is a bug in the autopatcher where it finds the variables in question like loadaddr but fails to use it in the way it was intended.

Does anybody have any suggestions about how to either fix the autopatcher or to generate my own u-boot patch?

Take a look at this section, particularly the given header and the next one. They describe how to extract the patch and disable auto-patching so you can use your own patch instead.