You may need to generate your own rootfs for your ARM target board, but do not want to cross-compile all libraries manually. You can achieve this with rootstock, a utility that generates Ubuntu armel rootfs tarballs and/or qemu image, to be uncompressed onto a root device. First install roostock: sudo apt-get install rootstock Then generate a rootfs with the required libraries: sudo rootstock –fqdn beagleboard –login cnxsoft –password temppasswd \ –imagesize 3G –seed xfce4,gdm,pkg-config,python,perl,g++,bison,flex,\ gperf,libnss3-dev,libgtk2.0-dev,libnspr4-0d,libasound2-dev,libnspr4-dev,\ libgconf2-dev,libcairo2-dev,libdbus-1-dev,libstdc++6-4.5-dev,libexpat1-dev,\ libxslt1-dev,libxml2-dev,libbz2-dev –dist natty Here are the details of the command line parameters: –fqdn: Hostname to be used for the target system –login: Login ID of the admin user created during setup –password: Password of the admin user created during setup –imagesize: Size of the target filesystem to be created (default 1GB) –seed: List of packages to install –dist: Specify Release to build (jaunty, karmic, lucid, maverick or natty) Alternatively you could also use an […]
Finding a Missing Package in Ubuntu with Aptitude
When you configure a program before building, it will usually check for dependencies and if one is missing it will return an error such as: checking for OPENSSL… configure: error: Package requirements (openssl) were not met: No package ‘openssl’ found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. It could be a PATH issue, but usually that simply means the development version of the library is not installed. Sometimes the name is easy to guess and can be installed with apt-get: sudo apt-get install packagename-devel But sometimes it’s more difficult to guess and Google is not always very helpful. In that case you can use aptitude to search for the package. For example for nss3: sudo aptitude search nss3 i libnss3 – Network Security Service libraries i libnss3-1d – Network Security Service libraries p libnss3-dbg – Development files for the Network Security p libnss3-dev […]
Dropbear: Lightweight SSH Server / Client
You may need to remotely access your embedded device, or your embedded systems is simply headless. You could use telnet, but this is insecure. A secure way to access a device remotly is to use SSH protocol. OpenSSH is one implementation but this is relatively too large and may use uncesary space on a device with limited storage. That’s where Dropbear comes into play. Dropbear is a lightweight implementation of an SSH client and server and is ideal for embedded systems. Dropbear ARM executable is only 200 KB. Here’s how it’s described on its website: Dropbear is a relatively small SSH 2 server and client. It runs on a variety of POSIX-based platforms. Dropbear is open source software, distributed under a MIT-style license. Dropbear is particularly useful for “embedded”-type Linux (or other Unix) systems, such as wireless routers. The main features of dropbear: A small memory footprint suitable for memory-constrained […]
Linaro 11.09 Release with Linux Kernel 3.0.4
Linaro has just released version 11.09 based on Linux Kernel 3.0.4. Here are the highlights of the release: Android Ethernet Configuration Manager from the x86 Android project is now available in all builds. Ethernet now works on Panda, Staging Panda, Beagle, Beagle xM, Staging Snowball. QA on all boards for the 11.09 Linaro Android Builds. Daily builds of Android toolchain against gcc-linaro bzr repository is provided. Android is now compiled with GCC4.6 with -O3. Busybox is built from source in all Android builds. glmark2 added to all the official builds for Android. Powertop is now available on Android. Linaro’s 11.09 toolchain has been benchmarked. All Android builds are running with the 11.09 toolchain. The MLO that Panda and Staging Panda uses for Android uses gets built from source from the upstream git. An OMAP4460 Android build is available from android-build. Panda supports Bluetooth. Panda supports Wi-Fi. Snowball Android A-release from […]
Cross-Compiling Mesa 3D Graphics Library for ARM
Mesa is an open-source implementation of the OpenGL specification that can be used for software emulation or complete hardware acceleration for modern GPUs.The Mesa library is used by a variety of games (e.g. Quake 2.3), libraries (e.g PyOpenGL), science and technical applications and utilities (e.g. xscreensaver). MesaLib requires X11 libraries. I’ll assume those are already cross-compiled here. For this build, I used pre-built X11 libraries found in ALIP (ARM Internet Platform) binaries. I used the method described here and copied the libs in /lib and /usr/lib and header files in /lib/include found in the qemu overo image respectively to /home/jaufranc/edeve/beagleboard/libs/lib and /home/jaufranc/edeve/beagleboard/libs/include. make sure you use the “-d” with cp to avoid copying the symlinks or some symbolic links would point to x86 binaries or files that do not exist. Here are the instructions to cross-compile MesaLib 7.11 for ARM using arm-linux-guneabi-gcc: Download the latest version of Mesa source code: […]
Cross Compiling Boost C++ Libraries for ARM
Boost provides free peer-reviewed portable C++ source libraries. Ten Boost libraries are already included in the C++ Standards Committee’s Library Technical Report and will be in the new C++11 Standard. The Boost C++ libraries are already included in popular Linux and Unix distributions such as Fedora, Debian, Ubuntu and NetBSD and are used by projects such as Python, Xibo, Civilization IV, etc.. Here are the steps to cross-compile Boost C++ libraries for arm using arm-linux-guneabi-g++: Download the source code:
1 |
wget http://sourceforge.net/projects/boost/files/boost/1.47.0/boost_1_47_0.tar.bz2/download |
Extract the source code:
1 2 3 |
mv download boost.tar.bz2 tar xjvf boost.tar.bz2 cd boost_1_47_0/ |
Bootstrap the code:
1 |
./bootstrap.sh |
Modify the configuration file (project-build.jam) to use the ARM toolchain by replacing the line with “using gcc” by:
1 |
using gcc : arm : arm-linux-gnueabi-g++ ; |
Install the python development package:
1 |
sudo apt-get install python-dev |
Build and install the boost libraries:
1 |
./bjam install toolset=gcc-arm --prefix=~/edev/beagleboard/libs --disable-long-double -sNO_ZLIB=1 -sNO_BZIP2=1 |
This was tested in Ubuntu 11.04 (natty) and 10.04 LTS with linaro g++ toolchain. Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his […]
How to Transfer files between the Host and Qemu via SSH and NFS
Last week, I wrote a blog post explaining how to copy files to a qemu image by mounting the qemu image in the host. This is only useful if emulated platform does not support networking. If networking is enabled, using SSH (Secure Shell) or NFS (Network File System) is more convenient. Using SSH with Qemu To initiate the SSH connection from qemu, there is actually nothing extra to do as long as you have sshd installed and running on the host. If it is not installed simply run sudo apt-get install openssh-shell on the host. This will install and automatically sshd. To initiate the SSH connection from the host, you’ll have to redirect the ssh port to an unknown port and start qemu as follow (for overo):
1 |
sudo qemu-system-arm -M overo -m 256 -drive file=./overo_sd_alip.img,if=sd,cache=writeback -clock unix -serial stdio -device usb-kbd -device usb-mouse -redir tcp:2222::22 |
Please refer to Beagleboard Emulator in Ubuntu with Qemu for the detailed instructions on how to setup qemu to emulate beagleboard or […]
Beagleboard Emulator in Ubuntu with Qemu
If you just want to try a program on Beagleboard, but do not want (or have the means) to purchase a board, you may be able to use qemu to emulate the Beagleboard or BeableBoard-xM. I’ll details the instructions to run the Nano build (minimal kernel) and the ARM Linux Internet Platform (ALIP) distribution for Beagleboard on qemu. Please read the full post before starting the installation before there are currently some issues such as no Ethernet support. First, install or update linaro-media-create: sudo add-apt-repository ppa:linaro-maintainers/tools sudo apt-get update sudo apt-get install linaro-image-tools Then download the nano image and omap3 hardware pack: wget http://releases.linaro.org/platform/linaro-n/nano/11.08/nano-n-tar-20110823-1.tar.gz wget http://releases.linaro.org/platform/linaro-n/nano/11.08/hwpack_linaro-omap3_20110823-0_armel_supported.tar.gz Generate the image for qemu: sudo linaro-media-create –image_file beagle_sd.img –dev beagle –binary nano-n-tar-20110823-1.tar.gz –hwpack hwpack_linaro-omap3_20110823-0_armel_supported.tar.gz If you don’t have it already, get the latest qemu-linaro package from Linaro Maintainers PPA: sudo apt-get install qemu-system Check the version is correct: qemu-system-arm -version QEMU emulator version […]