Archive | Linux RSS feed for this section

Embedded Bits Contribute to Automated Upstream Kernel Testing Project:

At this years Embedded Linux Conference we learnt about – a project that performs automated testing of upstream kernels. We were so impressed that we immediately got involved and are now contributing our resources to perform automated boot tests of the latest kernels within our board farm.

Xilinx Zynq ZC702 in our board farm

Xilinx Zynq ZC702 in our board farm

The Linux kernel supports a large variety of platforms yet there is limited coverage in its upstream testing. Thus when developers add new features to the kernel it’s very difficult to ensure that those new features don’t break support for existing platforms – especially as it’s impractical/impossible to expect those developers to have access to the full range of devices the kernel supports. The project aims to improve upstream testing and to allow bugs to be detected as early as possible. In this post we’ll find out a little more about how it all works.

Continue Reading →

Embedded Bits attends Embedded Linux Conference Europe 2015

Last week Embedded Bits attended the Embedded Linux Conference Europe (ELCE) held this year in Dublin, Ireland. Attending the 3 day event provided our engineers with an excellent opportunity to keep up to date with the latest developments and to collaborate with those shaping its future.

Throughout the conference we shared our highlights as they happened via our Twitter feed, in this post we will provide a summary.

Embedded Bits with Linus Torvalds

Embedded Bits with Linus Torvalds

Continue Reading →

Embedded Bits attends Embedded Linux Conference Europe

A few weeks ago the engineering team of Embedded Bits attended the Embedded Linux Conference Europe (ELCE) held this year in Düsseldorf, Germany. As described by The Linux Foundation: “The conference is the premier vendor-neutral technical conference for companies and developers using Linux in embedded products. This conference, now in it’s 8th year, has the largest collection of sessions dedicated exclusively to embedded Linux and embedded Linux developers. ELCE is embedded Linux experts talking about solutions to your embedded Linux problems. ELCE consists of 3 days of presentations, tutorials and Bird-of-a-Feather sessions.”

Attending the event provides our engineers with a valuable opportunity to keep up to date with the ever changing Linux landscape and to mix with the community shaping its future.

This year we also presented a talk titled ’12 Lessons Learnt in Boot Time Reduction’, slides for this talk are available here with videos expected to follow in due course.

Andrew Murray presenting  '12 Lessons Learnt in Boot Time Reduction' at ELCE

Andrew Murray presenting ’12 Lessons Learnt in Boot Time Reduction’

Continue Reading →

Understanding Boot Time Variability with the Zynq ZC702

One of the challenges of boot time reduction is understanding why the boot time of a device may vary with each reboot, this is important because we strive not only for minimal boot times but for consistently minimal boot times. This post uses a Xilinx Zynq platform to demonstrate how we can measure, understand and find the causes of boot time variability. We’ll also provide an insight into how we use automation at Embedded Bits to improve the process.

To explore boot time variability we’ll be using Xilinx’s Zynq-7000 based ZC702 evaluation kit. The Zynq range of SoC’s cleverly combine a dual-core Cortex A9 MPCore with programmable logic (Artix-7 FPGA). The ZC702 is provided with a ‘Base Targeted Reference Design (TRD)‘ (a Linux distribution on an SD card) – we’ll use this to perform our investigation against.

By its very nature, the only way to measure variability is to measure the boot time over and over again during successive runs (time consuming!). At Embedded Bits where possible we install development boards into our board farm – along with providing benefits such as board sharing and collaborative working, it crucially provides automation – we’ll take advantage of this as we explore boot time variability. We’ll start by instructing the farm to repeatedly reboot the board whilst capturing boot logs.

Continue Reading →

One Second Cold Linux Boot with OpenCV

As a means to demonstrate our boot time reduction skills, last November we put together a demo which shows an Embedded Linux device cold-booting in less than a second.

The demo consists of an ARM Cortex-A9 based device connected to a camera, 7-segment display and HDMI display. The device uses the camera along with OpenCV based software to count the number of yellow balls present on the table beneath and display the count on the 7-segment display. The device also outputs the camera image and ball detection illustration on the LCD display.

The device is able to do all this within one second of software reset, here is the video:

We’ve put lots of information on how we achieved this on our Boot Time Demos page which can be found here.

Continue Reading →

Scripted Modification of Kernel Configs

Whilst recently making changes to an embedded Linux distribution I came across a modest but very powerful feature of the kernel’s tried and test Kconfig system. What I discovered was a script that allows for scripted modification of kernel configuration files, i.e. .config and *_defconfig files.

The script, which first appeared in the 2.6.29 kernel can be found in the kernel’s scripts/ directory and its usage is very straight forward. Here are some examples:

# Enable timing information on printk's
./scripts/config --enable CONFIG_PRINTK_TIME

# Change the path of the initramfs
./scripts/config --set-str CONFIG_INITRAMFS_SOURCE ../fs

# Increase the size of the kernel log buffer
./scripts/config --set-val CONFIG_LOG_BUF_SHIFT 14

# Enable LZO compression for SquashFS in ~/test_defconfig
./scripts/config --file ~/test_defconfig --enable CONFIG_SQUASHFS
Continue Reading →

A nasty string initialization bug in C

Today I encountered a bug that was quite difficult to find regarding strings. In order for strings to work they must be null-terminated, and this implies that an array of characters can contain a string with a length equal to the array size minus one, because there must be space for the null character. I found out that, when initializing array of chars with strings, the compiler does not complain if just the null character doesn’t fit.

Continue Reading →

The Right Approach to Minimal Boot Times [ELCE Video]

Last year at the ELCE 2010 conference in Cambridge I performed a talk about reducing boot times of embedded Linux devices. The video of this talk has now been posted on-line:

ELCE 2010 – The Right Approach to Minimal Boot Times ELCE Video (Best viewed in Chrome)

The accompanying slides for this presentation can be found here

If you wish to see the accompanying YouTube video – please see my earlier post. [© 2011]

Continue Reading →

cat /proc/meminfo : MemTotal

Linux manages it’s physical memory in clever and often efficient ways – as a result it’s not uncommon to only think about how the memory in your system is being used when we run into performance issues. And this is where the frustration can begin – without fully understanding how memory is managed, it can be very difficult to answer some seemingly straight-forward questions like ‘How much free memory do I have?‘ or ‘How much memory is this process taking?‘. There are a lot of complications and as a result performance monitoring can be a challenge.

I was determined to fully understand precisely what the various memory figures report by the kernel mean and understand – on a practical level – the implications of Linux’s memory management on our performance sensitive applications. In this multi-part post we’ll attempt to debunk many of the mysteries of Linux’s memory.

Continue Reading →

validate_sb: bad superblock, error 8

I’ve recently left the dark ages and entered the world of UBI and UBIFS – it’s generally been a pleasant experience. However whilst getting to grips with it, I occasionally recieved the following error upon mount:

# mount -t ubifs /dev/ubi0_1  /tmp/
UBIFS error (pid 1096): validate_sb: bad superblock, error 8
mount: mounting /dev/ubi0_1 on /tmp/ failed: Invalid argument

The usual approach of googling my way out of problems didn’t give me much luck so I did some exploring. The cause of this failure, despite having been successful in flashing the UBIFS image – was that the UBI volume I was using was too small. The solution is therefore to increase the size of the volume.

Unfortunately though, my current project required me to create a UBI volume of only the minimum size to support a given UBIFS image – yet it would seem that determining the minimum size of a UBI volume for a given UBIFS image was not trivial. I had to do some more digging to find the answer…

Continue Reading →