Removing DFU from u-boot-imx in Yocto for i.MX8MM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Removing DFU from u-boot-imx in Yocto for i.MX8MM

Jump to solution
425 Views
Sampo
Contributor III

We are using Yocto (kirkstone 4.0.4) to build U-Boot for imx8mm_evk. We wish to remove DFU from U-Boot completely.

We know how to configure U-Boot with configuration fragments, we already do that successfully for other options. But for some reason, this simple configuration fragment does not work:

CONFIG_DFU=n
CONFIG_CMD_DFU=n

I have verified from do_configure logs that the fragments are taken into use:

Value of CONFIG_DFU is redefined by fragment remove_dfu.cfg:
Previous value: CONFIG_DFU=y
New value: CONFIG_DFU=n

Value of CONFIG_CMD_DFU is redefined by fragment remove_dfu.cfg:
Previous value: # CONFIG_CMD_DFU is not set
New value: CONFIG_CMD_DFU=n

I have also verified that no other fragments override these changes. However, after do_configure is finished, the final .configure file has CONFIG_DFU=y (CONFIG_CMD_DFU is still off). For some reason, when the recipe runs "make oldconfig", the value reverts.

Why does the configure want to seemingly force DFU on? I am able to remove it by forcing the change with a do_configure:append, but that is a very nasty hack and I would prefer another solution.

0 Kudos
Reply
1 Solution
367 Views
Sampo
Contributor III

I will answer my own question: going through all the Kconfig files I found out that CONFIG_EFI_CAPSULE_FIRMWARE_FIT and CONFIG_EFI_CAPSULE_FIRMWARE_RAW were forcing DFU to be enabled. When I disabled the EFI loader, I was also able to disable DFU the normal way.

View solution in original post

3 Replies
404 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Sampo 

 

One can try to add oe_runmake oldconfig on the do_compile, for example:

do_configure:append() {
    echo "CONFIG_DFU=n" >> ${B}/.config
    echo "CONFIG_CMD_DFU=n" >> ${B}/.config
    oe_runmake oldconfig
}

 

Best regards,

--... ...--

Salas. 

0 Kudos
Reply
382 Views
Sampo
Contributor III

That does not work. as I explained in my original post, running "oe_runmake oldconfig" for some reason sets "CONFIG_DFU=y" even if it is disabled in the config file. I am trying to understand why.

 

0 Kudos
Reply
368 Views
Sampo
Contributor III

I will answer my own question: going through all the Kconfig files I found out that CONFIG_EFI_CAPSULE_FIRMWARE_FIT and CONFIG_EFI_CAPSULE_FIRMWARE_RAW were forcing DFU to be enabled. When I disabled the EFI loader, I was also able to disable DFU the normal way.