diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 45cbaed..0000000 --- a/Android.mk +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2022 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. - -ifneq ($(filter $(TARGET_DEVICE), nx nx_tab),) - -LOCAL_PATH := $(call my-dir) - -include $(call all-makefiles-under,$(LOCAL_PATH)) - -endif diff --git a/bootfiles/Android.mk b/bootfiles/Android.mk deleted file mode 100644 index 4cc716b..0000000 --- a/bootfiles/Android.mk +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (C) 2022 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. -# - -LOCAL_PATH := $(call my-dir) -LINEAGE_TOOLS_PATH := $(abspath prebuilts/tools-lineage/$(HOST_PREBUILT_TAG)/bin) - -include $(CLEAR_VARS) -LOCAL_MODULE := android.ini -LOCAL_SRC_FILES := android.ini -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(PRODUCT_OUT) -include $(BUILD_PREBUILT) -INSTALLED_RADIOIMAGE_TARGET += $(PRODUCT_OUT)/android.ini - -include $(CLEAR_VARS) -LOCAL_MODULE := bootlogo_android -LOCAL_MODULE_SUFFIX := .bmp -LOCAL_SRC_FILES := bootlogo_android.bmp -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(PRODUCT_OUT) -include $(BUILD_PREBUILT) -INSTALLED_RADIOIMAGE_TARGET += $(PRODUCT_OUT)/bootlogo_android.bmp - -include $(CLEAR_VARS) -LOCAL_MODULE := icon_android_hue -LOCAL_MODULE_SUFFIX := .bmp -LOCAL_SRC_FILES := icon_android_hue.bmp -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(PRODUCT_OUT) -include $(BUILD_PREBUILT) -INSTALLED_RADIOIMAGE_TARGET += $(PRODUCT_OUT)/icon_android_hue.bmp diff --git a/build/tasks/bootloader.mk b/build/tasks/bootloader.mk index e5a6495..f0a5a39 100644 --- a/build/tasks/bootloader.mk +++ b/build/tasks/bootloader.mk @@ -53,6 +53,10 @@ $(PRODUCT_OUT)/boot.scr: $(_uscript_archive) .PHONY: boot.scr boot.scr: $(PRODUCT_OUT)/boot.scr +INSTALLED_RADIOIMAGE_TARGET += $(NX_BOOTFILES_PATH)/android.ini +INSTALLED_RADIOIMAGE_TARGET += $(NX_BOOTFILES_PATH)/bootlogo_android.bmp +INSTALLED_RADIOIMAGE_TARGET += $(NX_BOOTFILES_PATH)/icon_android_hue.bmp + ifneq ($(TARGET_TEGRA_UBOOT),prebuilt) INSTALLED_RADIOIMAGE_TARGET += $(_uboot_bin) else diff --git a/extract/file.list b/extract/file.list index 329ea45..6eb12ad 100644 --- a/extract/file.list +++ b/extract/file.list @@ -1 +1 @@ -stock-t210 vendor/firmware/brcmfmac4356-pcie.clm_blob bcm_firmware/bcm4356/ +stock-t210 vendor/firmware/brcmfmac4356-pcie.clm_blob bcm/bcm4356/ diff --git a/extract/patches.sh b/extract/patches.sh index d5b1065..863508e 100644 --- a/extract/patches.sh +++ b/extract/patches.sh @@ -16,14 +16,16 @@ 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 + mkdir -p ${LINEAGE_ROOT}/vendor/nintendo/nx/swr/bcm/bcm4356 + mkdir -p ${LINEAGE_ROOT}/vendor/nintendo/nx/swr/u-boot + wget -q https://gitlab.com/switchroot/android/nx-firmware/-/raw/main/brcmfmac4356A3-pcie.txt?ref_type=heads -O ${LINEAGE_ROOT}/vendor/nintendo/nx/swr/bcm/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/swr/bcm/bcm4356/CYW4356A3_001.004.009.0092.0095.bin echo ""; echo -n "Fetching BL33 for NX from SWR..."; - wget -q https://gitlab.com/switchroot/android/nx-firmware/-/raw/main/bl33.bin?ref_type=heads -O ${LINEAGE_ROOT}/vendor/nintendo/nx/rel-shield-r/bl33.bin + wget -q https://gitlab.com/switchroot/android/nx-firmware/-/raw/main/bl33.bin?ref_type=heads -O ${LINEAGE_ROOT}/vendor/nintendo/nx/swr/u-boot/bl33.bin echo ""; diff --git a/vendor/Android.mk b/vendor/Android.mk deleted file mode 100644 index ac83cb1..0000000 --- a/vendor/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2020 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. - -LOCAL_PATH := $(call my-dir) -COMMON_BUILD_PATH := device/nvidia/tegra-common/vendor/build - -include $(COMMON_BUILD_PATH)/macros.mk -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/vendor/bcm_firmware/Android.mk b/vendor/bcm_firmware/Android.mk deleted file mode 100644 index fd4a17d..0000000 --- a/vendor/bcm_firmware/Android.mk +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2020-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. - -LOCAL_PATH := $(call my-dir) -NX_BCM_PATH := vendor/nintendo/nx/rel-shield-r/bcm_firmware/bcm4356 - -# Bluetooth Patchfile -include $(CLEAR_VARS) -LOCAL_MODULE := BCM4356A3 -LOCAL_SRC_FILES := ../../../../../$(NX_BCM_PATH)/CYW4356A3_001.004.009.0092.0095.bin -LOCAL_MODULE_SUFFIX := .hcd -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := nintendo -include $(BUILD_PREBUILT) - -# WiFi NVRAM -include $(CLEAR_VARS) -LOCAL_MODULE := brcmfmac4356-pcie.txt -LOCAL_SRC_FILES := ../../../../../$(NX_BCM_PATH)/brcmfmac4356A3-pcie.txt -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := nintendo -include $(BUILD_PREBUILT) - -# mdarcy clm target -include $(CLEAR_VARS) -LOCAL_MODULE := brcmfmac4356-pcie.clm_blob -LOCAL_SRC_FILES := ../../../../../$(NX_BCM_PATH)/brcmfmac4356-pcie.clm_blob -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := nintendo -include $(BUILD_PREBUILT) diff --git a/vendor/bcm_firmware/bcm.mk b/vendor/bcm_firmware/bcm.mk deleted file mode 100644 index acb15d2..0000000 --- a/vendor/bcm_firmware/bcm.mk +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2022-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. - -LOCAL_PATH := device/nintendo/nx/vendor/bcm_firmware -COMMON_BCM_PATH := device/nvidia/tegra-common/vendor/rel-shield-r/bcm_firmware - -PRODUCT_PACKAGES += \ - BCM4356A3 \ - brcmfmac4356-pcie \ - brcmfmac4356-pcie.clm_blob \ - brcmfmac4356-pcie.txt diff --git a/vendor/nx-vendor.mk b/vendor/nx-vendor.mk index 98af995..82e6cfc 100644 --- a/vendor/nx-vendor.mk +++ b/vendor/nx-vendor.mk @@ -14,7 +14,6 @@ include device/nvidia/t210-common/vendor/t210-by-flags.mk include device/nvidia/tegra-common/vendor/common-by-flags.mk -include device/nintendo/nx/vendor/bcm_firmware/bcm.mk ATF_PATH := $(abspath hardware/nintendo/arm-trusted-firmware) @@ -28,8 +27,14 @@ ATF_PARAMS += SDEI_SUPPORT=0 # Error reporting ATF_PARAMS += CRASH_REPORTING=1 ENABLE_ASSERTIONS=1 LOG_LEVEL=0 PLAT_LOG_LEVEL_ASSERT=0 -# Switch firmware files -PRODUCT_PACKAGES += \ - android.ini \ - bootlogo_android \ - icon_android_hue +COMMON_BCM_PATH := vendor/nvidia/common/rel-shield-r/bcm +NX_BCM_PATH := vendor/nintendo/nx/rel-shield-r/bcm +NX_BCM_SWR_PATH := vendor/nintendo/nx/swr/bcm + +PRODUCT_COPY_FILES += \ + $(NX_BCM_PATH)/bcm4356/brcmfmac4356-pcie.clm_blob:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.clm_blob \ + $(NX_BCM_SWR_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.txt \ + $(NX_BCM_SWR_PATH)/bcm4356/CYW4356A3_001.004.009.0092.0095.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/BCM4356A3.hcd + +PRODUCT_COPY_FILES += \ + $(COMMON_BCM_PATH)/bcm4356/brcmfmac4356-pcie.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.bin