Add device tree for Orange Pi 5 Ultra LineageOS ATV
This commit is contained in:
parent
ff9874b632
commit
ae84f8e65e
147 changed files with 7890 additions and 1 deletions
34
suspend_blocker/Android.bp
Normal file
34
suspend_blocker/Android.bp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (C) 2019 The Android Open Source Project
|
||||
// Copyright (C) 2021-2022 KonstaKANG
|
||||
// Copyright (C) 2025 Venkata Atchuta Bheemeswara Sarma Darbha
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cc_binary {
|
||||
name: "suspend_blocker_opi",
|
||||
vendor: true,
|
||||
srcs: ["suspend_blocker_opi.cpp"],
|
||||
shared_libs: ["libpower"],
|
||||
installable: false,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "suspend_blocker_opi.rc",
|
||||
src: "suspend_blocker_opi.rc",
|
||||
installable: false,
|
||||
}
|
||||
|
||||
apex {
|
||||
name: "com.android.hardware.suspend_blocker.opi5",
|
||||
manifest: "apex_manifest.json",
|
||||
file_contexts: "apex_file_contexts",
|
||||
key: "com.android.hardware.key",
|
||||
certificate: ":com.android.hardware.certificate",
|
||||
updatable: false,
|
||||
vendor: true,
|
||||
|
||||
binaries: ["suspend_blocker_opi"],
|
||||
prebuilts: [
|
||||
"suspend_blocker_opi.rc",
|
||||
],
|
||||
}
|
||||
3
suspend_blocker/apex_file_contexts
Normal file
3
suspend_blocker/apex_file_contexts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(/.*)? u:object_r:vendor_file:s0
|
||||
/etc(/.*)? u:object_r:vendor_configs_file:s0
|
||||
/bin/suspend_blocker_opi u:object_r:suspend_blocker_exec:s0
|
||||
4
suspend_blocker/apex_manifest.json
Normal file
4
suspend_blocker/apex_manifest.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "com.android.hardware.suspend_blocker.opi5",
|
||||
"version": 1
|
||||
}
|
||||
20
suspend_blocker/suspend_blocker_opi.cpp
Normal file
20
suspend_blocker/suspend_blocker_opi.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
* Copyright (C) 2021-2022 KonstaKANG
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#include <wakelock/wakelock.h>
|
||||
|
||||
int main() {
|
||||
auto wl = android::wakelock::WakeLock::tryGet("suspend_blocker_opi"); // RAII object
|
||||
if (!wl.has_value()) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
sigset_t mask;
|
||||
sigemptyset(&mask);
|
||||
return sigsuspend(&mask); // Infinite sleep
|
||||
}
|
||||
4
suspend_blocker/suspend_blocker_opi.rc
Normal file
4
suspend_blocker/suspend_blocker_opi.rc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
service vendor.suspend_blocker_opi /apex/com.android.hardware.suspend_blocker.opi5/bin/suspend_blocker_opi
|
||||
class hal
|
||||
group system
|
||||
user root
|
||||
Loading…
Add table
Add a link
Reference in a new issue