vendor: Use copy-files for firmware targets and bootfiles

* Don't even copy bootfiles, just stuff them in RADIO for
  infra to grab.
* Kill top level Android.mk while we're here.

Co-Authored-By: Nolen Johnson <johnsonnolen@gmail.com>
Change-Id: I7ebe10120133df83d95f6b182f89ea3149bf60c8
This commit is contained in:
Aaron KlingandNolen Johnson authored and Nolen Johnson committed 2025-01-10 15:20:22 -05:00
1 parent b42da2fd3f
commit 6e973e6835
9 files changed
+21 -163

No files matched your search

-21
View File
@@ -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
-44
View File
@@ -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
+4
View File
@@ -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
+1 -1
View File
@@ -1 +1 @@
stock-t210 vendor/firmware/brcmfmac4356-pcie.clm_blob bcm_firmware/bcm4356/
stock-t210 vendor/firmware/brcmfmac4356-pcie.clm_blob bcm/bcm4356/
+5 -3
View File
@@ -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 "";
-19
View File
@@ -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))
-47
View File
@@ -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)
-22
View File
@@ -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
+11 -6
View File
@@ -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