Cross Building Linux

Just a quick note since even if is quite easy to read the Makefile sometimes you’d rather have the solution now.
This is what I use for the efika images. The layout is the following:

/dev/sdc1 on /mnt/efika/boot type vfat (rw)
/dev/sdc2 on /mnt/efika/ type ext4 (rw)

CROSS_COMPILE and INSTALL_MOD_PATH are described quite well in the linux Makefile.
The former tell the configure which toolchain should be used, the latter where to install the modules, pretty easy, isn’t it?

You must be careful to not forget the trailing “-” from the CROSS_COMPILE and you can avoid the trailing “/” in the INSTALL_MOD_PATH

make CROSS_COMPILE=armv7a-unknown-linux-gnueabi- ARCH=arm menuconfig
make CROSS_COMPILE=armv7a-unknown-linux-gnueabi- ARCH=arm
make CROSS_COMPILE=armv7a-unknown-linux-gnueabi- ARCH=arm uImage
make CROSS_COMPILE=armv7a-unknown-linux-gnueabi- ARCH=arm INSTALL_MOD_PATH=/mnt/efika modules_install

In this specific case we need the u-boot tools to bake an uImage, in Gentoo

emerge u-boot-tools

CentOS and apache

A great part of VPS users run a CentOS, also a lot of real servers run CentOS nowadays. Usually this happens as CentOS users hope that it should be more stable, tested and secure then other distributions as being derived from an enterprise commercial one.

This might be true for most cases, but while developing PyHP we found a lot of “unknown mysterious bugs” that happened only on CentOS. After some investigation we found that apr_stat on CentOS always returns 0 as file size (this made quite interesting to allocate buffers or use mmap to read files) and also that bucket brigades had a strange behaviour, and as strange I mean that in some conditions they never considered terminated the request and caged the user in a wonderful infinite loop (as in “while(true)” not as teleporting the user to apple head quarters).

As a big percentage of PyHP users rely on CentOS we had to rewrite some parts to use lstat instead of apr_stat and also move away from bucket brigades to ap_should_client_block. If you are using CentOS and find any problem with PyHP try to upgrade to the latest svn trunk, also if you are using the svn trunk please upgrade to the latest one as there was a bug caused by the process of migrating from bucket brigades to apr_should_client_block that might prevent your users from being able to upload big files.

Brother mfc5890 on Linux Gentoo 64bit

Actually we bought a new MFC-5890  printer for the office, we have a quite homogeneous environment with mainly Linux systems, a some with Gentoo, a some with Ubuntu, a few OSX systems and two Windows. We have been quite satisfied with the fact that Brother release packages for ubuntu, but we laso had to face the fact that there wasn’t a quick way to install it on Gentoo.

So I spent some time to edit the Brother package to install on Gentoo 64bit and create a .tgz to permit to other Gentoo users to install the printer drivers in a quick way.

You can download the package from here: http://www.axant.it/static/files/Brother.tgz

Simply unpack it in /usr/local (the paths are not relative so you must unpack it inside /usr/local), enter the directory /usr/local/Brother/Printer/mfc5890cn/cupswrapper and run cupswrappermfc5890cn it will perform every step needed by the installation and will restart CUPS, you will then be able to configure your printer from cups.