How to change files on Read-only file system

  • Thank you both for helping, but I don't think this works. Maybe I've done something wrong:

    I've installed this version first (realizing that there's a newer one: 8.90.008 after installing it, could this be the reason why it's not working?)

    Created directory, and copied the txt file over.

    Edited 90-my-firmware.conf

    After reboot, I still have no WiFi. Tried multiple reboots, with and without LAN cable plugged in, always the same outcome where WiFi isn't recognized.

  • Maybe this might help with debugging:
    I've loaded Linux Mint 19 (64-bit) into a Micro SD and booted it from my Mini PC.
    This is the outcome before I installed the nvram txt file:
    sandintv - Pastebin.com

    And the problem was fairly obvious:

    [   12.074660] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006

    [   12.075734] usbcore: registered new interface driver brcmfmac

    [   12.114266] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2

    This is the dmesg after I've installed nvram txt file in my Mint 19:
    sandintv - Pastebin.com

    No more errors, and Wifi is working.

    However, LibreELEC doesn't even pop up that message.

    I tried copying the entire brcm content, including .bin and .fw files from Mint into LibreELEC's newly brcm folder I created, but that didn't work either.

    Even after copying all entire brcm content from mint into libreelec, this is my new dmesg:
    http://ix.io/1uol
    It seems like it's not even aware of the WiFi.

    Either way, it was worth taking a shot, and thank you for your help, but I suppose I'll have to continue using the LAN communication.

    Edited once, last by sandin: broken link(s) (November 29, 2018 at 2:33 PM).

  • It looks like we don't have BRCMFMAC_SDIO enabled in the x86 kernel so LibreELEC is missing the driver for your Wifi chip (having Wifi connected via MMC/SDIO on x86 is rather unusual)

    linux.x86_64.conf#l2057

    I'll ping my LE colleagues and check if we can add that option.

    so long,

    Hias

  • That would be great. In that case I'll wait for an update.

    If you need anything, if you need someone to test it out after the change I'm more than willing to help/test.

  • Here's what I happened:
    First, I removed everything from: /storage/my-firmware/lib/firmware/brcm

    It still didn't have the WiFi, however after I ran dmesg, this is what I got: http://ix.io/1uqd

    Code
    [   26.449508] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
    [   26.449788] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2

    At least it's aware of the WiFi now!

    So then I copied all the files from brcm folder from my Mint 19 into brcm folder in LibreELEC, all the BIN and FW and TXT files. And did a reboot.
    This is the dmesg after reboot with Mint 19 brcm files: http://ix.io/1uqf

    Code
    [   26.823378] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
    [   26.824235] usbcore: registered new interface driver brcmfmac
    ...
    [   28.101239] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
    [   28.101402] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.clm_blob failed with error -2
    [   28.101410] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
    [   28.101847] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  1 2015 07:29:38 version 7.45.18 (r538002) FWID 01-6a2c8ad4

    The WiFi does work! Even the 5GHz network works:
       

    Even after reboot, wifi still works, and auto-connects to my 5GHz network. It works really well. No connection drops.

    However there were few issues I've noticed. I don't know if this is related to the drivers I copy-pasted or the system itself: When I connect to the 2.4GHz network, and then try to switch to 5GHz network, I get a black screen and KODI resets itself (not the entire box, only KODI as an app), I get only KODI 18.0 LEIA boot screen, not the LibreELEC boot screen. Also, if I delete all currently connected networks, and I keep switching between Connections and Network setting multiple times, really quickly, I get KODI app to crash again. But if I don't fiddle with connections, the connection is stable and doesn't drop. I can watch youtube streams and twitch streams without any issues and no connection dropouts.

    If you're interested in analyzing the driver files, I've uploaded them to the g-drive.

  • Thanks a lot for the detailed feedback!

    It looks like we were not only missing the kernel driver but also the brcmfmac43455-sdio.bin file - we'll include that in the next release.

    You'll still have to take care about the brcmfmac43455-sdio.txt file yourself, but adding just that single file to the my-firmware directory and sticking to the kernel overlay mechanism should be fine I guess (this file is not only missing in Linux mint but also in the linux kernel firmware repository so there's not much we can do about it for now).

    As for the kodi crash: If it wasn't a one-off glitch and you are able to reproduce that please open a ticket with some more information here: Ticket System - LibreELEC Forum with a link to your log. Best use the logfile upload function in LibreELEC settings, that will upload all relevant logs including the kodi_crash.log file with hopefully some useful information.

    so long,

    Hias

  • Code
    [   28.101402] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.clm_blob failed with error -2
    [   28.101410] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available

    ^ this stuff is harmless (most chipsets don't have clm_blob files) and can be ignored.

  • HiassofT I can confirm that it works! I've removed the kernel overlay, I've even removed the brcm folder entirely, just to be sure. And the WiFi works out of the box. It connects to both 2.4 and 5Ghz network.

    As for the crash, I was able to replicate it, and I've reported it.

    chewitt , thanks, good to know. I'm happy as long as I'm not forced to use the cable.

  • Thanks a lot for the feedback, good to know this is working!

    We'll look for a way to properly add the brcm firmware files in the next LE release (the linked build was just a quick test).

    so long,

    Hias

  • HiassofT: What about setting overlay automatically from /storage/.config/firmware/ folder? So only files in appropriate should be copied there and after reboot it would work. Without making .conf file.

  • HiassofT: What about setting overlay automatically from /storage/.config/firmware/ folder? So only files in appropriate should be copied there and after reboot it would work. Without making .conf file.

    I had thought about that as well. But it was puzzling me why adding firmware via .config/firmware shouldn't work so I gave it a try and - guess what - it worked as expected.

    I created an RPi2 image with the RPi wifi firmwares removed and added them in .config/firmware/brcm/:

    Then booted on a RPi3B (which needs the brcmfmac43430-sdio bin and txt files) with dyndbg="module firmware_class +p" on the kernel command line to trace the kernel firmware loader.

    The kernel first checks /lib/firmware/updates/4.19.4, then /lib/firmware/updates which is a symlink to /storage/config/firmware - and succeeds for the bin and txt files and fails for the clm_blob (which isn't available anywhere). In the clm_blob calls one can see though that /lib/firmware/4.19.4 and /lib/firmware are probed afterwards.

    bin:

    Code
    [ 6.223611] firmware_class: __allocate_fw_priv: fw-brcm/brcmfmac43430-sdio.bin fw_priv=1d7ef5e3
    [ 6.223669] brcmfmac mmc1:0001:1: loading /lib/firmware/updates/4.19.4/brcm/brcmfmac43430-sdio.bin failed with error -2
    [ 6.244375] firmware_class: fw_set_page_data: fw-brcm/brcmfmac43430-sdio.bin fw_priv=1d7ef5e3 data=0caa91ae size=388739

    txt:

    Code
    [ 6.244390] firmware_class: __allocate_fw_priv: fw-brcm/brcmfmac43430-sdio.txt fw_priv=bcdb1585
    [ 6.244425] brcmfmac mmc1:0001:1: loading /lib/firmware/updates/4.19.4/brcm/brcmfmac43430-sdio.txt failed with error -2
    [ 6.245707] firmware_class: fw_set_page_data: fw-brcm/brcmfmac43430-sdio.txt fw_priv=bcdb1585 data=6ad77431 size=1125

    clm_blob:

    Code
    [ 6.417063] firmware_class: __allocate_fw_priv: fw-brcm/brcmfmac43430-sdio.clm_blob fw_priv=1d7ef5e3
    [ 6.417107] brcmfmac mmc1:0001:1: loading /lib/firmware/updates/4.19.4/brcm/brcmfmac43430-sdio.clm_blob failed with error -2
    [ 6.417145] brcmfmac mmc1:0001:1: loading /lib/firmware/updates/brcm/brcmfmac43430-sdio.clm_blob failed with error -2
    [ 6.417167] brcmfmac mmc1:0001:1: loading /lib/firmware/4.19.4/brcm/brcmfmac43430-sdio.clm_blob failed with error -2
    [ 6.417188] brcmfmac mmc1:0001:1: loading /lib/firmware/brcm/brcmfmac43430-sdio.clm_blob failed with error -2
    
    [ 6.417199] firmware_class: __free_fw_priv: fw-brcm/brcmfmac43430-sdio.clm_blob fw_priv=1d7ef5e3 data= (null) size=0

    So I'd say everything's fine and if loading firmware via .config/firmware doesn't work on some systems that has to be investigated in detail.

    so long,

    Hias

  • Well, I tried the same and I didn't saw files from brcm folder. But maybe I made some small mistake. If you are saying that it works then it is ok.

    But you don't see files/folder from /storage/.config/firmware on /usr/lib/firmware/ right?

  • Well, I tried the same and I didn't saw files from brcm folder. But maybe I made some small mistake. If you are saying that it works then it is ok.

    But you don't see files/folder from /storage/.config/firmware on /usr/lib/firmware/ right?

    It's a bit of a symlink jungle, easy to get lost (maybe I should clean that up a bit some time):

    /lib/firmware symlinks to /var/lib/firmware, a directory in a ramdisk

    /var/lib/firmware gets populated with symlinks to the various kernel overlay directories, from /usr/lib/kernel-overlays and/or addons.

    Currently only /usr/lib/kernel-overlays/base/lib/firmware contains firmware files and that directory has a symlink "updates" pointing to /storage/.config/firmware

    Thinking about it we may run into problems when we add firmwares via overlays (which we don't do at the moment) as that may create symlinks in /storage/.config/firmware. Tricky. maybe handling .config/firmwares via a special case in the kernel overlay system may be better - I'll think about it some more.

    so long,

    Hias