CM-QS600: Linux: Getting started
Contents
Preparation steps
- Obtain a Linux PC workstation (host).
- Make sure a fastboot utility is installed on the host machine. For more details about the fastboot utility refer to Getting Fastboot section of the CM-QS600: Linux: Kernel article.
- Get a USB Card reader and a micro SD Card. Use either the micro SD card, supplied with the CM-QS600 Evaluation kit, or obtain a new one.
- Plug the USB SD Card reader to a host Linux PC. Insert the micro SD Card into the USB Card reader. From now we assume the device name of the micro SD card on your Linux PC is /dev/sdq.
- Download the Linux package for CM-QS600 from Compulab website. Unzip the package to a directory on your host workstation.
- All image files mentioned below can be found in images subdirectory of the Demo package.
Preparing micro SD card
- Create GPT partition table and create one Linux filesystem (ext4) partition on it.
Disk /dev/sdq: 3854336 sectors, 1.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): 28631117-2266-4EE4-AD25-58BF5B06223B Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3854302 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector) End (sector) Size Code Name 1 2048 3854302 1.8 GiB 8300 Linux filesystem
The example below shows how to create the GPT table and the ext4 filesystem using gdisk and mkfs.ext4 utilities respectively. Alternatively, you can use gparted to create the GPT table and the ext4 partition.
- Create GPT partition table:
echo -e "o\ny\nn\n\n\n8300\nw\ny\neof\n" | sudo gdisk /dev/sdq
- Format ext4 partition:
sudo mkfs.ext4 -L rootfs /dev/sdq1
- Mount the partition under /media/boot location:
sudo mkdir -p /media/rootfs sudo mount /dev/sdq1 /media/rootfs
Installing Linux root filesystem
- Extract the Linux root filesystem on to the micro SD card:
sudo tar --numeric-owner -xjpf /path/to/cm-qs600-linux/images/debian-image.tar.bz2 -C /media/rootfs && sync
- Unmount micro SD card:
sudo umount /dev/sdq1
- Remove the micro SD card from the SD card reader and insert it into the SB-QS600 micro SD card socket (P5).
- Continue to the Installing Kernel section.
Installing Kernel
- Connect the host PC to the SB-QS600 base-board micro USB port (P7) via the USB to micro USB cable supplied with the evaluation kit.
- Connect the host PC to the SB-QS600 base-board mini USB port (P16) via the USB to mini USB cable supplied with the evaluation kit.
- Make sure the new /dev/ttyUSBx device file is created by using the ls /dev/ttyUSB* command. x is the last number of the ttyUSB device.
- Start the terminal emulation software on your PC's /dev/ttyUSBx. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
- Turn on the CM-QS600 evaluation system. The application boot-loader (LK) will start and you will get a command prompt.
- Run the following fastboot command on the host machine:
fastboot flash boot /path/to/cm-qs600-linux/images/boot.img
- Continue with the boot process:
fastboot continue
- Alternatively, power cycle the CM-QS600 evaluation system or run the following fastboot command on the host machine:
fastboot reboot