Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rock/ubuntu

< Rock
Revision as of 07:03, 4 December 2013 by Hipboi (Talk | contribs)


This page describe how to customize a ubuntu image for radxa rock.

Install required packages

   sudo apt-get install qemu-user-static binfmt-support

Generate the image

   dd if=/dev/zero of=rock_rootfs.img bs=1M count=1024
   mkfs.ext4 -F -L linuxroot rock_rootfs.img #kernel use the label linuxroot to mount the rootfs as /
   sudo mount -o loop rock_rootfs.img /mnt

The fast way is to make a ubuntu image is downloading a recent pre-built ubuntu rootfs from linaro

   wget https://releases.linaro.org/13.08/ubuntu/raring-images/alip/linaro-raring-alip-20130826-474.tar.gz
   sudo tar zxvf linaro-raring-alip-20130826-474.tar.gz -C /mnt
   cd /mnt
   sudo mv binary/* .
   sudo rmdir binary

Prepare chroot

   sudo cp /usr/bin/qemu-arm-static /mnt/usr/bin
   sudo modprobe binfmt_misc
   sudo mount -t devpts devpts /mnt/dev/pts
   sudo mount -t proc proc /mnt/proc

Chroot and post configuartion

   sudo chroot /mnt

Now we are in the target rootfs. To be continued...

Trouble shooting

bluez package configure error

Setting up bluez (4.101-0ubuntu8b1) ...
reload: Unknown instance: 
invoke-rc.d: initscript dbus, action "force-reload" failed.
start: Job failed to start
invoke-rc.d: initscript bluetooth, action "start" failed.
dpkg: error processing bluez (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of blueman:
blueman depends on bluez (>= 4.25); however:
Package bluez is not configured yet.
...

It turns out the bluez package needs the dbus service running in order to configure properly. The following works:

   service dbus start
   dbus start/running, process 24551
   dpkg --configure bluez

Non root user can not use the network

Edit /etc/group and add

   inet:x:3003:root
   net_raw:x:3004:root

and then run

   gpasswd -a username inet