From 2f70d3fdc7ea907608df0bce5e5c261cd128ab2c Mon Sep 17 00:00:00 2001 From: kurtwalkir Date: Sat, 20 Jun 2020 19:17:08 +0300 Subject: [PATCH] 04-HAL: Add links on dependencies repositories Added dependencies links on android manifest, hikey960 kernel, hikey960 BSP. Signed-off-by: kurtwalkir --- 04-HAL/README.md | 17 +++++++++-------- 04-HAL/gl/hikey960/device-vendor.mk | 2 +- .../gl/hikey960/hardware/interfaces/Android.bp | 2 +- .../interfaces/compatibility_matrix.xml | 2 +- .../gl/hikey960/hardware/interfaces/config.fs | 2 +- .../interfaces/ledcontrol/1.0/Android.bp | 2 +- .../interfaces/ledcontrol/1.0/ILedControl.hal | 2 +- .../ledcontrol/1.0/default/Android.bp | 2 +- .../ledcontrol/1.0/default/LedControl.cpp | 2 +- .../ledcontrol/1.0/default/service.cpp | 2 +- ...vendor.gl.hardware.ledcontrol@1.0-service.rc | 10 +++++----- .../hikey960/hardware/interfaces/manifest.xml | 2 +- 04-HAL/gl/hikey960/sepolicy/hwservice.te | 2 +- 04-HAL/gl/hikey960/sepolicy/hwservice_contexts | 2 +- 04-HAL/gl/hikey960/sepolicy/ledcontrol.te | 2 +- 04-HAL/gl/hikey960/sepolicy/platform_app.te | 2 +- 16 files changed, 28 insertions(+), 27 deletions(-) diff --git a/04-HAL/README.md b/04-HAL/README.md index 0e9c7ae..43267c0 100644 --- a/04-HAL/README.md +++ b/04-HAL/README.md @@ -1,3 +1,9 @@ +# Project dependencies +Android manifest: https://github.com/kurtwalkir/android_manifest +Hikey Linaro Device: https://github.com/kurtwalkir/hikey-linaro-device +Hikey Linaro Kernel: https://github.com/kurtwalkir/hikey-linaro-kernel +HAL/App/Service: https://github.com/kurtwalkir/gl-android-training-2020 + # Description: A simple project for controlling the hikey 960 LEDs. @@ -12,17 +18,12 @@ Implemented:
Manual: -1. Clone these changes to the hikey vendor folder.
-2. Add:
-$(call inherit-product-if-exists, vendor/gl/hikey960/device-vendor.mk)
-to file:
-/hikey960/device/linaro/hikey/hikey960/device-hikey960.mk
- -3. Setup the build environment (if it is not done yet):
+1. Clone all repo in your project folder.
+2. Setup the build environment (if it is not done yet):
. ./build/envsetup.sh
lunch hikey960-userdebug
-4. Run the build:
+3. Run the build:
make -j8
diff --git a/04-HAL/gl/hikey960/device-vendor.mk b/04-HAL/gl/hikey960/device-vendor.mk index a3ac782..aad1704 100644 --- a/04-HAL/gl/hikey960/device-vendor.mk +++ b/04-HAL/gl/hikey960/device-vendor.mk @@ -9,4 +9,4 @@ DEVICE_MATRIX_FILE += vendor/gl/hikey960/hardware/interfaces/compatibility_matri BOARD_SEPOLICY_DIRS += vendor/gl/hikey960/sepolicy -#TARGET_FS_CONFIG_GEN += vendor/gl/hikey960/hardware/interface/config.fs \ No newline at end of file +#TARGET_FS_CONFIG_GEN += vendor/gl/hikey960/hardware/interface/config.fs diff --git a/04-HAL/gl/hikey960/hardware/interfaces/Android.bp b/04-HAL/gl/hikey960/hardware/interfaces/Android.bp index 0830315..8c4f902 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/Android.bp +++ b/04-HAL/gl/hikey960/hardware/interfaces/Android.bp @@ -1,4 +1,4 @@ hidl_package_root { name: "vendor.gl.hardware", path: "vendor/gl/hikey960/hardware/interfaces", -} \ No newline at end of file +} diff --git a/04-HAL/gl/hikey960/hardware/interfaces/compatibility_matrix.xml b/04-HAL/gl/hikey960/hardware/interfaces/compatibility_matrix.xml index 68a62e2..42e4a0d 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/compatibility_matrix.xml +++ b/04-HAL/gl/hikey960/hardware/interfaces/compatibility_matrix.xml @@ -7,4 +7,4 @@ default - \ No newline at end of file + diff --git a/04-HAL/gl/hikey960/hardware/interfaces/config.fs b/04-HAL/gl/hikey960/hardware/interfaces/config.fs index 140c163..0251e05 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/config.fs +++ b/04-HAL/gl/hikey960/hardware/interfaces/config.fs @@ -5,4 +5,4 @@ value: 2975 mode: 0775 user: AID_VENDOR_GLKH_LEDCONTROL group: AID_VENDOR_GLKH_LEDCONTROL -caps: 0 \ No newline at end of file +caps: 0 diff --git a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/Android.bp b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/Android.bp index 1ff78a1..028ac5b 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/Android.bp +++ b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/Android.bp @@ -13,4 +13,4 @@ hidl_interface { ], gen_java: true, gen_java_constants: true, -} \ No newline at end of file +} diff --git a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/ILedControl.hal b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/ILedControl.hal index 23d835c..0be4b2e 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/ILedControl.hal +++ b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/ILedControl.hal @@ -2,4 +2,4 @@ package vendor.gl.hardware.ledcontrol@1.0; interface ILedControl { setLedState(int32_t ledPin, int32_t state) generates (Result result); -}; \ No newline at end of file +}; diff --git a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/Android.bp b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/Android.bp index 10dafc8..2952d1e 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/Android.bp +++ b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/Android.bp @@ -14,4 +14,4 @@ cc_binary { "liblog", "vendor.gl.hardware.ledcontrol@1.0", ], -} \ No newline at end of file +} diff --git a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/LedControl.cpp b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/LedControl.cpp index ef1e74e..618632f 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/LedControl.cpp +++ b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/LedControl.cpp @@ -79,4 +79,4 @@ Return LedControl::setLedState(int ledPin, int state) { } // namespace ledcontrol } // namespace hardware } // namespace gl -} // namespace vendor \ No newline at end of file +} // namespace vendor diff --git a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/service.cpp b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/service.cpp index bded6e5..bbabe2a 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/service.cpp +++ b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/service.cpp @@ -19,4 +19,4 @@ int main(int /* argc */, char* /* argv */ []) { joinRpcThreadpool(); return 1; -} \ No newline at end of file +} diff --git a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/vendor.gl.hardware.ledcontrol@1.0-service.rc b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/vendor.gl.hardware.ledcontrol@1.0-service.rc index 306be48..0a5ce6c 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/vendor.gl.hardware.ledcontrol@1.0-service.rc +++ b/04-HAL/gl/hikey960/hardware/interfaces/ledcontrol/1.0/default/vendor.gl.hardware.ledcontrol@1.0-service.rc @@ -4,14 +4,14 @@ service vendor.gl.hardware.ledcontrol-1-0 /vendor/bin/hw/vendor.gl.hardware.ledc user system group system oneshot - #disabled on early-boot chown system system /sys/class/leds/user_led1/brightness - chown system system /sys/class/leds/user_led1/trigger chown system system /sys/class/leds/user_led2/brightness - chown system system /sys/class/leds/user_led2/trigger chown system system /sys/class/leds/user_led3/brightness - chown system system /sys/class/leds/user_led3/trigger chown system system /sys/class/leds/user_led4/brightness - chown system system /sys/class/leds/user_led4/trigger \ No newline at end of file + + chown system system /sys/class/leds/user_led1/trigger + chown system system /sys/class/leds/user_led2/trigger + chown system system /sys/class/leds/user_led3/trigger + chown system system /sys/class/leds/user_led4/trigger diff --git a/04-HAL/gl/hikey960/hardware/interfaces/manifest.xml b/04-HAL/gl/hikey960/hardware/interfaces/manifest.xml index 1da0d3c..78e58de 100644 --- a/04-HAL/gl/hikey960/hardware/interfaces/manifest.xml +++ b/04-HAL/gl/hikey960/hardware/interfaces/manifest.xml @@ -8,4 +8,4 @@ default - \ No newline at end of file + diff --git a/04-HAL/gl/hikey960/sepolicy/hwservice.te b/04-HAL/gl/hikey960/sepolicy/hwservice.te index f38bfb1..e89c2a2 100644 --- a/04-HAL/gl/hikey960/sepolicy/hwservice.te +++ b/04-HAL/gl/hikey960/sepolicy/hwservice.te @@ -1 +1 @@ -type hal_ledcontrol_hwservice, hwservice_manager_type; \ No newline at end of file +type hal_ledcontrol_hwservice, hwservice_manager_type; diff --git a/04-HAL/gl/hikey960/sepolicy/hwservice_contexts b/04-HAL/gl/hikey960/sepolicy/hwservice_contexts index 534951f..9df3dcc 100644 --- a/04-HAL/gl/hikey960/sepolicy/hwservice_contexts +++ b/04-HAL/gl/hikey960/sepolicy/hwservice_contexts @@ -1 +1 @@ -vendor.gl.hardware.ledcontrol::ILedControl u:object_r:hal_ledcontrol_hwservice:s0 \ No newline at end of file +vendor.gl.hardware.ledcontrol::ILedControl u:object_r:hal_ledcontrol_hwservice:s0 diff --git a/04-HAL/gl/hikey960/sepolicy/ledcontrol.te b/04-HAL/gl/hikey960/sepolicy/ledcontrol.te index 4a8b133..73a5f89 100644 --- a/04-HAL/gl/hikey960/sepolicy/ledcontrol.te +++ b/04-HAL/gl/hikey960/sepolicy/ledcontrol.te @@ -6,4 +6,4 @@ allow hal_ledcontrol_default hidl_base_hwservice:hwservice_manager { add }; allow hal_ledcontrol_default hal_ledcontrol_hwservice:hwservice_manager { add }; allow hal_ledcontrol_default sysfs_leds:dir { search }; -allow hal_ledcontrol_default sysfs:file { open write getattr }; \ No newline at end of file +allow hal_ledcontrol_default sysfs:file { open write getattr }; diff --git a/04-HAL/gl/hikey960/sepolicy/platform_app.te b/04-HAL/gl/hikey960/sepolicy/platform_app.te index 8b2cf65..d147d7c 100644 --- a/04-HAL/gl/hikey960/sepolicy/platform_app.te +++ b/04-HAL/gl/hikey960/sepolicy/platform_app.te @@ -1,2 +1,2 @@ allow platform_app hal_ledcontrol_hwservice:hwservice_manager { find }; -allow platform_app hal_ledcontrol_default:binder { call }; \ No newline at end of file +allow platform_app hal_ledcontrol_default:binder { call };