Saturday, December 15, 2012

QEMU User-Mode ARM for Raspbian chroot

The other day I forgot my password for my raspberrypi running raspbian. If this were a amd64 system, I would chroot the system and use passwd to reset my password, but the raspberrypi is an arm system, and the passwd binary of the guest system cannot be executed on my amd64 host system. Enter QEMU user-mode emulation.

Following loosely these intructions here:

http://wiki.debian.org/QemuUserEmulation


  This is what I did: Install qemu, binfmt-support, and qemu-user:
# apt-get install qemu binfmt-support qemu-user
The step involving dpkg-cross I did slightly differently, as I noticed the necessary packages were available in synaptic for Ubuntu 12.04. This is what I installed
# sudo apt-get install libc6-armel-cross libc6-dev-armel-cross
"Point QEMU to the target linux loader For example, for the arm(el) architecture." Add this line to the /etc/qemu-binfmt.conf:
EXTRA_OPTS="-L /usr/arm-linux-gnueabi"
This is needed for chroot user-mode (no dynamic loading is possible because paths would be frubbed):
# sudo apt-get install qemu-user-static
Then I removed the raspbian sdcard from the raspberrypi, and mounted it using my laptop sdcard reader @ /media/disk. It is necessary to copy this file to the /usr/bin of the tree to be chrooted:
# cp /usr/bin/qemu-arm-static /media/disk/usr/bin
Then
# chroot /media/disk
I was able to reset my password successfully, and I notice I can also use the chroot to build (e.g. xbmc) for arm using my laptop, which, even if its user-mode emulated arm, should still be faster per core, and I can build multi-core. That was easier than I thought it would be!

Monday, March 26, 2012

Install XBMC PPA on Ubuntu

The XBMC version 11.0 is released and available from the team-xbmc PPA for Ubuntu (tested for Ubuntu 11.10)

sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install xbmc

After install, here's how I got my environment set up:

  • Setup -> Skin -> Subtitles Addon -> Install XBMC Subtitles Addon

Tuesday, February 14, 2012

Kubuntu OpenConnect VPN (AnyConnect) with GNOME nm-applet

The network manager in Kubuntu 11.10 still does not support OpenConnect

Basically I followed this BLOG post.

But with slight variation for Kubuntu 11.10

I used synaptic to simultaneously uninstall  plasma-widget-networkmanager
and install "network-manager-gnome openconnect network-manager-openconnect network-manager-openconnect-gnome" packages.

Then added nm-applet to Autostart as follows:

$ grep -v NotShowIn /etc/xdg/autostart/nm-applet.desktop > ~/.config/autostart/nm-applet.desktop

K->search-> "Autostart" ... enable "nm-applet"

Wireless was strangely not connecting after selecting a SSID.  It turns out one also needs to install the "gnome-keyring" package ...