From 42554af82769ffd8af09fc802606aa440d06cd55 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Thu, 30 Nov 2023 20:44:20 +0200 Subject: [PATCH] sunfish: Add firmware extraction support Change-Id: If6cb6334a8f7b2fcc77c8947569eba1b2002190a --- extract-files.sh | 12 +++++++++++- proprietary-firmware.txt | 13 +++++++++++++ setup-makefiles.sh | 4 +++- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 proprietary-firmware.txt diff --git a/extract-files.sh b/extract-files.sh index eb66c0e8..71b9e417 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,7 +1,7 @@ #!/bin/bash # # Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2021 The LineageOS Project +# Copyright (C) 2017-2023 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # @@ -62,6 +62,12 @@ function blob_fixup() { esac } +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}" @@ -69,4 +75,8 @@ extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTIO extract "${MY_DIR}/proprietary-files-carriersettings.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/proprietary-firmware.txt b/proprietary-firmware.txt new file mode 100644 index 00000000..744e4015 --- /dev/null +++ b/proprietary-firmware.txt @@ -0,0 +1,13 @@ +# All firmware images are extracted from Google factory images for each new ASB + +abl.img;AB +aop.img;AB +devcfg.img;AB +hyp.img;AB +keymaster.img;AB +modem.img;AB +qupfw.img;AB +tz.img;AB +uefisecapp.img;AB +xbl.img;AB +xbl_config.img;AB diff --git a/setup-makefiles.sh b/setup-makefiles.sh index bc8f3c20..417ae5f5 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,7 +1,7 @@ #!/bin/bash # # Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017-2021 The LineageOS Project +# Copyright (C) 2017-2023 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # @@ -34,5 +34,7 @@ write_makefiles "${MY_DIR}/proprietary-files.txt" true write_makefiles "${MY_DIR}/proprietary-files-carriersettings.txt" true write_makefiles "${MY_DIR}/proprietary-files-vendor.txt" true +append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt" + # Finish write_footers