Running Ubuntu on Juno

Installing a disk image

Hardware Pack - hwpack

Use the standard Juno hardware pack in snapshot, eg:

http://snapshots.linaro.org/ubuntu/hwpacks/lt-vexpress64/715/hwpack_linaro-lt-vexpress64-rtsm_20150324-715_arm64_supported.tar.gz

Root File System - rootfs

We don't provide an official release of Ubuntu for Juno, so it's often best to start with one of our Nano snapshots, eg:

http://snapshots.linaro.org/ubuntu/images/nano-arm64/latest/linaro-utopic-nano-20150410-92.tar.gz

Creating a disk image

You create a Juno Ubuntu disk image in much the same way as you create any other disk image: with linaro-media-create. Eg:

sudo linaro-media-create --mmc /dev/sdX --dev juno --hwpack <hwpack filename> --binary <rootfs filename>

Board setup

Installing some essentials

You'll want to use a few things like a file editor, SSH and so on

apt-get install vim openssh-server less

Changing hostname

hostname juno
echo "juno" > /etc/hostname

Installing a GUI

This section is currently experimental because I haven't got it working yet.

Build your own kernel

First thing I did was build my own kernel and copy over the kernel an modules to my disk image. Without the modules, you won't get /dev/fb0.

git clone ssh://git@git.linaro.org/landing-teams/working/arm/kernel.git
cd kernel
git checkout integration-lsk-3.10-juno-android
ARCH=arm64 scripts/kconfig/merge_config.sh linaro/configs/linaro-base.conf linaro/configs/android.conf linaro/configs/big-LITTLE-MP.conf linaro/configs/vexpress64.conf
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image dtbs modules

Mount the USB stick and copy the kernel, dtb and modules over

cp arch/arm64/boot/Image /media/ryan/boot/Image
cp arch/arm64/boot/dts/juno.dtb /media/ryan/boot/juno/juno.dtb
sudo make -j7 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_install INSTALL_MOD_PATH=/media/ryan/rootfs/

The boot the system and make sure it all seems ok. The HDLCD module should probe automatically on boot.

Install some GUI packages

apt-get install lxde lxsession xorg

Inserting modules?

Much confusion over modules...

The HDLCD and I2C modules need to be installed, however, Ubuntu only auto-probes the HDLCD module. Or is I2C built-in? Or something else?

insmod ./drivers/gpu/drm/i2c/sii9022.ko
insmod ./drivers/gpu/drm/arm/hdlcd.ko

StartX

root@juno:~# startx
hostname: Name or service not known
xauth: (argv):1:  bad display name "juno:0" in "list" command
xauth: (stdin):1:  bad display name "juno:0" in "add" command


X.Org X Server 1.16.0
Release Date: 2014-07-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.8.0-2-mustang aarch64 Ubuntu
Current Operating System: Linux juno 3.10.63+ #1 SMP Tue Jan 6 17:49:45 GMT 2015 aarch64
Kernel command line: Image dtb=juno/juno.dtb console=ttyAMA0,115200 rootwait root=/dev/sda2
Build Date: 10 September 2014  01:21:41PM
xorg-server 2:1.16.0-1ubuntu1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.32.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Jan  7 11:07:18 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  140.672143] [drm:drm_mmap_locked] *ERROR* Could not find map
(EE) 
Fatal server error:
(EE) failed to create screen resources(EE) 
(EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth: (argv):1:  bad display name "juno:0" in "remove" command
root@juno:~# 

The log

[   122.231] 
X.Org X Server 1.16.0
Release Date: 2014-07-16
[   122.232] X Protocol Version 11, Revision 0
[   122.232] Build Operating System: Linux 3.8.0-2-mustang aarch64 Ubuntu
[   122.232] Current Operating System: Linux juno 3.10.63+ #1 SMP Tue Jan 6 17:49:45 GMT 2015 aarch64
[   122.232] Kernel command line: Image dtb=juno/juno.dtb console=ttyAMA0,115200 rootwait root=/dev/sda2
[   122.232] Build Date: 10 September 2014  01:21:41PM
[   122.232] xorg-server 2:1.16.0-1ubuntu1 (For technical support please see http://www.ubuntu.com/support) 
[   122.232] Current version of pixman: 0.32.4
[   122.232]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   122.232] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   122.233] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jan  7 11:07:18 2015
[   122.233] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   122.234] (==) No Layout section.  Using the first Screen section.
[   122.234] (==) No screen section available. Using defaults.
[   122.234] (**) |-->Screen "Default Screen Section" (0)
[   122.234] (**) |   |-->Monitor "<default monitor>"
[   122.235] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[   122.236] (==) Automatically adding devices
[   122.236] (==) Automatically enabling devices
[   122.236] (==) Automatically adding GPU devices
[   122.236] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   122.236]    Entry deleted from font path.
[   122.236] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   122.236]    Entry deleted from font path.
[   122.236] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   122.236]    Entry deleted from font path.
[   122.236] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   122.236]    Entry deleted from font path.
[   122.236] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   122.236]    Entry deleted from font path.
[   122.236] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[   122.236] (==) ModulePath set to "/usr/lib/aarch64-linux-gnu/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules"
[   122.236] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[   122.236] (II) Loader magic: 0x5574f15ce8
[   122.236] (II) Module ABI versions:
[   122.236]    X.Org ANSI C Emulation: 0.4
[   122.237]    X.Org Video Driver: 18.0
[   122.237]    X.Org XInput driver : 21.0
[   122.237]    X.Org Server Extension : 8.0
[   122.237] (II) xfree86: Adding drm device (/dev/dri/card0)
[   122.238] (II) LoadModule: "glx"
[   122.239] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   122.250] (II) Module glx: vendor="X.Org Foundation"
[   122.250]    compiled for 1.16.0, module version = 1.0.0
[   122.250]    ABI class: X.Org Server Extension, version 8.0
[   122.250] (==) AIGLX enabled
[   122.250] (==) Matched modesetting as autoconfigured driver 0

ARM/Juno/Ubuntu (last modified 2015-04-20 01:53:19)