• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[REFERENCE] Merge latest CAF Tag in Kernel

Search This thread

LordArcadius

Senior Member
Mar 29, 2015
1,279
2,820
Delhi
www.vipuljha.com
Introduction:
Hello folks! In this thread I will be guiding you about how you can merge latest CAF tags in your CAF based kernel. Many people who just started compiling the kernels still don't know how to merge a CAF tag because there isn't any proper guide available. I will try to make the guide as simple as possible.

What is CAF?
Code Aurora, a Linux Foundation Collaborative project. that host the tested open source code needed to provide upstream enablement for innovative, performance optimized support for system on a chip (SoC) products and related ecosystems, and also serves as a staging area for code that is submitted to upstream projects such as the Linux kernel and Android.

This thread is inspired from @nathanchance's linux version upstreaming thread!

Requirements:
  • You should know how to compile a kernel
  • The kernel should be for a Qualcomm device obviously
  • You should know the CAF tag you kernel is currently on
  • You should know basic stuffs of Git like commit, push, fixing conflicts etc.
  • You should know the chipset of your device
  • You should know your kernel version like 3.18.y, 4.4.y etc.

Instructions:
  • Open this link ( https://wiki.codeaurora.org/xwiki/bin/QAEP/release ) in your browser.
  • Check for the chipset and the Android version here. Find the caf tag your device is on. Like in my case My device is Redmi Note 4 and it has msm8953 chipset and my kernel is for Android 8.1. So now I can easily know that which CAF tag I have to merge. In my case my kernel was on LA.UM.6.6.r1-07400-89xx.0 tag. The newer tag is LA.UM.6.6.r1-08300-89xx.0
  • Now you know which CAF tag you need to merge. Open your terminal and change the directory to your kernel directory.
  • Copy the URL from this list according to your kernel version. In my case the kernel version is 3.18 so I will copy the 3.18 URL.
    Code:
    3.10 -> https://source.codeaurora.org/quic/la/kernel/msm-3.10/
    3.18 -> https://source.codeaurora.org/quic/la/kernel/msm-3.18/
    4.4 -> https://source.codeaurora.org/quic/la/kernel/msm-4.4/
  • In terminal type git fetch <repo link> <tag> and paste the url in place of <repo link>and also the CAF tag you want to merge, in place of <tag>, just like given below and hit enter. It will fetch the tag. It will take some time depending on your internet speed.
    Code:
    git fetch https://source.codeaurora.org/quic/la/kernel/msm-3.18/ LA.UM.6.6.r1-08300-89xx.0
  • After fetching the tag, type below line and hit enter.
    Code:
    git merge FETCH_HEAD
  • Now you will see that your tag is being merged successfully. If it gets some conflicts then fix the conflicts and complete the merge by following commands.
    Code:
    git add .
    git commit
  • After successfully merging the CAF tag, just push it to your github repository.
    Code:
    git push

Congratulations! You have successfully merged latest CAF tag in your kernel.


Tips:
  • Test each CAF tag
  • Do not multiple tags at once without testing the previous one
  • Bookmark all the links from this thread, even this thread.

Support & Help:
If you have any problem then post here. Do not PM me. I will not help you there. You can join the Telegram group for quick support and help.

You can also follow me on:
 
Last edited:

LordArcadius

Senior Member
Mar 29, 2015
1,279
2,820
Delhi
www.vipuljha.com

onliner

Senior Member
Oct 29, 2016
2,422
1,028
Thanks for this guide @LordArcadius, but I have some doubts:

- With this form, the commit "merge tag xxx into xxx" doesn't show as a description the complete list of commits that have been made in the merge, how can I show the complete list?
- Some devices have extra modules that are found in other branches of the caf kernel, for example: fw-api, qcacld-3.0, qca-wifi-host-cmn, how can I merge that too?
 

LordArcadius

Senior Member
Mar 29, 2015
1,279
2,820
Delhi
www.vipuljha.com
How do I merge updated prima drivers?
Use this repo: https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/prima/
Thanks for this guide @LordArcadius, but I have some doubts:

- With this form, the commit "merge tag xxx into xxx" doesn't show as a description the complete list of commits that have been made in the merge, how can I show the complete list?
- Some devices have extra modules that are found in other branches of the caf kernel, for example: fw-api, qcacld-3.0, qca-wifi-host-cmn, how can I merge that too?

Sorry but I don't know the answer of first question. Will let you know soon. For upstreaming things like qcacld you have to use their repos. LIke in case of qcacld here it is: https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/
 

onliner

Senior Member
Oct 29, 2016
2,422
1,028
Sorry but I don't know the answer of first question. Will let you know soon. For upstreaming things like qcacld you have to use their repos. LIke in case of qcacld here it is: https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/

After reading some guides, watching some videos and reading information in the linux kernel chat, I managed to do it by myself, here is an example with smd600 in case someone needs the info:


- qcacld-3.0
First merge:
Code:
git remote add qcacld https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0
git fetch qcacld <tag_to_merge> (In my case was: LA.UM.7.2.r1-05800-sdm660.0 )
git merge -s ours --no-commit FETCH_HEAD --allow-unrelated-histories
git read-tree --prefix=drivers/staging/qcacld-3.0 -u FETCH_HEAD
git commit

Updates:
Code:
git fetch qcacld <the_new_tag>
git merge -X subtree=drivers/staging/qcacld-3.0 FETCH_HEAD

- fw-api:
First merge:
Code:
git remote add fw-api https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/fw-api
git fetch fw-api <tag_to_merge> (In my case was: LA.UM.7.2.r1-05800-sdm660.0 )
git merge -s ours --no-commit FETCH_HEAD --allow-unrelated-histories
git read-tree --prefix=drivers/staging/fw-api -u FETCH_HEAD
git commit

Updates:
Code:
git fetch fw-api <the_new_tag>
git merge -X subtree=drivers/staging/fw-api FETCH_HEAD


- qca-wifi-host-cmn:
First merge:
Code:
git remote add qca-wifi-host-cmn https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn
git fetch qca-wifi-host-cmn <tag_to_merge> (In my case was: LA.UM.7.2.r1-05800-sdm660.0 )
git merge -s ours --no-commit FETCH_HEAD --allow-unrelated-histories
git read-tree --prefix=drivers/staging/qca-wifi-host-cmn -u FETCH_HEAD
git commit

Updates:
Code:
git fetch qca-wifi-host-cmn <the_new_tag>
git merge -X subtree=drivers/staging/qca-wifi-host-cmn FETCH_HEAD
 

hoenhind

New member
May 4, 2019
4
0
Can someone tell me how to check what is the current CAF version my kernel is on?I am currently on stock ROM and i have no idea how to check
Did you find out how to do it?

---------- Post added at 03:47 PM ---------- Previous post was at 03:46 PM ----------

How to get to know CAF tag the OEM used? LG doesn't provide any commit history. It just uploads the kernel in ZIP files.
Hi, even I have this problem. Did you find a way to check the CAF tag of OEM?
Thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Introduction:
    Hello folks! In this thread I will be guiding you about how you can merge latest CAF tags in your CAF based kernel. Many people who just started compiling the kernels still don't know how to merge a CAF tag because there isn't any proper guide available. I will try to make the guide as simple as possible.

    What is CAF?
    Code Aurora, a Linux Foundation Collaborative project. that host the tested open source code needed to provide upstream enablement for innovative, performance optimized support for system on a chip (SoC) products and related ecosystems, and also serves as a staging area for code that is submitted to upstream projects such as the Linux kernel and Android.

    This thread is inspired from @nathanchance's linux version upstreaming thread!

    Requirements:
    • You should know how to compile a kernel
    • The kernel should be for a Qualcomm device obviously
    • You should know the CAF tag you kernel is currently on
    • You should know basic stuffs of Git like commit, push, fixing conflicts etc.
    • You should know the chipset of your device
    • You should know your kernel version like 3.18.y, 4.4.y etc.

    Instructions:
    • Open this link ( https://wiki.codeaurora.org/xwiki/bin/QAEP/release ) in your browser.
    • Check for the chipset and the Android version here. Find the caf tag your device is on. Like in my case My device is Redmi Note 4 and it has msm8953 chipset and my kernel is for Android 8.1. So now I can easily know that which CAF tag I have to merge. In my case my kernel was on LA.UM.6.6.r1-07400-89xx.0 tag. The newer tag is LA.UM.6.6.r1-08300-89xx.0
    • Now you know which CAF tag you need to merge. Open your terminal and change the directory to your kernel directory.
    • Copy the URL from this list according to your kernel version. In my case the kernel version is 3.18 so I will copy the 3.18 URL.
      Code:
      3.10 -> https://source.codeaurora.org/quic/la/kernel/msm-3.10/
      3.18 -> https://source.codeaurora.org/quic/la/kernel/msm-3.18/
      4.4 -> https://source.codeaurora.org/quic/la/kernel/msm-4.4/
    • In terminal type git fetch <repo link> <tag> and paste the url in place of <repo link>and also the CAF tag you want to merge, in place of <tag>, just like given below and hit enter. It will fetch the tag. It will take some time depending on your internet speed.
      Code:
      git fetch https://source.codeaurora.org/quic/la/kernel/msm-3.18/ LA.UM.6.6.r1-08300-89xx.0
    • After fetching the tag, type below line and hit enter.
      Code:
      git merge FETCH_HEAD
    • Now you will see that your tag is being merged successfully. If it gets some conflicts then fix the conflicts and complete the merge by following commands.
      Code:
      git add .
      git commit
    • After successfully merging the CAF tag, just push it to your github repository.
      Code:
      git push

    Congratulations! You have successfully merged latest CAF tag in your kernel.


    Tips:
    • Test each CAF tag
    • Do not multiple tags at once without testing the previous one
    • Bookmark all the links from this thread, even this thread.

    Support & Help:
    If you have any problem then post here. Do not PM me. I will not help you there. You can join the Telegram group for quick support and help.

    You can also follow me on:
    7
    Sorry but I don't know the answer of first question. Will let you know soon. For upstreaming things like qcacld you have to use their repos. LIke in case of qcacld here it is: https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/

    After reading some guides, watching some videos and reading information in the linux kernel chat, I managed to do it by myself, here is an example with smd600 in case someone needs the info:


    - qcacld-3.0
    First merge:
    Code:
    git remote add qcacld https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0
    git fetch qcacld <tag_to_merge> (In my case was: LA.UM.7.2.r1-05800-sdm660.0 )
    git merge -s ours --no-commit FETCH_HEAD --allow-unrelated-histories
    git read-tree --prefix=drivers/staging/qcacld-3.0 -u FETCH_HEAD
    git commit

    Updates:
    Code:
    git fetch qcacld <the_new_tag>
    git merge -X subtree=drivers/staging/qcacld-3.0 FETCH_HEAD

    - fw-api:
    First merge:
    Code:
    git remote add fw-api https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/fw-api
    git fetch fw-api <tag_to_merge> (In my case was: LA.UM.7.2.r1-05800-sdm660.0 )
    git merge -s ours --no-commit FETCH_HEAD --allow-unrelated-histories
    git read-tree --prefix=drivers/staging/fw-api -u FETCH_HEAD
    git commit

    Updates:
    Code:
    git fetch fw-api <the_new_tag>
    git merge -X subtree=drivers/staging/fw-api FETCH_HEAD


    - qca-wifi-host-cmn:
    First merge:
    Code:
    git remote add qca-wifi-host-cmn https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn
    git fetch qca-wifi-host-cmn <tag_to_merge> (In my case was: LA.UM.7.2.r1-05800-sdm660.0 )
    git merge -s ours --no-commit FETCH_HEAD --allow-unrelated-histories
    git read-tree --prefix=drivers/staging/qca-wifi-host-cmn -u FETCH_HEAD
    git commit

    Updates:
    Code:
    git fetch qca-wifi-host-cmn <the_new_tag>
    git merge -X subtree=drivers/staging/qca-wifi-host-cmn FETCH_HEAD
    1
    ;_;

    Thanks mate.

    NoU

    Check your commit history.


    How to get to know CAF tag the OEM used? LG doesn't provide any commit history. It just uploads the kernel in ZIP files.