From 6d916c791d80844d9c3e076b2335707b1bc8e716 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sun, 23 Jun 2024 21:58:49 +0100 Subject: [PATCH] sm6150-common: Convert WiFi firmware symlinks to install_symlink targets The last bit that was preventing building hermetic images. Change-Id: I75bb7de4593a7992f6015317cf97e088beeba0cb --- Android.bp | 19 +++++++++++++++++++ Android.mk | 9 --------- sm6150.mk | 5 +++++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Android.bp b/Android.bp index 9eb0c19..eeaa29b 100644 --- a/Android.bp +++ b/Android.bp @@ -1,3 +1,8 @@ +// +// Copyright (C) 2020-2024 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + soong_namespace { imports: [ "hardware/google/interfaces", @@ -7,3 +12,17 @@ soong_namespace { "hardware/xiaomi", ], } + +install_symlink { + name: "firmware_wlan_mac.bin_symlink", + vendor: true, + installed_location: "firmware/wlan/qca_cld/wlan_mac.bin", + symlink_target: "/mnt/vendor/persist/wlan_mac.bin", +} + +install_symlink { + name: "firmware_WCNSS_qcom_cfg.ini_symlink", + vendor: true, + installed_location: "firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini", + symlink_target: "/vendor/etc/wifi/WCNSS_qcom_cfg.ini", +} diff --git a/Android.mk b/Android.mk index d52b344..19cd13f 100644 --- a/Android.mk +++ b/Android.mk @@ -41,13 +41,4 @@ $(DSP_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT) -WIFI_FIRMWARE_SYMLINKS := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/ -$(WIFI_FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE) - @echo "Creating wifi firmware symlinks: $@" - mkdir -p $@ - $(hide) ln -sf /vendor/etc/wifi/WCNSS_qcom_cfg.ini $@/WCNSS_qcom_cfg.ini - $(hide) ln -sf /mnt/vendor/persist/wlan_mac.bin $@/wlan_mac.bin - -ALL_DEFAULT_INSTALLED_MODULES += $(WIFI_FIRMWARE_SYMLINKS) - endif diff --git a/sm6150.mk b/sm6150.mk index cec7da2..a36f153 100644 --- a/sm6150.mk +++ b/sm6150.mk @@ -435,6 +435,11 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml \ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml +# WiFi firmware symlinks +PRODUCT_PACKAGES += \ + firmware_wlan_mac.bin_symlink \ + firmware_WCNSS_qcom_cfg.ini_symlink + # ZRAM writeback PRODUCT_PROPERTY_OVERRIDES += \ ro.zram.mark_idle_delay_mins=60 \