CM-T3530: Linux: Getting started

From Compulab Mediawiki
Revision as of 14:19, 23 December 2009 by Mike (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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-T3530.
  • Download the Linux package for CM-T3530 from CompuLab's website . Unzip the package to a directory on your host workstation.
  • All image files mentioned below can be found in images subdirectory

Image installation

  • Connect the host PC to the SB-T35 base-board (connector P8) 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-T3530 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-T3530 are different than default, you may need to press and hold ^C while turning the CM-T3530 on, in order to get command prompt.

Installation using MMC/SD card

  • Copy Angstrom-image.ubi, uImage-cm-t35.bin, kernel.img, ramdisk.img and bootscr.img from Linux package for CM-T3530 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-T3530:
> mmc init
> fatload mmc 0:1 80400000 bootscr.img
> source 80400000
Admolition note.png U-Boot with default settings will load and run bootscr.img script automatically
  • 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-t35.bin
  • Format the NAND flash root filesystem partition and write Angstrom filesystem image onto it:
$ ubiformat -O 2048 /dev/mtd4 -f /media/mmcblk0p1/Angstrom-image.ubi

Installation using NFS

  • Connect the CM-T3530 Ethernet port (connector P18 on SB-T35) to your local network
  • Copy Angstrom-image.ubi and uImage-cm-t35.bin from Linux package for CM-T3530 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-T3530 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-T3530:
> tftp 80400000 bootscr.img && source 80400000
  • After the ramdisk image is loaded you will get Linux login prompt. Login as root into the system.
  • During boot the CM-T3530 will attempt to obtain an IP address using DHCP. If you do not have DHCP server you can set a static IP address using ifconfig:
$ ifconfig eth0 <ip address>
  • Mount the NFS share containing cm-t3530-kernel.jffs2 and Angstrom-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-t35.bin
  • Format the NAND flash root filesystem partition and write Angstrom filesystem image onto it:
$ ubiformat /dev/mtd4 -f /mnt/net/Angstrom-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-T3530 are different than default, you may need to press and hold ^C while turning the CM-T3530 on, in order to get command prompt.
  • To boot Linux, type:
> nboot 82000000 nand0 2a0000; bootm
Admolition caution.png The Linux kernel for CM-T3530 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-T3530 will boot Angstrom Linux from the internal NAND flash. Note, that the first boot takes a long time because Angstrom Linux performs a lot of one-time initialization tasks.

Admolition important.png When the Angstrom Linux is run for the first time it presents several configuration screens. Make sure to choose "Angstrom" profile in the profile selection.

See also