Free Electrons at Embedded and Kernel Recipes 2017

Kernel RecipesEmbedded RecipesThe Kernel Recipes conference has become over the last few years a very interesting conference, with an original single track format and a limited number of attendees, which fosters communication and networking. Held in Paris, France, it is obviously a conference of choice for Free Electrons engineers to attend and speak at. We participated to multiple editions, Free Electrons engineer Maxime Ripard gave a talk at the 2014 edition, while Thomas Petazzoni gave a talk at the 2013 edition.

In 2017, the organizers decided to complement the 3-day Kernel Recipes conference with a 1-day Embedded Recipes event, and Free Electrons will participate by having two engineers attend those events and give talks:

  • Mylène Josserand will give an Introduction to Yocto Project and OpenEmbedded during the Embedded Recipes event
  • Maxime Ripard will give an Introduction to the Linux DRM subsystem during the Kernel Recipes event

If you’re interested in attending one of those events, make sure to register on time, there are only 100 seats available!

Updated bleeding edge toolchains on toolchains.free-electrons.com

Two months ago, we announced a new service from Free Electrons: free and ready-to-use Linux cross-compilation toolchains, for a large number of architectures and C libraries, available at http://toolchains.free-electrons.com/.

Bleeding edge toolchain updates

All our bleeding edge toolchains have been updated, with the latest version of the toolchain components:

  • gcc 7.2.0, which was released 2 days ago
  • glibc 2.26, which was released 2 weeks ago
  • binutils 2.29
  • gdb 8.0

Those bleeding edge toolchains are now based on Buildroot 2017.08-rc2, which brings a nice improvement: the host tools (gcc, binutils, etc.) are no longer linked statically against gmp, mpfr and other host libraries. They are dynamically linked against them with an appropriate rpath encoded into the gcc and binutils binaries to find those shared libraries regardless of the installation location of the toolchain.

However, due to gdb 8.0 requiring a C++11 compiler on the host machine (at least gcc 4.8), our bleeding edge toolchains are now built in a Debian Jessie system instead of Debian Squeeze, which means that at least glibc 2.14 is needed on the host system to use them.

The only toolchains for which the tests are not successful are the MIPS64R6 toolchains, due to the Linux kernel not building properly for this architecture with gcc 7.x. This issue has already been reported upstream.

Stable toolchain updates

We haven’t changed the component versions of our stable toolchains, but we made a number of fixes to them:

  • The armv7m and m68k-coldfire toolchains have been rebuilt with a fixed version of elf2flt that makes the toolchain linker directly usable. This fixes building the Linux kernel using those toolchains.
  • The mips32r5 toolchain has been rebuilt with NaN 2008 encoding (instead of NaN legacy), which makes the resulting userspace binaries actually executable by the Linux kernel, which expects NaN 2008 encoding on mips32r5 by default.
  • Most mips toolchains for musl have been rebuilt, with Buildroot fixes for the creation of the dynamic linker symbolic link. This has no effect on the toolchain itself, but also the tests under Qemu to work properly and validate the toolchains.

Other improvements

We made a number of small improvements to the toolchains.free-electrons.com site:

  • Each architecture now has a page that lists all toolchain versions available. This allows to easily find a toolchain that matches your requirements (in terms of gcc version, kernel headers version, etc.). See All aarch64 toolchains for an example.
  • We added a FAQ as well as a news page.

As usual, we welcome feedback about our toolchains, either on our bug tracker or by mail at info@free-electrons.com.

“Porting Linux on ARM” seminar road show in France

CaptronicIn December 2015, Free Electrons engineer Alexandre Belloni gave a half-day seminar “Porting Linux on ARM” in Toulouse (France) in partnership with french organization Captronic. We published the materials used for the seminar shortly after the event.

We are happy to announce that this seminar will be given in four different cities in France over the next few months:

  • In Montpellier, on April 14th from 2 PM to 6 PM. See this page for details.
  • In Clermont-Ferrand, on April 27th from 2 PM to 6 PM. See this page for details.
  • In Brive, on April 28th from 9 AM to 1 PM. See this page for details.
  • Near Chambéry, on May 25th from 9:30 AM to 5/30 PM. See this page for details.
  • Near Bordeaux, on June 2nd from 2 PM to 6 PM. See this page for details.
  • Near Nancy, on June 16th from 2 PM to 6 PM. See this page for details.

The seminar is delivered in French, and the event is free after registration. The speaker, Alexandre Belloni, has worked on porting botloaders and the Linux kernel on a number of ARM platforms (Atmel, Freescale, Texas Instruments and more) and is the Linux kernel co-maintainer for the RTC subsystem and the support of the Atmel ARM processors.

Free Electrons contributing Linux kernel initial support for Annapurna Labs ARM64 Platform-on-Chip

We are happy to announce that on February 8th 2016 we submitted to the mainline Linux kernel the initial support for Annapurna Labs Alpine v2 Platform-on-Chip based on the 64-bit ARMv8 architecture.

Annapurna Labs was founded in 2011 in Israel. Annapurna Labs provides 32-bit and 64-bit ARM products including chips and subsystems under the Alpine brand for the home NAS, Gateway and WiFi router equipment, see this page for details. The 32-bit version already has support in the official Linux kernel (see alpine.dtsi), and we have started to add support for the quad core 64-bit version, called Alpine v2, which brings significant performance for the home.

This is our initial contribution and we plan to follow it with additional Alpine v2 functionality in the near future.

Free Electrons contributions to Linux 4.5

Adelie PenguinLinus Torvalds just released Linux 4.5, for which the major new features have been described by LWN.net in three articles: part 1, part 2 and part 3. On a total of 12080 commits, Free Electrons contributed 121 patches, almost exactly 1% of the total. Due to its large number of contribution by patch number, Free Electrons engineer Boris Brezillon appears in the statistics of top-contributors for the 4.5 kernel in the LWN.net statistics article.

This time around, our important contributions were:

  • Addition of a driver for the Microcrystal rv1805 RTC, by Alexandre Belloni.
  • A huge number of patches touching all NAND controller drivers and the MTD subsystem, from Boris Brezillon. They are the first step of a more general rework of how NAND controllers and NAND chips are handled in the Linux kernel. As Boris explains in the cover letter, his series aims at clarifying the relationship between the mtd and nand_chip structures and hiding NAND framework internals to NAND. […]. This allows removal of some of the boilerplate code done in all NAND controller drivers, but most importantly, it unifies a bit the way NAND chip structures are instantiated.
  • On the support for the Marvell ARM processors:
    • In the mvneta networking driver (used on Armada 370, XP, 38x and soon on Armada 3700): addition of naive RSS support with per-CPU queues, configure XPS support, numerous fixes for potential race conditions.
    • Fix in the Marvell CESA driver
    • Misc improvements to the mv_xor driver for the Marvell XOR engines.
    • After four years of development the 32-bits Marvell EBU platform support is now pretty mature and the majority of patches for this platform now are improvements of existing drivers or bug fixes rather than new hardware support. Of course, the support for the 64-bits Marvell EBU platform has just started, and will require a significant number of patches and contributions to be fully supported upstream, which is an on-going effort.
  • On the support for the Atmel ARM processors:
    • Addition of the support for the L+G VInCo platform.
    • Improvement to the macb network driver to reset the PHY using a GPIO.
    • Fix Ethernet PHY issues on Atmel SAMA5D4
  • On the support for Allwinner ARM processors:
    • Implement audio capture in the sun4i audio driver.
    • Add the support for a special pin controller available on Allwinner A80.

The complete list of our contributions:

  • Alexandre Belloni (11):
    • clk: at91: Revert “keep slow clk enabled to prevent system hang”
    • of: Add vendor prefix for QiaoDian Xianshi
    • ARM: mxs: dt: cfa10057: fix backlight PWM
    • Merge tag ‘ib-mfd-regulator-rtc-v4.5’ into rtc-next
    • rtc: abx80x: Add Microcrystal rv1805 support
    • rtc: abx80x: add alarm support
    • clockevents/tcb_clksrc: Prevent disabling an already disabled clock
    • ARM: dts: at91: at91sam9n12ek: fix panel compatible string
    • ARM: dts: at91: sama5d4 xplained: properly mux phy interrupt
    • phy: micrel: Ensure interrupts are reenabled on resume
    • phy: micrel: Disable auto negotiation on startup
  • Antoine Tenart (1):
    • MAINTAINERS: alpine: add a new maintainer and update the entry
  • Boris BREZILLON (81):
    • mtd: nand: convert to nand_get_flash_node()
    • mtd: nand: fix drivers abusing mtd->priv
    • mtd: nand: add an mtd_to_nand() helper
    • doc: mtd: nand: update examples to use mtd_to_nand()
    • mtd: nand: fix ONFI parameter page layout
    • ARM: nand: make use of mtd_to_nand() where appropriate
    • sh: nand: make use of mtd_to_nand() where appropriate
    • mtd: nand: make use of mtd_to_nand() in NAND core code
    • staging: mt29f_spinand: make use of mtd_to_nand()
    • mtd: nand: make use of mtd_to_nand() in NAND drivers
    • mtd: nand: embed an mtd_info structure into nand_chip
    • mtd: nand: add nand_to_mtd() helper
    • cris: nand: make use of mtd_to_nand() where appropriate
    • blackfin: nand: make use of mtd_to_nand() where appropriate
    • mips: nand: make use of mtd_to_nand() where appropriate
    • mtd: nand: denali: add missing nand_release() call in denali_remove()
    • mtd: nand: fsmc: create and use mtd_to_fsmc()
    • mtd: nand: nuc900: create and use mtd_to_nuc900()
    • mtd: nand: omap2: create and use mtd_to_omap()
    • mtd: nand: ams-delta: use the mtd instance embedded in struct nand_chip
    • mtd: nand: atmel: use the mtd instance embedded in struct nand_chip
    • mtd: nand: au1550nd: use the mtd instance embedded in struct nand_chip
    • mtd: nand: bf5xx: use the mtd instance embedded in struct nand_chip
    • mtd: nand: brcm: use the mtd instance embedded in struct nand_chip
    • mtd: nand: cafe: use the mtd instance embedded in struct nand_chip
    • mtd: nand: cs553x: use the mtd instance embedded in struct nand_chip
    • mtd: nand: cmx270: use the mtd instance embedded in struct nand_chip
    • mtd: nand: davinci: use the mtd instance embedded in struct nand_chip
    • mtd: nand: diskonchip: use the mtd instance embedded in struct nand_chip
    • mtd: nand: docg4: use the mtd instance embedded in struct nand_chip
    • mtd: nand: fsl_elbc: use the mtd instance embedded in struct nand_chip
    • mtd: nand: fsl_ifc: use the mtd instance embedded in struct nand_chip
    • mtd: nand: fsl_upm: use the mtd instance embedded in struct nand_chip
    • mtd: nand: fsmc: use the mtd instance embedded in struct nand_chip
    • mtd: nand: gpio: use the mtd instance embedded in struct nand_chip
    • mtd: nand: gpmi: use the mtd instance embedded in struct nand_chip
    • mtd: nand: hisi504: use the mtd instance embedded in struct nand_chip
    • mtd: nand: jz4740: use the mtd instance embedded in struct nand_chip
    • mtd: nand: lpc32xx: use the mtd instance embedded in struct nand_chip
    • mtd: nand: mpc5121: use the mtd instance embedded in struct nand_chip
    • mtd: nand: mxc: use the mtd instance embedded in struct nand_chip
    • mtd: nand: nandsim: use the mtd instance embedded in struct nand_chip
    • mtd: nand: ndfc: use the mtd instance embedded in struct nand_chip
    • mtd: nand: nuc900: use the mtd instance embedded in struct nand_chip
    • mtd: nand: omap2: use the mtd instance embedded in struct nand_chip
    • mtd: nand: orion: use the mtd instance embedded in struct nand_chip
    • mtd: nand: pasemi: use the mtd instance embedded in struct nand_chip
    • mtd: nand: plat: use the mtd instance embedded in struct nand_chip
    • mtd: nand: pxa3xx: use the mtd instance embedded in struct nand_chip
    • mtd: nand: r852: use the mtd instance embedded in struct nand_chip
    • mtd: nand: sh_flctl: use the mtd instance embedded in struct nand_chip
    • mtd: nand: sharpsl: use the mtd instance embedded in struct nand_chip
    • mtd: nand: sunxi: use the mtd instance embedded in struct nand_chip
    • mtd: nand: tmio: use the mtd instance embedded in struct nand_chip
    • mtd: nand: txx9ndfmc: use the mtd instance embedded in struct nand_chip
    • mtd: nand: vf610: use the mtd instance embedded in struct nand_chip
    • mtd: nand: update the documentation to reflect framework changes
    • mtd: nand: s3c2410: use the mtd instance embedded in struct nand_chip
    • staging: mt29f_spinand: use the mtd instance embedded in struct nand_chip
    • cris: nand: use the mtd instance embedded in struct nand_chip
    • mtd: nand: bcm47xx: use the mtd instance embedded in struct nand_chip
    • mtd: nand: socrates: use the mtd instance embedded in struct nand_chip
    • mtd: nand: denali: use the mtd instance embedded in struct nand_chip
    • mtd: nand: update mtd_to_nand()
    • mtd: nand: remove useless mtd->priv = chip assignments
    • cris: nand: remove useless mtd->priv = chip assignments
    • staging: mt29f_spinand: remove useless mtd->priv = chip assignment
    • mtd: nand: simplify nand_dt_init() usage
    • mtd: nand: kill the chip->flash_node field
    • mtd: nand: remove unused and buggy get_platform_nandchip() helper function
    • mtd: nand: return consistent error codes in ecc.correct() implementations
    • mtd: nand: use nand_check_erased_ecc_chunk in default ECC read functions
    • mtd: nand: davinci: remove custom ‘erased check’ implementation
    • mtd: nand: diskonchip: remove custom ‘erased check’ implementation
    • mtd: nand: jz4740: remove custom ‘erased check’ implementation
    • mtd: nand: add helpers to access ->priv
    • ARM: make use of nand_set/get_controller_data() helpers
    • mtd: nand: make use of nand_set/get_controller_data() helpers
    • staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers
    • crypto: marvell/cesa – fix test in mv_cesa_dev_dma_init()
    • MAINTAINERS: add a maintainer for the NAND subsystem
  • Gregory CLEMENT (16):
    • net: mvneta: Make the default queue related for each port
    • net: mvneta: Associate RX queues with each CPU
    • net: mvneta: Add naive RSS support
    • net: mvneta: Configure XPS support
    • net/macb: add support for resetting PHY using GPIO
    • net/macb: Update device tree binding for resetting PHY using GPIO
    • ARM: at91/dt: Add Support for the L+G VInCo platform
    • rtc: rv8803: Extend compatibility with the rx8900
    • usb: host: xhci-plat: fix NULL pointer in probe for device tree case
    • net: mvneta: Fix for_each_present_cpu usage
    • net: mvneta: Fix the CPU choice in mvneta_percpu_elect
    • net: mvneta: Use on_each_cpu when possible
    • net: mvneta: Remove unused code
    • net: mvneta: Modify the queue related fields from each cpu
    • net: mvneta: The mvneta_percpu_elect function should be atomic
    • net: mvneta: Fix race condition during stopping
  • Maxime Ripard (5):
    • ASoC: sun4i: Implement MIC1 capture
    • ASoC: sunxi: Remove useless comments and variable
    • ASoC: sun4i-codec: pass through clk_set_rate error
    • pinctrl: sunxi: Add A80 special pin controller
    • drm/fb_cma_helper: Remove implicit call to disable_unused_functions
  • Thomas Petazzoni (8):
    • ARM: mvebu: remove duplicated regulator definition in Armada 388 GP
    • genirq: Implement irq_percpu_is_enabled()
    • dmaengine: mv_xor: remove mv_xor_chan->current_type field
    • dmaengine: mv_xor: de-duplicate mv_chan_set_mode*()
    • dmaengine: mv_xor: add suspend/resume support
    • PCI/MSI: Fix typos in
    • base: Export platform_msi_domain_[alloc,free]_irqs
    • ARM: mvebu: fix overlap of Crypto SRAM with PCIe memory window

Slides from Collaboration Summit talk on Linux kernel upstreaming

As we announced in a previous blog post, Free Electrons CTO Thomas Petazzoni gave a talk at the Collaboration Summit 2016 covering the topic of “Upstreaming hardware support in the Linux kernel: why and how?“.

The slides of the talk are now available in PDF format.

Upstreaming hardware support in the Linux kernel: why and how?

Upstreaming hardware support in the Linux kernel: why and how?

Upstreaming hardware support in the Linux kernel: why and how?

Through this talk, we identified a number of major reasons that should encourage hardware vendors to contribute the support for their hardware to the upstream Linux kernel, and some hints on how to achieve that. Of course, within a 25 minutes time slot, it was not possible to get into the details, but hopefully the general hints we have shared, based on our significant Linux kernel upstreaming experience, have been useful for the audience.

Unfortunately, none of the talks at the Collaboration Summit were recorded, so no video will be available for this talk.

Free Electrons engineer Boris Brezillon becomes Linux NAND subsystem maintainer

Free Electrons engineer Boris Brezillon has been involved in the support for NAND flashes in the Linux kernel for quite some time. He is the author of the NAND driver for the Allwinner ARM processors, did several improvements to the NAND GPMI controller driver, has initiated a significant rework of the NAND subsystem, and is working on supporting MLC NANDs. Boris is also very active on the linux-mtd mailing list by reviewing patches from others, and making suggestions.

Hynix NAND flash

For those reasons, Boris was recently appointed by the MTD maintainer Brian Norris as a new maintainer of the NAND subsystem. NAND is considered a sub-subsystem of the MTD subsystem, and as such, Boris will be sending pull requests to Brian, who in turn is sending pull requests to Linus Torvalds. See this commit for the addition of Boris as a NAND maintainer in the MAINTAINERS file. Boris will therefore be in charge of reviewing and merging all the patches touching drivers/mtd/nand/, which consist mainly of NAND drivers. Boris has created a nand/next on Github, where he has already merged a number of patches that will be pushed to Brian Norris during the 4.7 merge window.

We are happy to see one of our engineers taking another position as a maintainer in the kernel community. Maxime Ripard was already a co-maintainer of the Allwinner ARM platform support, Alexandre Belloni a co-maintainer of the RTC subsystem and Atmel ARM platform support, Grégory Clement a co-maintainer of the Marvell EBU platform support, and Antoine Ténart a co-maintainer of the Annapurna Labs platform support.

Slides from the Embedded Linux Conference

Two weeks ago, the entire Free Electrons engineering team (9 persons) attended the Embedded Linux Conference in San Diego. We had some really good time there, with lots of interesting talks and useful meetings and discussions.

Tim Bird opening the conferenceDiscussion between Linus Torvalds and Dirk Hohndel

In addition to attending the event, we also participated by giving 5 different talks on various topics, for which we are publishing the slides:

Boris Brezillon, the new NAND Linux subsystem maintainer, presented on Modernizing the NAND framework: The big picture.

Boris Brezillon's talk on the NAND subsystem

Antoine Ténart presented on Using DT overlays to support the C.H.I.P’s capes.

Antoine Tenart's talk on using DT overlays for the CHIP

Maxime Ripard, maintainer of the Allwinner platform support in Linux, presented on Bringing display and 3D to the C.H.I.P computer.

Maxime Ripard's talk on display and 3D for the CHIP

Alexandre Belloni and Thomas Petazzoni presented Buildroot vs. OpenEmbedded/Yocto Project: a four hands discussion.

Belloni and Petazzoni's talk on OpenEmbedded vs. Buildroot

Thomas Petazzoni presented GNU Autotools: a tutorial.

Petazzoni's tutorial on the autotools

All the other slides from the conference are available from the event page as well as from eLinux.org Wiki. All conferences have been recorded, and the videos will hopefully be posted soon by the Linux Foundation.

Article on the CHIP in French Linux magazine

Free Electrons engineer and Allwinner platform maintainer Maxime Ripard has written a long article presenting the Nextthing C.H.I.P platform in issue #18 of French magazine OpenSilicium, dedicated to open source in embedded systems. The C.H.I.P has even been used for the front cover of the magazine!

OpenSilicium #18

In this article, Maxime presents the C.H.I.P platform, its history and the choice of the Allwinner SoC. He then details how to set up a developer-friendly environment to use the board, building and flashing from scratch U-Boot, the kernel and a Debian-based root filesystem. Finally, he describes how to use Device Tree overlays to describe additional peripherals connected to the board, with the traditional example of the LED.

OpenSilicium #18 CHIP article

In the same issue, OpenSilicium also covers numerous other topics:

  • A feedback on the FOSDEM 2016 conference
  • Uploading code to STM32 microcontrollers: the case of STM32-F401RE
  • Kernel and userspace debugging with ftrace
  • IoT prototyping with Buildroot
  • RIOT, the free operating system for the IoT world
  • Interview of Cedric Bail, working on the Enligthenment Foundation Libraries for Samsung
  • Setup of Xenomai on the Zynq Zedboard
  • Decompression of 3R data stream using a VHDL-described circuit
  • Write a userspace device driver for a FPGA using UIO