Hello,
I’m trying to patch the defconfig to exclude usbserial from the built-in KMs.
I already tried:
But none of them got me to the result I wanted. The patch seems to be applied since I get the error:
Applying patch defconfig.patch
patching file arch/arm/configs/colibri_imx7_defconfig
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 255.
2 out of 2 hunks FAILED -- rejects in file arch/arm/configs/colibri_imx7_defconfig
Patch defconfig.patch can be reverse-applied
But the applied kernel config doesn’t have the changes.
I attached the recipe.
Has anyone an idea how to get that working?
Hi @pkahlert
It looks like the patch was already applied. Could it be that you didn’t do a clean of your kernel package?
bitbake -fc cleanall virtual/kernel
bitbake virtual/kernel
This should hopefully apply the patch correctly.
Regards,
Stefan
Hi Stefan,
I did a clean repo inti / repo sync and got the same error. But when it is already applied is it not used to build the kernel?
Regards,
Pascal
Hi @pkahlert
Ahh wait you want to exclude usb-serial? Then your patch is in the wrong direction! Everything that is + should be - and vice versa. How did you create the patch? You can simply do a git diff after the change. Your patch looks as follows:
-CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_CONSOLE=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_FTDI_SIO=y
+CONFIG_USB_SERIAL_PL2303=y
+CONFIG_USB_SERIAL_OPTION=m
This means remove CONFIG_USB_SERIAL=m and add CONFIG_USB_SERIAL=y. But in colibri_imx7_defconfig CONFIG_USB_SERIAL=y is already set.
The problem is that yocto does not know if you applied the patch manually or not. Therefore you should do the cleanall.
Regards
Stefan
Hi Stefan,
Okay I fixed that, the error message is now gone but its bitbake is still not not using the patched defconfig.
Any other idea?
Regards,
Pascal
Update:
When I add:
do_preconfigure_prepend () {
patch ${WORKDIR}/defconfig ${WORKDIR}/defconfig.patch
}
It seems to work, but I was under the impression that this should not be necessary.
Perfect, that it works. Thanks for the feedback.