Difference between revisions of "CM-T3517: Linux: Getting started"
(→Installation using NFS) |
(→Preparation steps) |
||
Line 1: | Line 1: | ||
== Preparation steps == | == Preparation steps == | ||
* Obtain a PC workstation with a serial communication port. | * 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 [http://tftpd32.jounin.net/ TFTPD32] included in the | + | * 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 [http:// | + | * 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. | ||
* All image files mentioned below can be found in {{filename|images}} subdirectory | * All image files mentioned below can be found in {{filename|images}} subdirectory | ||
Line 12: | Line 13: | ||
=== Installation using MMC/SD card === | === Installation using MMC/SD card === | ||
− | * Copy {{filename|debian-image.ubi}}, {{filename|uImage-cm-t3517}}, {{filename|kernel.img}}, {{filename|ramdisk.img}} and {{filename|bootscr.img}} from [http:// | + | * Copy {{filename|debian-image.ubi}}, {{filename|uImage-cm-t3517}}, {{filename|kernel.img}}, {{filename|ramdisk.img}} and {{filename|bootscr.img}} from [http://compulab.co.il/products/computer-on-modules/cm-t3517/#devres 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. | * 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: | * Use the following U-boot commands to boot Linux on CM-T3517: | ||
Line 36: | Line 37: | ||
=== Installation using NFS === | === Installation using NFS === | ||
* Connect the CM-T3517 Ethernet port (connector P18 on SB-T35) to your local network | * Connect the CM-T3517 Ethernet port (connector P18 on SB-T35) to your local network | ||
− | * Copy {{filename|debian-image.ubi}} and {{filename|uImage-cm-t3517}} from [http:// | + | * Copy {{filename|debian-image.ubi}} and {{filename|uImage-cm-t3517}} from [http://compulab.co.il/products/computer-on-modules/cm-t3517/#devres Linux package for CM-T3517] to a directory exported through NFS. |
* Make sure that Linux kernel binary image {{filename|kernel.img}}, ramdisk image {{filename|ramdisk.img}} and bootloader script image {{filename|bootscr.img}} are accessible by the TFTP server. | * Make sure that Linux kernel binary image {{filename|kernel.img}}, ramdisk image {{filename|ramdisk.img}} and bootloader script image {{filename|bootscr.img}} are accessible by the TFTP server. | ||
*: - On Windows machine: copy {{filename|kernel.img}}, {{filename|ramdisk.img}} and {{filename|bootscr.img}} to the same folder and point the TFTP server to that folder | *: - On Windows machine: copy {{filename|kernel.img}}, {{filename|ramdisk.img}} and {{filename|bootscr.img}} to the same folder and point the TFTP server to that folder | ||
Line 70: | Line 71: | ||
* Format the NAND flash root filesystem partition and write Debian filesystem image onto it: | * Format the NAND flash root filesystem partition and write Debian filesystem image onto it: | ||
<pre> | <pre> | ||
− | $ ubiformat /dev/mtd4 -f /mnt/net/debian-image.ubi | + | $ ubiformat -O 2048 /dev/mtd4 -f /mnt/net/debian-image.ubi |
</pre> | </pre> | ||
* Continue to [[#After Installation | After Installation]] section | * Continue to [[#After Installation | After Installation]] section |
Revision as of 14:01, 17 October 2012
Contents
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 installation 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.
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
- Continue to After Installation section
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>
- Using DHCP:
- 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
- Continue to After Installation section
After Installation
- Make sure there is no MMC/SD card in the SD socket (P13) on SB-T35.
- Reset the system.
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
- For Linux automatic boot, type:
> setenv bootdelay 3 > setenv bootcmd "nboot 82000000 nand0 2a0000; bootm" > saveenv > boot
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.