美文网首页
Customizing, building and deploy

Customizing, building and deploy

作者: semiscone | 来源:发表于2021-12-07 10:50 被阅读0次

    1 Patch the kernel

    In this example, we create a patch for Linux GPIO driver. We should do the steps as below:

      1. Go to the gpio driver folder:
    cd tmp/work/<machine>-fsl-linux/linux-s32/5.4-r0/git/drives/gpio
    

    and edit the source file gpio-siul2-s32gen1.c

      1. Add source that you changed before to git
    cd <builddirectory>/tmp/work/<machine>-fsl-linux/linux-s32/5.4-r0/git
    git add drivers/gpio/gpio-siul2-s32gen1.c
    git commit -s -m <title of your commit>
    
      1. Create the patch
    git format-patch -1
    Check in <builddirectory>/tmp/work/<machine>-fsl-linux/linux-s32/5.4-r0/git folder, there is a patch file created, e.g.
    0001-test-gpio-repackage.patch
    
      1. Copy the patch file to meta-alb/recipes-kernel/linux/linux-s32 folder
      1. Edit linux-s32_5.4.bb file in /meta-alb/recipes-kernel/linux to include the patch file, e.g.
    SRC_URI += "file://0001-test-gpio-repackage.patch"
    
      1. Return to the build directory and run command as below to clean the previous sstate:
    source ./SOURCE_THIS
    bitbake virtual/kernel -c cleansstate
    
      1. Re-build and deploy linux
    bitbake virtual/kernel
    

    相关文章

      网友评论

          本文标题:Customizing, building and deploy

          本文链接:https://www.haomeiwen.com/subject/okioxrtx.html