From 043de863d2346e2fba26b6538aabfb28766315a7 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Sat, 27 Mar 2021 15:03:02 -0500 Subject: [PATCH] Add extract files The script is a shim to to common Tegra extract scripts Change-Id: I8453db29f782996ac204c9eb2fbf54cfdebe39b9 --- extract-files.sh | 18 ++++++++++++++++++ extract/extract_sources.sh | 19 +++++++++++++++++++ extract/file.list | 15 +++++++++++++++ extract/patches.sh | 30 ++++++++++++++++++++++++++++++ extract/sources.txt | 1 + 5 files changed, 83 insertions(+) create mode 100755 extract-files.sh create mode 100644 extract/extract_sources.sh create mode 100644 extract/file.list create mode 100644 extract/patches.sh create mode 100644 extract/sources.txt diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..f4d5072 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Copyright (C) 2021 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +exec ${BASH_SOURCE%/*}/../tegra-common/extract/extract-files.sh "$@" diff --git a/extract/extract_sources.sh b/extract/extract_sources.sh new file mode 100644 index 0000000..837fb39 --- /dev/null +++ b/extract/extract_sources.sh @@ -0,0 +1,19 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SOURCE_PATHS+=("foster"); +FILELIST_PATHS+=("foster"); +PATCH_PATHS+=("foster"); diff --git a/extract/file.list b/extract/file.list new file mode 100644 index 0000000..a359752 --- /dev/null +++ b/extract/file.list @@ -0,0 +1,15 @@ +hekate hekate_ctcaer_5.5.4.bin foster/firmware/hekate.bin + +nv-tegra-t210 3rdparty/bcmbinaries/bcm4354a1/wlan/atv/nvram_darcy_a00.txt foster/bcm_firmware/bcm4354/nvram_darcy_a00.txt +nv-tegra-t210 3rdparty/bcmbinaries/bcm4354a1/wlan/atv/nvram_foster_e_4354.txt foster/bcm_firmware/bcm4354/nvram_foster_e_4354.txt +nv-tegra-t210 3rdparty/bcmbinaries/bcm4354a1/wlan/atv/nvram_foster_e_antenna_tuned_4354.txt foster/bcm_firmware/bcm4354/nvram_foster_e_antenna_tuned_4354.txt +nv-tegra-t210 3rdparty/bcmbinaries/bcm4354a1/wlan/atv/nvram_loki_e_4354.txt foster/bcm_firmware/bcm4354/nvram_loki_e_4354.txt +nv-tegra-t210 3rdparty/bcmbinaries/bcm4354a1/wlan/atv/nvram_loki_e_antenna_tuned_4354.txt foster/bcm_firmware/bcm4354/nvram_loki_e_antenna_tuned_4354.txt +nv-tegra-t210 3rdparty/bcmbinaries/bcm4354a1/wlan/emb/nvram_jetsonE_cv_4354.txt foster/bcm_firmware/bcm4354/nvram_jetsonE_cv_4354.txt +nv-tegra-t210 3rdparty/cypress/bcm4356a3/wlan/brcmfmac4356-pcie.txt foster/bcm_firmware/bcm4356/brcmfmac4356-pcie.txt + +nv-tegra-t210 3rdparty/cypress/bcm4354a1/wlan/atv/darcy.clm_blob foster/bcm_firmware/bcm4354/darcy.clm_blob +nv-tegra-t210 3rdparty/cypress/bcm4354a1/wlan/atv/foster.clm_blob foster/bcm_firmware/bcm4354/foster.clm_blob +nv-tegra-t210 3rdparty/cypress/bcm4354a1/wlan/atv/flynn-hp.clm_blob foster/bcm_firmware/bcm4354/flynn-hp.clm_blob +nv-tegra-t210 3rdparty/cypress/bcm4356a3/wlan/fw_4356a3_prod.clm_blob foster/bcm_firmware/bcm4356/fw_4356a3_prod.clm_blob +nv-tegra-t210 3rdparty/cypress/bcm4356a3/wlan/brcmfmac4356-pcie.clm_blob foster/bcm_firmware/bcm4356/brcmfmac4356-pcie.clm_blob diff --git a/extract/patches.sh b/extract/patches.sh new file mode 100644 index 0000000..f6b290e --- /dev/null +++ b/extract/patches.sh @@ -0,0 +1,30 @@ +# Copyright (C) 2021 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Needed by the Pixel C +function fetch_smaug_nvram() { + wget 'https://dumps.tadiphone.dev/dumps/google/dragon/-/raw/ryu-user-8.1.0-OPM8.190605.005-5749003-release-keys/system/etc/wifi/bcmdhd.cal' -O ${LINEAGE_ROOT}/${OUTDIR}/foster/bcm_firmware/bcm4354/bcmdhd.cal + + # Crummy hack to match what was already committed + sed -i -e '$a\' ${LINEAGE_ROOT}/${OUTDIR}/foster/bcm_firmware/bcm4354/bcmdhd.cal +} + +# The previous default crashes the current firmware +function patch_nvrams() { + sed -i 's/ccode=XR/ccode=XX/' ${LINEAGE_ROOT}/${OUTDIR}/foster/bcm_firmware/bcm4354/nvram_jetsonE_cv_4354.txt + sed -i 's/ccode=0/ccode=XX/' ${LINEAGE_ROOT}/${OUTDIR}/foster/bcm_firmware/bcm4354/bcmdhd.cal +} + +fetch_smaug_nvram; +patch_nvrams; diff --git a/extract/sources.txt b/extract/sources.txt new file mode 100644 index 0000000..9f4c653 --- /dev/null +++ b/extract/sources.txt @@ -0,0 +1 @@ +hekate https://github.com/CTCaer/hekate/releases/download/v5.5.4-v2/hekate_ctcaer_5.5.4_Nyx_1.0.1.zip hekate