# \[SOLVED\] Adding framebuffer support

**URL:** <https://mangoh.discourse.group/t/solved-adding-framebuffer-support/2571>\
**Category:** mangOH Red\
**Created:** [April 18, 2019, 8:49am UTC](https://mangoh.discourse.group/t/solved-adding-framebuffer-support/2571 "2019-04-18T08:49:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![c.pahl](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@c.pahl](https://mangoh.discourse.group/u/c.pahl)\
**Post date:** [April 18, 2019, 8:49am UTC](https://mangoh.discourse.group/t/solved-adding-framebuffer-support/2571/1 "2019-04-18T08:49:41Z")

</div>

Hey there,

I’m planning to attach a display to a MangOH Red via SPI (an Adafruit ILI9341 to be exact).  
I wonder now what’s the best way to go about it. In the best case I’d like to have framebuffer support for it (i.e. have a `/dev/fb0`). [There are drivers](https://github.com/notro/fbtft) for the display I use, but they fail to load since the kernel coming with `18.10.3` is compiled without any framebuffer support at all (which is why the driver fails to load):

```bash
$ cat /proc/kallsyms | grep register_framebuffer | wc -l
0

```

Do you think it’s worth the hassle to compile an own kernel/image via yocto and all that comes with it or should I just go for interfacing with the display via SPI? If so, I guess I would need to port some Arduino library.

* * *

For reference, there is also [this guide](https://github.com/mangOH/mangOH/tree/master/experimental/waveshare_eink/linux_kernel_modules), but it fails for me on the `bitbake linux-yocto -c kernel_configme -f` step with this message:

```auto
WARNING: No bb files matched BBFILE_PATTERN_swi-mdm9xxx-bin '^/dist/yocto/meta-swi/../meta-swi-extras/meta-swi-mdm9xxx-bin/'
WARNING: No bb files matched BBFILE_PATTERN_swi-mdm9xxx-bin '^/dist/yocto/meta-swi/../meta-swi-extras/meta-swi-mdm9xxx-bin/'
ERROR: Nothing PROVIDES 'linux-yocto'
ERROR: linux-yocto was skipped: incompatible with machine swi-mdm9x28 (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto was skipped: incompatible with machine swi-mdm9x28 (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto was skipped: incompatible with machine swi-mdm9x28 (not in COMPATIBLE_MACHINE)

```

_Edit:_ I see there’s some sort of mismatch in the machine name:

```bash
yocto/build_bin$ grep COMPATIBLE_MACHINE ../meta-swi/meta-swi-mdm9x15/recipes-kernel/linux/linux-yocto_3.14.bb
COMPATIBLE_MACHINE_swi-mdm9x15 = "swi-mdm9x15"
COMPATIBLE_MACHINE_swi-mdm9x15 = "(swi-mdm9x15)"
yocto/build_bin$ grep 'MACHINE' conf/local.conf | grep -v '#'
MACHINE = "swi-mdm9x28-wp"

```

Can this be right? Is `linux-yocto` even the right target?

---

<div class="post-metadata">

**Author:** ![Thong](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/thong/32/1017_2.png) [@Thong](https://mangoh.discourse.group/u/Thong)\
**Post date:** [April 22, 2019, 7:46am UTC](https://mangoh.discourse.group/t/solved-adding-framebuffer-support/2571/2 "2019-04-22T07:46:21Z")

</div>

Hi c.pahl,  
Please try to use **bitbake linux-quic -c menuconfig -f** command instead of **bitbake linux-yocto -c kernel\_configme -f** command to cross that error

Thanks,  
Thong

---

<div class="post-metadata">

**Author:** ![c.pahl](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@c.pahl](https://mangoh.discourse.group/u/c.pahl)\
**Post date:** [April 23, 2019, 9:24am UTC](https://mangoh.discourse.group/t/solved-adding-framebuffer-support/2571/3 "2019-04-23T09:24:19Z")

</div>

Hello @Thong,

thank you for your answer.  
After some more tinkering I have build an image with the following command:

```bash
# We only want to re-build the linux image,
# no need to 
export LEGATO_BUILD=0
# Build the base installation:
make image_bin
# Source the build tools:
. ./poky/oe-init-build-env ./build_bin
# Set linux config / enable framebuffer etc.:
# (See also https://bugzilla.yoctoproject.org/show_bug.cgi?id=2256#c7)
bitbake linux-quic -c cleansstate
# For framebuffer support enable:
# Drivers options -> Graphic drivers -> Framebuffer Support.
# (and whatever else you'd like to)
# Hint to myself: do not save the config somewhere else or it won't be used.
# Just exit menuconfig with a "yes" to save.
bitbake linux-quic -c do_menuconfig -f
bitbake -C compile -f linux-quic
bitbake linux-quic
# Build the image:
bitbake -c cleansstate mdm9x28-image-minimal
bitbake mdm9x28-image-minimal

```

* * *

For some reason I was not able to flush the image via `fwupdate`:

```auto
fwupdate download ~/workspace/legato-dist/yocto/build_bin/tmp/deploy/images/swi-mdm9x28-wp/yocto_wp76xx.4k.cwe
Connecting to service ...
Connecting to service ...
Download started ...
Download successful
Timeout, server 192.168.2.2 not responding.

```

* * *

I was then able to use `swiflash` to flash the device though:

- Set dip switch 7 to on
- Power off device and reboot.
- Run `sudo swiflash -m wp76xx -i ~/workspace/legato-dist/yocto/build_bin/tmp/deploy/images/swi-mdm9x28-wp/yocto_wp76xx.4k.cwe`. While this is running, switch the dip 7 off.

* * *

So far so good, I can see by `uname -v` that a newer kernel was build and it indeed has framebuffer support:

```bash
$ cat /proc/kallsyms | grep register_framebuffer | wc -l
7

```

Now on to actually getting drivers to work 🙂

---

<div class="post-metadata">

**Author:** ![gavinoimparato1](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@gavinoimparato1](https://mangoh.discourse.group/u/gavinoimparato1)\
**Post date:** [March 16, 2021, 11:32am UTC](https://mangoh.discourse.group/t/solved-adding-framebuffer-support/2571/4 "2021-03-16T11:32:05Z")

</div>

sorry, do you remember how many time this operation required? After one hour the situation is still this:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/3/332f3708df3553c7cef160cbd65569a2cbe3fe3a.png)

Could be there any problem?
