# sd8887-mrvl repo gone

**URL:** <https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856>\
**Category:** balenaFin\
**Created:** [September 14, 2020, 12:58pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856 "2020-09-14T12:58:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [September 14, 2020, 12:58pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/1 "2020-09-14T12:58:27Z")

</div>

I’m trying to build a custom Yocto image for the balenaFin, without the rest of balenaOS. I am trying to get the WiFi working, and I see that I need the proprietary driver. I found the recipe at `meta-balena-raspberrypi/recipes-kernel/sd8887-mrvl` but the binary version won’t load due to version mismatch, and the source recipe refers to the repo at `github.com/balena-io/sd8887-mrvl.git` which doesn’t seem to exist. How can I build the module?

```auto
root@fincm3:~# dmesg | grep -E "sd8|wl|ml"
[7.612825] mlan: disagrees about version of symbol module_layout
[15.965080] mlan: disagrees about version of symbol module_layout

```

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [September 14, 2020, 8:38pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/5 "2020-09-14T20:38:56Z")

</div>

Hi, thanks for the report. We will build it and update the repo

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [September 15, 2020, 6:38am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/9 "2020-09-15T06:38:14Z")

</div>

thanks. my image is based on the cm3 and the kernel is newer than the one for raspbian:

```auto
root@fincm3:~# uname -a
Linux fincm3 4.19.75 #1 SMP Thu Sep 10 14:44:40 UTC 2020 armv7l GNU/Linux

```

I did get the open source mwifiex driver working, can you tell me why I should choose the proprietary driver over the in-kernel one?

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [September 15, 2020, 8:21am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/13 "2020-09-15T08:21:48Z")

</div>

Hi. I updated the prebuilts for matching the latest kernel we have for the balena fin. This is the PR [https://github.com/balena-os/balena-raspberrypi/pull/536](https://github.com/balena-os/balena-raspberrypi/pull/536)  
At the time we chose this wifi chipset, mwifiex was not working. So we compiled the proprietary driver that the vendor made available for us.  
Are you sure raspbian is at 4.19.75? Last time we checked it was 4.19.118, and that’s what we have at this moment too.

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [September 15, 2020, 9:22am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/14 "2020-09-15T09:22:04Z")

</div>

Raspbian image (lite version) seems to be

```auto
uname -a
Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

```

But I have built a custom Yocto image, excluding the balena layer. My machine config has:

```auto
MACHINEOVERRIDES = "raspberrypi3:${MACHINE}"
include conf/machine/raspberrypi-cm3.conf

RPI_EXTRA_CONFIG="dtoverlay=balena-fin"

KERNEL_DEVICETREE_append_fincm3 = " overlays/balena-fin.dtbo"

```

and this pulls in kernel 4.19.75

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [September 15, 2020, 9:59am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/15 "2020-09-15T09:59:32Z")

</div>

If you excluded the balena image then you should at least match the kernel version we currently have in master. So use [https://github.com/balena-os/balena-raspberrypi/blob/master/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi\_4.19.bbappend](https://github.com/balena-os/balena-raspberrypi/blob/master/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend)

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [September 17, 2020, 8:02am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/17 "2020-09-17T08:02:18Z")

</div>

So I have added a bbappend to build that kernel version:

```auto
root@fincm3:~# uname -a
Linux fincm3 4.19.118 #1 SMP Thu Sep 17 07:05:25 UTC 2020 armv7l GNU/Linux

```

But it didn’t help:

```auto
root@fincm3:~# dmesg | grep -E 'ml'
[7.639686] mlan: disagrees about version of symbol module_layout

```

I can’t use the recipe from meta-balena-raspberry-pi because that inherits kernel-resin from meta-balena layer which then creates all the other dependencies that I am trying to avoid here.

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [September 17, 2020, 12:29pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/20 "2020-09-17T12:29:24Z")

</div>

Which revision of balena-raspberrypi did you build?

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [September 17, 2020, 12:44pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/21 "2020-09-17T12:44:50Z")

</div>

I am not including meta-balena-raspberrypi layer. I can’t build that recipe because it depends on kernel-resin from meta-balena/meta-balena-common

I copied some parts from linux-raspberrypi\_4.19.bbappend into my own layer:

```auto
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI_append_fincm3 = " \
	file://0004-mmc-pwrseq-Repurpose-for-Marvell-SD8777.patch \
	file://0005-balena-fin-wifi-sta-uap-mode.patch \
"

SRC_URI_append = " \
	file://0002-wireless-wext-Bring-back-ndo_do_ioctl-fallback.patch \
"

LINUX_VERSION = "4.19.118"
SRCREV = "fe2c7bf4cad4641dfb6f12712755515ab15815ca"

```

I also copied sd8887-mrvl-prebuilt.bb from meta-balena-raspberrypi into my layer. meta-balena-raspberrypi is at 16c19486a1279a9677888bd920920a87596d74b9 which includes your updated binaries

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [September 17, 2020, 12:53pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/22 "2020-09-17T12:53:32Z")

</div>

I’m trying to do what I think @mvargasevans was doing in this thread: [Connect to wifi](https://forums.balena.io/t/connect-to-wifi/4543/74) and this one: [BalenaFin Yocto Layer](https://forums.balena.io/t/balenafin-yocto-layer/35768)

Unfortunately there was no follow up on whether they managed to get it working.

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [September 25, 2020, 3:06pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/34 "2020-09-25T15:06:12Z")

</div>

Hi, can you also make sure you have `CONFIG_PWRSEQ_SD8787=y` in your kernel config?

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [October 2, 2020, 8:27am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/36 "2020-10-02T08:27:34Z")

</div>

Hi,

I did not have that set. Updated and recompiled but still not working. I carried these three patches over from your recipe:

- 0002-wireless-wext-Bring-back-ndo\_do\_ioctl-fallback.patch
- 0004-mmc-pwrseq-Repurpose-for-Marvell-SD8777.patch
- 0005-balena-fin-wifi-sta-uap-mode.patch

```auto
root@fincm3:~# zcat /proc/config.gz | grep -E 'PWRSEQ_SD8787'
CONFIG_PWRSEQ_SD8787=y
root@fincm3:~# modprobe sd8xxx
modprobe: ERROR: could not insert 'bt8xxx': Exec format error
modprobe: ERROR: could not insert 'mlan': Exec format error
modprobe: ERROR: could not insert 'sd8xxx': Operation not permitted
root@fincm3:~# dmesg | tail
[58918.323880] bt8xxx: disagrees about version of symbol module_layout
[58923.343636] mlan: disagrees about version of symbol module_layout

```

---

<div class="post-metadata">

**Author:** ![georgiats](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/georgiats/32/2571_2.png) [@georgiats](https://forums.balena.io/u/georgiats)\
**Post date:** [October 6, 2020, 11:33am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/39 "2020-10-06T11:33:54Z")

</div>

Hi Paul,  
I’d like ask if you managed to follow my collegue’s suggestion to set up CONFIG\_PWRSEQ\_SD8787=y in your kernel config. You mention you did not have that set.  
You do need some extra instructions regarding that?

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [October 6, 2020, 2:29pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/41 "2020-10-06T14:29:00Z")

</div>

Hi @georgiats , see my previous comment. I have now set it, but it didn’t fix the issue. maybe it wasn’t clear, those commands are what I run on my latest image, to prove that its really set! Also, the patch `0004-mmc-pwrseq-Repurpose-for-Marvell-SD8777.patch` must be applied correctly as otherwise it would have built that as a module.

---

<div class="post-metadata">

**Author:** ![alexgg](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@alexgg](https://forums.balena.io/u/alexgg)\
**Post date:** [October 6, 2020, 5:51pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/42 "2020-10-06T17:51:33Z")

</div>

Hi Paul, as you probably know the modules need to be built against exactly the same kernel they are to be loaded to. Those error messages point to this not being the case. Some possible reason for this is Yocto building the kernel but using a cached version of the target image that do not include the new modules.  
Could you paste the output of `modinfo` run against both one of the modules already loaded in the kernel (check lsmod) and then the failing modules?

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [October 7, 2020, 6:52am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/44 "2020-10-07T06:52:32Z")

</div>

Yes I understand that, and I assume there is some other patch or config option that is causing the difference between the kernel I build and what the module is expecting. The kernel in the image is correct, as it did build in pwrseq\_sd8787 whereas without the patch I mentioned it would build as a module.

modinfo output as requested:

```auto
root@fincm3:~# modinfo cfg80211
filename: /lib/modules/4.19.118/kernel/net/wireless/cfg80211.ko
alias: net-pf-16-proto-16-family-nl80211
description: wireless configuration support
license: GPL
author: Johannes Berg
srcversion: 1461DB02C03AB8A9F6E50DF
depends: rfkill
intree: Y
name: cfg80211
vermagic: 4.19.118 SMP mod_unload modversions ARMv7 p2v8 
parm: bss_entries_limit:limit to number of scan BSS entries (per wiphy, default 1000) (int)
parm: ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
parm: cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)
root@fincm3:~# modinfo mlan
filename: /lib/modules/4.19.118/kernel/net/wireless/mlan.ko
license: Marvell Proprietary
version: C651
author: Marvell International Ltd.
description: M-WLAN MLAN Driver
srcversion: 1E9C8967EEEB4A865A2342B
depends:        
name: mlan
vermagic: 4.19.118 SMP mod_unload modversions ARMv7 p2v8

```

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [October 8, 2020, 7:47pm UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/47 "2020-10-08T19:47:35Z")

</div>

Hi, can you share the generated .config you get when you compiled your kernel?

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [October 9, 2020, 9:14am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/49 "2020-10-09T09:14:25Z")

</div>

Here is the config, from running kernel: [https://drive.google.com/file/d/19lPUsZBcbXgQQNQzXdnFXdpIItlKFHTF/view?usp=sharing](https://drive.google.com/file/d/19lPUsZBcbXgQQNQzXdnFXdpIItlKFHTF/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![alexgg](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@alexgg](https://forums.balena.io/u/alexgg)\
**Post date:** [October 12, 2020, 8:43am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/53 "2020-10-12T08:43:45Z")

</div>

Hi Paul, could you share the whole device repository with your modifications so we can built and reproduce this ourselves? At this point that’s the only way we could help any further.

---

<div class="post-metadata">

**Author:** ![crazystick](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/crazystick/32/4489_2.png) [@crazystick](https://forums.balena.io/u/crazystick)\
**Post date:** [October 12, 2020, 8:54am UTC](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856/54 "2020-10-12T08:54:49Z")

</div>

I can work on that. I’ll have to remove some proprietary stuff, and then check I still get the same result.

[Next page](https://forums.balena.io/t/sd8887-mrvl-repo-gone/188856.md?page=2)
