Cross compiling Berkeley DB for ARM and MIPS

Following my blog entry about Databases for Linux Embedded Systems, here are the instructions to cross-compile Oracle Berkeley DB. First download the source code of the latest version of Berkeley DB (version 11gR2 – 11.2.5.1.25). You’ll need to register on Oracle website first on the download page http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html to download http://download.oracle.com/otn/berkeley-db/db-5.1.25.tar.gz (with AES encryption) or  http://download.oracle.com/otn/berkeley-db/db-5.1.25.NC.tar.gz (if you don’t need encryption). Extract the source code: tar xzvf ../Downloads/db-5.1.25.tar.gz Configure and build the source code. I’ll use mipsel-linux-gcc, but any other cross-compiler could be used. cd db-5.1.25/build_unix ../dist/configure –host=mipsel-linux CC=mipsel-linux-gcc RANLIB=mipsel-linux-ranlib STRIP=mipsel-linux-strip AR=mipsel-linux-ar –prefix=/home/jaufranc/edev/lib/db-11g make make install The full berkeley DB package is 79MB: jaufranc@CNX-TOWER:~/edev/lib/db-11g$ du –max-depth=1 -h 6.6M    ./lib 308K    ./bin 72M    ./docs 176K    ./include 79M    . However, you won’t need the include and docs directory in your embedded target. So you do not need to copy those. You may or may need the utilities in the bin file. The […]

Cross compiling SQLite for ARM and MIPS

Following my blog entry about Databases for Linux Embedded Systems, here are the instructions to cross-compile SQlite. First download the latest version of SQLite amalgamation with autoconf script (version 3.75): wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz Extract the source code: tar xzvf sqlite-autoconf-3070500.tar.gz Configure and build the source code. I’ll use mipsel-linux-gcc, but any other cross-compiler could be used. cd sqlite-autoconf-3070500 ./configure –host=mipsel-linux –target=mipsel-linux –prefix=/home/jaufranc/edev/sqlite-mips make make install At this point the library is correctly configured and installed, so you’d just need to copy the relevant files to your target board (skip include and share directories and  libsqlite3.a) . Let’s check the size of the required files: ls -l ../sqlite-mips/bin/ -rwxr-xr-x 1 jaufranc jaufranc 125513 2011-03-14 14:21 sqlite ls -l ../sqlite-mips/lib/libsqlite3.so.0.8.6 -rwxr-xr-x 1 jaufranc jaufranc 2087584 2011-03-14 14:21 ../sqlite-mips/lib/libsqlite3.so.0.8.6 sqlite binary is 122.57KB and the dynamic library 2038.65KB. Let’s see if we can optimize the binary size with compilation flags and by disabling some […]

Emulate an ARM Plaform with QEMU on Ubuntu 10.10

When developing software for embedded systems, you may need to support multiple architectures such as  arm, mips, x86, powerpc, alpha etc.. but you may not have the hardware required on hand to test them. This is where QEMU – a processor emulator – comes to the rescue. In a way, QEMU is similar to VirtualBox, VMWare or Citrix Xendeskop except it can support multiple architectures. I’ll show how to run Debian Lenny ARMEL in QEMU on a computer running Ubuntu 10.10 (aka Ubuntu Maverick Meerkat). QEMU (Qemu-kvm) Installation First install qemu-kvm and qemu-kvm-extras (the latter contains qemu-system-arm): sudo apt-get install qemu-kvm qemu-kvm-extras Let’s check qemu version: jaufranc@CNX-TOWER:~/edev$ qemu –version QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard Debian ARM Installation in QEMU Create a directory to store the required files for the emulator and  download the Debian Lenny ARMEL kernel (vmlinuz) and debian installer rootfs (initrd.gz): mkdir […]

Texas Instruments OMAP 5 based on ARM Cortex A15 Core

Texas Instruments announced its new generation of mobile chips OMAP 5 based on the latest ARM core Cortex A15.  Press release excerpt: DALLAS (Feb. 7, 2011) /PRNewswire/ — Texas Instruments Incorporated (TI) (NYSE: TXN) announced today the next generation of its popular OMAP™ family: the OMAP 5 mobile applications platform, which is positioned to transform how mobile devices, such as Smartphones, tablets and other mobile form factors are used, making them even more valuable in our daily lives. … The 28 nanometer OMAP 5 applications processors carry on the OMAP family tradition of delivering significant increases in performance and functionality, while lowering power consumption compared to their predecessors. Specifically, they offer up to 3x processing performance and five-fold 3D graphics improvement, yet provide a nearly 60 percent average power reduction compared to a sample user experience on the OMAP 4 platform. Additionally, the OMAP 5 platform’s software is designed for […]

Running .NET applications on Linux Embedded Systems

You may have some applications developed using Microsoft .NET application framework that are running on Windows XP, Windows Vista and Windows 7. .NET for Linux If after spending much effort and time, you have a request to port your application to Linux, you don’t need to rewrite everything thanks to Mono, an open source implementation of .NET framework that can be run in Windows, Linux and MacOS. The development framework is composed of three parts: Mono – An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET MonoDevelop – An open Source C# and .NET development environment for Linux, Windows, and Mac OS X Mono Tools for Visual Studio – Development Tools to develop and migrate .NET applications to Mono on Linux without leaving Visual Studio. This application can be tried for 30 days and / or purchased. This tools is compatible with Visual […]

Cross-compiling Python for MIPS and ARM Platforms

Python programming language is used in several open source projects such as Sugar OS and Xibo. Let’s see if we can cross-compile it in Ubuntu 10.10 using a mips compiler. I’ll use the instructions given at http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html. Let’s download Python 2.7.1 first and extract the source code:

Then run the following command in Python-2.7.1 in order to build some tools for the host:

There is no patch for Python 2.7.1 cross-compilation in the link above, so let’s just try to configure and build it:

If we don’t use a patch the first error is:

So I used some older patch to create a new patch: http://www.cnx-software.com/patch/python-2.7.1-cross-compile.patch. You can download it an apply it as follows:

And repeat the step above to configure and cross-compile Python for mips. Finally install Python in ~/Python-2.7.1/install for example:

After that copy all necessary files in ~/Python-2.7.1/install to your […]

Ayuda Splash Digital Signage Player Becomes Open Source

Ayuda Media Systems announced OpenSplash – a free, open source digital signage player at ISE 2011. Press Release Excerpt: Ayuda Media Systems (“Ayuda”) announced today at ISE 2011 that it will be open sourcing its Splash Digital Player. Dubbed “OpenSplash”, it is a free, multi-platform open source player that can be driven by any content management and scheduling system. “Offering a free, open source media player will enable a new wave of innovation in the signage industry” said Andreas Soupliotis, President & CEO of Ayuda. “There are a multitude of software vendors in the space that basically all do the same thing – push content from a content management system (CMS) to a network of players. Some do it a little better than others but the differentiation of identity is just not there. If there were a standard open software player that the industry rallied behind then everyone could focus […]

Resources for Atmel AT91SAM9: SAM926X, SAM9GXX, SAM9M1X, SAM9XE…

Atmel AT91SAM9 – or simply Atmel SAM9 – series are versatile microcontrollers and embedded microprocessors used in variety of products such as internet radios, embedded p2p downloaders, smart grid in-home displays, and much more. Atmel SAM9 series are divided into five subsets: The original SAM9 MCU based on ARM926EJ-S running at between 210 and 240 Mhz, namely AT91SAM9260, AT91SAM9261, AT91SAM9261S and AT91SAM9263 SAM9G eMPU (Embedded MPU) based on ARM926EJ-S, a new generation based on SAM9 MCU architecture but running at between 266 and 400Mhz: AT91SAM9G10, AT91SAM9G20, AT91SAM9G45 and AT91SAM9G46. SAM9M eMPU based on ARM926EJ-S clocked at 400Mhz and with a video decoder: AT91SAM9M10 and AT91SAM9M11 SAM9R MCU based on ARM926EJ-S running at 210 Mhz with similar characteristic as the original SAM9 MCU, except it does not support USB Host but can be used as a High Speed USB device: AT91SAM9R64 and AT91SAM9RL64 SAM9XE MCU are also based on ARM926EJ-S running […]