From e83db3f96dedad1ecfbd34595231d8a33fa34ed5 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Thu, 30 Nov 2023 20:44:20 +0200 Subject: [PATCH] bramble: Add firmware extraction support Change-Id: If6cb6334a8f7b2fcc77c8947569eba1b2002190a --- extract-files.sh | 12 +++++++++++- proprietary-firmware.txt | 14 ++++++++++++++ setup-makefiles.sh | 4 +++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 proprietary-firmware.txt diff --git a/extract-files.sh b/extract-files.sh index 8b648f4..6944115 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 # @@ -66,6 +66,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}" @@ -73,4 +79,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 0000000..edcc4e7 --- /dev/null +++ b/proprietary-firmware.txt @@ -0,0 +1,14 @@ +# All firmware images are extracted from Google factory images for each new ASB + +abl.img;AB +aop.img;AB +devcfg.img;AB +featenabler.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 255fe04..663a9a6 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