Removing Old Kernels in Ubuntu with Synaptic

If you have used Ubuntu for a while and performed upgrades, you may have quite a few kernels in GNU GRUB as shown below: Those kernels are usually not necessary, they take space on your hard disk and make you scroll down in GRUB to access your other OS (if any). I’ll show how to only keep the last 2 kernels (for safety) in GRUB with Synaptic. First, start synaptic as a superuser: sudo synaptic Select “System Administration“, in type “linux-image” in the Quick search field and show the installed kernel (green tick box). Then select the kernels you want to remove (keep the last 2 versions), right-click and select “Mark for Removal”. Synaptic Package Manager window should look like the screenshot below: After that, simply click on Apply and within a short time (one minute in my case), the selected kernel are removed. Removing 4 kernels, freed 429 MB […]

Setting Up an NFS Server in Ubuntu

You may need to setup an NFS server on Ubuntu to run and debug your program on your target platform or simply to share media files on the network composed of Linux clients. If you are using Windows clients, you would usually use SAMBA/CIFS, although it is possible to setup an NFS server in Windows as well using Windows Services for UNIX 3.5. Quick Guide to to setup an NFS server in Ubuntu without authentication. Install the required packages: # sudo apt-get install nfs-kernel-server nfs-common portmap Reconfigure and restart portmap: # sudo dpkg-reconfigure portmap # sudo /etc/init.d/portmap restart Edit /etc/exports: # sudo vi /etc/exports Add the directories to share with NFS and save the file, for example: /nfs 192.168.1.0/24(rw,no_root_squash,async) will give full read/write permissions to the nfs directory for computer in 192.168.1.0 subnet. Restart the NFS server: # sudo /etc/init.d/nfs-kernel-server restart and reload the configuration: # sudo exportfs -a The […]

Installing Linaro ARM Cross Toolchain on Ubuntu

You can easily install Linaro arm cross-compiler on Ubuntu 10.04 (Lucid), 10.10 (Maverick) and 11.04 (Natty) as follows: sudo apt-get install gcc-arm-linux-gnueabi This will install Linaro cross-toolchain version 4.4 on Ubuntu 10.04 and 10.10, and version 4.5 on Ubuntu 11.04. You can check the installation worked by checking the cross-compiler version jaufranc@CNX-TOWER:~$ arm-linux-gnueabi-gcc -v Using built-in specs. Target: arm-linux-gnueabi Configured with: ../src/configure -v –with-pkgversion=’Ubuntu/Linaro 4.4.4-14ubuntu4′ –with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs –enable-languages=c,c++,fortran,objc,obj-c++ –prefix=/usr –program-suffix=-4.4 –enable-shared –enable-multiarch –enable-linker-build-id –with-system-zlib –libexecdir=/usr/lib –without-included-gettext –enable-threads=posix –with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.4.5 –libdir=/usr/lib –enable-nls –enable-clocale=gnu –enable-libstdcxx-debug –enable-objc-gc –disable-sjlj-exceptions –with-arch=armv7-a –with-float=softfp –with-fpu=vfpv3-d16 –with-mode=thumb –disable-werror –enable-checking=release –program-prefix=arm-linux-gnueabi- –includedir=/usr/arm-linux-gnueabi/include –build=i686-linux-gnu –host=i686-linux-gnu –target=arm-linux-gnueabi –with-headers=/usr/arm-linux-gnueabi/include –with-libs=/usr/arm-linux-gnueabi/lib Thread model: posix gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) You can also install the latest version 4.5 (recommended) on Lucid and Maverick: sudo add-apt-repository ppa:linaro-maintainers/toolchain sudo apt-get update sudo apt-get install gcc-4.5-arm-linux-gnueabi If you are using an ARM platform running Ubuntu 10.10 or higher, you could also use the native GCC compiler. sudo apt-get install […]

AMD G-Series SDK and Development Boards

Earlier this year, AMD announced its new Embedded processors G-Series aimed at set-top boxes, smart tv, digital signage, point of sales, media servers and more in order to compete with Intel Atom solutions as well as ARM based processors. Please refer to the link above for an overview and details about the 5 processors of the AMD G-series: T56N – Dual core @ 1.6GHz with Radeon HD 6310 GPU T48N – Dual core @ 1.4 GHz with Radeon HD 6310 GPU T40N – Dual core @ 1.0 GHz with Radeon HD 6250 GPU T52R – Single core @ 1.5 GHz with Radeon HD 6310 GPU Today, I’ll discuss about the development boards and software development kits available for this platform. AMD G-Series Development Boards and Reference Designs AMD Provide two reference designs and one development board: AMD Embedded G-Series Platform Mini-ITX Reference Design. No details are publicly available as this […]

Qemu Linaro Versatile Express Image on Ubuntu 10.10

I’ve installed qemu-linaro and run an ARM image based on the instructions on https://wiki.linaro.org/PeterMaydell/QemuVersatileExpress. I used Ubuntu 10.10 desktop edition. First, install the Linaro images tools: sudo apt-get install linaro-image-tools Download the Linaro release and versatile hardware pack: wget http://releases.linaro.org/platform/linaro-n/nano/alpha-3/linaro-natty-nano-tar-20110302-0.tar.gz wget http://releases.linaro.org/platform/linaro-n/hwpacks/alpha-3/hwpack_linaro-vexpress_20110302-0_armel_supported.tar.gz You can download another hwpack for omap3, i.mx51, pandaboard, beagleboard, ST U8500, etc.. if needed at http://releases.linaro.org/platform/linaro-n/hwpacks/alpha-3/ Download the source, extract it, then configure, build and install qemu linaro: wget http://launchpad.net/qemu-linaro/trunk/2011.03-1/+download/qemu-linaro-0.14.50-2011.03-1.tar.gz tar xzvf qemu-linaro-0.14.50-2011.03-1.tar.gz cd qemu-linaro-0.14.50-2011.03-1 ./configure –prefix=/usr make sudo make install Make sure the prefix is set to /usr in order to overwrite any previous version of Qemu (It installed qemu linaro in /usr/local/ instead in my case). Failure to do so may generate the following error during linaro-media-create: qemu: fatal: cp15 insn ee1d6f70 Instead of compiling qemu, you can install qemu-linaro with apt-get (this will avoid possible version issues between linaro-media-create and qemu): sudo add-apt-repository ppa:linaro-maintainers/tools […]

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 […]

Folders and Files Comparison in Linux with Meld

Beyond Compare and Winmerge are tools that can be used to compare files in Windows, but the latter is not available in Linux and the former is only available as a commercial application. One alternative is to use Meld, a diff and merge tool for Linux. This open source program is a GUI for diff2 and diff3 written using pygkt toolit based on Python, Glade and GTK+. This is not as powerful as the two programs aforementioned, but still very useful. It can also compare 3 files at the same time. To install it in ubuntu: sudo apt-get install meld It will still allow you to compare files, directory and merge changes. The file comparison merge function is a little confusing at first, but after a while you’ll get used to it. Meld can also support version control comparison with CVS, SVN, GIT, Bazaar-ng or Mercurial. Jean-Luc Aufranc (CNXSoft)Jean-Luc started […]

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 […]