Free Android training materials

Android robotAfter months of preparation, and after completing our first Android system development training session, we are proud to release our complete training materials under the Creative Commons Attribution – Share Alike 3.0 license.

Our course targets engineers who need to develop embedded systems with Google Android, customizing Android to support specific hardware and product requirements.

Here are the main topics that we cover:

  • Introduction to Android
  • Android source code and compiling
  • Linux kernel, configuration, compiling and booting
  • Bootloaders for Android
  • Android changes to the Linux kernel
  • Supporting new hardware
  • Development and debugging with ADB
  • Android’s build system
  • The Android filesystem
  • Android native layer and calling a C program from Android
  • Android framework and applications
  • Application development
  • The apk standard
  • System customization
  • Advise and resources

See the detailed agenda.

Just like the materials for our Embedded Linux system development and Embedded Linux kernel and driver development courses, this new courseware is meant to be be a useful resource for product developers around the world. It could also be used by engineers with sufficient Android experience to train their colleagues without having to spend months preparing slides and practical labs as we did.

Devkit8000 board from EmbestPractical labs are conducted on the Devkit8000 embedded board from Embest, with a TI OMAP3 CPU and an LCD touchscreen. As we use Linaro Android in our labs, it should be relatively easy to make these labs on other development boards with a Linaro supported CPU (TI OMAP, Freescale i.MX53 and i.MX6, ST Ericsson Nova and Samsung Exynos).

LaTeX sources for these materials are available on Bootlin’spublic git server.

To build these documents from source, you may need to install several packages (thanks to Huy, Bui Quang, for contributing the package list):

sudo apt-get install git-core inkscape texlive-latex-base \
texlive-latex-extra texlive-font-utils dia python-pygments \
texlive-fonts-recommended

You can then build the latest version as follows:

git clone git://github.com/bootlin/training-materials.git
cd training-materials
make full-android-labs.pdf
make full-android-slides.pdf

The LaTeX format and the git repository make it easy to identify changes made since the last time you accessed the materials. We even have a training-materials-updates mailing list to receive notifications for updates to all our training materials. Compared to the Open Document Format that we used in the past, this should also make it considerably simpler to translate these documents and keep translations up to date.

As usual, comments, suggestions and translations are welcome. You can write to the feedback address available on our contact page.

Embedded Linux, kernel and Android engineer job openings (2012)

Home based jobs in Europe or at one of our offices in France

Penguin worksTo meet increasing demand for its Embedded Linux, kernel and Android engineering services, Bootlin is looking for developers:

  • With experience developing embedded Linux systems
  • With experience developing device drivers for the Linux kernel, and porting Linux on new hardware
  • With visible contributions to Free Software used in embedded systems, such as the Linux kernel, BusyBox, build systems, compilers…
  • With technical writing skills and an interest for training

Experience with Android low-level development, allowing to teach our Android System Development course would also be a strong advantage, though not mandatory.

A first possibility is be hired in France. Being able to join one of our offices in France (Toulouse or Orange) will be an advantage, but working from home in other parts of France will be possible too. We are also open to people living in a country with the Euro currency, working from home, and able to work as full time contractors.

We have a first opening that we would like to fill between September and December 2012. If demand continues to grow, we expect to hire more engineers with the same profile in the following months. We also hope to expand the home based jobs to countries outside Europe in the next years, but it will take a bit more time.

See our careers page for a full description.

Bootlin Quarterly – 2012 Q2

This is the second Bootlin newsletter for 2012. We are happy to share with you the latest news about our projects, training courses and contributions.

New “Android system development” training

As announced in our previous newsletter, we have created a new Android system development training course.

This course targets engineers who need to develop embedded systems with Google Android. In four days, through theory and practical labs, the course makes you familiar with compiling and booting Android, with adapting Android to support a new embedded board (assuming that it is already supported by the Linux kernel), and with building a real system through accessing specific hardware, customizing the filesystem and using debugging techniques. More details and the complete agenda.

The first public session of this training will take place on June 11-14 2012 in Toulouse, France (session taught in English). There are still seats available for this session.

We will start giving on-site sessions of this course in July 2012. Do not hesitate to contact us if you want to organize on-site sessions.

Opening our training materials source code

Since Bootlin’screation in 2004, we have been releasing our training materials under the Creative Commons Attribution Share-Alike license, a free license that allows anyone to share, improve and use our embedded Linux and Linux kernel training materials. Since that time, our training materials were available as PDF files, and as OpenDocument files for the source code, but we were only updating their online version from time to time.

Now, we are proud to announce that our training materials are being converted to the LaTeX language, and their latest version is available at any time from our public Git repository.

For the moment, our embedded Linux slides have been published (about 500 slides) in this Git repository, as well as the instructions for the practical sessions of our embedded Linux and Linux kernel courses. In the near future, we will also publish in LaTeX the slides of our Linux kernel training (which remain available under PDF and OpenDocument formats) as well as the materials of our new “Android system development” course.

The creation of this public Git repository is a strong sign of our commitment for open training materials.

The LaTeX format and the public Git repository now make it easy for everyone to follow updates on our materials, to keep one’s knowledge up to date, and even to teach a training session using our materials (commercial use of our materials is welcome, as it helps to spread knowledge about Free and Open Source Software for embedded systems).

Upcoming public training sessions

Our next public training sessions dates and locations are:

  • Embedded Linux kernel and driver development
    June, 4-8 2012
    Toulouse, France
    Session given in French
    Details
  • Android system development
    June, 11-14 2012
    Toulouse, France
    Session given in English
  • Embedded Linux system development
    June, 18-22 2012
    Avignon, France
    Session given in French
    Details
  • Embedded Linux kernel and driver development
    July 2-6, 2012
    Avignon, France
    Session given in French
    Details
  • Embedded Linux kernel and driver development
    October, 8-12 2012
    Avignon, France
    Session given in English
    Details
  • Embedded Linux system development
    October, 15-19 2012
    Toulouse, France
    Session given in French
    Details
  • Embedded Linux system development
    December, 3-7 2012
    Avignon, France
    Session given in English
    Details
  • Embedded Linux system development
    February, 4-8 2013
    Lyon, France
    Session given in French
    Details

Projects

Since the beginning of the year, we have been involved in the following projects for various customers:

  • Boot time optimization and power management evaluation for a MIPS-based platform used in a payment terminal;
  • Filesystem size optimization, embedded Linux build system integration, Ethernet PHY driver development for an AT91 ARM platform used in satellite video processing;
  • Embedded Linux build system integration and generic embedded Linux debugging and support for an AT91 ARM platform used as a gateway between medical devices;
  • Starting in April, we will be working with a major ARM SoC vendor to help mainlining support for their latest SoC in the official Linux kernel sources;
  • Continued the creation of materials for our new “Android system development” course.
  • Continued our work on the Linux kernel driver for the Analog-to-Digital converters of the AT91 ARM SoC (see ‘Contributions’, below);
  • Continued our work on real-time Linux evaluation on AT91 ARM SoC (see ‘Contributions’, below.).

Career opportunities

Bootlin is looking for a kernel developer in the the French Riviera, to be hired with a permanent contract. The job is open to English speaking people who do not speak French, but are ready to settle in the area of Nice, and be hired through a French contract. See details.

Conferences and contributions

Embedded Linux Conference and Android Builders Summit

Three engineers of Bootlin attended the Embedded Linux Conference 2012 and Android Builders Summit 2012 in Redwood Shores, near San Francisco in California, on February. This strong participation of our engineers to technical conferences is a key factor to make sure we remain up to date on embedded Linux technologies and keep a close contact with the community.

During the conference, we have published daily reports about the various talks that we thought were interesting:

After the conference, we also posted videos of the talks:

Our scripts to encode videos to the royalty-free VP8 codec and add a title sequence to the videos are now available on on our public git server.

At this conference, our engineer Thomas Petazzoni has given a talk titled “Buildroot, a nice, simple and efficient embedded Linux build system”. Here are the slides and the video.

FOSDEM conference

Two of our engineers participated to the FOSDEM conference, a community-driven open-source conference, in early February.

Our engineer Maxime Ripard gave a talk on his work around the IIO kernel subsystem, which he used to write an ADC driver for the AT91 SoC. Here are the slides.

Our engineer Thomas Petazzoni gave a talk about “Using Qt for non-graphical applications”. Here are the slides.

AT91 Analog-to-Digital converter drivers

Details about the driver for the AT91 Analog-to-Digital converters driver written by Maxime Ripard from Bootlin have been published on the Atmel Linux4Sam wiki. This driver relies on the IIO framework, and we are in the process of getting this driver merged upstream. See the Atmel Linux4Sam wiki page.

Real-time Linux benchmarks

A report of extensive real-time benchmarks conducted by Gregory Clement from Bootlin on AT91 platforms has been published on the Atmel Linux4Sam Wiki. This report compares a vanilla Linux kernel, the PREEMPT-RT patches and the Xenomai co-kernel approach through timer-based and GPIO-based benchmarks. See the Atmel Linux4Sam wiki page.

Buildroot

Bootlin’sinvolvement in Buildroot is still strong:

  • Maxime Ripard and Thomas Petazzoni participated to the Buildroot Developer Day organized in Brussels before the FOSDEM conference. A report of this meeting, which gathered several other Buildroot developers, is available at the Buildroot mailing list archives.
  • Since the beginning of the year, Thomas Petazzoni has contributed 64 patches that have been merged: support for the LTT-ng Linux tracing solution, support to represent host utilities in the menuconfig, many updates and fixes to external toolchain support and many other fixes.
  • In the same time-frame, Maxime Ripard has contributed 13 patches that have been merged: support for systemd, improvements to the package infrastructure and various fixes.
  • Thomas Petazzoni has implemented a Web interface that publicly shows the result of our random configuration builds, available at http://autobuild.buildroot.org. The Buildroot community is doing random configuration builds 24/7 on three machines, with various configurations. This Web interface collects the build results and sends a summary every day on the Buildroot mailing-list. This has already allowed to fix many build issues, and will help to improve Buildroot’s quality in the future.

Linux kernel course

Participants to our Embedded Linux kernel and driver development course have also started contributing to the Linux kernel sources during the course itself. Here are the patches which have been merged so far:

During our git lab, instead of asking people to make dummy code changes, we ask them to make real improvements to the Linux sources, and send them for real to the right maintainers and mailing lists. This way, people get a better understanding of how they can interact with the Linux kernel developers to merge their changes and contributions.

See our slides and practical lab instructions for our git lectures and lab.

Blog posts

Bootlin has published several blog posts:

You can follow Bootlin’snews by reading our blog and by following our quick news on Twitter.

By the way, the right column of the Bootlin blog now lists the most popular posts and pages. This can help you to find useful content that you may have missed.

Bootlin remains available to help you in your embedded Linux projects, either through its development and support services or through its training sessions. Do not hesitate to contact us!

Gregory, Maria, Maxime, Michael and Thomas – Bootlin

Linux kernel engineer job in Nice

Penguin worksBootlin is looking for a embedded Linux and kernel engineer in the area of Nice in France (on the French Riviera). The contract will be home based, but will also involve working at customer locations in the same area, possibly for long periods of time.

A detailed job description is available on our careers page.

For this particular job opening, we absolutely need someone with prior experience with kernel and driver development, and contributions to the official Linux kernel sources will be a strong advantage. This is because a customer of ours is looking for an engineer to develop new drivers and port the Linux kernel to pre-silicon and silicon platforms.

Once we find a candidate with the expected skills and profile, and once the customer agrees to contract this person for this initial project, the engineer will be hired by Bootlin under a permanent contract, and will work on the customer site for at least 6 months.

Once the initial assignment is over, our engineer will continue to work on projects for other Bootlin customers, and will also give embedded Linux and kernel training sessions to customers throughout the world.

Note that this position is open to people who do not speak French, but are ready to settle in the French Riviera and to be hired through a French contract.

If you are interested in this position, see our job description for details about how to apply.

How to boot an uncompressed Linux kernel on ARM

This is a quick post to share my experience booting uncompressed Linux kernel images, during the benchmarks of kernel compression options, and no compression at all was one of these options.

It is sometimes useful to boot a kernel image with no compression. Though the kernel image is bigger, and takes more time to copy from storage to RAM, the kernel image no longer has to be decompressed to RAM. This is useful for systems with a very slow CPU, or very little RAM to store both the compressed and uncompressed images during the boot phase. The typical case is booting CPUs emulated by FPGA, during processor development, before the final silicon is out. For example, I saw a Cortex A15 chip boot at 11 MHz during Linaro Connect Q2.11 in Budapest. At this clock frequency, booting a kernel image with no compression saves several minutes of boot time, reducing development and test time. Note that with such hardware emulators, copying the kernel image to RAM is cheap, as it is done by the emulator from a file given by the user, before starting to emulate the system.

Building a kernel image with no compression on ARM is easy, but only once you know where the uncompressed image is and what to do! For people who have never done that before, I’m sharing quick instructions here.

To generate your uncompressed kernel image, all you have to do is run the usual make command. The file that you need is arch/arm/boot/Image.

Depending on the bootloader that you use, this could be sufficient. However, if you use U-boot, you still need to put this image in a uImage container, to let U-boot know about details such as how big the image is, what its entry point is, whether it is compressed or not… The problem is you can’t run make uImage any more to produce this container. That’s because Linux on ARM has no configuration option to keep the kernel uncompressed, and the uImage file would contain a compressed kernel.

Therefore, you have to create the uImage by invoking the mkimage command manually. To do this without having to guess the right mkimage parameters, I recommend to run make V=1 uImage once:

$ make V=1 uImage
...
  Kernel: arch/arm/boot/zImage is ready
  /bin/bash /home/mike/linux/scripts/mkuboot.sh -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 'Linux-3.3.0-rc6-00164-g4f262ac' -d arch/arm/boot/zImage arch/arm/boot/uImage
Image Name:   Linux-3.3.0-rc6-00164-g4f262ac
Created:      Thu Mar  8 13:54:00 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3351272 Bytes = 3272.73 kB = 3.20 MB
Load Address: 80008000
Entry Point:  80008000
  Image arch/arm/boot/uImage is ready

Don’t be surprised if the above message says that the kernel is uncompressed (corresponding to -C none). If we told U-boot that the image is already compressed, it would take care of uncompressing it to RAM before starting the kernel image.

Now, you know what mkimage command you need to run. Just invoke this command on the Image file instead of zImage (you can directly replace mkuboot.sh by mkimage):

$ mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 'Linux-3.3.0-rc6-00164-g4f262ac' -d arch/arm/boot/Image arch/arm/boot/uImage
Image Name:   Linux-3.3.0-rc6-00164-g4f262ac
Created:      Thu Mar  8 14:02:27 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    6958068 Bytes = 6794.99 kB = 6.64 MB
Load Address: 80008000
Entry Point:  80008000

Now, you can use your uImage file as usual.

Linux on ARM: xz kernel decompression benchmarks

I recently managed to find time to clean up and submit my patches for xz kernel compression support on ARM, which I started working on back in November, during my flight to Linaro Connect. However, it was too late as Russell King, the ARM Linux maintainer, alreadyaccepted a similar patch, about 3 weeks before my submission. The lesson I learned was that checking a git tree is not always sufficient. I should have checked the mailing list archives too.

The good news is that xz kernel compression support should be available in Linux 3.4 in a few months from now. xz is a compression format based on the LZMA2 compression algorithm. It can be considered as the successor of lzma, and achieves even better compression ratios!

Before submitting my patches, I ran a few benchmarks on my own implementation. As the decompressing code is the same, the results should be the same as if I had used the patches that are going upstream.

Benchmark methodology

For both boards I tested, I used the same pre 3.3 Linux kernel from Linus Torvalds’ mainline git tree. I also used the U-boot bootloader in both cases.

I used the very useful grabserial script from Tim Bird. This utility reads messages coming out of the serial line, and adds timestamps to each line it receives. This allow to measure time from the earliest power on stages, and doesn’t slow down the target system by adding instrumentation to it.

Our benchmarks just measure the time for the bootloader to copy the kernel to RAM, and then the time taken by the kernel to uncompress itself.

  • Loading time is measured between “reading uImage” and “OK” (right before “Starting kernel”) in the bootloader messages.
  • Compression time measured between “Uncompressing Linux” and “done”:
    ~/bin/grabserial -v -d /dev/ttyUSB0 -e 15 -t -m "Uncompressing Linux" -i "done," > booting-lzo.log

Benchmarks on OMAP4 Panda

The Panda board has a fast dual Cortex A9 CPU (OMAP 4430) running at 1 GHz. The standard way to boot this board is from an MMC/SD card. Unfortunately, the MMC/SD interface of the board is rather slow.

In this case, we have a fast CPU, but with rather slow storage. Therefore, the time taken to copy the kernel from storage to RAM is expected to have a significant impact on boot time.

This case typically represents todays multimedia and mobile devices such as phones, media players and tablets.

Compression Size Loading time Uncompressing time Total time
gzip 3355768 2.213376 0.501500 2.714876
lzma 2488144 1.647410 1.399552 3.046962
xz 2366192 1.566978 1.299516 2.866494
lzo 3697840 2.471497 0.160596 2.632093
None 6965644 4.626749 0 4.626749

Results on Calao Systems USB-A9263 (AT91)

The USB-A9263 board from Calao Systems has a cheaper and much slower AT91SAM9263 CPU running at 200 MHz.

Here we are booting from NAND flash, which is the fastest way to boot a kernel on this board. Note that we are using the nboot command from U-boot, which guarantees that we just copy the number of bytes specified in the uImage header.

In this case, we have a slow CPU with slow storage. Therefore, we expect both the kernel size and the decompression algorithm to have a major impact on boot time.

This case is a typical example of industrial systems (AT91SAM9263 is still very popular in such applications, as we can see from customer requests), booting from NAND storage operating with a 200 to 400 MHz CPU.

Compression Size Loading time Uncompressing time Total time
gzip 2386936 5.843289 0.935495 6.778784
lzma 1794344 4.465542 6.513644 10.979186
xz 1725360 4.308605 4.816191 9.124796
lzo 2608624 6.351539 0.447336 6.798875
None 4647908 11.080560 0 11.080560

Lessons learned

Here’s what we learned from these benchmarks:

  • lzo is still the best solution for minimum boot time. Remember, lzo kernel compression was merged by Bootlin.
  • xz is always better than lzma, both in terms of image size. Therefore, there’s no reason to stick to lzma compression if you used it.
  • Because of their heavy CPU usage, lzma and xz remain pretty bad in terms of boot time, on most types of storage devices. On systems with a fast CPU, and very slow storage though, xz should be the best solution
  • On systems with a fast CPU, like the Panda board, boot time with xz is actually pretty close to lzo, and therefore can be a very interesting compromise between kernel size and boot time.
  • Using a kernel image without compression is rarely a worthy solution, except in systems with a very slow CPU. This is the case of CPUs emulated on an FPGA (typically during chip development, before silicon is available). In this particular case, copying to memory is directly done by the emulator, and we just need CPU cycles to start the kernel.

HOWTO – Mailing lists with Mailman on Ubuntu 10.04

GNU mailman logoBootlin is not in the system administration business (we offer free and open-source solutions for embedded systems), but we do our best to share whatever experience we acquire, and whatever code we produce.

We configured a KVM virtual machine to run our mailing lists, and we used Ubuntu 10.04, the long term support (LTS) version. Here are instructions based on this experience. You could also use the same instructions to install Ubuntu 10.04 on a tiny, low power ARM board. And if you wish to use a more recent version of Ubuntu, I expect the steps to be very similar.

Here we assume that your domain is example.com and that you install your mailing list software on lists.example.com. It is indeed a good idea to install your mailing list software on a different server. This way, you won’t mess up with your main web and mail servers. Not having CGI scripts running on it will also keep your main mail server more secure.

Install packages

Install the Apache web server. It will allow administrators to configure and manage the lists, and users to subscribe, unsubscribe and tune their subscription settings.

sudo apt-get install apache2

For e-mail delivery, I chose the Postfix MTA (Mail Transport Agent). Exim would have been a good solution too, but I am more familiar with Postfix, which is already in use on our main mail server.

sudo apt-get install postfix

Choose the Internet site option.

Now install the mailman package:

sudo apt-get install mailman

Select the languages that you want your mailing list interfaces to support. I chose English and French for the moment. To add more languages later, run:

sudo dpkg-reconfigure mailman

Configure the Apache web server

First copy the sample Apache configuration file provided by the mailman package:

cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman

Now, in /etc/apache2/sites-available/mailman, enable short URLs by enabling:

ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/

Also modify /etc/mailman/mm_cfg.py:

DEFAULT_URL_PATTERN = 'http://%s/mailman/'

The last step is to enable your mailman site in Apache:

sudo a2ensite mailman
sudo /etc/init.d/apache2 restart

You should now have a new symbolic link in /etc/apache2/sites-enabled/.

Check that the Mailman website works by opening your mailing lists home page: http://lists.example.com/mailman/listinfo. It should look like https://lists.bootlin.com/mailman/listinfo.

Configure postfix

Enable the following line in /etc/mailman/mm_cfg.py:

MTA='Postfix'

Once the MTA is configured, generate Mailman specific aliases for Postfix:

sudo /usr/lib/mailman/bin/genaliases

Now, you need to configure Postfix through its main.cf file. A convenient way to do this is to run the below commands:

sudo postconf -e 'relay_domains = lists.example.com'
sudo postconf -e 'transport_maps = hash:/etc/postfix/transport'
sudo postconf -e 'mailman_destination_recipient_limit = 1'
sudo postconf -e 'alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases'

Also add the following line to /etc/postfix/transport:

lists.bootlin.com      mailman:

and run:

sudo postmap -v /etc/postfix/transport

You won’t have any mail delivery if you forget. I struggled for a few hours before I realized I forgot this setting.

Now, set correct file ownership:

sudo chown root:list /var/lib/mailman/data/aliases
sudo chown root:list /etc/aliases

For logging and debugging e-mail delivery, I recommend to install the sysklogd package. Without it, you won’t have any mail.info, mail.warn and mail.err files in /var/mail/.

To install this package, enable the universe repository if needed (uncomment the lines with universe in the /etc/apt/sources.list file), and run:

sudo apt-get update
sudo apt-get install sysklogd

To avoid having two mail.info and mail.log files with identical contents, edit /etc/syslog.conf and remove the below line:

mail.*                          -/var/log/mail.log

Also create a /etc/logrotate.d/mail file to rotate logs, as in the below example:

/var/log/mail.* {
        daily
        size 10M
        rotate 4
        compress
        missingok
        notifempty
        create 640 root adm
}

Last but not least, restart Postfix:

/etc/init.d/postfix restart

At this point, a good idea is to check that mail delivery works:

sudo apt-get install bsd-mailx
mailx alice@example.com
Subject: test
test
.
Cc: 

Note: that’s the line containing only a dot character that allows to terminate the message.

If the receipient doesn’t receive this message, there is an issue in the way your mail server is configured. This could be because the firewall doesn’t allow connections to outside machines through tcp port 25. Anyway, look at the logs in /var/log/mail.* to get a clue. There is no point going on in this howto until you get this fixed.

Creating the mailman site list

Mailman needs a so-called “site list”, which is the list from which password reminders and such are sent out from. The default name for this list list mailman, though you can change this through the MAILMAN_SITE_LIST setting in /etc/mailman/mm_cfg.py.

To create this list, run:

sudo newlist mailman

You will have to answer a few questions like:

Enter the email of the person running the list: postmaster@example.com
Initial newsletter password: xxx
Hit enter to notify newsletter owner...

Choose the password carefully, as crackers will be able to highjack your mailing list if it is too easy to guess.

The next required step is to add the list aliases to /etc/aliases:

# mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

In addition to delivering e-mail to the mailing lists, these aliases also allow to subscribe and unsubscribe by writing to special e-mail addresses.

You also need to run the newaliases command, without which there is no e-mail delivery:

sudo newaliases
sudo /etc/init.d/postfix restart
sudo /etc/init.d/mailman restart

Look at the /var/log/mailman/error file for potential issues.

Create regular mailing lists

Regular mailing lists are created in the same way as above: Assuming you want to create a newsletter mailing list. You will need run:

sudo newlist newsletter

Add your new mailing list to /etc/aliases:

# newletter mailing list
newsletter:              "|/var/lib/mailman/mail/mailman post newsletter"
newsletter-admin:        "|/var/lib/mailman/mail/mailman admin newsletter"
newsletter-bounces:      "|/var/lib/mailman/mail/mailman bounces newsletter"
newsletter-confirm:      "|/var/lib/mailman/mail/mailman confirm newsletter"
newsletter-join:         "|/var/lib/mailman/mail/mailman join newsletter"
newsletter-leave:        "|/var/lib/mailman/mail/mailman leave newsletter"
newsletter-owner:        "|/var/lib/mailman/mail/mailman owner newsletter"
newsletter-request:      "|/var/lib/mailman/mail/mailman request newsletter"
newsletter-subscribe:    "|/var/lib/mailman/mail/mailman subscribe newsletter"
newsletter-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe newsletter"

Then, run the usual commands:

sudo newaliases
sudo /etc/init.d/postfix restart
sudo /etc/init.d/mailman restart

Configuring your lists

The easiest way to configure your lists and add members is to open the http://lists.example.com.com/mailman/listinfo URL with a browser.

A few things are also possible from the command line. For example, you can add a member as follows:

echo "alice@example.com" > /tmp/foo
sudo add_members -r /tmp/foo newsletter

Enabling archives

Default file permissions are not completely ready to support mailing list archives:

sudo chown -R root:list /var/lib/mailman/archives
sudo chmod o+rX /var/lib/mailman/archives/private

The second line allows the webserver to access the archives. Note that these settings were forgotten in the official Ubuntu documentation.

Settings for newsletter mailing lists

At Bootlin, we also use Mailman to deliver our newsletters. Mailman provides recipients with an easy mechanism to subscribe by themselves and unsubscribe whenever they want.

To make it even easier to unsubscribe from a newsletter, Mailman can add a special footer to each recipient, with a custom URL that allows to unsubscribe without having to remember one’s password.

To enable this feature, you have to enable the following line in /etc/mailman/mm_cfg.py:

# Extra options
# Allow to personalize each message
# (useful to provide a password-less unsubscribe link)
OWNERS_CAN_ENABLE_PERSONALIZATION = 1

Restart Mailman (/etc/init.d/mailman restart) and go to the administrative interface for your list. Under Non digest options, you will then be able to set the Should Mailman personalize each non-digest delivery? option to Full Personalization.

Then, you can set a custom footer for each recipient in the Footer added to mail sent to regular list members option. Here is an example:

_______________________________________________
Bootlin quarterly newsletter
Unsubscribe: %(user_optionsurl)s?password=%(user_password)s
Archives: https://lists.bootlin.com/pipermail/newsletter/

Beware that sending custom e-mails to each recipient will increase the load on your server. You may not want to do this on mailing lists with great numbers of subscribers.

Useful resources

The below ressources were useful to prepare this HOWTO document:

Don’t hesitate to ask questions and give feedback by leaving a reply below.

New quarterly newsletter: 2011 report, best wishes and 2012 plans

The Bootlin team wishes you a Happy New Year 2012 and all the best for your professional and personal projects. We are taking this opportunity to give some news about Bootlin.

In 2011, Bootlin has:

Worked on multiple development projects for various customers. Amongst the most important ones:

  • development of an embedded Linux system and Qt-based application for a RFID/GSM device based on the AT91 ARM processor
  • boot time reduction on a MIPS-based point-of-sale system, by improving the embedded Linux system integration
  • development of an embedded Linux system for an AT91-based device for the medical field (kernel and bootloader adaptation, system integration, application porting)
  • porting of the PREEMPT_RT patch set to the 2.6.32 kernel delivered by Texas Instruments
  • developed the driver for the Analog to Digital converters built-in the AT91 processors
  • conducted a real-time performance analysis of the PREEMPT_RT and Xenomai solutions on AT91 based processors
  • developed an Ubuntu-based embedded system on a BeagleBoard, for image acquisition and analysis with OpenCV
  • boot time reduction on an i.MX-based device, with major bootloader modifications
  • developed a demonstration system for a racing car control panel on a AT91-based device, with a Qt graphical application

Helped customers solve various embedded Linux related problems, through the support provided by Bootlin engineers

Contributed to various open-source projects:

  • 167 patches to the Buildroot build system
  • 6 patches to the Linux kernel, and more are coming with the mainlining of our AT91 ADC driver
  • 6 patches to the Barebox bootloader
  • 4 patches to the U-Boot bootloader
  • 3 patches to the LTT-ng project

Given multiple sessions of our Embedded Linux system development and Linux kernel and driver development courses. The materials of these courses are being constantly updated and are still freely available under a Creative Commons license.

Prepared materials for a new Android system development course. A four days training session to understand the Android system architecture, how to build and customize an Android system for a given hardware platform, how to extend the Android platform to take new hardware devices into account. A first public session will be organized in June in Toulouse.

Switched the hardware platform used in our Embedded Linux system development course from the aging Calao USB-A9263 platform (AT91-based) to the much more powerful IGEPv2 platform from ISEE (OMAP3-based), offering more possibilities to improve our course.

Hired a new engineer, Maxime Ripard, with Android and embedded Linux experience, and created a new office in Toulouse, France.

Moved its headquarters to Orange, France. While we remain reasonably close the Nice area, where we started, we get closer to other parts of France.

Given two presentations at the Embedded Linux Conference Europe in Prague (Using Buildroot for real projects and Qt for non-graphical applications), gave one presentation on boot time reduction at the GENIVI meeting in Dublin, and gave five editions of an embedded Linux introduction seminar in France.

Attended multiple conferences, for which the Bootlin team also recorded and published videos of the talks:

Participated to the development of the community of Linaro, an engineering organization working on improving Linux on the ARM platform. In addition to making sure that Linaro has all the infrastructure required to nurture a community of developers and users, we also supported Linaro release users on AskLinaro.

In 2012, we expect to:

Work on more development projects in the field of kernel porting, boot time reduction, power management and embedded Linux system integration.

Announce several new training sessions:

  • Git training. A two days training session to clearly understand how to use the Git distributed version control system, both for internal projects and for contribution to open-source projects.
  • Advanced Buildroot training. A three days training session to get a clear and detailed understanding of the Buildroot embedded Linux build system: how to add new packages, how to customize it to generate the embedded Linux system for a given hardware platform.

As we are currently preparing those courses, we are definitely interested in having feedback. Do not hesitate to contact us with your ideas and needs about those topics.

Switch our Linux kernel and driver development course to an OMAP3-based platform, and expand it to the development of a driver for an I2C-attached device.

Convert our training materials to a text source format (LaTeX), and maintain them in a public git tree, making it easier to contribute to them and to follow changes between between versions.

Participate to multiple conferences. Bootlin will be present at the FOSDEM in Brussels in February, at the Android Builders Summit and the Embedded Linux Conference in San Francisco in February, and also at the Embedded Linux Conference Europe in Barcelona in October. This participation to conferences allows Bootlin engineers to remain up-to-date with the latest developments in the embedded Linux area and to create useful contacts in the community.

You can follow Bootlin news by reading our blog (24 articles in 2011) and by following our quick news on Twitter.

Bootlin remains available to help you in your embedded Linux projects, either through its development and support services or through its training sessions. Do not hesitate to contact us!

Best regards, and again, Happy New Year 2012!

Gregory, Maria, Maxime, Michael and Thomas – Bootlin

Embedded Linux boot time reduction presentation for GENIVI

GENIVI LogoI was invited to speak at the GENIVI All Members Meeting that took place on May 3-6 in Dublin, Ireland. This was a very interesting opportunity to meet new people in the In Vehicle Infotainment (IVI) industry and community.

In addition to the friendly social event at the Guiness Brewery, there was also a very interesting technical showcase of products and software using the GENIVI stack. I could observe that Freescale and ARM chips in general dominate this market. I also wore my Linaro shirt and had interesting discussions with several people about partnership opportunities between GENIVI and Linaro.

I gave a presentation about reducing boot time in embedded Linux systems. The slides are available in PDF and ODF formats, and as usual, are released with a Creative Commons Attribution – Share Alike 3.0 license. Here is the description of the talk:

Cheap Linux boot time reduction techniques

By Michael Opdenacker, Bootlin

More and more feature rich Linux devices are put in the hands of consumers, and the average consumer shouldn’t even notice that they run Linux. To make the OS invisible, the system should boot in a flash.

Multiple boot time reduction techniques are now available, and can be used at the end of a development project, without incurring redesign costs. This presentation will guide embedded Linux system developers through the most effective ones. For each technique, we will detail how to use it and will report the exact savings achieved on a real embedded board.

Author’s biography

Michael Opdenacker is the founder of Bootlin (https://bootlin.com), a company offering development, consulting and training services to embedded Linux system developers worldwide. He is always looking for innovative techniques to share with customers and with the community.

Michael is also the Community Manager for Linaro (http://linaro.org), a not-for-profit engineering organization working on software foundations for Linux on ARM, to reduce fragmentation between ARM chip vendors, increase product performance and reduce time to market. Linaro currently employs more than 100 of the most active developers in the ARM and embedded Linux community.

I was pleased to have a good number of participants, and to get many questions during and after the talk.

Though GENIVI is about Free and Open Source Software, it is unfortunately not very open to the community yet. You have to become a member to access its specifications, wiki and other technical resources. While collecting membership fees makes sense to operate such an organization, and is acceptable for system makers, it makes it difficult for embedded Linux community developers to get involved. I hope that GENIVI will become more open to the wider embedded Linux community in the future.

ELC-E 2010 tutorial videos

Videos from the embedded Linux and Android tutorials at ELC-E 2010, by Chris Simmonds

As releasing ELC-E 2010 videos, here are recordings of the embedded Linux and Android tutorials, performed by Chris Simmonds on October 26, 2010.

Chris SimmondsVideo capture
2net
The Embedded Linux Quick Start Guide – Part 1
Slides
Video (52 minutes, 397M)
Chris SimmondsVideo capture
2net
The Embedded Linux Quick Start Guide – Part 2
Slides
Video (79 minutes, 660M)
Chris SimmondsVideo capture
2net
The Embedded Linux Quick Start Guide – Part 3
Slides
Video (67 minutes, 501M)
Chris SimmondsVideo capture
2net
What else can you do with Android? – Part 1
Slides
Video (49 minutes, 432M)
Chris SimmondsVideo capture
2net
What else can you do with Android? – Part 2
Slides
Video (31 minutes, 293M)
Chris SimmondsVideo capture
2net
What else can you do with Android? – Part 3
Slides
Video (59 minutes, 545M)