Skip to content

Commit

Permalink
daisy: Import A/B stuff
Browse files Browse the repository at this point in the history
* Add bootctrl
* Add gpt-utils
  • Loading branch information
Lyceris-chan authored and LinkBoi00 committed Jun 23, 2021
1 parent 69e369f commit 5eebf06
Show file tree
Hide file tree
Showing 11 changed files with 1,982 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
soong_namespace {
imports: ["hardware/qcom/bootctrl"],
}
21 changes: 21 additions & 0 deletions bootctrl/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

cc_library {
name: "bootctrl.msm8953",
defaults: ["bootctrl_hal_defaults"],
static_libs: ["libgptutils.daisy"],
}
40 changes: 40 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,32 @@ PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml

# A/B
AB_OTA_UPDATER := true

AB_OTA_PARTITIONS += \
boot \
system \
vendor

AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true

PRODUCT_PACKAGES += \
otapreopt_script

# Boot control
PRODUCT_PACKAGES += \
[email protected] \
[email protected] \
bootctrl.msm8953 \

PRODUCT_PACKAGES_DEBUG += \
bootctl

# Binder
PRODUCT_PACKAGES += \
libhwbinder \
Expand Down Expand Up @@ -374,10 +400,24 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/thermal/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf

# Update engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier

PRODUCT_PACKAGES_DEBUG += \
update_engine_client

# USB HAL
PRODUCT_PACKAGES += \
[email protected]

# Verity
PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/soc/7824900.sdhci/by-name/system
$(call inherit-product, build/target/product/verity.mk)

# Vibrator
PRODUCT_PACKAGES += \
init.qcom.usb.rc \
init.qcom.usb.sh
Expand Down
9 changes: 9 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
<instance>default</instance>
</interface>
<fqname>@5.0::IEffectsFactory/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.boot</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IBootControl</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
Expand Down
1 change: 1 addition & 0 deletions recovery/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(all-subdir-makefiles)
40 changes: 40 additions & 0 deletions recovery/gpt-utils/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//


cc_library {
name: "libgptutils.daisy",
vendor: true,
recovery_available: true,
shared_libs: [
"libcutils",
"liblog",
"libz",
],
cflags: [
"-Wall",
"-Werror",
"-Wno-macro-redefined",
],
srcs: [
"gpt-utils.cpp",
],
owner: "qti",
header_libs: [
"device_kernel_headers",
],
export_include_dirs: ["."],
}
Loading

0 comments on commit 5eebf06

Please sign in to comment.