Bootlin contributes to KernelCI.org

The Linux kernel is well-known for its ability to run on thousands of different hardware platforms. However, it is obviously impossible for the kernel developers to test their changes on all those platforms to check that no regressions are introduced. To address this problem, the KernelCI.org project was started: it tests the latest versions of the Linux kernel from various branches on a large number of hardware plaforms and provides a centralized interface to browse the results.

KernelCI.org project
KernelCI.org project

From a physical point of view, KernelCI.org relies on labs containing a number of hardware platforms that can be remotely controlled. Those labs are provided by various organizations or individuals. When a commit in one of the Linux kernel Git branches monitored by KernelCI is detected, numerous kernel configurations are built, tests are sent to all labs and results are collected on the KernelCI.org website. This allows kernel developers and maintainers to detect and fix bugs and regressions before they reach users. As of May, 10th 2016, KernelCI stats show a pool of 185 different boards and around 1900 daily boots.

Bootlin is a significant contributor to the Linux kernel, especially in the area of ARM hardware platform support. Several of our engineers are maintainers or co-maintainers of ARM platforms (Grégory Clement for Marvell EBU, Maxime Ripard for Allwinner, Alexandre Belloni for Atmel and Antoine Ténart for Annapurna Labs). Therefore, we have a specific interest in participating to an initiative like KernelCI, to make sure that the platforms that we maintain continue to work well, and a number of the platforms we care about were not tested by the KernelCI project.

Over the last few months, we have been building our boards lab in our offices, and we have joined the KernelCI project since April 25th. Our lab currently consists of 15 boards:

  • Atmel SAMA5D2 Xplained
  • Atmel SAMA5D3 Xplained
  • Atmel AT91SAM9X25EK
  • Atmel AT91SAM9X35EK
  • Atmel AT91SAMA5D36EK
  • Atmel AT91SAM9M10G45EK
  • Atmel AT91SAM9261EK
  • BeagleBone Black
  • Beagleboard-xM
  • Marvell Armada XP based Plathome Openblocks AX3
  • Marvell Armada 38x Solidrun ClearFog,
  • Marvell Armada 38x DB-88F6820-GP
  • Allwinner A13 Nextthing Co. C.H.I.P
  • Allwinner A33 Sinlinx SinA33
  • Freescale i.MX6 Boundary Devices Nitrogen6x

We will very soon be adding 4 more boards:

  • Atmel SAMA5D4 Xplained
  • Atmel SAMA5D34EK
  • Marvell Armada 7K 7040-DB (ARM64)
  • Marvell Armada 39x DB

Bootlin board farm

Three of the boards we have were already tested thanks to other KernelCI labs, but the other sixteen boards were not tested at all. In total, we plan to have about 50 boards in our lab, mainly for the ARM platforms that we maintain in the official Linux kernel. The results of all boots we performed are visible on the KernelCI site. We are proud to be part of this unique effort to perform automated testing and validation of the Linux kernel!

In the coming weeks, we will publish additional articles to present the software and physical architecture of our lab and the program we developed to remotely control boards that are in our lab, so stay tuned!

How we found that the Linux nios2 memset() implementation had a bug!

NIOS II processorNiosII is a 32-bit RISC embedded processor architecture designed by Altera, for its family of FPGAs: Cyclone III, Cyclone IV, etc. Being a soft-core architecture, by using Altera’s Quartus Prime design software, you can adjust the CPU configuration to your needs and instantiate it into the FPGA. You can customize various parameters like the instruction or the data cache size, enable/disable the MMU, enable/disable an FPU, and so on. And for us embedded Linux engineers, a very interesting aspect is that both the Linux kernel and the U-Boot bootloader, in their official versions, support the NIOS II architecture.

Recently, one of our customers designed a custom NIOS II platform, and we are working on porting the mainline U-Boot bootloader and the mainline Linux kernel to this platform. The U-Boot porting went fine, and quickly allowed us to load and start a Linux kernel. However, the Linux kernel was crashing very early with:

[    0.000000] Linux version 4.5.0-00007-g1717be9-dirty (rperier@archy) (gcc version 4.9.2 (Altera 15.1 Build 185) ) #74 PREEMPT Fri Apr 22 17:43:22 CEST 2016
[    0.000000] bootconsole [early0] enabled
[    0.000000] early_console initialized at 0xe3080000
[    0.000000] BUG: failure at mm/bootmem.c:307/__free()!
[    0.000000] Kernel panic - not syncing: BUG!

This BUG() comes from the __free() function in mm/bootmem.c. The bootmem allocator is a simple page-based allocator used very early in the Linux kernel initialization for the very first allocations, even before the regular buddy page allocator and other allocators such as kmalloc are available. We were slightly surprised to hit a BUG in a generic part of the kernel, and immediately suspected some platform-specific issue, like an invalid load address for our kernel, or invalid link address, or other ideas like this. But we quickly came to the conclusion that everything was looking good on that side, and so we went on to actually understand what this BUG was all about.

The NIOS II memory initialization code in arch/nios2/kernel/setup.c does the following:

bootmap_size = init_bootmem_node(NODE_DATA(0),
                                 min_low_pfn, PFN_DOWN(PHYS_OFFSET),
                                 max_low_pfn);
[...]
free_bootmem(memory_start, memory_end - memory_start);

The first call init_bootmem_node() initializes the bootmem allocator, which primarily consists in allocating a bitmap, with one bit per page. The entire bootmem bitmap is set to 0xff via a memset() during this initialization:

static unsigned long __init init_bootmem_core(bootmem_data_t *bdata,
        unsigned long mapstart, unsigned long start, unsigned long end)
{
        [...]
        mapsize = bootmap_bytes(end - start);
        memset(bdata->node_bootmem_map, 0xff, mapsize);
        [...]
}

After doing the bootmem initialization, the NIOS II architecture code calls free_bootmem() to mark all the memory pages as available, except the ones that contain the kernel itself. To achieve this, the __free() function (which is the one triggering the BUG) clears the bits corresponding to the page to be marked as free. When clearing those bits, the function checks that the bit was previously set, and if it’s not the case, fires the BUG:

static void __init __free(bootmem_data_t *bdata,
                        unsigned long sidx, unsigned long eidx)
{
        [...]
        for (idx = sidx; idx < eidx; idx++)
                if (!test_and_clear_bit(idx, bdata->node_bootmem_map))
                        BUG();
}

So to summarize, we were in a situation where a bitmap is memset to 0xff, but almost immediately afterwards, a function that clears some bits finds that some of the bits are already cleared. Sounds odd, doesn’t it?

We started by double checking that the address of the bitmap was the same between the initialization function and the __free function, verifying that the code was not overwriting the bitmap, and other obvious issues. But everything looked alright. So we simply dumped the bitmap after it was initialized by memset to 0xff, and to our great surprise, we found that the bitmap was in fact initialized with the pattern 0xff00ff00 and not 0xffffffff. This obviously explained why we were hitting this BUG(): simply because the buffer was not properly initialized. At first, we really couldn’t believe this: how it is possible that something as essential as memset() in Linux was not doing its job properly?

On the NIOS II platform, memset() has an architecture-specific implementation, available in arch/nios2/lib/memset.c. For buffers smaller than 8 bytes, this memset implementation uses a simple naive loop, iterating byte by byte. For larger buffers, it uses a more optimized implementation, using inline assembly. This implementation copies data per blocks of 4-bytes rather than 1 byte to speed-up the memset.

We quickly tested a workaround that consisted in using the naive implementation for all buffer sizes, and it solved the problem: we had a booting kernel, all the way to the point where it mounts a root filesystem! So clearly, it’s the optimized implementation in assembly that had a bug.

After some investigation, we found out that the bug was in the very first instructions of the assembly code. The following piece of assembly is supposed to create a 4-byte value that repeats 4 times the 1-byte pattern passed as an argument to memset:

/* fill8 %3, %5 (c & 0xff) */
"       slli    %4, %5, 8\n"
"       or      %4, %4, %5\n"
"       slli    %3, %4, 16\n"
"       or      %3, %3, %4\n"

This code takes as input in %5 the one-byte pattern, and is supposed to return in %3 the 4-byte pattern. It goes through the following logic:

  • Stores in %4 the initial pattern shifted left by 8 bits. Provided an initial pattern of 0xff, %4 should now contain 0xff00
  • Does a logical or between %4 and %5, which leads to %4 containing 0xffff
  • Stores in %3 the 2-byte pattern shifted left by 16 bits. %3 should now contain 0xffff0000.
  • Does a logical or between code>%3 and %4, i.e between 0xffff0000 and 0xffff, which gives the expected 4-byte pattern 0xffffffff

When you look at the source code, it looks perfectly fine, so our source code review didn’t spot the problem. However, when looking at the actual compiled code disassembled, we got:

34:	280a923a 	slli	r5,r5,8
38:	294ab03a 	or	r5,r5,r5
3c:	2808943a 	slli	r4,r5,16
40:	2148b03a 	or	r4,r4,r5

Here r5 gets used for both %4 and %5. Due to this, the final pattern stored in r4 is 0xff00ff00 instead of the expected 0xffffffff.

Now, if we take a look at the output operands, %4 is defined with the "=r" constraint, i.e an output operand. How to prevent the compiler from re-using the corresponding register for another operand? As explained in this document, "=r" does not prevent gcc from using the same register for an output operand (%4) and input operand (%5). By adding the constrainst & (in addition to "=r"), we tell the compiler that the register associated with the given operand is an output-only register, and so, cannot be used with an input operand.

With this change, we get the following assembly output:

34:	2810923a 	slli	r8,r5,8
38:	4150b03a 	or	r8,r8,r5
3c:	400e943a 	slli	r7,r8,16
40:	3a0eb03a 	or	r7,r7,r8

Which is much better, and correctly produces the 0xffffffff pattern when 0xff is provided as the initial 1-byte pattern to memset.

In the end, the final patch only adds one character to adjust the inline assembly constraint and gets the proper behavior from gcc:

diff --git a/arch/nios2/lib/memset.c b/arch/nios2/lib/memset.c
index c2cfcb1..2fcefe7 100644
--- a/arch/nios2/lib/memset.c
+++ b/arch/nios2/lib/memset.c
@@ -68,7 +68,7 @@ void *memset(void *s, int c, size_t count)
 		  "=r" (charcnt),	/* %1  Output */
 		  "=r" (dwordcnt),	/* %2  Output */
 		  "=r" (fill8reg),	/* %3  Output */
-		  "=r" (wrkrega)	/* %4  Output */
+		  "=&r" (wrkrega)	/* %4  Output only */
 		: "r" (c),		/* %5  Input */
 		  "0" (s),		/* %0  Input/Output */
 		  "1" (count)		/* %1  Input/Output */

This patch was sent upstream to the NIOS II kernel maintainers:
[PATCH v2] nios2: memset: use the right constraint modifier for the %4 output operand, and has already been applied by the NIOS II maintainer.

We were quite surprised to find a bug in some common code for the NIOS II architecture: we were assuming it would have already been tested on enough platforms and with enough compilers/situations to not have such issues. But all in all, it was a fun debugging experience!

It is worth mentioning that in addition to this bug, we found another bug affecting NIOS II platforms, in the asm-generic implementation of the futex_atomic_cmpxchg_inatomic() function, which was causing some preemption imbalance warnings during the futex subsystem initialization. We also sent a patch for this problem, which has also been applied already.

Bootlin 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, Bootlin contributed 121 patches, almost exactly 1% of the total. Due to its large number of contribution by patch number, Bootlin 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:

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

Annapurna Labs LogoWe 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.

See our patch series:

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.

Linux 4.4, Bootlin contributions

Linux 4.4 is the latest releaseLinux 4.4 has been released, a week later than the normal schedule in order to allow kernel developers to recover from the Christmas/New Year period. As usual, LWN has covered the 4.4 cycle merge window, in two articles: part 1 and part 2. This time around, KernelNewbies has a nice overview of the Linux 4.4 changes. With 112 patches merged, we are the 20th contributing company by number of patches according to the statistics.

Besides our contributions in terms of patches, some of our engineers have also become over time maintainers of specific areas of the Linux kernel. Recently, LWN.net conducted a study of how the patches merged in 4.4 went into the kernel, which shows the chain of maintainers who pushed the patches up to Linus Torvalds. Bootlin engineers had the following role in this chain of maintainers:

  • As a co-maintainer of the Allwinner (sunxi) ARM support, Maxime Ripard has submitted a pull request with one patch to the clock maintainers, and pull requests with a total of 124 patches to the ARM SoC maintainers.
  • As a maintainer of the RTC subsystem, Alexandre Belloni has submitted pull requests with 30 patches directly to Linus Torvalds.
  • As a co-maintainer of the AT91 ARM support, Alexandre Belloni has submitted pull requests with 46 patches to the ARM SoC maintainers.
  • As a co-maintainer of the Marvell EBU ARM support, Gregory Clement has submitted pull requests with a total of 33 patches to the ARM SoC maintainers.

Our contributions for the 4.4 kernel were centered around the following topics:

  • Alexandre Belloni continued some general improvements to support for the AT91 ARM processors, with fixes and cleanups in the at91-reset, at91-poweroff, at91_udc, atmel-st, at91_can drivers and some clock driver improvements.
  • Alexandre Belloni also wrote a driver for the RV8803 RTC from Microcrystal.
  • Antoine Ténart added PWM support for the Marvell Berlin platform and enabled the use of cpufreq on this platform.
  • Antoine Ténart did some improvements in the pxa3xx_nand driver, still in preparation to the addition of support for the Marvell Berlin NAND controller.
  • Boris Brezillon did a number of improvements to the sunxi_nand driver, used for the NAND controller found on the Allwinner SoCs. Boris also merged a few patches doing cleanups and improvements to the MTD subsystem itself.
  • Boris Brezillon enabled the cryptographic accelerator on more Marvell EBU platforms by submitting the corresponding Device Tree descriptions, and he also fixed a few bugs found in the driver
  • Maxime Ripard reworked the interrupt handling of per-CPU interrupts on Marvell EBU platforms especially in the mvneta network driver. This was done in preparation to enable RSS support in the mvneta driver.
  • Maxime Ripard added support for the Allwinner R8 and the popular C.H.I.P platform.
  • Maxime Ripard enabled audio support on a number of Allwinner platforms, by adding the necessary clock code and Device Tree descriptions, and also several fixes/improvements to the ALSA driver.

The details of our contributions for 4.4:

Linux 4.3 released, Bootlin contributions inside

Adelie PenguinThe 4.3 kernel release has been released just a few days ago. For details about the big new features in this release, we as usual recommend to read LWN.net articles covering the merge window: part 1, part 2 and part 3.

According to the KPS statistics, there were 12128 commits in this release, and with 110 patches, Bootlin is the 20th contributing company. As usual, we did some contributions to this release, though a somewhat smaller number than for previous releases.

Our main contributions this time around:

  • On the support for Atmel ARM SoCs
    • Alexandre Belloni contributed a fairly significant number of cleanups: description of the slow clock in the Device Tree, removal of left-over from platform-data usage in device drivers (no longer needed now that all Atmel ARM platforms use the Device Tree).
    • Boris Brezillon contributed numerous improvements to the atmel-hlcdc, which is the DRM/KMS driver for the modern Atmel ARM SoCs. He added support for several SoCs to the driver (SAMA5D2, SAMA5D4, SAM9x5 and SAM9n12), added PRIME support, and support for the RGB565 and RGB444 output configurations.
    • Maxime Ripard improved the dmaengine drivers for Atmel ARM SoCs (at_hdmac and at_xdmac) to add memset and scatter-gather memset capabilities.
  • On the support for Allwinner ARM SoCs
    • Maxime Ripard converted the SID driver to the newly introduced nvmem framework. Maxime also did some minor pin-muxing and clock related updates.
    • Boris Brezillon fixed some issues in the NAND controller driver.
  • On the support for Marvell EBU ARM SoCs
    • Thomas Petazzoni added the initial support for suspend to RAM on Armada 38x platforms. The support is not fully enabled yet due to remaining stability issues, but most of the code is in place. Thomas also did some minor updates/fixes to the XOR and crypto drivers.
    • Grégory Clement added the initial support for standby, a mode that allows to forcefully put the CPUs in deep-idle mode. For now, it is not different from what cpuidle provides, but in the future, we will progressively enable this mode to shutdown PHY and SERDES lanes to save more power.
  • On the RTC subsystem, Alexandre Belloni did numerous fixes and cleanups to the rx8025 driver, and also a few to the at91sam9 and at91rm9200 drivers.
  • On the common clock framework, Boris Brezillon contributed a change to the ->determinate_rate() operation to fix overflow issues.
  • On the PWM subsystem, Boris Brezillon contributed a number of small improvements/cleanups to the subsystem and some drivers: addition of a pwm_is_enabled() helper, migrate drivers to use the existing helper functions when possible, etc.

The detailed list of our contributions is:

Linux 4.2 released, Bootlin contributions inside

Adelie Penguin
Linus Torvalds has released last sunday the 4.2 release of the Linux kernel. LWN.net covered the merge window of this 4.2 release cycle in 3 parts (part 1, part 2 and part 3), giving a lot of details about the new features and important changes.

In a more recent article, LWN.net published some statistics about the 4.2 development cycle. In those statistics, Bootlin appears as the 10th contributing company by number of patches with 203 patches integrated, and Bootlin engineer Maxime Ripard is in the list of most active developers by changed lines, with 6000+ lines changed. See also this page for more kernel contribution statistics.

This time around, the most important contributions of Bootlin where:

  • Support for Atmel ARM processors:
    • The effort to clean-up the arch/arm/mach-at91/ continued, now that the conversion to the Device Tree and multiplatform is completed. This was mainly done by Alexandre Belloni.
    • Support for the ACME Systems Arietta G25 was added by Alexandre Belloni.
    • Support for the RTC on at91sam9rlek was also added by Alexandre Belloni.
    • Significant improvements were brought to the dmaengine xdmac and hdmac drivers (used on Atmel SAMA5D3 and SAMA5D4), bringing interleaved support, memset support, and better performance for certain use cases. This was done by Maxime Ripard.
  • Support for Marvell Berlin ARM processors:
    • In preparation to the addition of a driver for the ADC, an important refactoring of the reset, clock and pinctrl driver was done by using a regmap and the syscon mechanism to more easily share the common registers used by those drivers. Worked done by Antoine Ténart.
    • An IIO driver for the ADC was contributed, which relies on the syscon and regmap mentioned above, as the ADC uses registers that are mixed with the clock, reset and pinctrl ones.
    • The Device Tree files were relicensed under GPLv2 and X11 licenses.
  • Support for Marvell EBU ARM processors:
    • A completely new driver for the CESA cryptographic engine was contributed by Boris Brezillon. This driver aims at replacing the old mv_cesa drivers, by supporting the newer features of the cryptographic engine available in recent Marvell EBU SoCs (DMA, new ciphers, etc.). The driver is backward compatible with the older processors, so it will be a full replacement for mv_cesa.
    • A big cleanup/verification work was done on the pinctrl drivers for Armada 370, 375, 38x, 39x and XP, leading to a number of fixes to pin definitions. This was done by Thomas Petazzoni.
    • Various fixes were made (suspend/resume improvements, big endian usage, SPI, etc.).
  • Support for the Allwinner ARM processors:
    • Support for the AXP22x PMIC was added by Boris Brezillon, including the support for the regulators provided by this PMIC. This PMIC is used on a significant number of Allwinner designs.
    • A small number of Device Tree files were relicensed under GPLv2 and X11 licenses.
    • A big cleanup of the Device Tree files was done by using more aggressively the “DT label based syntax”
    • A new driver, sunxi_sram, was added to support the SRAM memories available in some Allwinner processors.
  • RTC subsystem:
    • As was announced recently, Bootlin engineer Alexandre Belloni is now the co-maintainer of the RTC subsystem. He has set up a Git repository at https://git.kernel.org/cgit/linux/kernel/git/abelloni/linux.git/ to maintain this subsystem. During the 4.2 release cycle, 46 patches were merged in the drivers/rtc/ directory: 7 were authored by Alexandre, and all other patches (with the exception of two) were merged by Alexandre, and pushed to Linus.

The full details of our contributions:

Linux 4.1 released, Bootlin 17th contributing company

TuxLinus Torvalds recently released the 4.1 Linux kernel, for which LWN.net gave a good description of the major new features: 4.1 Merge window, part 1, 4.1 Merge window, part 2, The 4.1 merge window closes.

As usual, Bootlin engineers contributed to the Linux kernel during this development cycle, though this time with a smaller number of patches: we contributed 118 patches. This time around, Bootlin is the 17th company contributing to this kernel release, by number of patches.

Our major contributions this time around have been:

  • On support for Atmel platforms
    • Alexandre Belloni did a good number of improvements to Atmel SoC support: converting some remaining SoCs to the SoC detection infrastructure, cleaning up the timer driver to use a syscon/regmap, removing a lot of unused headers in arch/arm/mach-at91/, etc. The final and very important change is that the AT91 ARM platform is now part of the multiplatform mechanism: you can build a single zImage for ARMv5 or for ARMv7 which will include support for the ARMv5 or ARMv7 Atmel platforms.
    • Boris Brezillon improved the Atmel DRM/KMS driver for the display controller by switching to atomic mode-setting. He also added Device Tree definitions for the Atmel display controller on Atmel SAMA5D3 and Atmel SAMA5D4.
  • On support for Marvell EBU platforms
    • Ezequiel Garcia enabled the Performance Monitor Unit on Armada 375 and Armada 38x, which allows to use perf on those platforms.
    • Gregory Clement did a number of fixes and minor improvements to support for Marvell EBU platforms.
    • Maxime Ripard enabled the Performance Monitoring Unit on Armada 370/XP, enabling the use of perf on these platforms. He also improved support for the Armada 385 AP board by enabling NAND and USB3 support.
    • Thomas Petazzoni added initial support for the new Marvell Armada 39x platform (clock driver, pinctrl driver, Device Tree). He did some cleanup and fixes in many Device Tree of Marvell EBU platforms and added suspend/resume support in the PCI and pinctrl drivers for these platforms.
  • Other contributions
    • As we posted recently, Alexandre Belloni also became in this release cycle a co-maintainer for the RTC subsystem.
    • Alexandre Belloni added bq27510 support for the bq27x00_battery driver.
    • Maxime Ripard did some small contributions to the dmaengine subsystem, improved the of_touchscreen code and the edt-ft5x06 touchscreen driver, and did some cleanup in the Allwinner sun5i clocksource driver.

For the upcoming 4.2 version, we have 198 patches in linux-next, of which 191 have already been pulled by Linus as part of the 4.2 merge window.

Our complete list of contributions follows:

Buildroot 2015.05 release, Bootlin contributions inside

Buildroot LogoThe Buildroot project has recently released a new version, 2015.05. With exactly 1800 patches, it’s the largest release cycle ever, with patches from more than 100 different contributors. It’s an impressive number, showing the growing popularity of Buildroot as an embedded Linux build system.

The CHANGES file summarizes the most important improvements of this release.

Amongst those 1800 patches, 143 patches were contributed by Bootlin. Our most significant contributions for this release have been:

  • Addition of a package for the wf111 WiFi drivers. They allow to use a WiFi chip from Bluegiga, which is being used in one of our customer projects.
  • Addition of the support for using uClibc-ng. uClibc-ng is a “collaborative” fork of the uClibc project, which aims at doing more regular releases and have better testing. Maintained by Waldemar Brodkorb, the project has already seen several releases since its initial 1.0 release. Waldemar is merging patches from the original uClibc regularly, and adding more fixes. It allows Buildroot and other uClibc users to have well-identified uClibc stable versions instead of a 3 years old 0.9.33.2 version with dozens of patches on top of it. uClibc-ng is not currently used as the default uClibc version as of 2015.05, but it might very well be the case in 2015.08.
  • Important internal changes to the core infrastructure. Until this release, the make legal-info, make source, make external-deps and make source-check logic was relying only on the Buildroot configuration file. This was giving correct results for target packages which all have a corresponding Buildroot configuration option, but not for host packages (which for most of them don’t have Buildroot configuration options). Only a manual two-level dependency handling was done for the host packages for the above mentioned commands. With our work, the handling of those features has been moved to be part of the package infrastructure itself, so it’s using proper make recursivity to resolve the entire dependency tree. Due to this, the results of make legal-info or make external-deps may be longer following this release, but it’s because it’s now actually correct and complete. You can look at the patches for more details, but these changes are very deep into the core Buildroot infrastructure.
  • Large number of build fixes. We contributed 52 patches fixing issues detected by the autobuild infrastructure.
  • Addition of the imx-usb-loader package, which can be used to load over USB a new bootloader on i.MX6 platforms, even if the platform has no bootloader or a broken bootloader. We also use it as part of one of our customer projects.

With 142 patches, Bootlin engineer Thomas Petazzoni is the third contributor to this release by number of patches:

git shortlog -s -n 2015.02..

   397	Bernd Kuhls
   393	Gustavo Zacarias
   142	Thomas Petazzoni

But by far, our most important contribution by far for this release is Thomas acting as the interim maintainer: on the total of 1800 patches merged for this release, Thomas has been the committer of 1446 patches. He has therefore been very active in merging the patches contributed by the Buildroot community.

There are already some very interesting goals set for the Buildroot 2015.08 release, as you can see on the Buildroot release goals page.

Also, if you want to learn Buildroot in details, do not hesitate to look at our Buildroot training course!

Bootlin working on the $9 C.H.I.P. computer

C.H.I.P computer

If you’re following the news about embedded Linux and new cool development platforms, you for sure couldn’t miss the announcement on the world’s first $9 computer. This computer, called C.H.I.P., was started through a crowd-funding campaign on Kickstarter and reception in the Free Software and Open Source community has been very positive. Out of an initial funding goal of $50,000, NextThing Co, the Oakland, California based company creating this product eventually managed to raise more $2,000,000 of funding.

NextThing Co announced their intention to support the platform in the most open way possible: the schematics will be made available, and it will be supported in the mainline Linux kernel.

It turns out that the processor NextThing Co has chosen for this platform is an Allwinner R8 processor. Bootlin has been working since several years on supporting Allwinner processors in the mainline Linux kernel: our engineer Maxime Ripard is the maintainer of the Allwinner SoC support.

Thanks to this long term involvement, Bootlin has been asked by NextThing Co to work with them to support the C.H.I.P. computer in the mainline Linux kernel, and in the process bring some significant improvements to the support of Allwinner processors in the kernel.

C.H.I.P, world first $9 computer

NextThing Co announced recently our collaboration in a blog post on Kickstarter:

We’re incredibly excited to announce that we’ve partnered with one of the premier contributors to ARM Linux: Bootlin! We will be collaborating with their amazing team of ARM Linux engineers, and of course our Kernel Hacker backers to help us test and mainline C.H.I.P.’s kernel modifications as we move forward.

Bootlin is also very excited to be working with NextThing Co on this project! Thanks to this, over the next months, we will have a very substantial amount of time dedicated to this project, and we will regularly push code to support the missing hardware Allwinner SoC hardware blocks in the mainline Linux kernel and to support the C.H.I.P. board.

Pocket C.H.I.P

More details about the C.H.I.P:

  • Availability planned for 2016 for the general public. A selection of 1000 kernel hackers who backed on Kickstarter will have the platform earlier.
  • Very small platform: 40mm x 60mm, making is even smaller than a Raspberry Pi or BeagleBone.
  • Allwinner R8 processor, clocked at 1 Ghz, and offering OpenGL/OpenVG acceleration through an ARM Mali GPU
  • 512 MB of RAM
  • 4GB of on-board NAND flash storage
  • WiFi and Bluetooth 4.0 to connect the system to the outside world
  • One USB host port
  • Powered through a micro USB connector which also supports USB OTG (either USB host or device).
  • Jack connector for composite video out, headphones and microphone input.
  • Many headers to connect external devices (SPI, I2C, UART + 8 GPIOs)
  • Integrated circuit for charging a LiPo battery and being powered by it
  • Additional HDMI or VGA add-on boards will be needed to connect to displays with the corresponding connectivity.