Difference between revisions of "CM-QS600: Linux: Getting started"
(→Install Images) |
|||
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 [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres Linux package for CM-QS600] from Compulab website. Unzip the package to a directory on your host workstation. | * Download the [http://compulab.co.il/products/computer-on-modules/cm-qs600/#devres 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 {{filename|images}} subdirectory of the Demo package. | * All image files mentioned below can be found in {{filename|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 {{filename|/dev/ttyUSBx}} device file is created by using the {cmd|ls /dev/ttyUSB*}} command. {{parameter|x}} is the last number of the ttyUSB device. | ||
+ | * Start the terminal emulation software on your PC's {{filename|/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: | ||
<pre> | <pre> | ||
− | + | fastboot boot /path/to/cm-qs600-linux/images/bootramfs-cm-qs600.img | |
− | + | </pre> | |
− | + | * Continue to the [[#Install Linux Images | Install Linux Images]] section. | |
− | |||
− | |||
− | |||
− | |||
− | + | = Install Linux Images = | |
− | + | After the ramdisk image is loaded the Linux login prompt will appear. Login as {{parameter|root}} into the system. | |
+ | <pre> | ||
+ | compulab login: root | ||
</pre> | </pre> | ||
− | + | == 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|Micro SD Card]] | ||
+ | * [[#Mount a USB Storage Device|USB storage device]] | ||
+ | * [[#Mount an NFS drive|NFS drive]] | ||
+ | |||
+ | === 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. | ||
+ | * 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: | ||
<pre> | <pre> | ||
− | + | root@compulab:~# mkdir -p /media/mmcblk1pX && mount /dev/mmcblk1pX /media/mmcblk1pX | |
</pre> | </pre> | ||
− | * | + | * Continue to the [[#Install Images | Install Images]] section. |
+ | |||
+ | === 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. | ||
+ | * 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: | ||
<pre> | <pre> | ||
− | + | root@compulab:~# mkdir -p /media/sdXY && mount /dev/sdXY /media/sdXY | |
</pre> | </pre> | ||
− | * Mount the | + | * Continue to the [[#Install Images | Install Images]] section. |
+ | |||
+ | === Mount an NFS drive === | ||
+ | * 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. | ||
+ | * Obtain an IP address for the CM-QS600: | ||
+ | ** Using DHCP:<pre>root@compulab:~# ifup `basename /sys/class/net/eth?`</pre> | ||
+ | ** If you do not have a DHCP server, you can set a static IP address using {{cmd|ifconfig}}:<pre>root@compulab:~# ifconfig `basename /sys/class/net/eth?` <ip address></pre> | ||
+ | * Mount the NFS share containing the {{filename|boot-cm-qs600.img}} and the {{filename|debian-image.tar.bz2}} files: | ||
<pre> | <pre> | ||
− | + | root@compulab:~# mount -o nolock <host ip>:/path/to/nfs/share /mnt/net | |
− | |||
</pre> | </pre> | ||
+ | * Continue to the [[#Install Images | Install Images]] section. | ||
+ | |||
+ | == 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 {{filename|/mount/point}} can be: | |
− | * | + | ** {{filename|/mnt/net}} if NFS is used |
+ | ** {{filename|/media/mmcblk1pX}} if a micro SD card is used, where X is the partition number | ||
+ | ** {{filename|/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 {{parameter|boot}}: | ||
<pre> | <pre> | ||
− | + | root@compulab:~# dd if=/mount/point/boot-cm-qs600.img of=/dev/mmcblk0p7 | |
</pre> | </pre> | ||
− | * | + | * Format the eMMC partition number 13 named {{parameter|userdata}}: |
<pre> | <pre> | ||
− | + | root@compulab:~# mkfs.ext4 /dev/mmcblk0p13 | |
</pre> | </pre> | ||
− | * | + | * Mount the {{parameter|userdata}} partition: |
− | + | <pre> | |
− | + | root@compulab:~# mkdir -p /media/mmcblk0p13 && mount /dev/mmcblk0p13 /media/mmcblk0p13 | |
− | + | </pre> | |
− | + | * Extract the content of {{filename|debian-image.tar.bz2}} onto the /media/mmcblk0p13: | |
− | |||
− | |||
− | |||
− | |||
− | |||
<pre> | <pre> | ||
− | + | root@compulab:~# tar --numeric-owner -xpf /mount/point/debian-image.tar.bz2 -C /media/mmcblk0p13 && sync | |
</pre> | </pre> | ||
− | * | + | * Unmount the {{parameter|userdata}} partition: |
<pre> | <pre> | ||
− | + | root@compulab:~# umount /media/mmcblk0p13 | |
</pre> | </pre> | ||
− | * | + | * Reboot the CM-QS600 evaluation system. |
<pre> | <pre> | ||
− | + | root@compulab:~# reboot | |
</pre> | </pre> | ||
Revision as of 10:05, 29 September 2014
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.
- 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.
- 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 {cmd|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
- Continue to the Install Linux Images section.
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.
- 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
- Continue to the Install Images section.
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.
- 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
- Continue to the Install Images section.
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.
- 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>
- Using DHCP:
- 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
- Continue to the Install Images section.
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
- Unmount the userdata partition:
root@compulab:~# umount /media/mmcblk0p13
- Reboot the CM-QS600 evaluation system.
root@compulab:~# reboot