[LG V30 Guides, News, & Discussion] Caffination:
UPDATE CAF

Repeating history isn't what we came for though. From our CAF base the fun begins. We didn't do all that work to end up with a stock image! The entire reason to figure out what CAF we started with is so we could change it. Now that we have a kernel with the CAF commit history, as we download newer CAF bases, we'll simply reapply the same commits that they did to update our kernel's base.

We're going to download the latest CAF base image for our hardware. Go to the codeaurora.org page for your device's source tags. Search for your chip (here 8x98 referring to the msm8998 aka Snapdragon 835) and find a similar build string to your identified one.

For the H932 this page would be: https://source.codeaurora.org/quic/la/kernel/msm-4.4/refs/tags?h=BosSen-msm-44/master

In this instance, 30d identified closest as "LA.UM.7.4.r1-03500-8x98.0 ", so I'm looking for a "LA.UM.7.4.r1" release for the "8x98.0" architecture.

Just a heads up - I'm not sure if this is right! There are much newer msm8998 releases listed, such as "LA.UM.8.4.r1-05500-8x98.0". I've yet to experiment with these to see if they are of value to us. I went with the "most similar looking" to get my feet wet with the process.

git fetch https://source.codeaurora.org/quic/la/kernel/msm-4.4.git LA.UM.7.4.r1-06000-8x98.0

Go back to master since it's our only clean branch. Then make a home for our selected CAF release. Then switch to using it.

git checkout master
git branch LA.UM.7.4.r1-06000-8x98.0
git checkout LA.UM.7.4.r1-06000-8x98.0

Do the same process we did to import the original CAF's code. We already set the LA.UM.7.4.r1-06000-8x98.0 commit as our FETCH_HEAD earlier.

git merge --allow-unrelated-histories FETCH_HEAD

Head back to staging. It currently has a copy of the LA.UM.7.4.r1-03500-8x98.0+H932.30d branch's code.

git checkout staging

Now merge the changes from 06000 into our 03500 base.

git merge LA.UM.7.4.r1-06000-8x98.0

Notice how this produces A TON fewer conflicts than our original go around. Also, rerere has captured how we modified some of the files when we added 30d into the CAF branch so it has a basic concept of what we're trying to achieve, and makes some of these for us automagically. The day is saved!

Break out your git mergetool of choice again and get to work.

git mergetool -t meld

Then add and commit your changes.

git add .
git commit -m "LA.UM.7.4.r1-06000-8x98.0 + LG H932 30d kernel source merged"

You also need to update some tertiary CAF drivers like qcalcd-3.0. You may need to check the CAF repo to make sure you've nabbed all that apply. I'm going to assume you can merge a repo at this point.

qcacld:

git remote add qcacld https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0
git fetch qcacld LA.UM.7.4.r1-06000-8x98.0

fw-api:

git remote add fw-api https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/fw-api
git fetch fw-api LA.UM.7.4.r1-06000-8x98.0

qca-wifi-host-cmn:

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 LA.UM.7.4.r1-06000-8x98.0

If your image compiled /before/ adding the CAF drivers but didn't compile /after/, check that your config flags are up to date before changing code around. qcacld-3.0 threw some errors for me in the upgrade from 3500 to 6000 unless I /also/ enabled WLAN_TX_FLOW_CONTROL_V2 in the defconfig, then reverted some of LGE's older custom patches (check OEM patches before modifying CAF code!).

The easiest way to poke around at flags is by doing a menuconfig after you run your "make O=./out joan_tmo_us-perf_defconfig" equivalent.

make O=./out menuconfig

UPDATE LINUX

Coming soon. Still ascertaining the easiest process. Git merge sounds like an obvious choice. ;)