[CSE]  Advanced Operating Systems 
COMP9242 2013/S2 
UNSW
CRICOS Provider
Number: 00098G

PRINTER Printer-Friendly Version

Freescale® SABRE Lite i.MX6Quad Lab

The SABRE Lite is a low-cost development platform featuring the i.MX 6 Quad processor.

Development system-on-a-chip(SoC) platforms such as this are ideal for experimenting with kernels, operating systems and hardware.

Technical details

The device features:

  • A Quad-Core ARM® Cortex A9 processor, running at 1GHz
  • 1GB of DDR3 RAM @ 532Mhz.
  • 10/100/Gb IEEE1588 Ethernet.
  • Three display ports (RGB, LVDS, and HDMI 1.4a).
  • Hardware accelerated Video Processing Unit and Graphics Processing Unit.
  • RS232 serial ports.
  • High speed USB ports (2xHost, 1xOTG).

The boot process

The Sabre Lite has been configured to load a first stage boot loader, U-Boot, from SPI flash memory. U-Boot is a popular open source boot loader that supports a wide range of features. Its primary role is to enable peripherals and secondary storage in order to load and boot a complete operating system from a variety storage media.

U-boot is highly configurable to suit the needs of the specific hardware platform and the application. The U-Boot provided with the COMP9242 kit has been configured to provide a richer set of features and an appropriate default environment for your project.

Once U-Boot has loaded, it will wait a few seconds before executing the default boot command. This is your chance to stop the boot process and enter the U-Boot prompt. Once at the U-Boot prompt, type help to view a list of commands or print to display a list of environment variables.

Key environment variables:

  • bootcmd : The boot command that will be executed when the boot delay expires.
  • bootdelay : The number of seconds to wait before executing the default boot command.
  • ipaddr: The IP address of the development board. This should be set to 192.168.168.2.
  • serverip: The IP address of server hosting remote boot images. This should be set to 192.168.168.1.

If in doubt, you can retore the default environment by typing run clearenv.

Key U-Boot commands:

  • setenv : Set the value of an environment variable.
  • run : Execute the contents of an environment variable.
  • tftpboot : Download a file from the server.
  • bootelf : Boot and ELF format file.
  • md : Display the contents of physical memory.
  • mm : Modify the contents of physical memory.

Once you have finished, you can resume the auto boot process by running run bootcmd

Kit contents

The kit given out for COMP9242 contains the following items:

  • A Sabre Lite (in a plastic case).
  • µSD card (already inserted into the Sabre Lite).
  • 5V power adapter.
  • USB to Serial cable.
  • Serial cable.
  • USB to Ethernet adapter.
  • CAT5 Ethernet cable.

Setting up your host

The CSE lab machines already have the required software installed (if it is not installed on the machine itself, then it is installed in ~disy/bin or ~disy/crossdev. See milestone 0 for development details.

Your host machine will require certain software and drivers to talk to the Sabre. This is mostly machine specific:

Setting up a Sabre Lite

Use the USB-serial and serial cables to connect the Sabre Lite serial port marked debug to your host computer. This will allow us to see output and debug the device over serial.

You will also need a network connection between the host computer and the Sabre Lite for downloading OS images, communicating with NFS file systems and to provide a console over LAN. If you are in a CSE lab or do not have a spare Ethernet port, you will need to use the provided USB/Ethernet dongle. Connect the Ethernet cable cable from the Sabre Lite to the USB/Ethernet dongle and then connect the dongle to your computer.

Once the Sabre Lite is connected to your development machine you should launch the two consoles that connect you to its output. Run minicom in one console window and nc -lup 26706 in the other.

You may be required to change the settings for minicom. On linux, use dmesg to work out which port the USB to serial converter has been attached to (its usually /dev/ttyUSB0). Then set minicom to use that serial port, 115200 baud rate, 8N1, and no hardware flow control, using sudo minicom -s /dev/ttyUSB0.

Plug in the power cable for the Sabre Lite or press the reset button on the top of the Sabre Lite to reboot. When minicom is connected to the serial port, you should see some output from U-Boot in the minicom window.

How to use - what is really happening

A brief description of the development cycle can be found in Milestone 0. A lot is happening under the covers to allow you to easily develop an operating system:

  1. Plug in the Sabre Lite and power it on.

    On CSE machines this generates a hotplug event on the host's USB bus and results in the creation of the tty device. A cse script runs at this time and customises the tftpd and nfs server to your login sessions user name.

  2. In a terminal, launch minicom, % minicom.

    When minicom launches it opens the tty device.

  3. In another terminal, launch netcat, % nc -lup 26706.

    Not magical, nothing will happen though until you send something with libserial.

  4. Make your changes, (hint: learn cscope).
  5. Build using % make.

    A lot is happening here under the covers, the Makefile will first build your OS, generating a boot image bootimg.elf. Once the build is complete, make copies the images/sos-image-arm-imx6 file to your tftpboot directory. Then, a reset signal is sent over serial, which causes the kernel to reboot the device. When the device reboots, tftp will fetch the newly built image over tftp and execute the image.

  6. Test your changes.

    'nuff said?

  7. Repeat from step 4 above until satified, or you fall over for lack of sleep.

    Are you wondering why you started this course now? Just think how good it will feel when you finish!

Booting Linux

An installation of Ubuntu Linux has been supplied on the given µSD card. To boot this image, you will need to interrupt the default boot process.

First reset your Sabre Lite by pressing the button on top of the box. Next wait for Hit any key to stop autoboot: to appear and press a key in the minicom window to stop the automatic boot process.

U-Boot 2013.04-dirty (Jul 21 2013 - 23:42:37)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: MX6Q-Sabre Lite
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected SST25VF016B with page size 4 KiB, total 2 MiB
*** Warning - bad CRC, using default environment

No panel detected: default to HDMI
unsupported panel HDMI
In:    serial
Out:   serial
Err:   serial
Net:   using phy at 6
FEC [PRIME]
Warning: FEC using MAC address from net device

Hit any key to stop autoboot:  2 

Finally, run the pre-defined boot script by entering run bootubuntu. When prompted for a user name, enter ubuntu. The password is temppwd


Last modified: 02 Aug 2013.