How To Use Putty with an SSH Private Key Generated by OpenSSH

I have access to a remote server where I am only allowed to login via SSH with a key, and I can’t add an extra key by myself, as described in “No Password SSH” post. The private key (RSA) has been generated with ssh-keygen in Linux, and I can login from Linux without issue. This morning, I wanted to do the same with Putty in Windows XP, so I just copied the private key to Windows and loaded it in Putty, but it failed:

After a few minutes of research, I found my answer on UbuntuForums, and the reason it fails is because Putty does not support openssh keys, but uses its own format. Here’s what I had to do: Convert OpenSSH private key to Putty private key with Putty Key Generator (puttygen) Start puttygen, and click on Conversions->Import key, then click Browse and select the private key generated with […]

Installing Android SDK on Ubuntu 12.04

The official instructions to install Android SDK do not appear to be really up-to-date for Ubuntu 12.04, so I’ll post how I’ve installed the Android SDK and Eclipse on Ubuntu 12.04. First download and decompress Android SDK for Linux:

on 64-bit Ubuntu:

Sun Java is not part of Ubuntu packages anymore, so you’ll need to use openjdk instead

Now install the SDK

Android SDK Manager should show up. Use the default recommended packages and platforms, as well as any extra packages you may need, and click on Install x packages, accept all licenses and after installation is complete, the Android SDK is installed. Eclipse IDE is optional, but it’s the most widely used IDE to develop Android apps. You can install Eclipse as follows:

Once both Android packages and platforms, and eclipse are installed, start eclipse:

Then in the top menu, click on Help->Install […]

Hardware Packs for AllWinner A10 Devices and Easier Method to Create a Bootable Ubuntu 12.04 SD Card

Linaro has a tool called linaro-media-create to install Linaro Ubuntu to an SD card by passing the device, hardware pack file, the rootfs and the board as arguments. Hardware packs are files that contains hardware specific binaries and configs files (e.g. bootloader, kernel…). I’ve done something similar (albeit more basic) for AllWinner A10 devices so that you can easily install and run Ubuntu (and possibly other distributions) on an SD card. I’ve written 2 scripts for this: a10-hwpack-bld.sh – Script to generate evb.bin, build the latest u-boot and linux kernel, retrieve some config files and compress all this in an hardware pack file a1x-media-create.sh – Script to make a bootable SD card for AllWinner A10 devices. You can get the scripts with git:

I’ve only tested it with Mele A1000, but if you have other A10 devices such as MK802 mini PC or MINI X media player, it should […]

Importing Source Code to Github

Github is a hosting service for software development projects using the Git revision control system. GitHub offers free accounts for open source projects (public repositories) and commercial plans for private repositories. I’ve been using github for a while to clone source code, but I had never imported existing source code to github. Here are the steps to follow: If you don’t have an account yet, sign-up for github. Setup github for Linux, Windows or Mac OS X. Create a repository as shown as explained here. You should now have a URL in github, something like [email protected]:user/repo_name.git, which we’ll use below. Go to the directory with your existing source code and create a local repo:

Finally, type the commands below to add your code to your new repository:

That’s it, anybody should now be able to clone you code as follows:

NB: If your existing source code (or […]

Getting Started with MultiArch (armel / armhf) in Ubuntu

Until now, I used xapt and dpkg-cross to install cross libraries for armel, but since I’ve upgraded to Ubuntu 12.04, it appears to be broken. I’ve contacted Linaro about this issue, and the “cross-building” expert at Linaro (wookey) recommended me to use multiarch instead, as xapt/dpkg-cross will be eventually deprecated. He provided me an example showing how-to use multiarch to build Chromium. I’ve been looking for a “How-to multiarch”, but haven’t been able to find something really clear and simple, so I thought I would post it here. In the example, they used a chroot for cross-building, which is probably a good idea to avoid messing up with the system. It’s also possible multiarch is not 100% reliable, and I’ve read stories where people messed up their system when using multiarch with i386 (32-bit) and amd64 (64-bit). Preparing a chroot for cross-building I’ll use a 32-bit Ubuntu precise chroot, but […]

Glark, an alternative to Grep

grep is a very useful tool to search or filter strings in order to look for files, parse useful info in log files and more. glark is an alternative to grep, it has few features that grep does not such as complex expressions, Perl-compatible regular expressions, and excluding binary files. It also has a more fancy way of display results. It is described as follows in the manpage: Similar to “grep”, “glark” offers: Perl-compatible regular expressions, color highlighting of matches, context around matches, complex expressions (“and” and “or”), grep output emulation, and automatic exclusion of non-text files. Its regular expressions should be familiar to persons experienced in Perl, Python, or Ruby. File may also be a list of files in the form of a path. glark is not installed by default. To install it in Debian/Ubuntu/Mint: sudo apt-get install glark It does not appear to be available in Fedora and […]

Using OpenOCD JTAG in Android Kernel Debugging – Android Builder Summit 2012

Mike Anderson, CTO and Chief Scientist for The PTR Group, gives a tutorial about Linux kernel debugging in Android with OpenOCD JTAG at the Android Builder Summit in February 2012. Abstract: Owing to the use of the Linux kernel, Android device drivers can be debugged using many of the same techniques as Linux. Still, much of the user-space interface code typically found in Linux is missing in Android. This complicates the debugging of kernel driver code. This presentation will demonstrate the use of the open on-chip debug (OpenOCD) software and an inexpensive JTAG to debug Android kernel code. The target audience for this presentation are platform developers looking to debug their kernel code such as device drivers. This presentation is targeted at intermediate-level developers with some understanding of kernel code development. You can also download the presentation slides on linuxfoundation.org website. Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as […]

Android Device Porting Tutorial – Android Builder Summit 2012

Benjamin Zores, Open Source Software and Multimedia Architect at Alcatel-Lucent, gives step-by-step to port Android to your own device at Android Builder Summit in February 2012. Abstract: This talk is presented as a step by step tutorial meant for Android platform rookies, as to discover all Androidisms one has to tackle down to bring his own custom device to life. Based on a real-life Android 4.0 ICS device porting experience, the talk will cover early board bringup (from U-Boot and Fastboot to Linux kernel and drivers), AOSP device integration, Android-specific device init customization, touchscreen input layer adaptations and Hardware Abstraction Layer (HAL) driver interfaces development. You can also download the presentation slides on linuxfoundation.org website. Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011. www.cnx-software.com

Memfault IoT and embedded debugging platform