compulab-yokneam / meta-bsp-imx8mm

16 stars 21 forks source link

Build crashes on rel_imx_5.4.24_2.1.0-dev with some machines due to Denx's Gitlab redirect #6

Closed ikozic closed 3 years ago

ikozic commented 3 years ago

Hi, I've noticed that due to an error in a recipe which actually has nothing to do with the i.MX8M Mini or this meta layer, the Yocto build on the rel_imx_5.4.24_2.1.0-dev branch fails just after the recipe parsing phase for UCM-IMX8M-MINI. The recipe in question is the one from meta-compulab meta layer and can be found at: https://github.com/compulab-yokneam/meta-compulab/blob/devel/recipes-bsp/u-boot/u-boot-compulab_2017.07.bb

This layer is pulled by one of Compulab scripts and unfortunately due to a typo or error, bitbake is trying to fetch the refs from Denx's Gitlab for this U-Boot 2017.07. The line in question from the recipe is: COMPATIBLE_MACHINE_cl-som-imx7 = "cl-som-imx7" Correct would be: COMPATIBLE_MACHINE = "cl-som-imx7"

Due to this typo, and the fact that with the new 5.4 branch Compulab added layer masking for anything that has the word boundary in it, the newest U-Boot found after parsing phase (and the first recipe that tries to do do_compile() task) is this one, which is why it is trying to fetch the refs. This typo is effectively sabotaging the COMPATIBLE_MACHINE variable at least after the parsing phase.

Now the interesting thing is that refs can be fetched on some machines, as redirect works proper, but on most machines I've tried, it would crash with a redirect to Sign-in page of Denx's Gitlab, thinking that it actually has to build this old u-boot. Once this stage is passed (either by changing/deleting the recipe or removing the typo), a bit later in the build the proper imx-uboot is taken. However, this is rather difficult to figure out, especially since this U-Boot is not even supposed to be built. In contrast deleting this recipe helps bitbake as the newest one after this is 2016.09 which has the correct COMPATIBLE_MACHINE defined in its recipe, so bitbake doesn't touch it at all.

Fixing the typo resolves the issue. Please fix - I would create a PR myself, but since the change was done on purpose, I'm not sure if it would break something else. The typo was introduced with commit 814b0feb904485f3aa239f55a00e4a8e3189a919, apparently was needed for warrior, but I really doubt that it was meant like this since it's just wrong - it makes no sense to be written like that...

To test if the bitbake touches it during UCM-IMX8M-MINI build, you can break the git link in the recipe - as a result the whole build will fail after parsing.

Cheers!

vraevsky commented 3 years ago

Thanks, the recipe updated.

ikozic commented 3 years ago

No probs, thanks for being so prompt. Just in case, I'll test the build today once I come home and close the issue.

ikozic commented 3 years ago

Verified, fully working, sorry for delay in closing this.