Last day I was trying to get a fresh code base and followed the instruction https://github.com/linaro-swg/optee_android_manifest/tree/hikey-n-4.9. But while applying the patches I got error and patches did not apply properly. Build was also failed due to the failure in applying the patches.
./android-patchsets/hikey-n-workarounds
=== Applying 17601/1 ===
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 11 (delta 5), reused 10 (delta 4)
Unpacking objects: 100% (11/11), done.
From git://android-review.linaro.org/device/linaro/hikey
- branch refs/changes/01/17601/1 → FETCH_HEAD
[detached HEAD 9b55f40] boot parameters: set printk.devkmsg to on
Author: Yongqin Liu yongqin.liu@linaro.org
3 files changed, 11 insertions(+), 11 deletions(-)
=== Applying 17597/6 ===
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 3), reused 1 (delta 0)
Unpacking objects: 100% (4/4), done.
From git://android-review.linaro.org/device/linaro/hikey
- branch refs/changes/97/17597/6 → FETCH_HEAD
error: could not apply 656c7e5… init rc files: enabled adb over tcpip by default
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add ’ or 'git rm ’
hint: and commit the result with ‘git commit’
Recorded preimage for ‘init.common.rc’
Recorded preimage for ‘init.common.usb.rc’
17597/6 failed to apply, please fix
HEAD is now at 9b55f40 boot parameters: set printk.devkmsg to on
./android-patchsets/hikey-optee-n
=== Applying 16991/11 ===
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6 (delta 4), reused 6 (delta 4)
Unpacking objects: 100% (6/6), done.
From git://android-review.linaro.org/device/linaro/hikey
- branch refs/changes/91/16991/11 → FETCH_HEAD
error: could not apply d012ee7… optee: integrate for optee components
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add ’ or 'git rm ’
hint: and commit the result with ‘git commit’
Recorded preimage for ‘init.common.rc’
Recorded preimage for ‘ueventd.common.rc’
16991/11 failed to apply, please fix
HEAD is now at 9b55f40 boot parameters: set printk.devkmsg to on
./android-patchsets/swg-mods
=== Applying 17625/3 ===
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 3), reused 4 (delta 2)
Unpacking objects: 100% (5/5), done.
From git://android-review.linaro.org/device/linaro/hikey
- branch refs/changes/25/17625/3 → FETCH_HEAD
error: could not apply 1ccb424… Revert “init rc files: enabled adb over tcpip by default”
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add ’ or 'git rm ’
hint: and commit the result with ‘git commit’
Recorded preimage for ‘init.common.rc’
Recorded preimage for ‘init.common.usb.rc’
17625/3 failed to apply, please fix
HEAD is now at 9b55f40 boot parameters: set printk.devkmsg to on
Two patches were applied successfully
./android-patchsets/hikey-optee-4.9
./android-patchsets/optee-230-workarounds
Build failed message
1 warning generated.
[ 29% 14076/47714] build out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy
FAILED: /bin/bash -c “(out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy.tmp out/target/product/hikey/obj/ETC/sepolicy_intermediates/policy.conf ) && (out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/hikey/obj/ETC/sepolicy_intermediates//sepolicy.dontaudit out/target/product/hikey/obj/ETC/sepolicy_intermediates/policy.conf.dontaudit ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy.tmp permissive > out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains ) && (if [ “userdebug” = “user” -a -s out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains ]; then echo “==========” 1>&2; echo “ERROR: permissive domains not allowed in user builds” 1>&2; echo “List of invalid domains:” 1>&2; cat out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains 1>&2; exit 1; fi ) && (mv out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy.tmp out/target/product/hikey/obj/ETC/sepolicy_intermediates/sepolicy )”
device/linaro/hikey/sepolicy/hal_bluetooth_hikey.te:5:ERROR ‘syntax error’ at token ‘hal_server_domain’ on line 20715:
hal_server_domain(hal_bluetooth_hikey, hal_bluetooth)
checkpolicy: error(s) encountered while parsing configuration
out/host/linux-x86/bin/checkpolicy: loading policy configuration from out/target/product/hikey/obj/ETC/sepolicy_intermediates/policy.conf
[ 29% 14076/47714] Docs droiddoc: out/target/common/docs/system-api-stubs
DroidDoc took 42 sec. to write docs to out/target/common/docs/system-api-stubs
[ 29% 14076/47714] Docs droiddoc: out/target/common/docs/api-stubs
DroidDoc took 42 sec. to write docs to out/target/common/docs/api-stubs
[ 29% 14076/47714] Docs droiddoc: out/target/common/docs/test-api-stubs
DroidDoc took 42 sec. to write docs to out/target/common/docs/test-api-stubs
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
make failed to build some targets (21:18 (mm:ss))