Skip to content

Commit

Permalink
04-HAL: Add links on dependencies repositories
Browse files Browse the repository at this point in the history
Added dependencies links on android manifest, hikey960
kernel, hikey960 BSP.

Signed-off-by: kurtwalkir <[email protected]>
  • Loading branch information
kurtwalkir committed Jun 20, 2020
1 parent a03b49c commit 2f70d3f
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 27 deletions.
17 changes: 9 additions & 8 deletions 04-HAL/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -12,17 +18,12 @@ Implemented:

<details>
<summary>Manual:</summary>
1. Clone these changes to the hikey vendor folder.<br/>
2. Add:<br/>
$(call inherit-product-if-exists, vendor/gl/hikey960/device-vendor.mk)<br/>
to file:<br/>
/hikey960/device/linaro/hikey/hikey960/device-hikey960.mk<br/>

3. Setup the build environment (if it is not done yet):<br/>
1. Clone all repo in your project folder.<br/>
2. Setup the build environment (if it is not done yet):<br/>
. ./build/envsetup.sh<br/>
lunch hikey960-userdebug<br/>

4. Run the build:<br/>
3. Run the build:<br/>
make -j8<br/>


Expand Down
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/device-vendor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
#TARGET_FS_CONFIG_GEN += vendor/gl/hikey960/hardware/interface/config.fs
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/hardware/interfaces/Android.bp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hidl_package_root {
name: "vendor.gl.hardware",
path: "vendor/gl/hikey960/hardware/interfaces",
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>
</compatibility-matrix>
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/hardware/interfaces/config.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ value: 2975
mode: 0775
user: AID_VENDOR_GLKH_LEDCONTROL
group: AID_VENDOR_GLKH_LEDCONTROL
caps: 0
caps: 0
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ hidl_interface {
],
gen_java: true,
gen_java_constants: true,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package [email protected];

interface ILedControl {
setLedState(int32_t ledPin, int32_t state) generates (Result result);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ cc_binary {
"liblog",
"[email protected]",
],
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ Return<Result> LedControl::setLedState(int ledPin, int state) {
} // namespace ledcontrol
} // namespace hardware
} // namespace gl
} // namespace vendor
} // namespace vendor
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ int main(int /* argc */, char* /* argv */ []) {
joinRpcThreadpool();

return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

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
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/hardware/interfaces/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
<instance>default</instance>
</interface>
</hal>
</manifest>
</manifest>
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/sepolicy/hwservice.te
Original file line number Diff line number Diff line change
@@ -1 +1 @@
type hal_ledcontrol_hwservice, hwservice_manager_type;
type hal_ledcontrol_hwservice, hwservice_manager_type;
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/sepolicy/hwservice_contexts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vendor.gl.hardware.ledcontrol::ILedControl u:object_r:hal_ledcontrol_hwservice:s0
vendor.gl.hardware.ledcontrol::ILedControl u:object_r:hal_ledcontrol_hwservice:s0
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/sepolicy/ledcontrol.te
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
allow hal_ledcontrol_default sysfs:file { open write getattr };
2 changes: 1 addition & 1 deletion 04-HAL/gl/hikey960/sepolicy/platform_app.te
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
allow platform_app hal_ledcontrol_hwservice:hwservice_manager { find };
allow platform_app hal_ledcontrol_default:binder { call };
allow platform_app hal_ledcontrol_default:binder { call };

0 comments on commit 2f70d3f

Please sign in to comment.