Installing a Firmware File into a Directory

Second question of the day yay!

I have been able to successfully install OpenWRT onto my D-Link 885L A2 router with WAN working. According to the Wiki revision A2 requires a extra .bin file to make the wifi function. I used SSH to access the file system and add the .bin file to the appropriate location, using wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/brcm/brcmfmac4366c-pcie.bin. When I use “ls” to check the files in the folder, brcmfmac4366c-pcie.bin shows up. The wiki says to install it, so I tried using:

chmod +x brcmfmac4366c-pcie.bin
./brcmfmac4366c-pcie.bin

However I am getting a syntax error: “unexpected newline.”

If I only add the file to the directory, then once I reset the router it does not launch again which requires a new install of OpenWRT.

Wiki Link: https://openwrt.org/toh/d-link/dir-885l

I am new to OpenWRT and Linus SSH, I really would really appreciate any suggestions. Thanks for your help.

This file is code that executes in a separate dedicated CPU built into the wifi chip. Do not try to execute it on the router CPU.

The wifi driver will copy it over to the wifi chip during bootup, where the chip will store it in RAM and use it until the next time the power is cut. As far as the router CPU is concerned it is an unintelligble blob of data, thus the name. There is no "installation" of this file other than making it accessible in the filesystem at the designated place.

1 Like

Ok good to know. As a mentioned though whenever I reboot the router, after adding the new .bin file it does not start up again, and requires a new firmware install. When its rebooting the power light goes from flashing white to holding a solid white then a solid red each for a few seconds then returning to a flashing white. The old .bin file (brcmfmac4366b-pcie.bin) remains in /lib/firmware/brcm/, might it need to be deleted?

Edit: I have tried removing brcmfmac4366b-pcie.bin and only leaving brcmfmac4366c-pcie.bin. But it also enters same sort of boot loop.

First question - see: Clarification on install on D-Link-885L A2

Downloading a file does that?

Odd...

???

I really donno how you're managing to add instructions from a quite straightforward wiki sentence:

it needs to be installed in /lib/firmware/brcm/

Are you following some other additional instructions?

Perhaps you should reset the OpenWrt and re-try copying the file into /lib/firmware/brcm/ again...without trying to make executable, without executing it, etc.

(It may need the correct permissions, though.)

I have done a clean install of OpenWRT and added brcmfmac4366c-pcie.bin, but I am still experiencing the same boot looping I described earlier.

Edit: for context, I successful reboot only flashes white.

This message seems to describe a similar issue.

I am considering trying older versions of OpenWRT as this user seems to have his wifi stable on 19.07.7. Is there anyway to access old versions of OpenWRT?

Edit: https://downloads.openwrt.org/releases/19.07.7/targets/bcm53xx/generic/

I am not a native Linux user and that may be why I thought install meant execute. As the term install is commonly used in windows to mean execute.

1 Like