Skip to content

Commit

Permalink
Update How_to_Install_Firmware_for_Mediatek_based_USB_WiFi_adapters.md
Browse files Browse the repository at this point in the history
  • Loading branch information
morrownr authored Feb 14, 2025
1 parent d8c5777 commit c145d82
Showing 1 changed file with 110 additions and 30 deletions.
140 changes: 110 additions & 30 deletions home/How_to_Install_Firmware_for_Mediatek_based_USB_WiFi_adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ The following sections are available:

Note: The instructions in sections 1, 2 and 3 apply to PCIe and M.2 cards as well as USB adapters and modules.

Note: Realtek rtw88 firmware is located [here](https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtw88). Copy the appropriate file(s) to `/lib/firmware/rtw88`.
Note: Realtek rtw88 firmware is located [here](https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtw88). Copy the appropriate file(s) to `/lib/firmware/rtw88`

Note: Some distros compress firmware files. The compressed files will have the same name but will end with something like `.zst`. You should check to see if compressed firmware files are located in the destination firmware directory and take action if you find compressed versions of the firmware files that you are about to update. My suggestion is that you delete the compressed version as the below guide will not write over the comressed files as they have different filenames.
Note: Some distros compress firmware files. The compressed firmware files will have the same filename but will end with `.zst`. `.xz` or `.gz`. Instructions for how to handle this are in each section below.

Note: Make sure the drivers are owned by root after moving them to the correct directory before rebooting.

Expand All @@ -69,6 +69,14 @@ ethtool -i <interface name>

To install or update the firmware:

Create a folder/directory to hold the downloaded firmware files. Example:

$ mkdir -p ~/firmware

Move to your newly created firmware folder/directory:

$ cd ~/firmware

Go to the following site:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek/mt7925
Expand All @@ -77,21 +85,21 @@ Click on `WIFI_MT7925_PATCH_MCU_1_1_hdr.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Click on `WIFI_RAM_CODE_MT7925_1_1.bin`

Click on `plain`

Save file
Save the file to ~/firmware

If your card has Bluetooth support:

Click on `BT_RAM_CODE_MT7925_1_1_hdr.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Create the needed directory (if necessary):

Expand All @@ -102,15 +110,15 @@ sudo mkdir /lib/firmware/mediatek/mt7925
Copy the files to the following locations:

```
sudo cp WIFI_MT7925_PATCH_MCU_1_1_hdr.bin /lib/firmware/mediatek/mt7925
sudo cp WIFI_MT7925_PATCH_MCU_1_1_hdr.* /lib/firmware/mediatek/mt7925
```

```
sudo cp WIFI_RAM_CODE_MT7925_1_1.bin /lib/firmware/mediatek/mt7925
sudo cp WIFI_RAM_CODE_MT7925_1_1.* /lib/firmware/mediatek/mt7925
```

```
sudo cp BT_RAM_CODE_MT7925_1_1_hdr.bin /lib/firmware/mediatek/mt7925
sudo cp BT_RAM_CODE_MT7925_1_1_hdr.* /lib/firmware/mediatek/mt7925
```

Reboot:
Expand All @@ -125,6 +133,14 @@ sudo reboot

To install or update the firmware:

Create a folder/directory to hold the downloaded firmware files. Example:

$ mkdir -p ~/firmware

Move to your newly created firmware folder/directory:

$ cd ~/firmware

Go to the following site:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek
Expand All @@ -133,21 +149,53 @@ Click on `WIFI_MT7922_patch_mcu_1_1_hdr.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Click on `WIFI_RAM_CODE_MT7922_1.bin`

Click on `plain`

Save file
Save the file to ~/firmware

If your adapter/card has Bluetooth support:

Click on `BT_RAM_CODE_MT7922_1_1_hdr.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Check that your files downloaded properly:

$ ls -l

Note that the downloaded files will end with `.bin`. You now need to check what type, if any, comression is used for firmware files in your system:

$ ls -l /lib/firmware/mediatek

Check to see the endings of the files. If your firmware files are uncompressed, you will see an ending of `.bin`. If your firmware files are compressed you will see an ending of `.zst`. `.xz` or `.gz`.

For compressed files, you will first need to compress your downloaded files before copying them to their final destination. Make sure you are in the firmware folder/directory we created earlier (or the location that you decided to create to hold the firmware files):

$ cd ~/firmware

For .zst files, run:

$ zstd -fq --rm *.bin

For .xz files, run:

$ xz -f -C crc32 *.bin

For .gz files, run:

gzip -f *.bin

Check to ensure your new firmware files have the proper filename ending for your system:

$ ls -l ~/firmware

You are now ready to copy the new firmware files to their destination folder/directory.

Create the needed directory (if necessary):

Expand All @@ -158,15 +206,15 @@ sudo mkdir /lib/firmware/mediatek
Copy the files to the following locations:

```
sudo cp WIFI_MT7922_patch_mcu_1_1_hdr.bin /lib/firmware/mediatek
sudo cp WIFI_MT7922_patch_mcu_1_1_hdr.* /lib/firmware/mediatek
```

```
sudo cp WIFI_RAM_CODE_MT7922_1.bin /lib/firmware/mediatek
sudo cp WIFI_RAM_CODE_MT7922_1.* /lib/firmware/mediatek
```

```
sudo cp BT_RAM_CODE_MT7922_1_1_hdr.bin /lib/firmware/mediatek
sudo cp BT_RAM_CODE_MT7922_1_1_hdr.* /lib/firmware/mediatek
```

Reboot:
Expand All @@ -181,6 +229,14 @@ sudo reboot

To install or update the firmware:

Create a folder/directory to hold the downloaded firmware files. Example:

$ mkdir -p ~/firmware

Move to your newly created firmware folder/directory:

$ cd ~/firmware

Go to the following site:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek
Expand All @@ -189,21 +245,21 @@ Click on `WIFI_MT7961_patch_mcu_1_2_hdr.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Click on `WIFI_RAM_CODE_MT7961_1.bin`

Click on `plain`

Save file
Save the file to ~/firmware

If your adapter/card has Bluetooth support:

Click on `BT_RAM_CODE_MT7961_1_2_hdr.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Create the needed directory (if necessary):

Expand All @@ -214,15 +270,15 @@ sudo mkdir /lib/firmware/mediatek
Copy the files to the following locations:

```
sudo cp WIFI_MT7961_patch_mcu_1_2_hdr.bin /lib/firmware/mediatek
sudo cp WIFI_MT7961_patch_mcu_1_2_hdr.* /lib/firmware/mediatek
```

```
sudo cp WIFI_RAM_CODE_MT7961_1.bin /lib/firmware/mediatek
sudo cp WIFI_RAM_CODE_MT7961_1.* /lib/firmware/mediatek
```

```
sudo cp BT_RAM_CODE_MT7961_1_2_hdr.bin /lib/firmware/mediatek
sudo cp BT_RAM_CODE_MT7961_1_2_hdr.* /lib/firmware/mediatek
```

Reboot:
Expand All @@ -231,10 +287,10 @@ Reboot:
sudo reboot
```

Note: To fully remove bluetooth detection:
Note: To fully remove bluetooth detection, delete the bluetooth firmware file:

```
sudo rm /lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin
sudo rm /lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.*
```

-----
Expand Down Expand Up @@ -297,6 +353,14 @@ Reboot:

To install or update the firmware:

Create a folder/directory to hold the downloaded firmware files. Example:

$ mkdir -p ~/firmware

Move to your newly created firmware folder/directory:

$ cd ~/firmware

Go to the following site:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek
Expand All @@ -305,13 +369,13 @@ Click on `mt7662u.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Click on `mt7662u_rom_patch.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Create the needed directory (if necessary):

Expand All @@ -322,11 +386,11 @@ sudo mkdir /lib/firmware/mediatek
Copy the files to the following locations:

```
sudo cp mt7662u.bin /lib/firmware/mediatek
sudo cp mt7662u.* /lib/firmware/mediatek
```

```
sudo cp mt7662u_rom_patch.bin /lib/firmware/mediatek
sudo cp mt7662u_rom_patch.* /lib/firmware/mediatek
```
Reboot:

Expand All @@ -340,6 +404,14 @@ sudo reboot

To install or update the firmware:

Create a folder/directory to hold the downloaded firmware files. Example:

$ mkdir -p ~/firmware

Move to your newly created firmware folder/directory:

$ cd ~/firmware

Go to the following site:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek
Expand All @@ -348,7 +420,7 @@ Click on `mt7610u.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Create the needed directory (if necessary):

Expand All @@ -359,7 +431,7 @@ sudo mkdir /lib/firmware/mediatek
Copy the file to the following location:

```
sudo cp mt7610u.bin /lib/firmware/mediatek
sudo cp mt7610u.* /lib/firmware/mediatek
```

Reboot:
Expand All @@ -374,6 +446,14 @@ sudo reboot

To install or update the firmware:

Create a folder/directory to hold the downloaded firmware files. Example:

$ mkdir -p ~/firmware

Move to your newly created firmware folder/directory:

$ cd ~/firmware

Go to the following site:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek
Expand All @@ -382,7 +462,7 @@ Click on `mt7601u.bin`

Click on `plain`

Save file
Save the file to ~/firmware

Create the needed directory (if necessary):

Expand All @@ -393,7 +473,7 @@ sudo mkdir /lib/firmware
Copy the file to the following location:

```
sudo cp mt7601u.bin /lib/firmware
sudo cp mt7601u.* /lib/firmware
```

Reboot:
Expand Down

0 comments on commit c145d82

Please sign in to comment.