cvetaevvitaliy / stm32mp1-ubuntu

This repo for build Ubuntu 22.04, 20.04, 18.04, and Debian 10, 11 on stm32mp1 CPU
MIT License
49 stars 25 forks source link

WiFi not working with Ubuntu 20.04 image on STM32MP157F-DK2 #1

Closed haimiko closed 1 year ago

haimiko commented 2 years ago

Interestingly enough the wifi device isn't showing up on the STM32MP157F-DK2, with the Ubuntu20.04 release, even though it's the same chip as on the STM32MP157C-DK2. I tried running the activate_wifi.sh script but still no joy.
dmesg error shows the following:

[ 24.500978] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.bin failed with error -2 Looks like the bluetooth firmware file and wifi cyfmac43430-sdio.bin file was missing from the release and placing it the lib/firmware/brcm folder didn't help.

with Firmware copied now the dmesg reads as follows:


 dmesg |grep brcm
[   21.883320] Bluetooth: hci0: BCM: 'brcm/BCM43430A1.hcd'
[   21.883337] Bluetooth: hci0: BCM: 'brcm/BCM.hcd'
[   22.481306] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   22.484646] usbcore: registered new interface driver brcmfmac
[   23.550437] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[   24.570581] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
root@arm:~# rfkill
ID TYPE      DEVICE      SOFT      HARD
 0 bluetooth hci0   unblocked unblocked
root@arm:~# rfkill list all
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
cvetaevvitaliy commented 2 years ago

Hi Plese use command

user@localhost:~/$

wget -c https://raw.githubusercontent.com/STMicroelectronics/meta-st-stm32mp/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt wget -c https://github.com/murata-wireless/cyw-fmac-fw/raw/master/cyfmac43430-sdio.bin wget -c https://github.com/murata-wireless/cyw-fmac-fw/raw/master/cyfmac43430-sdio.1DX.clm_blob

sudo mkdir -p /mnt/rootfs/lib/firmware/brcm/

sudo cp -v ./brcmfmac43430* /mnt/rootfs/lib/firmware/brcm/ sudo cp -v ./brcmfmac43430-sdio.txt /mnt/rootfs/lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.txt

UPD: And recheck file in your board brcmfmac43430-sdio.st,stm32mp157c-dk2.txt in folder /lib/firmware/brcm/

cvetaevvitaliy commented 2 years ago

Hi! I fixed WiFi and BLE

[   16.562404] Bluetooth: hci0: BCM: chip id 94
[   16.562962] Bluetooth: hci0: BCM: features 0x2e
[   16.564412] Bluetooth: hci0: BCM43430A1
[   16.564452] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000
[   16.601408] Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.hcd' Patch
[   17.304646] Bluetooth: hci0: BCM4343WA1 37.4MHz Murata Type-1DX BT4.2-0093
[   17.304689] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0395
[   17.309939] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   17.881198] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   18.289537] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   18.501726] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   18.571660] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Mar 30 2021 01:12:21 version 7.45.98.118 (7d96287 CY) FWID 01-32059766

I made big changes in the project, see develop branch Now the Linux kernel from the official ST repository with fresh updates and fixes: 5.10.61, latest u-boot and secure trust zone And finally, the cherry on the cake - Ubuntu 22.04 Te

ScreenShot 2022-05-17 в 20 47 23 You can download ubuntu-22.04-stm32mp1.img from the latest build GitHub actions and help me with testing