Qt and Layouts

When I first started with graphics - I plotted pixels onto the screen by calculating a memory address and then poking the corresponding value. Times have changed since then. more>>


ELC 2010 videos

Videos from the Embedded Linux Conference in San Francisco, April 12-14, 2010.

The 2010 edition of the Embedded Linux Conference was once again a very interesting event. For embedded Linux developers, the Embedded Linux Conference is a perfect place to learn about new technologies, profit from the experience of other developers, and to meet key software developers.

For people who couldn’t attend this conference, and for single core people who didn’t manage to attend two or three talks at the same time, here are the videos that we managed to shoot. As usual, the videos are released with a Creative Commons Attribution – ShareAlike 3.0 license.

We hope it makes you feel like joining the next edition of the conference. If you can’t wait, what about going to ELC Europe in Cambridge (UK) in late October? It has a very interesting program too. Of the sessions will also be recorded. I hope to see you there!

As Predicted, OpenSolaris Board Disbands

OpenSolaris

When the OpenSolaris Governing Board issued their ultimatum to Oracle on July 12, few thought it would have the desired effect of saving OpenSolaris. The board sent a message that if Oracle didn't start to show some interest in OpenSolaris by August 23, they would disband and leave OpenSolaris without leadership and guidance. more>>


Dual Boot openSUSE USB Stick Installer

In the latest round of upgrades and new installs of openSUSE around here I decided to take a different approach and use the network install and install from a USB stick rather than a DVD. While I was at it I decided that I'd try to make a dual boot installer that would allow me to install either the 32-bit or 64-bit version of the latest openSUSE (version 11.3) from the same USB stick. more>>


Buildroot 2010.08 released!

Buildroot logoOn the last day of August, just in time, the 2010.08 version of Buildroot has been released. For the record, Buildroot is an easy-to-use embedded Linux build system: it can build your toolchain, your root filesystem with all its components (Busybox, libraries, applications, etc.), your kernel and your bootloaders, or any combination of these components.

Amongst the interesting changes in this version :

  • Complete rewrite of the bootloader build code. It contained a lot of legacy, unused and unclear stuff, it is now much easier to use and extend. We’ve removed support for Yaboot and added support for the new Barebox bootloader, and all the code to support AT91Bootstrap, AT91DataFlashBoot, U-Boot, Grub and Grub 2 has been rewritten.
  • Complete rewrite of the Linux kernel build code. It was also complicated to use, with an horribly complicated kernel version selection mechanism, the new code is much easier to configure and use.
  • The configuration file .config is now located in the out-of-tree directory when the O= option is used. So typically, for an out-of-tree build (which are very convenient when using the same Buildroot source tree for different projects/tests), you could do : mkdir ~/myoutput ; make O=~/myoutput menuconfig ; make O=~/myoutput
  • Support for building NPTL toolchains with uClibc, using the latest uClibc snapshots.
  • Support for the gconfig Gtk-based configurator, in addition to the already available menuconfig and xconfig
  • A particular effort has been put on fixing many of the bugs in our Bugzilla, improving robustness thanks to automated random builds, and converting even more packages to the generic and autotools infrastructure
  • Various things have also been deprecated: support for the CRIS, IA64, Sparc64 and Alpha architectures, support for Gtk over DirectFB (which is at the moment not supported upstream), Java support (no maintainer has volunteered to maintain this in Buildroot)
  • Many components have been bumped to newer versions
  • The shared configuration cache, which allowed to speed up the configuration of different packages, has been disabled by default, since it was causing a lot of problems with certain package configurations

I’ve again contributed to a significant portion of this release, being the author of the bootloader build code cleanup, the Linux kernel build code rewrite, leading an effort to reduce the number of outstanding bugs in our Bugzilla and many other little things. The contributors for this release are shown below :

   175  Peter Korsgaard
   168  Thomas Petazzoni
    38  Gustavo Zacarias
    18  cmchao
     8  Luca Ceresoli
     7  Paul Jones
     6  Lionel Landwerlin
     6  Malte Starostik
     5  Yann E. MORIN
     3  Julien Boibessot
     3  Khem Raj
     2  Dmytro Milinevskyy
     2  Francois Perrad
     2  Nick Leverton
     2  Peter Huewe
     2  Stanislav Bogatyrev
     1  Baruch Siach
     1  Bjørn Forsman
     1  Daniel Hobi
     1  Darcy Watkins
     1  Darius Augulis
     1  H Hartley Sweeten
     1  Karl Krach
     1  Kelvin Cheung
     1  Ossy
     1  Sagaert Johan
     1  Simon Pasch
     1  Slava Zanko
     1  Thiago A. Correa
     1  Will Wagner
     1  Yegor Yefremov

For the next release, there are already a few things in the pipeline :

  • Cleanup of all the board support code in Buildroot, in order to cleanly add support for more boards like BeagleBoard, Qemu boards, Calao boards, etc. We’ll use the new minimal defconfig mechanism used by the kernel. I’ve already started working on this
  • Cleanup of the package download process, to support Git and SVN download. The code has already been written by Maxime Petazzoni, reviewed on the list, so I expect it to be included fairly soon
  • Rewrite of libtool handling code, to remove some of our ugly libtool hacks. The code is currently being worked on by Lionel Landwerlin
  • Support for compiling toolchain using Crosstool-NG as a backend. The code is currently being finalized by Yann E. Morin, the author of Crosstool-NG
  • Further work on package uninstallation, clean partial rebuild. Some work has been started by Lionel Landwerlin, but it needs some discussion
  • Continue the conversion of packages to the generic and autotools infrastructures
  • I have also a ton of other things on my TODO-list : rework gdb/gdbserver support with external toolchains, rework the configuration of IPv6/RPC/locale/etc. with external toolchains, set up a Wiki-based Buildroot website with tutorials and better documentation, clean up the toolchain build process, reduce the number of “enhancement” bugs waiting in our Bugzilla, etc.

As Peter Korsgaard, Buildroot maintainer, said in the 2010.08 announcement: The next release is going to be 2010.11. Expect the first release candidate in late October and the final release at the end of November..

It is worth noting that we will be having a Buildroot Developer Day, on Friday 29th October, right after Embedded Linux Conference Europe. At least Peter Korsgaard, Lionel Landwerlin, Yann E. Morin and myself should be there.

Update your WordPress site from scripts

An example Python script, which can be re-used with other website engines.

WordPress logoThe Free Electrons website is proudly powered by WordPress. It is a mix of static pages and blog posts, and we are very satisfied of the way we can manage and post content.

Being the webmaster, I had an issue though. Several of our pages share the same bits of content, in particular the descriptions of our public training sessions. To avoid discrepancies between pages, I ended up writing scripts to generate the contents of these pages from common parts. However, updating those pages on the website was done with manual copying and pasting, which was time consuming and error prone.

Fortunately, after some on-line research and practical experiments, I found a simple way of automating the process of login to our WordPress site, open a page for editing, and submitting a new version of the contents.

Since this wasn’t really straightforward, I’m happy to share the Python script I came up with, hoping that it be useful to you too:

#!/usr/bin/env python
#
# update-wordpress-page: updates a WordPress page with the contents
# of the input file
#
# Usage: update-wordpress-page url-base post-id content-file
#
# Example: update-wordpress-page myblog.com 245 page-contents
#
# For each url-base, the $HOME/.update-wordpress-page file
# should give the wordpress user and password
#
# Multiple wordpress sites are supported.
#
# Tested with Python 2.6 and WordPress 3.0
#
# Advantage: you don't have to leave a direct database connection
# to your website open, and don't have to understand
# the WordPress database.
#
# Copyright 2010, Free Electrons, michael@free-electrons.com
# License: Public domain

import urllib, urllib2, cookielib, optparse, sys, os
import ConfigParser, ClientForm

usage = 'Usage: %prog url-base postid page-contents'
description = 'Updates a WordPress page with the specified contents'
optparser = optparse.OptionParser(usage=usage, version='1.0beta1', \
 				  description=description)
(options, args) = optparser.parse_args()

if len(args) != 3:
   print 'Wrong number of arguments. Exiting.'
   sys.exit()

url_base = args[0]
post_id = args [1]
login_url = 'http://' + url_base + '/wp-login.php'
url = 'http://' + url_base + '/wp-admin/post.php?post=' \
      + post_id + '&action=edit'

page_contents = args[2]
file = open(page_contents)
new_contents= file.read()
file.close()

# Read configuration file

config = ConfigParser.RawConfigParser()
config.read(os.environ['HOME'] + '/.update-wordpress-page')
user = config.get(url_base, 'user')
password = config.get(url_base, 'password')

# Open the authentication page
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

login_data = urllib.urlencode({'log' : user,
'pwd' : password,
})

# Log in
resp = opener.open(login_url, login_data)
resp.close()

# Access member only pages
resp = opener.open(url)

forms = ClientForm.ParseResponse(resp, backwards_compat=False)

try:
	# WordPress has multiple forms and uses forms[1] for content
	# Other versions or other CMS may use [0] or [2]...
	form = forms[1]
	form["content"] = new_contents
	content = opener.open(form.click()).read()
	check_success(content)

except urllib2.HTTPError, e:
	sys.exit("%d: %s" % (e.code, e.msg))
except IOError, e:
	print e
except:
	pass

resp.close()

This script can only be used to modify an existing page. It just changes the contents, and doesn’t touch other attributes. Of course, you could also extend it to create new pages and posts, but this would represent much more work, having lots of input fields to fill.

Another approach would have been to open a direct database connection to the server running WordPress, and then to perform your updates directly with SQL commands. However, this requires a knowledge about WordPress databases (making the script much less generic), and the open database port also makes your website less secure.

To use my script, you will first have to find the edit URL for your page, which reveals the WordPress post id.

I suggest you to create a special WordPress user with Editor privileges. The page history will then show which changes were automated, and which were manual.

The last thing you will have to do is create a $HOME/.update-wordpress-page configuration file as follows:

[free-electrons.com/fr]
user=bot
password=ERrdrsdGp8

[free-electrons.com]
user=bot
password=Hgdeedxx55

You can easily tune this script to support other web content engines. You first need to identify the login page (WordPress uses cookies to authenticate a session, instead of simple http authentication). Then, you will find the names of the input forms by reading the login page HTML code.

The second step is to open the page editing URL, and find out the name of the input form used for the page contents.

We don’t offer official support for our script, but I hope that this working code example will help you to make your own scripts, and to get you started faster. Python’s urllib2 and ClientForm really make this easy to do. What I especially like with ClientForm is its ability to modify the value of a given form, without having to read and fill any other input forms in the page, to keep their default content.

New Wine: Running Windows Music & Sound Applications Under Wine 1.2

New Wine logo here.

Wine runs many Windows programs nicely these days, including more and more serious music applications. Dave profiles some of those applications running under the latest & greatest Wine 1.2 more>>


Google Adds Phone Calls to Linux Gmail Use

Google Phone

Five days after the announcement of Voice and Video Chat service in Gmail for Debian-based Linux distributions, Google unveiled a Gmail phone call service for Windows, Mac, and Linux. more>>


Linux Journal Insider - October 2010

This month Shawn and Kyle throw out X-Windows, and kick it old
school with the command line issue. Granted, "kicking it old school"
isn't really a stretch for them, especially Kyle, but you can join in
the fun with an entire issue focused on command line tools. Whether more>>


Virus Scan A Windows Machine

How often do we all hear the phrase, “Could you take a look at it for me?” Whether you are checking out a machine for a friend or colleague or looking after one of your own machines, it's handy to have the ability to virus check a Windows setup from the safety of a Linux boot CD or USB stick. This short guide shows you how to scan for infected files by booting into SystemRescueCD and running ClamAV, a virus checker. more>>


BuGLe—OpenGL Debugging Wrapper

BuGLe is a tool for OpenGL debugging, implemented as a wrapper library that sits between your program and OpenGL. Although it's still in development, the Web site states that it already can do the following: more>>


Stupid tar Tricks

One of the most common programs on Linux systems for packaging files is the venerable tar. tar is short for tape archive, and originally, it would archive your files to a tape device. Now, you're more likely to use a file to make your archive. To use a tarfile, use the command-line option -f . To create a new tarfile, use the command-line option -c. more>>


Spotlight on Linux: Parsix 3.6 (RC)

Parsix 3.6

Parsix GNU/Linux is a great little distro hailing from the exotic lands of Persia. It features a lovely customized GNOME desktop and lots of handy applications. It reminds folks of Ubuntu in many ways and is often described as a nice alternative to Ubuntu. more>>


Recruiting in Toulouse, France

Penguin worksFor the French speaking readers, we are looking for a graduate engineer to open a new office in Toulouse, France.

All the details are available on our French blog.

This job is not only open to French applicants. Everyone ready to relocate in Toulouse is welcome, but we need someone with a good command of the French language. This will be needed to serve local customers.

Free and Open-Source Software -- An Analog Devices

RMLL 2010 : film sur la fresque communautaire

Salut.

Durant toute la durée des RMLL 2010 à Bordeaux (Rencontres Mondiales du Logiciel Libre), une fresque communautaire a été réalisée. Un film a été fait (image par image) pour suivre l'évolution de la fresque durant la semaine des RMLL à l'ENSEIRB-MATMECA.

Superbe film avec la musique qui va bien permettant de prendre aussi conscience du temps qui passe...

Le film de la fresque communautaire des RMLL 2010 par Nyredia : http://www.nyredia.org/Film_rmll.ogv

++

Fedora 13 vs Fedora 12 : comparaison des performances pour les versions 32 bits

Salut.

Avec le passage de ma machine à Fedora 13, avec un peu de retard (pour cause en autre d'organisation des RMLL 2010 à Bordeaux), j'en ai profité comme à chaque fois, pour comparer les performances de Fedora 13 à celles de Fedora 12 pour la version 32 bits uniquement.

Pour rappel, ma machine est équipée d'un Quad Core Intel Q6600 à 2,4 GHz avec 4 Go de RAM.

Je me suis limité au benchmark UnixBench qui fournit un indice global, ce qui me simplifiera la comparaison. La version UnixBench utilisée est la version 4.1.0.

Mon protocole de tests est le suivant :
  • Installation de Fedora 13 avec mise à jour version 32 bits avec le noyau Fedora 2.6.33.6-147.fc13.i686.
  • La machine est placée en niveau 3 (init 3).
  • 10 séries de tests avec UnixBench compilé sous Fedora 13 et exécuté sous Fedora 13 (noyau Fedora 2.6.33.6-147.fc13.i686).
  • 10 séries de tests avec UnixBench compilé sous Fedora 12 et exécuté sous Fedora 12 (noyau Fedora 2.6.31.6-166.fc12.i686).
Voici les résultats obtenus :

Fedora 13 version 32 bits :


Série 1 : 686.6
Série 2 : 670.5
Série 3 : 685.4
Série 4 : 683.8
Série 5 : 690.0
Série 6 : 684.3
Série 7 : 674.3
Série 8 : 685.3
Série 9 : 684.7
Série 10 : 684.7

Moyenne : 683,0

Fedora 12 version 32 bits :

Voici pour rappel les résultats obtenus avec Fedora 12 :
Série 1 : 640.6
Série 2 : 636.1
Série 3 : 619.4
Série 4 : 634.3
Série 5 : 637.7
Série 6 : 630.6
Série 7 : 634.8
Série 8 : 641.3
Série 9 : 643.2
Série 10 : 641.1

Moyenne : 635,9


Résultats :

Pour Fedora 13, on obtient un indice moyen de 683,0 pour UnixBench.
Pour Fedora 12, j'avais obtenu un indice moyen de 635,9 pour UnixBench.


On a donc un gain moyen de près de 7,4 % de Fedora 13 32 bits par rapport à Fedora 12 32 bits...


Conclusion :


Au moment de ces tests, le noyau Fedora 13 (basé sur le noyau vanilla 2.6.33) est nettement plus performant que le noyau Fedora 12 (basé sur le noyau vanilla 2.6.31). On retrouve les performances comparables à celles d'un noyau Fedora 10. Cela confirme ce que l'on avait noté avec le noyau Fedora 12...


++

ELC Europe 2010 sessions announced

List of sessions and speakers at ELC Europe in Cambridge, UK

Cambridge, UKBeing a member of the organization committee of the Embedded Linux Conference Europe, I get access to fresh news about this yearly conference. The call for presentations is now over and we have just announced the list of sessions.

Note that this list is not the final one yet. Some speakers haven’t confirmed their participation or haven’t sent their biographies yet. There are also two or three speakers added at the last minute who are not listed yet.

The conference will happen in Cambridge, UK, on October 27-28, 2010. Keep an eye on the website (or on our blog). Registration should open in a few days from now, and all practical details will be given then.

See also the agenda of the GStreamer conference which will happen at the same location on the day before.

Tablette Internet tactile à 35 dollars !

Salut.

Des chercheurs et entreprises indiennes ont réussi à développer une tablette Internet tactile pour 35 USD !

Superbe prouesse technique pour une tablette avec 2 Go de RAM, Wi-Fi, et ports USB. Le prototype tourne sous GNU/Linux !

++

 

Cours libres de Free Electrons

Salut.

Les copains de Free Electrons proposent un ensemble de cours libres complets sur Linux en général et Linux embarqué en particulier.

Leur formation Linux embarqué est disponible ici avec l'ensemble des transparents et exercices.

Félicitons cette initiative. Merci Michael et Thomas !

++

How to find the root device?

How to find which device corresponds to your root filesystem

I recently found something I was looking for for quite a long time. If you use the mount command in Linux, you can see that the root device is not listed like the other mounted filesystems:

/dev/root on / type ext3 (rw)
/dev/mmcblk0p1 on /mmcboot type vfat (rw)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /dev type tmpfs (rw,mode=0755)
...

For the / mount point, you are just told that it corresponds to /dev/root, which is not the real device you are looking for.

Of course, you can look at the kernel command line and see on which initial root filesystem Linux was instructed to boot (root parameter):

$ cat /proc/cmdline
mem=512M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait

However, this doesn’t mean that what you see is the current root device. Many Linux systems boot on intermediate root filesystems (like initramdisks and initramfs), which are just used to access the final one.

I explored the contents of /proc, but didn’t find any file revealing what the root device is.

Fortunately, I eventually found a command to find the root device:

$ rdev
/dev/mmcblk0p2 /

But how does this work? How could we find such information by ourselves? Use the Source, Luke!

When you ask yourself questions like this one, the best is to look at the BusyBox sources which implement this command. These sources are usually simpler than the ones for the same GNU command.

Here is what BusyBox rdev does… It first runs the stat system call on the / directory. Let’s run the stat command that corresponds to it:

$ stat /
  File: `/'
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: b302h/45826d	Inode: 2           Links: 23
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2010-07-21 22:00:01.000000000 +0200
Modify: 2010-06-13 15:04:37.000000000 +0200
Change: 2010-06-13 15:04:37.000000000 +0200

What’s interesting is the Device field. It means that the device corresponding to / has the major number b3 in hexadecimal (179 in decimal), and minor number 02. Bingo, this corresponds to /dev/mmcblk0p2:

$ ls -l /dev/mmcblk0p2
brw-rw---- 1 root disk 179, 2 Jan  1  1970 /dev/mmcblk0p2

Therefore, what BusyBox rdev does is walk through /dev and its subdirectories to find a device file matching the major and minor numbers.

This is not a completely generic solution though. On some very simple embedded systems, you don’t even need to create device files for all existing devices. In particular, the device file for the root filesystem doesn’t have to exist. In such a case, rdev wouldn’t be able to find the root device.

A more generic solution could be to walk through /sys/block which enumerates all the block devices present on a system (even if not all of them have an entry in /dev/. This would allow to find the device with the matching major and minor numbers:

$ cat /sys/block/mmcblk0/mmcblk0p1/dev
179:1

Through this example, you can see how useful it can be to study the sources of system commands to understand how the system works. BusyBox sources, implementing simplified versions of GNU utilities, make this even easier.

Ubuntu 10.04 on the IGEPv2 board

Installing Ubuntu 10.04 on the IGEPv2 board. Using the board as a small server.

IGEPv2 boardLast year, folks at Texas Instruments told me about the IGEP v2 board. This board is similar to the Beagle board, but also features 512 MB of RAM and NAND flash (instead of 256 for the Beagle), on board Ethernet (RJ45), Wi-Fi and Bluetooth, all this for only 145 €! Its fast ARM CPU (TI OMAP 3530 running at 720 MHz) and graphical capabilities allow it to be used in for services usually performed by desktop or server CPUs.

At the Free Electrons main office, we needed a server to share files, create backups and upload these backups to our servers on the Internet. I decided to use the Ubuntu 10.04 distribution on ARM, based on Debian GNU/Linux. As I didn’t find all the details I needed on the IGEP community website, here are the steps that I took. Several details were found on the http://labs.igep.es/index.php/How_to_get_the_Ubuntu_distribution page though.

This page assumes that you are familiar with building the Linux kernel, controlling an embedded board from a serial line and booting it, and using the GNU/Linux system in general (see the training materials from our embedded Linux course). Beginners may be lost because we don’t give all the details, but more experienced developers should just find the board specific details that they need.

First, get an SD card (at least 2 GB), and prepare its partitions with the mkcard.sh utility.

To compile your kernel, get a CodeSourcery toolchain for ARM. I used the 2010q1 release. Install it in /usr/local/CodeSourcery/arm-2010q1/ (for example)

Get the kernel sources:

$ mkdir $HOME/igep
$ cd $HOME/igep
$ git clone git://git.igep.es/pub/scm/linux-omap-2.6.git
$ cd linux-omap-2.6/

Let’s switch to the latest stable version:

$ git tag
v2.6.28.10-3
v2.6.28.10-igep0020b-0
v2.6.28.10-igep0020b-1
v2.6.28.10-igep0020b-2
v2.6.33.2-0
v2.6.33.4-0
$ git checkout -b v2.6.33.4-0 v2.6.33.4-0
Checking out files: 100% (13116/13116), done.
Switched to a new branch 'v2.6.33.4-0'

Now, set the environment variables for cross-compiling the kernel sources to the arm architecture:

$ export PATH=/usr/local/CodeSourcery/arm-2010q1/bin:$PATH
$ export ARCH=arm
$ export CROSS_COMPILE=arm-none-linux-gnueabi-

Now, take the default configuration for the board and build your kernel:

$ make help | grep igep
$ make igep0020_defconfig
$ make -j 4
$ make uImage

It’s time to build your Ubuntu filesystem, using the Rootstock utility:

$ tar zxvf rootstock-0.1.99.3.tar.gz
$ cd rootstock-0.1.99.3
$ sudo ./rootstock --fqdn igepv2 --login mike --password letmein --imagesize 2G --seed build-essential,openssh-server --dist lucid

Copy the kernel to the first partition of your SD card:

cp arch/arm/boot/uImage /media/boot/
cp .config /media/boot/config-2.6.33.4

Install the root filesystem on the second partition of your SD card:

$ cd /media/rootfs/
$ sudo tar zxvf $HOME/igep/rootstock-0.1.99.3/armel-rootfs-201006102239.tgz

Configure the rootfs to let you log in on the serial console (ttyS2 with OMAP). Do this by copying etc/init/tty1 to etc/init/ttyS2 and replacing tty1 by ttyS2 in this file.

Install kernel modules manually for the first time:

$ mkdir -p /lib/modules
$ cd $HOME/igep/linux-omap-2.6/
$ make INSTALL_MOD_PATH=/media/rootfs modules_install

In the Rootstock version I tested, the specified user didn’t get created (bug report). To be able to log in, I had to disable the root password by removing the first * character in the root entry in etc/shadow:

We are now ready to boot our new system. First, unmount your SD card partitions:

$ sudo umount /media/boot
$ sudo umount /media/rootfs

Insert your SD card in the slot on your board, connect your serial cable and in the U-boot prompt on the serial line, configure the kernel boot parameters:

$ setenv bootargs mem=512M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait
$ setenv bootcmd 'mmc init 0 ; fatload mmc 0 80000000 uImage'
$ setenv autostart yes
$ saveenv
$boot

You should see your Linux kernel boot and get to a login shell. Log in as root with no password.

It is now time for the final tweaks. First, create a non root user (remember the Rootstock bug), allow it to run the sudo command, and choose a root password too:

adduser mike
adduser mike sudo
passwd

Let’s cope with a last Rootstock bug. Add the updates and security repositories to /etc/apt/sources.list:

deb http://ports.ubuntu.com/ubuntu-ports lucid-updates main
deb http://ports.ubuntu.com/ubuntu-ports lucid-security main

Without this, you would miss package updates and security releases, and your packages would never change!

If you use the IGEP board as a server as I do, you may need your server to have a fixed MAC address. The trouble is the e2prom storing the MAC address is not populated by default, and every time you boot, the kernel gives you a random MAC address.

The easiest fix I found was to choose an arbitrary MAC address (you can take the first random one that you get), and force it in /etc/network/interfaces:

auto eth0
iface eth0 inet dhcp
hwaddress ether 00:01:04:1b:2C:1F

As the IGEPv2 board doesn’t have a battery by default, it won’t be able to keep the correct time. You can use the ntp daemon to address this:

sudo apt-get install ntp

Your configuration should now be complete. You can now use your IGEPv2 board as a tiny, ultra low power server with Ubuntu server. All the rest is ordinary Debian / Ubuntu server administration. Of course, you can also install desktop packages and use your board as a desktop replacement (you may need to add kernel command line settings for graphics). Have fun!

By the way, the IGEPv2 board is not the best solution if you all you need is a server. The amazing graphical capabilities of the OMAP chip would just be useless. For a server, better, cheaper and more powerful alternatives are the SheevaPlug and GuruPlug. Don’t miss these very nice devices!

Linux device drivers architecture talk at Libre Software Meeting

recursive device modelThomas Petazzoni gave a talk on the Linux kernel architecture for device drivers at the Libre Software Meeting in Bordeaux, France. While the talk was given in French, the materials are in English and can therefore benefit a larger audience. The talk seems to have been well-received, especially from people already having a basic Linux kernel development experience. The topics covered are part of our Linux Kernel development training, and are also usually very appreciated from the trainees already having Linux kernel experience.

The idea of the talk is to give an overview of how device drivers fit into the kernel, both to expose their functionality to upper layers (such as a network device driver exposes itself to the kernel network infrastructure) and to detect/access the hardware using the device/driver model, which is quite hard to understand from the source code only.

The talk went through the following sections :

  • First a basic introduction to device drivers: how devices are seen from userspace applications, and how a simple, raw, character driver can be implemented. It allowed to expose the principle of operations and their similarity with methods in object-oriented programming, and the principle of registration to an upper-layer infrastructure
  • Then, an introduction to what I call « kernel frameworks », i.e kernel subsystems that specialize a general device type (i.e character device) into a particular device type (i.e serial port device, framebuffer device, etc.). The talk illustrates this with the framebuffer core and the serial port core.
  • Finally, an explanation about the device model: bus drivers, adapter drivers and device drivers. I started with the example of the USB bus: being a dynamically-enumerated bus, it provides a good illustration of the device model principles. At the end, I explained how the device model works for the devices embedded into a SoC using the platform drivers/devices mechanism

Here are the slides of this talk.

RMLL 2010 : journée de vendredi

Salut.

Dernière journée des conférences avant de migrer tout le village des associations sur les quais de Bordeaux pour aller à la rencontre du public.

J'ai assisté à la conférence sur Androïd de mon étudiant bien surpris d'avoir autant de monde...

Journée assez calme. J'en ai profité pour prendre le temps de visiter le village des associations et rendre visite à fedora-fr (un visu avec bioinfornatics et d'autres...).

Un bilan positif sur toute la ligne !

Allez quelques news :

  • 2011 : les RMLL seront à Strasbourg.
  • 2012 : les RMLL seront à ............................... Liège en Belgique !

++ La fresque RMLL 2010.

Les copains d'Armadeus.

Du bon hardware.

Le stand fedora-fr.org.

Radio RMLL 2010.

GNU/Linux Magazine HS N°49 – AOÛT/SEPTEMBRE 2010 – Chez votre marchand de journaux

Le tout nouveau GNU/Linux Magazine HS est disponible dès maintenant chez votre marchand de journaux et sur notre site marchand.

ug_lmhs49

>
>
Où trouver GNU/Linux Magazine HS près de chez vous (Entrez un code postal)

————-

PEOPLE :

  • p. 4 Contribuer à Python : envoyer un patch

CODE :

  • p. 10 Accès au matériel avec Python : capteurs et mesures
  • p. 12 Python, le serpent très dynamique
  • p. 23 Votre environnement applicatif cloisonné avec Virtualenv et Pip

(Pour visualiser le sommaire complet, voir ci-dessous)

Sommaire (suite)

BINDING :

  • p. 28 Votre bot Jabber en Python
  • p. 32 Mettez un python dans votre Redis

APPLICATIONS :

  • p. 40 Tornado, le serveur web nouvelle génération
  • p. 44 Shinken : quand un Python rencontre Nagios
  • p. 56 Gestion de projet facile avec Trac
  • p. 60 Le projet Get-it ou la réalisation d’une table tactile

Édito : GNU/Linux Magazine HS N°49

« Ah Python ! Tu finiras par t’y mettre… »

Voici ce que j’ai entendu il y a fort longtemps déjà. Ma préférence va généralement au C et à la programmation système. La plupart des fonctionnalités que j’aime utiliser, des bibliothèques que j’apprécie ou des activités qui me réjouissent « tournent » autour du C.
Bien sûr, lorsqu’il s’agit de rapidement développer un code, d’implémenter une idée ou de régler un problème, on se détache rapidement des langages comme le C pour se tourner vers de l’interprété comme le Shell, Perl, etc. Aujourd’hui, on se tourne de plus en plus vers Python et tantôt Ruby. Pourquoi ? Car il s’agit là de langages de haut niveau, matures, et surtout, qui disposent de toutes les fonctionnalités nécessaires à satisfaire bon nombre de développeurs ou d’administrateurs système.
« Le grand perdant du succès de Python, c’est Perl ». Ceci, je l’ai entendu plus récemment et c’est sans doute vrai pour plus d’un utilisateur. C’est bien simple, Python est partout ! Des scripts d’administration aux téléphones mobiles, en passant par les applications web ou encore le bureau GNU/Linux de monsieur (presque) tout le monde.
Nous avons souhaité illustrer cette omniprésence dans ce hors-série en traitant de bien plus que du langage lui-même. Nous parlerons donc, dans les pages qui suivent, de certaines fonctionnalités de Python, bien sûr, mais également des bindings et modules qui lui apportent une telle popularité. Un langage souple et dynamique, couplé à une importante communauté et un vaste choix d’extensions signifie généralement autre chose : une gamme d’applications et de solutions très importantes. Ainsi, nous avons également inclus la mise en œuvre de quelques applications Python (ou reposant sur le langage) dans ce numéro. Serveur HTTP, supervision, gestion de projet se joignent ainsi à la fête avec, en guise de cerise sur le gâteau, la mise en œuvre d’une table interactive tactile. Connaître Python, c’est aussi mieux connaître ses applications Python et pouvoir comprendre leur fonctionnement. Tout est lié finalement.
Et voilà, avec le magazine que vous tenez entre vos mains, je peux, moi aussi, me permettre de vous dire : « Ah Python ! Vous finirez par vous y mettre… d’une manière ou d’une autre ».

Denis Bodor

Sorcier niveau 18

GESBC-9260S no serial response

GNU/Linux Magazine N°129 – JUILLET/AOUT 2010 – Chez votre marchand de journaux

Le tout nouveau GNU/Linux Magazine est disponible dès maintenant chez votre marchand de journaux et sur notre site marchand.

ug_lm129

>
>
Où trouver GNU/Linux Magazine près de chez vous (Entrez un code postal)

————-

Kernel

  • p. 4 Le mécanisme des signaux POSIX sous Linux

SysAdmin

  • p. 10 Gestion de documentation avec Calenco
  • p. 18 Redis, un Memcached aux stéroïdes
  • p. 24 Unissez Git et SVN : le duo parfait pour la gestion de versions

Unixgarden

  • p. 35 Quoi de neuf dans OpenBSD 4.7 ?

(Pour visualiser le sommaire complet, voir ci-dessous)

SOMMAIRE (suite)

NETADMIN

  • p. 36 Développement de sondes Nagios

LIVRE(s)

  • p. 42 jQuery – critique

Repères

  • p. 48 Conception et vie d’un programme, le format ELF
  • p. 56 Parce qu’y’en a marre – Marre des projets moins ouverts que leur code

Code(s)

  • p. 60 Le pixel, le polygone et la matrice – le calcul par processeur graphique
  • p. 70 Améliorez votre application Java avec des caches open source
  • p. 81 De l’utilité d’OOoBasic
  • p. 92 HTML5 VIDEO portable avec Hop

Édito : GNU/Linux Magazine N°129

Multitâche !
L’industrie informatique ou/et l’industrie marketing forment un univers fantastique, fantasmatique, intangible et quantique. Dans cet univers aux multiples réalités parallèles, la moindre avancée peut devenir une révolution, le moindre écart une catastrophe, le plus grave bogue une fonctionnalité et mieux encore, les technologies de longue date peuvent devenir des nouveautés (pouvant potentiellement, donc, découler sur une révolution).
Pour preuve, le dernier tsunami d’Apple, j’ai nommé l’iPhone 4 et son… multitâche ! Waouh ! C’est… Heu… Attendez une seconde ! Que dit Wikipédia sur le sujet ? « Le premier ordinateur multitâche dans le monde a été conçu par la firme Bull en 1958 ». Voilà qui retire un peu de lustre à la verve marketing de certains. Creusons un peu. Windows (<=3.11) et Mac OS (<=9) étaient multitâches (dits coopératifs) il y a plus de 20 ans. Les Unix (Unix, *BSD, Linux) le pratiquent, en préemptif, depuis plus de 40ans. Là, la nouveauté commence à prendre des allures tout à fait locales.
Mais le monde du marketing est plus subtile que cela. Alors que le chaland s’arrêtera sans doute au simple terme mis en avant, l’utilisateur critique et aguerri remarquera qu’il est, en réalité, question de gestion du multitâche n’impactant ni les performances ni l’autonomie. C’est là toute la magie de la communication où l’effet recherché repose sur une lecture superficielle et sur notre penchant naturel à tirer des conclusions à partir des points les plus visibles et non nécessairement les plus pertinents.
Je passe ici sur le fait qu’UBM TechInsights vient tout juste d’annoncer que le « wonderfull A4 processor » designed par Apple lui-même partage le même carré de silicium que le processeur S5PC110A01 au cœur du Samsung Wave S8500. Ah ! La communication. Quelle belle invention !
Donc, faisons un peu de marketing nous aussi. Ce magazine que vous tenez dans vos mains bouscule lui aussi tout ! Non seulement il durera deux fois plus longtemps (numéro double d’été), mais il intègre des pages (différentes de celles du précédent numéro en plus). Ce n’est pas tout ! Les titres des articles sont complètement différents de ceux du mois dernier et il est équipé d’une couverture entièrement mise à jour ! Waouh aussi donc !
Sur ce, rendez-vous le 28 août pour le tout nouveau numéro, plein, lui aussi, de nouveautés toutes neuves et nouvelles (teasing).

Denis Bodor

cours de kernel Linux en ligne

L'annonce (sur linkedIn) de ces quelques articles de début de cours sur la programmation kernel Linux me fait rappeler que des slides de formation peuvent aussi être trouvés sur le web : chez FreeElectron, et bien entendu, chez Linagora !

Bonne lecture !  :)