summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2023-11-30 20:44:20 +0200
committeralk3pInjection <webmaster@raspii.tech>2024-01-04 05:40:50 +0800
commit1ee88ffbc1fa52a2a0657e54baa5589c28ebba41 (patch)
treeec67b5604feaa3897948aadbcd9a3ef5487ccedf
parente06a3b30e362e1eefa303f7cb53712ce49da3b3d (diff)
pantah: Add firmware extraction support
Change-Id: If6cb6334a8f7b2fcc77c8947569eba1b2002190a
-rwxr-xr-xcheetah/extract-files.sh12
-rw-r--r--cheetah/proprietary-firmware.txt11
-rwxr-xr-xcheetah/setup-makefiles.sh4
-rwxr-xr-xpanther/extract-files.sh12
-rw-r--r--panther/proprietary-firmware.txt11
-rwxr-xr-xpanther/setup-makefiles.sh4
6 files changed, 50 insertions, 4 deletions
diff --git a/cheetah/extract-files.sh b/cheetah/extract-files.sh
index 4618b53..b6670f0 100755
--- a/cheetah/extract-files.sh
+++ b/cheetah/extract-files.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
-# Copyright (C) 2017-2020 The LineageOS Project
+# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -53,10 +53,20 @@ if [ -z "${SRC}" ]; then
SRC="adb"
fi
+function prepare_firmware() {
+ if [ "${SRC}" != "adb" ]; then
+ bash "${ANDROID_ROOT}"/lineage/scripts/pixel/prepare-firmware.sh "${DEVICE}" "${SRC}"
+ fi
+}
+
# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}"
+if [ -z "${SECTION}" ]; then
+ extract_firmware "${MY_DIR}/proprietary-firmware.txt" "${SRC}"
+fi
+
"${MY_DIR}/setup-makefiles.sh"
diff --git a/cheetah/proprietary-firmware.txt b/cheetah/proprietary-firmware.txt
new file mode 100644
index 0000000..f32fb48
--- /dev/null
+++ b/cheetah/proprietary-firmware.txt
@@ -0,0 +1,11 @@
+# All firmware images are extracted from Google factory images for each new ASB
+
+abl.img;AB
+bl1.img;AB
+bl2.img;AB
+bl31.img;AB
+gsa.img;AB
+ldfw.img;AB
+modem.img;AB
+pbl.img;AB
+tzsw.img;AB
diff --git a/cheetah/setup-makefiles.sh b/cheetah/setup-makefiles.sh
index 5cb111e..4148dec 100755
--- a/cheetah/setup-makefiles.sh
+++ b/cheetah/setup-makefiles.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
-# Copyright (C) 2017-2020 The LineageOS Project
+# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -33,5 +33,7 @@ write_headers
write_makefiles "${MY_DIR}/proprietary-files.txt" true
write_makefiles "${MY_DIR}/proprietary-files-vendor.txt" true
+append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt"
+
# Finish
write_footers
diff --git a/panther/extract-files.sh b/panther/extract-files.sh
index 6f52e07..fde242e 100755
--- a/panther/extract-files.sh
+++ b/panther/extract-files.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
-# Copyright (C) 2017-2020 The LineageOS Project
+# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -53,10 +53,20 @@ if [ -z "${SRC}" ]; then
SRC="adb"
fi
+function prepare_firmware() {
+ if [ "${SRC}" != "adb" ]; then
+ bash "${ANDROID_ROOT}"/lineage/scripts/pixel/prepare-firmware.sh "${DEVICE}" "${SRC}"
+ fi
+}
+
# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}"
+if [ -z "${SECTION}" ]; then
+ extract_firmware "${MY_DIR}/proprietary-firmware.txt" "${SRC}"
+fi
+
"${MY_DIR}/setup-makefiles.sh"
diff --git a/panther/proprietary-firmware.txt b/panther/proprietary-firmware.txt
new file mode 100644
index 0000000..f32fb48
--- /dev/null
+++ b/panther/proprietary-firmware.txt
@@ -0,0 +1,11 @@
+# All firmware images are extracted from Google factory images for each new ASB
+
+abl.img;AB
+bl1.img;AB
+bl2.img;AB
+bl31.img;AB
+gsa.img;AB
+ldfw.img;AB
+modem.img;AB
+pbl.img;AB
+tzsw.img;AB
diff --git a/panther/setup-makefiles.sh b/panther/setup-makefiles.sh
index ffb853b..b181785 100755
--- a/panther/setup-makefiles.sh
+++ b/panther/setup-makefiles.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
-# Copyright (C) 2017-2020 The LineageOS Project
+# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -33,5 +33,7 @@ write_headers
write_makefiles "${MY_DIR}/proprietary-files.txt" true
write_makefiles "${MY_DIR}/proprietary-files-vendor.txt" true
+append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt"
+
# Finish
write_footers