Compute Module 3

We will walk you through the steps of flashing Ubuntu Core on a Compute Module 3. At the end of this process, you will have a board ready for production or testing snaps.

User account prerequisites

An Ubuntu SSO account is required to create the first user on an Ubuntu Core installation.

  1. Start by creating an Ubuntu SSO account
  2. Import an SSH Key into your Ubuntu SSO account on this page. Instructions to generate an SSH Key on your computer can be found here

Hardware and software requirements

  • A Compute Module 3
  • A Compute Module IO board
  • Two micro USB to USB cables (one for power, one to setup the CM from the host)
  • An HDMI cable and a display
  • A USB keyboard
  • A USB to RJ45 adaptor or a WiFi dongle
  • A USB hub to attach the keyboard and the RJ45 adaptor/WiFi dongle (note that the keyboard and display can be replaced with a serial cable connected directly to pins of the IO board)
  • An Ubuntu Core image

Ubuntu Core image

Ubuntu Core 16 image for Compute Module 3

  • SHA256: 1c01130550b37447c7e345e234e337a16b7c58c1e1ceab64e15f0195bdc4e014

Installation instructions

1. On the host system: Ubuntu Desktop 16.04 or above

  1. In a terminal, download the USBboot tool you will use to setup the board, and install its build dependencies:

    git clone --depth=1 https://github.com/raspberrypi/usbboot.git
    sudo apt install libusb-1.0-0-dev
    
  2. Then cd into the usbboot directory, build with make and start the resulting binary as root:

    cd usbboot
    make
    sudo ./rpiboot
    
  3. Once started, it will wait for the Compute Module to be attached to the machine.

2. On the Compute Module IO board

  1. Position the Compute Module on the IO board
  2. Attach the USB hub, RJ45 adaptor, keyboard and monitor (HDMI) to the board
  3. Ensure the J4 switch (USB SLAVE BOOT ENABLE) on the IO board is in the EN position J4
  4. With the first micro USB to USB cable, plug the host machine into the IO Board USB slave port (J15) J15
  5. With the second micro USB to USB cable, power on the IO board.

3. Back to the host system

  1. The USBboot tool should have recognized the attached Compute Module and mounted the EMMC partition as a new device
  2. Identify the device by opening the "Disks" application:
    • Locate the EMMC partition of the Compute Module in the left pane
    • Note down its "Device" address on the right pane.
    • If the partition is mounted, unmount it by clicking the square icon below the partition diagram or the eject icon in a file manager
  3. Download the Ubuntu Core image. When this is done you should have an ubuntu-core-16-cm3.img.xz file in your ~/Downloads directory
  4. Flash Ubuntu Core on the EMMC partition with:

    xzcat ~/Downloads/<image file .xz> | sudo dd of=<device address> bs=32M; sync
    

    This process will take some time. After completion, you can reboot your Compute Module IO board and follow the first boot process with the display, keyboard and RJ45/WiFI dongle attached to it.

First boot

  1. The system will boot then become ready to configure
  2. The device will display the prompt “Press enter to configure”
  3. Press enter then select “Start” to begin configuring your network and an administrator account. Follow the instructions on the screen, you will be asked to configure your network and enter your Ubuntu SSO credentials
  4. At the end of the process, you will see your credentials to access your Ubuntu Core machine:
    This device is registered to <Ubuntu SSO email address>.
    Remote access was enabled via authentication with the SSO user <Ubuntu SSO user name>
    Public SSH keys were added to the device for remote access.
    

User login

Once setup is done, you can login with SSH into Ubuntu Core, from a machine on the same network, using the following command:

ssh <Ubuntu SSO user name>@<device IP address>

The user name is your Ubuntu SSO user name, it has been reminded to you at the end of the account configuration step.

First boot tips

  • During setup,console-conf will download the SSH key registered with your Store account and configure it so you can log into the device via ssh <Ubuntu SSO account name>@<device IP address> without a password.
  • There is no default ubuntu user on these images, but you can run sudo passwd <account name> to set a password in case you need a local console login.

Install and develop snaps

Your board is ready to have snaps installed — get started with the snap command

You can install a classic Ubuntu environment on top of Ubuntu Core to have a fully-fledged development environment and develop snaps on target ›