miuicamera: Initial repo
This commit is contained in:
commit
f8225f0f5a
1
Android.mk
Normal file
1
Android.mk
Normal file
@ -0,0 +1 @@
|
||||
include $(call all-subdir-makefiles)
|
9
common/Android.bp
Normal file
9
common/Android.bp
Normal file
@ -0,0 +1,9 @@
|
||||
// Automatically generated file. DO NOT MODIFY
|
||||
//
|
||||
// This file is generated by vendor/xiaomi/garnet-miuicamera/setup-makefiles.sh
|
||||
|
||||
soong_namespace {
|
||||
imports: [
|
||||
],
|
||||
}
|
||||
|
9
common/Android.mk
Normal file
9
common/Android.mk
Normal file
@ -0,0 +1,9 @@
|
||||
# Automatically generated file. DO NOT MODIFY
|
||||
#
|
||||
# This file is generated by vendor/xiaomi/garnet-miuicamera/setup-makefiles.sh
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq ($(filter arm64,$(TARGET_ARCH)),)
|
||||
|
||||
endif
|
4
common/BoardConfigVendor.mk
Normal file
4
common/BoardConfigVendor.mk
Normal file
@ -0,0 +1,4 @@
|
||||
# Automatically generated file. DO NOT MODIFY
|
||||
#
|
||||
# This file is generated by vendor/xiaomi/garnet-miuicamera/setup-makefiles.sh
|
||||
|
7
common/common-vendor.mk
Normal file
7
common/common-vendor.mk
Normal file
@ -0,0 +1,7 @@
|
||||
# Automatically generated file. DO NOT MODIFY
|
||||
#
|
||||
# This file is generated by vendor/xiaomi/garnet-miuicamera/setup-makefiles.sh
|
||||
|
||||
PRODUCT_SOONG_NAMESPACES += \
|
||||
vendor/xiaomi/garnet-miuicamera/common
|
||||
|
71
extract-files.sh
Executable file
71
extract-files.sh
Executable file
@ -0,0 +1,71 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
DEVICE=common
|
||||
VENDOR=xiaomi/garnet-miuicamera
|
||||
|
||||
# Load extract_utils and do some sanity checks
|
||||
MY_DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
|
||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||
if [ ! -f "${HELPER}" ]; then
|
||||
echo "Unable to find helper script at ${HELPER}"
|
||||
exit 1
|
||||
fi
|
||||
source "${HELPER}"
|
||||
|
||||
# Default to sanitizing the vendor folder before extraction
|
||||
CLEAN_VENDOR=true
|
||||
|
||||
KANG=
|
||||
SECTION=
|
||||
|
||||
while [ "${#}" -gt 0 ]; do
|
||||
case "${1}" in
|
||||
-n | --no-cleanup )
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
-k | --kang )
|
||||
KANG="--kang"
|
||||
;;
|
||||
-s | --section )
|
||||
SECTION="${2}"; shift
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
* )
|
||||
SRC="${1}"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "${SRC}" ]; then
|
||||
SRC="adb"
|
||||
fi
|
||||
|
||||
function blob_fixup() {
|
||||
case "${1}" in
|
||||
esac
|
||||
}
|
||||
|
||||
if [ -z "$SRC" ]; then
|
||||
echo "Path to system dump not specified! Specify one with --path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Initialize the helper
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||
|
||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
|
||||
"${MY_DIR}/setup-makefiles.sh"
|
17
products/board.mk
Normal file
17
products/board.mk
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright (C) 2020 The LineageOS 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.
|
||||
#
|
||||
|
||||
include vendor/xiaomi/garnet-miuicamera/common/BoardConfigVendor.mk
|
17
products/miuicamera.mk
Normal file
17
products/miuicamera.mk
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright (C) 2020 The LineageOS 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.
|
||||
#
|
||||
|
||||
$(call inherit-product, vendor/xiaomi/garnet-miuicamera/common/common-vendor.mk)
|
0
proprietary-files.txt
Normal file
0
proprietary-files.txt
Normal file
40
setup-makefiles.sh
Executable file
40
setup-makefiles.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
DEVICE=common
|
||||
VENDOR=xiaomi/garnet-miuicamera
|
||||
|
||||
# Load extract_utils and do some sanity checks
|
||||
MY_DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
|
||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||
if [ ! -f "${HELPER}" ]; then
|
||||
echo "Unable to find helper script at ${HELPER}"
|
||||
exit 1
|
||||
fi
|
||||
source "${HELPER}"
|
||||
|
||||
# Initialize the helper
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" true
|
||||
|
||||
# Warning headers and guards
|
||||
write_headers "arm64"
|
||||
sed -i 's|TARGET_DEVICE|TARGET_ARCH|g' "${ANDROIDMK}"
|
||||
sed -i 's|vendor/xiaomi/garnet-miuicamera/|vendor/xiaomi/garnet-miuicamera/common|g' "${PRODUCTMK}"
|
||||
sed -i 's|device/xiaomi/garnet-miuicamera//setup-makefiles.sh|vendor/xiaomi/garnet-miuicamera/setup-makefiles.sh|g' "${ANDROIDBP}" "${ANDROIDMK}" "${BOARDMK}" "${PRODUCTMK}"
|
||||
|
||||
write_makefiles "${MY_DIR}/proprietary-files.txt" true
|
||||
sed -i 's|"xiaomi/garnet-miuicamera"|"xiaomi"|g' "${ANDROIDBP}"
|
||||
|
||||
# Finish
|
||||
write_footers
|
Loading…
Reference in New Issue
Block a user