From 287048e0e8b532659a8cf42fa377e1bf197f4a3a Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Thu, 30 Nov 2023 20:44:20 +0200 Subject: [PATCH] sm8450-common: Add firmware extraction support Change-Id: If6cb6334a8f7b2fcc77c8947569eba1b2002190a --- extract-files.sh | 6 +++++- setup-makefiles.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index 92b0be9..31fcebb 100755 --- a/extract-files.sh +++ b/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 # @@ -85,6 +85,10 @@ if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/propriet setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" extract "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" + + if [ -z "${SECTION}" ] && [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then + extract_firmware "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" "${SRC}" + fi fi "${MY_DIR}/setup-makefiles.sh" diff --git a/setup-makefiles.sh b/setup-makefiles.sh index f2ac3ec..490d217 100755 --- a/setup-makefiles.sh +++ b/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 # @@ -43,6 +43,10 @@ if [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then # The standard device blobs write_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" true + if [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then + append_firmware_calls_to_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" + fi + # Finish write_footers fi