Files
android_device_nintendo_nx/extract/patches.sh
T
Aaron Kling 043de863d2 Add extract files
The script is a shim to to common Tegra extract scripts

Change-Id: I8453db29f782996ac204c9eb2fbf54cfdebe39b9
2021-03-27 17:12:24 -05:00

31 lines
1.3 KiB
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.
# 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;