diff --git a/extract-files.sh b/extract-files.sh index 3d25d93..26d3ffd 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -15,4 +15,7 @@ # limitations under the License. # +export DEVICE="nx"; +export VENDOR="nintendo" + exec ${BASH_SOURCE%/*}/../../nvidia/tegra-common/extract/extract-files.sh "$@" diff --git a/extract/extract_sources.sh b/extract/extract_sources.sh index c06ef16..902c73f 100644 --- a/extract/extract_sources.sh +++ b/extract/extract_sources.sh @@ -1,5 +1,5 @@ # -# Copyright (C) 2022 The LineageOS Project +# Copyright (C) 2024 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. @@ -14,4 +14,5 @@ # limitations under the License. # -FILELIST_PATHS+=("nx"); +FILELIST_PATHS+=("nintendo/nx"); +PATCH_PATHS+=("nintendo/nx"); diff --git a/extract/file.list b/extract/file.list index 833a128..329ea45 100644 --- a/extract/file.list +++ b/extract/file.list @@ -1 +1 @@ -stock-t210 vendor/firmware/brcmfmac4356-pcie.clm_blob foster/bcm_firmware/bcm4356/brcmfmac4356-pcie.clm_blob +stock-t210 vendor/firmware/brcmfmac4356-pcie.clm_blob bcm_firmware/bcm4356/ diff --git a/extract/patches.sh b/extract/patches.sh new file mode 100644 index 0000000..bff5799 --- /dev/null +++ b/extract/patches.sh @@ -0,0 +1,25 @@ +# Copyright (C) 2024 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. + +# The previous default crashes the current firmware +function fetch_nx_firmware() { + echo -n "Fetching Wi-Fi firmware for NX from SWR..."; + + wget -q https://gitlab.com/switchroot/android/nx-firmware/-/raw/main/brcmfmac4356A3-pcie.txt?ref_type=heads -O ${LINEAGE_ROOT}/vendor/nintendo/nx/rel-shield-r/bcm_firmware/bcm4356/brcmfmac4356A3-pcie.txt + wget -q https://gitlab.com/switchroot/android/nx-firmware/-/raw/main/CYW4356A3_001.004.009.0092.0095.bin?ref_type=heads -O ${LINEAGE_ROOT}/vendor/nintendo/nx/rel-shield-r/bcm_firmware/bcm4356/CYW4356A3_001.004.009.0092.0095.bin + + echo ""; +} + +fetch_nx_firmware; diff --git a/vendor/bcm_firmware/Android.mk b/vendor/bcm_firmware/Android.mk index 7a7298a..58cc2cd 100644 --- a/vendor/bcm_firmware/Android.mk +++ b/vendor/bcm_firmware/Android.mk @@ -13,7 +13,7 @@ # limitations under the License. LOCAL_PATH := $(call my-dir) -NX_BCM_PATH := vendor/nintendo/nx/bcm_firmware +NX_BCM_PATH := vendor/nintendo/nx/rel-shield-r/bcm_firmware/bcm4356 # Bluetooth Patchfile include $(CLEAR_VARS)