If you're just updating code within platform2/nnapi, skip down to Uprev the ebuild.
To fully update the NNAPI dependencies, the following repos need to be addressed:
aosp/platform/frameworks/nativeaosp/platform/system/core/libcutilsaosp/platform/system/core/libutilsaosp/platform/system/libbaseaosp/platform/system/libfmqaosp/platform/system/libhidlaosp/platform/system/loggingMost of these can be updated by merging the upstream branch of the repo into the master branch. There are however, two cases where this does not apply.
The NNAPI package depends on some repo‘s that are copybara’d from another repo.
Specifically, the following repos:
aosp/system/core/libcutilsaosp/system/core/libutilsAre updated by a copybara process from aosp/platform/system/core.
You can see the status of this process on the Copybara dashboard.
In short, whenever the master branch of aosp/platform/system/core is updated, the copybara process will (at some point in the future), propagate those changes into aosp/system/core/libcutils and aosp/system/core/libutils.
This means that we can't directly control when the downstream repo will get updated by the copybara process. It is possible that builds of NNAPI will start failing if the infrastructure tries to uprev NNAPI to use updated versions of libcutils and libutils that are possibly incompatible.
Due avoid this, and ensure we have explicit control over which version of these copybara‘d directories is built, we have introduced CROS_WORKON_MANUAL_UPREV to the NNAPI package which means we need to manually update the commit and tree id’s of the non-9999 ebuild. This decouples the updating of aosp/platform/system/core from the NNAPI package.
| Repo | Local Dir | Upstream Branch |
|---|---|---|
aosp/platform/frameworks/native | aosp/frameworks/native | cros/upstream/master |
aosp/platform/system/libbase | aosp/system/libbase | cros/upstream/master |
aosp/platform/system/libfmq | aosp/system/libfmq | cros/upstream/master |
aosp/platform/system/libhidl | aosp/system/libhidl | cros/upstream/master |
aosp/platform/system/logging | aosp/system/logging | cros/upstream/master |
Steps:
mastermasterrepo upload to gerrit and process the CL as normalExample:
cd src/aosp/system/libbase git checkout -b merge cros/master # This will ask for an appropriate commit msg git merge cros/upstream/master --no-ff # This may give you a scary warning about the number of commits. Say 'y'. repo upload --cbr . --no-verify
As described earlier, aosp/system/core/libcutils and aosp/system/core/libutils are updated by merging upstream into the master of aosp/platform/system/core. This is a bit more involved than the previous cases, since this repo isn‘t mapped into the ChromeOS tree. It’s quite similar though...
Steps:
origin/master.origin/upstream.libcutils and libutils.cd /tmp git clone https://chromium.googlesource.com/aosp/platform/system/core # Set up the commit hooks cd core f=`git rev-parse --git-dir`/hooks/commit-msg mkdir -p $(dirname $f) curl -Lo $f https://gerrit-review.googlesource.com/tools/hooks/commit-msg chmod +x $f # Done setting up the repo git checkout -b merge git merge origin/upstream --no-ff # This will ask for an appropriate commit msg git commit # This will upload to gerrit git push origin HEAD:refs/for/master
Once you have any code changes and dependencies submitted via CQ, do a repo sync and you‘ll be able to uprev the ebuild. This is important, since you will not be able to get the git commit id’s you need until this is done.
There is a script in this directory, get_git_ids.sh that will print out the two lines you need to replace.
Steps:
get_git_ids.sh.nnapi-0.0.2-r<N>.ebuild to nnapi-0.0.2-r<N+1>.ebuild.get_gid_ids.sh script.files dir).