New Post: Shipping new SparkLAN Wifi cards with Librem 5

Did you do, on the phone: sudo apt install librem5-fw-jail
(after doing the flashing) and then reboot?

1 Like

yes i did but it was already installed. just redit the entire process same result.

2 Likes

Because it is outputting to a file in the files subdirectory, I think it is assuming that you have done
cd librem5-devkit-tools
before wget ... in turn before the actual flashing.

1 Like

Ah gotcha that makes sense and thanks for pointing that out: however just tried that wget command from git still gives the same error regarding file u-boot-librem5.imx’ no such file or directory’.

Apart from the flashing script not working out of the box to create the firmware jail, which you can work around- i think my issue is not having the actual driver for the module. I doubt the firmware.sqsh is the actual driver.

Update: running the wget command ’ ```
wget https://source.puri.sm/Librem5/firmware-librem5-nonfree/-/jobs/389262/artifacts/raw/firmware.sqsh -O files/firmware.sqsh

1 Like

It works for me. For clarity, the exact command that I am doing is

wget https://source.puri.sm/Librem5/firmware-librem5-nonfree/-/jobs/389262/artifacts/raw/firmware.sqsh -O files/firmware.sqsh

and I am doing it while in a directory that has a subdirectory called files
and the resulting file firmware.sqsh in the subdirectory files has size 1101824.

For the avoidance of doubt, that option -O is a capital letter O.

No, it’s a container for the firmware that has to be loaded into the device by the driver. I don’t know the details but the container is SquashFS, I believe.

2 Likes

We could be talking about different wget commands so …

wget -O files/u-boot-librem5.imx https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/lastSuccessfulBuild/artifact/output/uboot-librem5/u-boot-librem5.imx

works for me and the resulting file u-boot-librem5.imx has size 1073880.

2 Likes

thanks for the help the wget commands work correctly when inside the ‘/home/purism/librem5-devkit-tools/scripts/’ folder, sorry for the confusion. Just wished the modem would also work 8). @irwinewade you are a genius after running:

‘unsquashfs firmware.sqsh’ the following files show:

x-special/nautilus-clipboard
copy
file:///home/purism/librem5-devkit-tools/scripts/files/squashfs-root/brcm/BCM4362A2.hcd
file:///home/purism/librem5-devkit-tools/scripts/files/squashfs-root/brcm/brcmfmac43752-sdio.bin
file:///home/purism/librem5-devkit-tools/scripts/files/squashfs-root/brcm/brcmfmac43752-sdio.clm_blob
file:///home/purism/librem5-devkit-tools/scripts/files/squashfs-root/brcm/brcmfmac43752-sdio.txt

So one of these i bet is a driver? Not knowing which file i just copied them all into the ‘/usr/share/firmware-librem5-nonfree/firmware/brcm/’ folder and it worked right away after reboot!! I am very happy now. And its pretty fast even with VPN. Measuring at about 10ft distance from my wifi modem and around the corner with a glass door inbetween.

4 Likes

No, I don’t think so. I think all the files relate to firmware (to run on the card itself).

It’s great that you got it working - that is a proof of concept that all the pieces are working. However I actually think you have technically not got this set up correctly. I think something is wrong with your firmware jail. Later on maybe someone can help you to get to the bottom of that - because it may be a problem for you in the future.

Just looking on an x86 PC, I think the driver would be more like

/usr/lib/modules/$kernelversion/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko

where $kernelversion is replaced by the kernel version as displayed by uname -r

but things could be different on ARM. I think the point is from Purism that this is a mainline driver, not requiring maintenance from the manufacturer as much as the Redpine driver. So the driver should just be there.

1 Like

they exist in the location you mentioned for my kernel 6.1.0, i also have an older kernel hangin out 6.0.0.

‘/usr/lib/modules/kernel#/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko’

that file exists but didnt by itself work for me without copying the “firmware” files directly. There is a redpine module folder with a .ko file as well. Do these just pull from an online repository? Since .ko doesnt appeasr to be a driver itself.

1 Like

A .ko file is one of these: https://en.wikipedia.org/wiki/Loadable_kernel_module

For all intents and purposes, that is the driver.

I don’t know exactly in this case whether the .ko file is installed when you install the operating system, or installed subsequently in the normal way, or built during installation. As long as the file is there at all, that is a good sign.

I’m fairly convinced that your problem is with the firmware jail, not with the driver.

So I would think either the firmware jail in the flash is not set up correctly, or the startup code is not correctly accessing the firmware jail to get the firmware out of jail. (Your own work shows that the firmware itself is fine.)

2 Likes

You’re supposed to run the flash script from a PC with the phone in flash mode, not from the phone.

If you unpacked and placed the files manually, you’re not using the jail but just placed the files into your filesystem and they’ll be gone after a OS reflash.

5 Likes

if you already have the brcm80211 folder do we need to flash the firmware?

1 Like

brcm80211 folder is completely unrelated. You want to check for /usr/share/firmware-librem5-nonfree/firmware/brcm. If it’s there and there are files in it, you don’t have to flash anything.

4 Likes

Does this mean that I need to (completely) re-flash the L5 before I can use the SparkLAN Wifi card?

1 Like

No, you only need to flash the jail from the PC. This goes into a specific memory area.

1 Like

No. You only may have to flash the SPI NOR memory, which is done in a very similar way (by putting your phone into flash mode), but is separate from eMMC where your OS is stored.

4 Likes

OK, thanks.
I was worried loosing all my settings/apps.

2 Likes

woops i missed that part, no wonder it didn’t do what it was supposed to do.

1 Like

How is shipping to Europe handled? Will I have to handle customs and pay VAT (as I did with buying Librem5)?

1 Like

Yep, you need to pay vat, handling cost, banking charges. It does make the new card expensive for non US customers

1 Like