Timesys Getting Started Guide for GizmoSphere Gizmo 2


Contents

Introduction

This document will describe in detail the procedures for booting a Linux kernel image and mounting a root file system from an SD Card on the Gizmo 2.

This guide was tested with the GizmoSphere Gizmo 2 using the SYSLINUX bootloader.

Prerequisites

Host Requirements

To properly boot a board using software from Timesys, your host machine must meet the following requirements:
  • Modern GNU/Linux Distribution. While you can use nearly any modern Linux distribution released in the last 24 months, Timesys recommends one of the following:
    • Ubuntu (Most recent release or LTS)
    • Fedora (Most recent release)
  • An internet connection on the Development Host.
  • Root or sudo permission on the Development Host.
  • A copy of the Linux Kernel (bzImage-3.12-ts-x86_64 ) and Root File System (rootfs.tar.gz) for the Target Board downloaded from Factory. These are found in the output directory of your online build, or in the directory build_x86_64-timesys-linux-<libc>/images/ on the command line.
  • syslinux
    • Ubuntu installation:

          $ sudo apt-get install syslinux
          
    • Fedora installation:

          $ sudo yum install syslinux
          

Target Requirements

To boot the Gizmo 2, you will need the following items:

  • Gizmo 2 Board
  • microSD card, USB key, or mSATA drive
  • USB keyboard
  • HDMI monitor and cable

Once you have all of the necessary components, you should perform the following steps:

  1. Connect the board to the HDMI monitor.
  2. Connect the USB keyboard to one of the available USB ports on the board.
  3. Connect the power supply to your board.

Preparing the Target

Installing Boot Images to your microSD card or USB key using SYSLINUX

SYSLINUX is a lightweight bootloader for MS-DOS FAT filesystems. For more information on SYSLINUX, see http://syslinux.zytor.com/wiki/index.php/SYSLINUX. SYSLINUX requires a block device supported by the Linux kernel. For example, SYSLINUX can be used on a hard disk, USB mass storage device, or microSD card. Typically a bootable partition must reside on the block device. The following example assumes an MBR parition table is required (rather than a GUID partition table) and that the block device is /dev/sdc: NOTE: Be sure you have the correct device, all data on the device will be destroyed!

Formatting the disk

  1. As root, run the fdisk utility on the drive.
    $ sudo fdisk /dev/sdc
    • In fdisk, delete any existing partition table and create a new one using the o command.
    • Create a new primary partition using the n command. Set it as partition 1 and accept the defaults for first sector.
    • Set the last sector to a reasonably large value such as +20M
    • Set the new primary partition as bootable using the a command.
    • Use the t command and set the partition type to c ("W95 FAT32 (LBA)")
    • Create a second primary partition for the RFS using the remaining space by pressing n and accepting the defaults.
    • This step will destroy all data on the SD Card - Write the partition table to the card using the w command.
  2. Create a VFAT filesystem on the boot partition:
        mkfs.vfat /dev/sdc1
  3. Create a Ext4 filesystem on the second partition:

        mkfs.ext4 /dev/sdc2

Installing SYSLINUX on the boot partition

  1. The partition must not be mounted in order to install SYSLINUX. The following command installs SYSLINUX to the partition:

        syslinux -install /dev/sdc1

  2. The kernel, bzImage-3.12-ts-x86_64 , must then be copied to the mounted filesystem on /mnt:

        mount /dev/sdc1 /mnt
        cp bzImage-3.12-ts-x86_64 /mnt/

Configuring SYSLINUX

SYSLINUX uses a very simple plain-text file to determine how to boot the system. The syslinux.cfg file must be present in the root directory of the file system that SYSLINUX was installed on (e.g., if /dev/sdc1 is mounted at /mnt/boot, this is /mnt/boot/syslinux.cfg). The following is an example default configuration:

prompt 1
default timesys
timeout 100

label timesys
kernel bzImage-3.12-ts-x86_64
append ip=dhcp root=/dev/mmcblk0p2 rw noinitrd rootwait console=/dev/tty0 radeon.audio=1

Writing RFS to Second Partition

  1. Mount the volume.

        $ sudo mount -t ext4 /dev/sdc2 /mnt/rfs
        
  2. Extract the RFS output tarball into the mount point.

        $ sudo tar -xf /PATH/TO/TIMESYS/INSTALLATION/rfs/rootfs.tar.gz -C /mnt/rfs
        

Cleaning up

  1. Unmount both partitions.

        $ sudo umount /dev/sdc1,2
        
  2. Remove the drive from your host system.

Notes

  • If you aren't connected to a network at boot time, omitting the dhcp argument to the kernel command line can improve boot time, e.g.: root=/dev/mmcblk0p2 rw noinitrd rootwait console=/dev/tty0 radeon.audio=1
  • Make sure the root device in the kernel command line is correct for your boot medium:
    • microSD - root=/dev/mmcblk0p2
    • USB or SATA - root=/dev/sda2

Preparing the Host

No additional host setup is required to boot from microSD / USB / mSATA.

Booting the Board

If you followed the instructions for installing boot images above, your board should boot to a Linux kernel automatically. If not, try these steps:
  • If you have multiple devices connected to the board, make sure the boot order is correct in the BIOS. For the Sage BIOS, Press F12 to enter the boot menu when you turn the board on.
  • If fdisk warned you about a GPT (GUID) partition table, follow these steps and do the procedure again:

        $ sudo parted /dev/sdX
        mklabel msdos
        Answer y to any questions. Note: this will destroy all information on the disk!
        
  • Make sure the boot media has a working MBR (and double-check that the first partition is marked as bootable as described above):

        $ sudo dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/sdX
        
    mbr.bin is part of the SYSLINUX installation, and is usually located in /usr/lib/syslinux or /usr/share/syslinux depending on your host OS.
  • Make sure the root device in the append line at the bottom of syslinux.cfg is correct (see notes above).

Additional Information

Factory Documentation