Difference between revisions of "CM-QS600: Linux: Getting started"

From Compulab Mediawiki
Jump to: navigation, search
(Install Images)
(Mount an NFS drive)
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
* Obtain a Linux PC workstation (host).  
 
* Obtain a Linux PC workstation (host).  
 
* Make sure a {{parameter|fastboot}} utility is installed on the host machine. For more details about the {{parameter|fastboot}} utility refer to [[CM-QS600: Linux: Kernel#Getting_Fastboot|Getting Fastboot]] section of the [[CM-QS600: Linux: Kernel]] article.
 
* Make sure a {{parameter|fastboot}} utility is installed on the host machine. For more details about the {{parameter|fastboot}} utility refer to [[CM-QS600: Linux: Kernel#Getting_Fastboot|Getting Fastboot]] section of the [[CM-QS600: Linux: Kernel]] article.
* Download the Linux package and the proprietary firmware archive for CM-QS600 from [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Compulab website].
+
* Download the Linux package and the proprietary firmware archive for CM-QS600 from [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Compulab website].  
* The proprietary firmware archive is password protected and requires signing the CompuLab - Qualcomm EULA. Please contact [mailto:sales@compulab.co.il CompuLab Sales Department] for further guidance.
+
* Please note that downloading the proprietary firmware archive requires signing the CompuLab - Qualcomm EULA.
 
* Unzip both packages to a directory on your host workstation.
 
* Unzip both packages to a directory on your host workstation.
 
* All image files mentioned below can be found in {{filename|images}} subdirectory of the Demo package.
 
* All image files mentioned below can be found in {{filename|images}} subdirectory of the Demo package.
Line 34: Line 34:
  
 
=== Mount a micro SD Card ===
 
=== Mount a micro SD Card ===
* Copy the {{filename|boot-cm-qs600.img}} and the {{filename|debian-image.tar.bz2}} from the [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Linux package for CM-QS600] to the root directory of any partition on the micro SD card. The partition can be formatted either ext2/3/4 or FAT file system. Additionally, copy the proprietary firmware archive {{filename|qcom-linux-firmware.tar.bz2}} to the same location.
+
* Copy the {{filename|boot-cm-qs600.img}} and the {{filename|debian-image.tar.bz2}} from the [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Linux package for CM-QS600] to the root directory of any partition on the micro SD card. The partition can be formatted either ext2/3/4 or FAT file system. Additionally, copy the directory containing the proprietary firmware {{filename|cm-qs600-qcom-linux-firmware}} to the same location.
 
* Insert the micro SD card into the SD socket (P5) on the SB-QS600 prior to booting into the installation environment.
 
* Insert the micro SD card into the SD socket (P5) on the SB-QS600 prior to booting into the installation environment.
 
* The micro SD card is mounted automatically under /media/mmcblk1pX. Where X is the partition number.
 
* The micro SD card is mounted automatically under /media/mmcblk1pX. Where X is the partition number.
Line 44: Line 44:
  
 
=== Mount a USB Storage Device ===
 
=== Mount a USB Storage Device ===
* Copy the {{filename|boot-cm-qs600.img}} and the {{filename|debian-image.tar.bz2}} from [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Linux package for CM-QS600] to the root directory of any partition on the USB storage device. Additionally, copy the proprietary firmware archive {{filename|qcom-linux-firmware.tar.bz2}} to the same location.
+
* Copy the {{filename|boot-cm-qs600.img}} and the {{filename|debian-image.tar.bz2}} from [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Linux package for CM-QS600] to the root directory of any partition on the USB storage device. Additionally, copy the directory containing the proprietary firmware {{filename|cm-qs600-qcom-linux-firmware}} to the same location.
 
* Plug the USB storage device to any USB host port (P13 or P14) on the SB-QS600.
 
* Plug the USB storage device to any USB host port (P13 or P14) on the SB-QS600.
 
* The USB device is mounted automatically under /media/sdXY. Where X is the device letter and Y is the partition number.
 
* The USB device is mounted automatically under /media/sdXY. Where X is the device letter and Y is the partition number.
Line 55: Line 55:
 
=== Mount an NFS drive ===
 
=== Mount an NFS drive ===
 
* Connect the CM-QS600 Ethernet port (P13) to your local network.
 
* Connect the CM-QS600 Ethernet port (P13) to your local network.
* Copy the {{filename|boot-cm-qs600.img}} and the {{filename|debian-image.tar.bz2}} from the [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Linux package for CM-QS600] to a directory exported through NFS. Additionally, copy the proprietary firmware archive {{filename|qcom-linux-firmware.tar.bz2}} to the same location.
+
* Copy the {{filename|boot-cm-qs600.img}} and the {{filename|debian-image.tar.bz2}} from the [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Linux package for CM-QS600] to a directory exported through NFS. Additionally, copy the directory containing the proprietary firmware {{filename|cm-qs600-qcom-linux-firmware}} to the same location.
 
* Obtain an IP address for the CM-QS600:
 
* Obtain an IP address for the CM-QS600:
 
** Using DHCP:<pre>root@compulab:~# ifup `basename /sys/class/net/eth?`</pre>
 
** Using DHCP:<pre>root@compulab:~# ifup `basename /sys/class/net/eth?`</pre>
Line 89: Line 89:
 
root@compulab:~# tar --numeric-owner -xpf /mount/point/debian-image.tar.bz2 -C /media/mmcblk0p13 && sync
 
root@compulab:~# tar --numeric-owner -xpf /mount/point/debian-image.tar.bz2 -C /media/mmcblk0p13 && sync
 
</pre>
 
</pre>
* Extract the proprietary firmware from the {{filename|qcom-linux-firmware.tar.bz2}} archive to the {{filename|/media/mmcblk0p13/lib/firmware}}:
+
* Copy the proprietary firmware to the {{filename|/media/mmcblk0p13/lib/firmware}}:
 
<pre>
 
<pre>
root@compulab:~# tar -xpf /mount/point/qcom-linux-firmware.tar.bz2 -C /media/mmcblk0p13/lib/firmware/ && sync
+
root@compulab:~# cp -a /mount/point/cm-qs600-qcom-linux-firmware/* /media/mmcblk0p13/lib/firmware/ && sync
 
</pre>
 
</pre>
 
* Unmount the {{parameter|userdata}} partition:
 
* Unmount the {{parameter|userdata}} partition:

Latest revision as of 13:23, 3 January 2016

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.
  • Download the Linux package and the proprietary firmware archive for CM-QS600 from Compulab website.
  • Please note that downloading the proprietary firmware archive requires signing the CompuLab - Qualcomm EULA.
  • Unzip both packages to a directory on your host workstation.
  • All image files mentioned below can be found in images subdirectory of the Demo package.
  • 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.

Boot into the installation environment (ramfs)

The first step in CM-QS600 Linux installation is starting the installation environment (boot image containing Linux kernel and Ramfs image).

  • Run the following fastboot command on the host machine:
fastboot boot /path/to/cm-qs600-linux/images/bootramfs-cm-qs600.img

Install Linux Images

After the ramdisk image is loaded the Linux login prompt will appear. Login as root into the system.

compulab login: root

Mount the installation source media

The next step is installing the Debian Linux images. The following media can be used as a source for installation:

Mount a micro SD Card

  • Copy the boot-cm-qs600.img and the debian-image.tar.bz2 from the Linux package for CM-QS600 to the root directory of any partition on the micro SD card. The partition can be formatted either ext2/3/4 or FAT file system. Additionally, copy the directory containing the proprietary firmware cm-qs600-qcom-linux-firmware to the same location.
  • Insert the micro SD card into the SD socket (P5) on the SB-QS600 prior to booting into the installation environment.
  • The micro SD card is mounted automatically under /media/mmcblk1pX. Where X is the partition number.
  • If for some reason the micro SD card hasn't been mounted automatically, use the following mount command:
root@compulab:~# mkdir -p /media/mmcblk1pX && mount /dev/mmcblk1pX /media/mmcblk1pX

Mount a USB Storage Device

  • Copy the boot-cm-qs600.img and the debian-image.tar.bz2 from Linux package for CM-QS600 to the root directory of any partition on the USB storage device. Additionally, copy the directory containing the proprietary firmware cm-qs600-qcom-linux-firmware to the same location.
  • Plug the USB storage device to any USB host port (P13 or P14) on the SB-QS600.
  • The USB device is mounted automatically under /media/sdXY. Where X is the device letter and Y is the partition number.
  • If for some reason the USB storage device hasn't been mounted automatically, use the following mount command:
root@compulab:~# mkdir -p /media/sdXY && mount /dev/sdXY /media/sdXY

Mount an NFS drive

  • Connect the CM-QS600 Ethernet port (P13) to your local network.
  • Copy the boot-cm-qs600.img and the debian-image.tar.bz2 from the Linux package for CM-QS600 to a directory exported through NFS. Additionally, copy the directory containing the proprietary firmware cm-qs600-qcom-linux-firmware to the same location.
  • Obtain an IP address for the CM-QS600:
    • Using DHCP:
      root@compulab:~# ifup `basename /sys/class/net/eth?`
    • If you do not have a DHCP server, you can set a static IP address using ifconfig:
      root@compulab:~#  ifconfig `basename /sys/class/net/eth?` <ip address>
  • Mount the NFS share containing the boot-cm-qs600.img and the debian-image.tar.bz2 files:
root@compulab:~#  mount -o nolock <host ip>:/path/to/nfs/share /mnt/net

Install Images

Once the ramfs image is loaded and the media containing the CM-QS600 Debian Linux image is mounted, the installation can proceed:

  • In this subsection the term /mount/point can be:
    • /mnt/net if NFS is used
    • /media/mmcblk1pX if a micro SD card is used, where X is the partition number
    • /media/sdXY if USB storage is used, where X is the USB drive letter and Y is the partition number.
  • Copy the boot image containing Linux Kernel to the eMMC partition number 7 named boot:
root@compulab:~# dd if=/mount/point/boot-cm-qs600.img of=/dev/mmcblk0p7
  • Format the eMMC partition number 13 named userdata:
root@compulab:~# mkfs.ext4 /dev/mmcblk0p13
  • Mount the userdata partition:
root@compulab:~# mkdir -p /media/mmcblk0p13 && mount /dev/mmcblk0p13 /media/mmcblk0p13
  • Extract the content of debian-image.tar.bz2 onto the /media/mmcblk0p13:
root@compulab:~# tar --numeric-owner -xpf /mount/point/debian-image.tar.bz2 -C /media/mmcblk0p13 && sync
  • Copy the proprietary firmware to the /media/mmcblk0p13/lib/firmware:
root@compulab:~# cp -a /mount/point/cm-qs600-qcom-linux-firmware/* /media/mmcblk0p13/lib/firmware/ && sync
  • Unmount the userdata partition:
root@compulab:~# umount /media/mmcblk0p13
  • Reboot the CM-QS600 evaluation system.
root@compulab:~# reboot

See also