Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
device_xiaomi_sm8350-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid-Devices
device_xiaomi_sm8350-common
Commits
7d2fbba5
Commit
7d2fbba5
authored
3 years ago
by
Arian
Browse files
Options
Downloads
Patches
Plain Diff
sm8350-common: Update extract scripts from templates
Change-Id: I41480402e01d1a32ee1d8562e73c8e97a9380aae
parent
a5d227a7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
extract-files.sh
+22
-13
22 additions, 13 deletions
extract-files.sh
setup-makefiles.sh
+8
-10
8 additions, 10 deletions
setup-makefiles.sh
with
30 additions
and
23 deletions
extract-files.sh
+
22
−
13
View file @
7d2fbba5
#!/bin/bash
#
# Copyright (C) 2018-2020 The LineageOS Project
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
...
...
@@ -11,9 +12,9 @@ set -e
MY_DIR
=
"
${
BASH_SOURCE
%/*
}
"
if
[[
!
-d
"
${
MY_DIR
}
"
]]
;
then
MY_DIR
=
"
${
PWD
}
"
;
fi
LINEAGE
_ROOT
=
"
${
MY_DIR
}
"
/../../..
ANDROID
_ROOT
=
"
${
MY_DIR
}
/../../..
"
HELPER
=
"
${
LINEAGE
_ROOT
}
/tools/extract-utils/extract_utils.sh"
HELPER
=
"
${
ANDROID
_ROOT
}
/tools/extract-utils/extract_utils.sh"
if
[
!
-f
"
${
HELPER
}
"
]
;
then
echo
"Unable to find helper script at
${
HELPER
}
"
exit
1
...
...
@@ -23,11 +24,19 @@ source "${HELPER}"
# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR
=
true
SECTION
=
ONLY_COMMON
=
ONLY_TARGET
=
KANG
=
SECTION
=
while
[
"
${#}
"
-gt
0
]
;
do
case
"
${
1
}
"
in
--only-common
)
ONLY_COMMON
=
true
;;
--only-target
)
ONLY_TARGET
=
true
;;
-n
|
--no-cleanup
)
CLEAN_VENDOR
=
false
;;
...
...
@@ -51,25 +60,25 @@ fi
function
blob_fixup
()
{
case
"
${
1
}
"
in
product/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml
|
product/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml
)
product/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml
|
product/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml
)
sed
-i
's/version="2.0"/version="1.0"/g'
"
${
2
}
"
;;
esac
}
# Initialize the helper for common device
setup_vendor
"
${
DEVICE_COMMON
}
"
"
${
VENDOR
}
"
"
${
LINEAGE_ROOT
}
"
true
"
${
CLEAN_VENDOR
}
"
if
[
-z
"
${
ONLY_TARGET
}
"
]
;
then
# Initialize the helper for common device
setup_vendor
"
${
DEVICE_COMMON
}
"
"
${
VENDOR
}
"
"
${
ANDROID_ROOT
}
"
true
"
${
CLEAN_VENDOR
}
"
extract
"
${
MY_DIR
}
/proprietary-files.txt"
"
${
SRC
}
"
\
"
${
KANG
}
"
--section
"
${
SECTION
}
"
extract
"
${
MY_DIR
}
/proprietary-files.txt"
"
${
SRC
}
"
"
${
KANG
}
"
--section
"
${
SECTION
}
"
fi
if
[
-s
"
${
MY_DIR
}
/../
${
DEVICE
}
/proprietary-files.txt"
]
;
then
if
[
-z
"
${
ONLY_COMMON
}
"
]
&&
[
-s
"
${
MY_DIR
}
/../
${
DEVICE
}
/proprietary-files.txt"
]
;
then
# Reinitialize the helper for device
source
"
${
MY_DIR
}
/../
${
DEVICE
}
/extract-files.sh"
setup_vendor
"
${
DEVICE
}
"
"
${
VENDOR
}
"
"
${
LINEAGE
_ROOT
}
"
false
"
${
CLEAN_VENDOR
}
"
setup_vendor
"
${
DEVICE
}
"
"
${
VENDOR
}
"
"
${
ANDROID
_ROOT
}
"
false
"
${
CLEAN_VENDOR
}
"
extract
"
${
MY_DIR
}
/../
${
DEVICE
}
/proprietary-files.txt"
"
${
SRC
}
"
\
"
${
KANG
}
"
--section
"
${
SECTION
}
"
extract
"
${
MY_DIR
}
/../
${
DEVICE
}
/proprietary-files.txt"
"
${
SRC
}
"
"
${
KANG
}
"
--section
"
${
SECTION
}
"
fi
"
${
MY_DIR
}
/setup-makefiles.sh"
This diff is collapsed.
Click to expand it.
setup-makefiles.sh
+
8
−
10
View file @
7d2fbba5
#!/bin/bash
#
# Copyright (C) 2018-2022 The LineageOS Project
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2022 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set
-e
INITIAL_COPYRIGHT_YEAR
=
2020
# Load extract_utils and do some sanity checks
MY_DIR
=
"
${
BASH_SOURCE
%/*
}
"
if
[[
!
-d
"
${
MY_DIR
}
"
]]
;
then
MY_DIR
=
"
${
PWD
}
"
;
fi
LINEAGE
_ROOT
=
"
${
MY_DIR
}
/../../.."
ANDROID
_ROOT
=
"
${
MY_DIR
}
/../../.."
HELPER
=
"
${
LINEAGE
_ROOT
}
/tools/extract-utils/extract_utils.sh"
HELPER
=
"
${
ANDROID
_ROOT
}
/tools/extract-utils/extract_utils.sh"
if
[
!
-f
"
${
HELPER
}
"
]
;
then
echo
"Unable to find helper script at
${
HELPER
}
"
exit
1
...
...
@@ -23,9 +22,9 @@ fi
source
"
${
HELPER
}
"
# Initialize the helper for common
setup_vendor
"
${
DEVICE_COMMON
}
"
"
${
VENDOR
}
"
"
${
LINEAGE
_ROOT
}
"
true
setup_vendor
"
${
DEVICE_COMMON
}
"
"
${
VENDOR
}
"
"
${
ANDROID
_ROOT
}
"
true
#
Copyright
headers and guards
#
Warning
headers and guards
write_headers
"haydn lisa odin renoir venus"
# The standard common blobs
...
...
@@ -36,10 +35,9 @@ write_footers
if
[
-s
"
${
MY_DIR
}
/../
${
DEVICE
}
/proprietary-files.txt"
]
;
then
# Reinitialize the helper for device
INITIAL_COPYRIGHT_YEAR
=
"
$DEVICE_BRINGUP_YEAR
"
setup_vendor
"
${
DEVICE
}
"
"
${
VENDOR
}
"
"
${
LINEAGE_ROOT
}
"
false
setup_vendor
"
${
DEVICE
}
"
"
${
VENDOR
}
"
"
${
ANDROID_ROOT
}
"
false
#
Copyright
headers and guards
#
Warning
headers and guards
write_headers
# The standard device blobs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment