vendredi 29 janvier 2021

Kivy recipe for Yocto

Here is the recipe I've made recently to integrate Kivy 2.0.0 in Yocto (dunfell).

It's probably far from perfect, but I guess it can help other Yocto+Kivy users like me. Note that I had to patch the of Kivy to work around a bug. This bug has been fixed now, so this patch won't be useful for future versions.

SUMMARY = "Recipie to embedded the Python PiP Package Kivy"

LIC_FILES_CHKSUM = "file://LICENSE;md5=f0c851d60495c7e27225a819e179208a"



inherit dos2unix pypi setuptools3

SRC_URI += " \
    file:// \
SRC_URI[md5sum] = "410d3968c7f45171285bcac76bbad265"
SRC_URI[sha256sum] = "d25e44eb44e43762b2fd0c5874e51954e0f1181fd9800d8a6756be6d084812d8"

DEPENDS += " \
    gstreamer1.0 \
    gstreamer1.0-python \
    libsdl2 \
    libsdl2-image \
    libsdl2-mixer \
    libsdl2-ttf \
    pango \
    python3-cython-native \

RDEPENDS_${PN} = " \
    gstreamer1.0 \
    gstreamer1.0-python \
    libsdl2 \
    libsdl2-image \
    libsdl2-mixer \
    libsdl2-ttf \
    pango \
    python3-docutils \
    python3-fcntl \
    python3-image \
    python3-kivy-garden \
    python3-pillow \
    python3-pygments \

do_install_append() {
    # drop the examples
    # XXX(Jflesch): by default they shouldn't have been built by
    # Kivy's Therefore they shouldn't have been installed
    # either. Yet somehow here they are.
    rm -rf ${D}/usr/share

Kivy-garden is also required by Kivy, so I also had to make a recipe for it. You can download the complete recipes and patches for Kivy and Kivy-garden here: yocto_recipe_kivy.tar.gz.

If like me you are working on an Olinuxino A20 (Micro or Lime2):

  • Do not try to use Linux 3.4 + Xorg + sunxi-mali. Use Wayland and the lima driver from the mainline kernel (and Weston and Xwayland if you have to).
  • You must modify the Kivy configuration: kivy.config.Config.set('graphics', 'multisamples', 0). Otherwise you will just get a black screen/window.

I've made it work with the following settings in local.conf:

# Mainline kernel drivers + disable sunxi-mali
MACHINEOVERRIDES .= ":use-mailine-graphics"

ROOT_HOME = "/root"

    egl \
    ext4 \
    gles \
    gles2 \
    opengl \
    opengles \
    opengles2 \
    systemd \
    wayland \
    x11 \

(I'm pretty sure half of those flags don't actually exist, but meh).

mercredi 9 septembre 2020

Raspberry pi 4 + K3s + Rook + Ceph

Use Ubuntu 20.04.1 (Raspbian is only available as armhf images ; we need arm64). In /etc/modules, add libceph and rbd Install K3s Clear the disks you want to use as Ceph storages As root: sudo apt install ceph-common git clone cd rook Switch to the raspbernetes  […]

Lire la suite

samedi 18 juillet 2020

Segway Kickscooter Ninebot ES-2 trials

My girlfriend and me have bought the very same electric kick scooter, the Segway Kickscooter Ninebot ES-2. We have done the very same trip at the same time. Both scooters are brand new. This showcase very nicely the importance of weight regarding electric kick-scooter autonomy.

Lire la suite

lundi 14 novembre 2016

Paperwork for Windows

Update: As of version 1.1.0, Paperwork for Windows is now entirely free.

I've finally completed the portage of Paperwork to Windows \o/

Lire la suite

dimanche 24 janvier 2016

Git dumb protocol

Git supports various protocols. One of them is called the "dumb" protocol.

This dumb protocol is based on HTTP+Webdav. There is also a smart protocol, but this one is not really HTTP compliant (it starts as HTTP for an handshake, but then switches to a custom protocol).

The dumb protocol is really handy in scenarios where you can only expose a Git repository through standard HTTP+WebDav. For instance, if you have a firewall in front of your webserver. Or if you want to implement a "fake" Git repository using a standard web framework (Django for instance).

Lire la suite

mardi 1 septembre 2015

Git, MariaDB et Python3

Pour un projet perso top secret, je me suis retrouvé dans une situation où je souhaitais être capable de :

  • stocker un grand nombre de petits dépôts Git
  • les avoir en haute-disponibilité (99.9% d'uptime)
  • encaisser une forte charge en lecture sur ces dépôts
  • être capable de monter en charge verticalement mais aussi horizontalement rapidement si besoin est
  • toujours avoir un contenu apparent cohérent : Quand on fait un push sur une des machines du cluster et qu'on enchaîne sur un pull depuis une autre, il faut que le contenu du push soit systématiquement apparent
  • accéder et manipuler ces dépôts depuis un programme en Python 3.

Autrement dit, il me fallait essentiellement un moyen de répliquer des dépôts Git sur plusieurs machines efficacement.

Lire la suite

samedi 5 octobre 2013

L'obsolescence programmée


Hier soir, mon scanner m'a laché. Dans ce genre de situation, j'ai pris le réflexe d'ouvrir l'engin pour voir si je ne peux pas le réparer moi même. Pour le coup, j'ai pu constater que le fabriquant (HP) a été radin sur plusieurs points et que cette panne serait arrivée tôt ou tard.

Lire la suite

dimanche 25 août 2013

Synchronizing files and directories from GNU/Linux to Android

In the long term, I plan to port Paperwork to Android. Before that, there is one problem : how to keep a synchronized copy of all the scans on an Android devices ?

Lire la suite