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

From Compulab Mediawiki
Jump to: navigation, search
(Preparation steps)
Line 3: Line 3:
 
* For networked installation you need to install a TFTP server on the host PC. For Windows machines we recommend [http://tftpd32.jounin.net/ TFTPD32] included in the Linux package for CM-T3517 (link below).
 
* For networked installation you need to install a TFTP server on the host PC. For Windows machines we recommend [http://tftpd32.jounin.net/ TFTPD32] included in the Linux package for CM-T3517 (link below).
 
* Download the Linux package for CM-T3517 from [http://compulab.co.il/products/computer-on-modules/cm-t3517/#devres CompuLab website]. Unzip the package to a directory on your host workstation.
 
* Download the Linux package for CM-T3517 from [http://compulab.co.il/products/computer-on-modules/cm-t3517/#devres CompuLab website]. Unzip the package to a directory on your host workstation.
* If MMC/SD card is used for installation it must be prepared as described in [[CM-T3x: Linux: Booting from MMC/SD card|CM-T3x: Linux: Booting from MMC/SD card]] article.
+
* If MMC/SD card is used for booting into U-Boot, it must be prepared as described in [[CM-T3x: Linux: Booting from MMC/SD card|CM-T3x: Linux: Booting from MMC/SD card]] article.
 
* All image files mentioned below can be found in {{filename|images}} subdirectory
 
* All image files mentioned below can be found in {{filename|images}} subdirectory
  

Revision as of 15:26, 18 October 2012

Preparation steps

  • Obtain a PC workstation with a serial communication port.
  • For networked installation you need to install a TFTP server on the host PC. For Windows machines we recommend TFTPD32 included in the Linux package for CM-T3517 (link below).
  • Download the Linux package for CM-T3517 from CompuLab website. Unzip the package to a directory on your host workstation.
  • If MMC/SD card is used for booting into U-Boot, it must be prepared as described in CM-T3x: Linux: Booting from MMC/SD card article.
  • All image files mentioned below can be found in images subdirectory

Image installation

  • Connect the host PC to the SB-T35 base-board (connector P12) via the serial cable supplied with the evaluation kit.
  • Start terminal emulation software on your PC. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
  • Turn on the CM-T3517 evaluation system. The U-Boot boot-loader will start and you will get a command prompt.
Admolition note.png If the boot settings of your CM-T3517 are different than default, you may need to press and hold ^C while turning the CM-T3517 on, in order to get command prompt.

Installation using MMC/SD card

  • Copy debian-image.ubi, uImage-cm-t3517, kernel.img, ramdisk.img and bootscr.img from Linux package for CM-T3517 to the root directory of the MMC/SD card.
  • Insert the MMC/SD card into the SD socket (P13) on SB-T35.
  • Use the following U-boot commands to boot Linux on CM-T3517:
> mmc init
> fatload mmc 0:1 80400000 bootscr.img
> source 80400000
  • After the ramdisk image is loaded, you will get Linux login prompt. Login as root into the system.
  • The MMC/CD card will be mounted automatically under /media/mmcblk0p1
  • Format the NAND flash kernel partition and write the kernel image onto it:
$ flash_eraseall /dev/mtd3
$ nandwrite -p /dev/mtd3 /media/mmcblk0p1/uImage-cm-t3517
  • Format the NAND flash root filesystem partition and write Debian filesystem image onto it:
$ ubiformat -O 2048 /dev/mtd4 -f /media/mmcblk0p1/debian-image.ubi

Installation using NFS

  • Connect the CM-T3517 Ethernet port (connector P18 on SB-T35) to your local network
  • Copy debian-image.ubi and uImage-cm-t3517 from Linux package for CM-T3517 to a directory exported through NFS.
  • Make sure that Linux kernel binary image kernel.img, ramdisk image ramdisk.img and bootloader script image bootscr.img are accessible by the TFTP server.
    - On Windows machine: copy kernel.img, ramdisk.img and bootscr.img to the same folder and point the TFTP server to that folder
    - On Linux machine: copy kernel.img, ramdisk.img and bootscr.img to TFTP server root directory, usually /tftpboot or /tftproot.
  • You can use U-boot dhcp command to obtain IP address or manually set ipaddr environment variable:
> setenv ipaddr <CM-T3517 ip address>
  • Set serverip environment variable and save the new environment to NAND flash:
> setenv serverip <host ip address>
> saveenv
  • Use the following U-boot command to boot Linux on CM-T3517:
> tftp 80400000 bootscr.img && source 80400000
  • After the ramdisk image is loaded you will get Linux login prompt. Login as root into the system.
  • Obtain the IP address for CM-T3517:
    • Using DHCP:
      $ ifup `basename /sys/devices/platform/davinci_emac/net/eth?`
    • If you do not have DHCP server, you can set a static IP address using ifconfig:
      $ ifconfig `basename /sys/devices/platform/davinci_emac/net/eth?` <ip address>
  • Mount the NFS share containing uImage-cm-t3517 and debian-image.ubi image:
$ mount -n <host ip>:/path/to/nfs/share /mnt/net
  • Format the NAND flash kernel partition and write the kernel image onto it:
$ flash_eraseall /dev/mtd3
$ nandwrite -p /dev/mtd3 /mnt/net/uImage-cm-t3517
  • Format the NAND flash root filesystem partition and write Debian filesystem image onto it:
$ ubiformat -O 2048 /dev/mtd4 -f /mnt/net/debian-image.ubi

After Installation

  • Make sure there is no MMC/SD card in the SD socket (P13) on SB-T35.
  • Reset the system.
Admolition note.png If the boot settings of your CM-T3517 are different than default, you may need to press and hold ^C while turning the CM-T3517 on, in order to get command prompt.
  • To boot Linux, type:
> nboot 82000000 nand0 2a0000; bootm
Admolition caution.png The Linux kernel for CM-T3517 is shipped with built-in command line parameters that define primary console, default display settings, root device and root filesystem type. Setting U-Boot bootargs environment variable overrides default kernel command line!
  • For Linux automatic boot, type:
> setenv bootdelay 3
> setenv bootcmd "nboot 82000000 nand0 2a0000; bootm"
> saveenv
> boot
Admolition note.png If you want to get back to U-Boot prompt, hold Ctrl-C during reset.

CM-T3517 will boot Debian Linux from the internal NAND flash.

See also