How can I create a patch for .config in my custom layer

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

How can I create a patch for .config in my custom layer

Jump to solution
1,282 Views
Derek0902
Contributor II

Hi,

 

After I modified kernel config use this command below, there is a .config in <build_dir>/tmp/work/imx8mqevk-poky-linux/linux-imx/6.1.36+gitAUTOINC+04b05c5527-r0/build

 

$ bitbake linux-imx -c menuconfig 

 

Then I override defconfig with .config and create a patch in my custom layer. But it didn't take effect in my board.

 

$ cp .config <build_dir>/tmp/work/imx8mqevk-poky-linux/linux-imx/6.1.36+gitAUTOINC+04b05c5527-r0/git/arch/arm64/configs/defconfig

 

 

I want to create a patch for this config in my custom layer. How can I do that?

 

Thanks & Regards,

Derek Lin

0 Kudos
Reply
1 Solution
1,239 Views
pengyong_zhang
NXP Employee
NXP Employee

HI, @Derek0902 

Sorry to reply late

1. Make sure you have added the configuration changes in your customization layer. This is usually done by adding a conf/layer.conf file, which is read during the build process.

2. In the top-level directory of your customization layer, run the following command to create the patch file:
bitbake-diff . > custom-layer-config-patch
3. This command compares the current.config file in your build directory with the prebuild pristine.config file and generates a patch file custom-layer-config-patch.

View solution in original post

0 Kudos
Reply
2 Replies
1,240 Views
pengyong_zhang
NXP Employee
NXP Employee

HI, @Derek0902 

Sorry to reply late

1. Make sure you have added the configuration changes in your customization layer. This is usually done by adding a conf/layer.conf file, which is read during the build process.

2. In the top-level directory of your customization layer, run the following command to create the patch file:
bitbake-diff . > custom-layer-config-patch
3. This command compares the current.config file in your build directory with the prebuild pristine.config file and generates a patch file custom-layer-config-patch.

0 Kudos
Reply
1,238 Views
Derek0902
Contributor II

Hi @pengyong_zhang ,

 

Thanks for your help. I have found that is in ../source/meta-freescale/recipes-kernel/linux-imx_6.1.bb. 

KBUILD_DEFCONFIG:mx6-generic-bsp = "imx_v7_defconfig"
KBUILD_DEFCONFIG:mx7-generic-bsp = "imx_v7_defconfig"
KBUILD_DEFCONFIG:mx8-generic-bsp = "imx_v8_defconfig"
KBUILD_DEFCONFIG:mx9-generic-bsp = "imx_v8_defconfig"

I modified the kernel config successfully.

 

Thanks & Regards,

 

Derek Lin

 

 

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1893462%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20can%20I%20create%20a%20patch%20for%20.config%20in%20my%20custom%20layer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1893462%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAfter%20I%20modified%20kernel%20config%20use%20this%20command%20below%2C%20there%20is%20a%20.config%20in%20%3CBUILD_DIR%3E%2Ftmp%2Fwork%2Fimx8mqevk-poky-linux%2Flinux-imx%2F6.1.36%2BgitAUTOINC%2B04b05c5527-r0%2Fbuild%3C%2FBUILD_DIR%3E%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20bitbake%20linux-imx%20-c%20menuconfig%20%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EThen%20I%20override%26nbsp%3Bdefconfig%20with%20.config%20and%20create%20a%20patch%20in%20my%20custom%20layer.%20But%20i%3CSPAN%20class%3D%22%22%3Et%20didn't%20take%20effect%20in%20my%20board.%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20cp%20.config%20%3CBUILD_DIR%3E%2Ftmp%2Fwork%2Fimx8mqevk-poky-linux%2Flinux-imx%2F6.1.36%2BgitAUTOINC%2B04b05c5527-r0%2Fgit%2Farch%2Farm64%2Fconfigs%2Fdefconfig%3C%2FBUILD_DIR%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3EI%20want%20to%20create%20a%20patch%20for%20this%20config%20in%20my%20custom%20layer.%20How%20can%20I%20do%20that%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20%26amp%3B%20Regards%2C%3C%2FP%3E%3CP%3EDerek%20Lin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1893462%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208%20Family%20%7C%20i.MX%208QuadMax%20(8QM)%20%7C%208QuadPlus%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1896265%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20can%20I%20create%20a%20patch%20for%20.config%20in%20my%20custom%20layer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1896265%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202673%22%20target%3D%22_blank%22%3E%40pengyong_zhang%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20for%20your%20help.%20I%20have%20found%20that%20is%20in%20..%2Fsource%2Fmeta-freescale%2Frecipes-kernel%2Flinux-imx_6.1.bb.%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EKBUILD_DEFCONFIG%3Amx6-generic-bsp%20%3D%20%22imx_v7_defconfig%22%0AKBUILD_DEFCONFIG%3Amx7-generic-bsp%20%3D%20%22imx_v7_defconfig%22%0AKBUILD_DEFCONFIG%3Amx8-generic-bsp%20%3D%20%22imx_v8_defconfig%22%0AKBUILD_DEFCONFIG%3Amx9-generic-bsp%20%3D%20%22imx_v8_defconfig%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20modified%20the%20kernel%20config%20successfully.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20%26amp%3B%20Regards%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EDerek%20Lin%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1896255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20can%20I%20create%20a%20patch%20for%20.config%20in%20my%20custom%20layer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1896255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHI%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F221567%22%20target%3D%22_blank%22%3E%40Derek0902%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESorry%20to%20reply%20late%3C%2FP%3E%0A%3CP%3E1.%20Make%20sure%20you%20have%20added%20the%20configuration%20changes%20in%20your%20customization%20layer.%20This%20is%20usually%20done%20by%20adding%20a%20conf%2Flayer.conf%20file%2C%20which%20is%20read%20during%20the%20build%20process.%3C%2FP%3E%0A%3CP%3E2.%20In%20the%20top-level%20directory%20of%20your%20customization%20layer%2C%20run%20the%20following%20command%20to%20create%20the%20patch%20file%3A%3CBR%20%2F%3Ebitbake-diff%20.%20%26gt%3B%20custom-layer-config-patch%3CBR%20%2F%3E3.%20This%20command%20compares%20the%20current.config%20file%20in%20your%20build%20directory%20with%20the%20prebuild%20pristine.config%20file%20and%20generates%20a%20patch%20file%20custom-layer-config-patch.%3C%2FP%3E%3C%2FLINGO-BODY%3E