Difference between revisions of "CM-T3530: Linux: Getting started"
(→Install Images on the MMC/SD Card using Linux Host workstation) |
|||
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-T3530 (link below). |
− | * Download the [http:// | + | * Download the Linux package for CM-T3530 from [http://compulab.co.il/products/computer-on-modules/cm-t3530/#devres CompuLab website]. Unzip the package to a directory on your host workstation. |
* All image files mentioned below can be found in {{filename|images}} subdirectory | * All image files mentioned below can be found in {{filename|images}} subdirectory | ||
+ | * 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-T3530 evaluation system. The U-Boot boot-loader will start and you will get a command prompt. | ||
+ | *: {{Note|If the boot settings of your CM-T3530 are different than default, you may need to press and hold '''Ctrl-C''' while turning the CM-T3530 on, in order to get command prompt.}} | ||
+ | |||
+ | == Boot into the installation environment (ramdisk) == | ||
+ | The first step in CM-T3530 Linux installation is starting the installation environment (Linux kernel and Ramdisk image). | ||
+ | This can be done using the following media: | ||
+ | * [[#Using installation environment on MMC/SD card|MMC/SD card]] | ||
+ | * [[#Using installation environment from TFTP server|Network TFTP server]] | ||
+ | |||
+ | === Using installation environment on MMC/SD card === | ||
+ | * Copy {{filename|kernel.img}}, {{filename|ramdisk.img}} and {{filename|bootscr.img}} from [http://compulab.co.il/products/computer-on-modules/cm-t3530/#devres Linux package for CM-T3530] to the root directory on the first partition of the MMC/SD card. Note, the partition must be FAT (16 or 32) formatted. | ||
+ | * Insert the MMC/SD card into the SD card socket (P13) on the SB-T35. | ||
+ | * Use the following U-boot commands to boot the installation environment on the CM-T3530: | ||
+ | <pre> | ||
+ | CM-T3x # mmc rescan | ||
+ | CM-T3x # fatload mmc 0:1 80400000 bootscr.img | ||
+ | CM-T3x # source 80400000 | ||
+ | </pre> | ||
+ | * Continue to the [[#Install Kernel and Angstrom Linux Images|Install Kernel and Angstrom Linux Images]] section. | ||
+ | |||
+ | === Using installation environment from TFTP server === | ||
+ | * Connect the CM-T3530 Ethernet port to your local network. | ||
+ | * Put {{filename|kernel.img}}, {{filename|ramdisk.img}} and {{filename|bootscr.img}} from [http://compulab.co.il/products/computer-on-modules/cm-t3530/#devres Linux package for CM-T3530] to a location 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 Linux machine: copy {{filename|kernel.img}}, {{filename|ramdisk.img}} and {{filename|bootscr.img}} to TFTP server root directory, usually {{filename|/tftpboot}} or {{filename|/tftproot}}. | ||
+ | * You can use U-boot {{cmd|dhcp}} command to obtain IP address | ||
+ | <pre> | ||
+ | CM-T3x # dhcp | ||
+ | </pre> | ||
+ | :or manually set {{parameter|ipaddr}} environment variable: | ||
+ | <pre> | ||
+ | CM-T3x # setenv ipaddr <CM-T3530 ip address> | ||
+ | </pre> | ||
+ | * Set {{parameter|serverip}} environment variable and save the new environment: | ||
+ | <pre> | ||
+ | CM-T3x # setenv serverip <host ip address> | ||
+ | CM-T3x # saveenv | ||
+ | </pre> | ||
+ | * Use the following U-boot command to boot Linux on CM-T3530: | ||
+ | <pre> | ||
+ | CM-T3x # tftp 80400000 bootscr.img && source 80400000 | ||
+ | </pre> | ||
+ | * Continue to the [[#Install Kernel and Angstrom Linux Images | Install Kernel and Angstrom Linux Images]] section. | ||
− | == | + | === Install Kernel and Angstrom Linux Images === |
− | * | + | |
− | * | + | ==== Mount the installation source media ==== |
− | * | + | |
− | * | + | The next step is installing the kernel and Angstorm Linux images. The following media can be used as a source for installation: |
+ | * [[#Mount an MMC/SD Card|MMC/SD Card]] | ||
+ | * [[#Mount a USB Storage Device|USB storage device]] | ||
+ | * [[#Mount an NFS drive|NFS drive]] | ||
+ | |||
+ | ===== Mount an MMC/SD Card ===== | ||
+ | * Copy the {{filename|angstrom-image-cm-t3530.ubi}}, {{filename|angstrom-image-cm-t3530.tar.bz2}} and the {{filename|uImage-cm-t3530}} from the [http://compulab.co.il/products/computer-on-modules/cm-t3530/#devres Linux package for CM-T3530] to the root directory of any partition on the MMC/SD card. The partition can be formatted either ext2/3/4 or FAT file system. | ||
+ | * Insert the MMC/SD card into the SD socket (P13) on the SB-T35. | ||
+ | * The MMC/SD card is mounted automatically under /media/mmcblk0p{{parameter|X}}. Where {{parameter|X}} is the partition number. | ||
+ | * If for some reason the MMC/SD card hasn't been mounted automatically, use the following mount command: | ||
+ | <pre> | ||
+ | root@compulab:~# mkdir -p /media/mmcblk0pX && mount /dev/mmcblk0pX /media/mmcblk0pX | ||
+ | </pre> | ||
+ | * Continue to the [[#Install Images|Install Images]] section. | ||
+ | |||
+ | ===== Mount a USB Storage Device ===== | ||
+ | * Copy the {{filename| angstrom-image-cm-t3530.ubi}}, {{filename|angstrom-image-cm-t3530.tar.bz2}} and the {{filename|uImage-cm-t3530}} from [http://compulab.co.il/products/computer-on-modules/cm-t3530/#devres Linux package for CM-T3530] to the root directory of any partition on the USB storage device. | ||
+ | * Plug the USB storage device to any port on the dual USB host connector (P17) on the SB-T35. | ||
+ | * The USB device is mounted automatically under /media/sd{{parameter|XY}}. Where {{parameter|X}} is the device letter and {{parameter|Y}} is the partition number. | ||
+ | * If for some reason the USB storage device hasn't been mounted automatically, use the following mount command: | ||
+ | <pre> | ||
+ | root@compulab:~# mkdir -p /media/sdXY && mount /dev/sdXY /media/sdXY | ||
+ | </pre> | ||
+ | * Continue to the [[#Install Images|Install Images]] section. | ||
− | === | + | ===== Mount an NFS drive ===== |
− | * Copy {{filename| | + | * Connect the CM-T3530 Ethernet port (connector P16 or P18 on the SB-T35) to your local network. |
− | * | + | * Copy the {{filename|angstrom-image-cm-t3530.ubi}}, {{filename|angstrom-image-cm-t3530.tar.bz2}} and the {{filename|uImage-cm-t3530}} from the [http://compulab.co.il/products/computer-on-modules/cm-t3530/#devres Linux package for CM-T3530] to a directory exported through NFS. |
− | * | + | * During Ramdisk image booting the CM-T3530 attempts to obtain an IP address using DHCP. If from some reason the IP address has not been obtained, use the following commands to obtain IP address for the CM-T3530: |
+ | ** If P18 Ethernet port is connected (CM-T3530 SMSC Ethernet controller is used): <pre>export eth_device=smsc911x.0</pre> | ||
+ | ** If P16 Ethernet port is connected (SB-T35 SMSC Ethernet controller is used): <pre>export eth_device=smsc911x.1</pre> | ||
+ | ** Obtain IP using DHCP:<pre>root@compulab:~# ifup `basename /sys/devices/platform/$eth_device/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/devices/platform/$eth_device/net/eth?` <ip address></pre> | ||
+ | * Mount the NFS share containing the {{filename|uImage-cm-t3530}} and the {{filename|angstrom-image-cm-t3530.ubi}} files: | ||
<pre> | <pre> | ||
− | > | + | root@compulab:~# mount -o nolock <host ip>:/path/to/nfs/share /mnt/net |
− | > | + | </pre> |
− | + | * Continue to [[#Install Images | Install Images]] section. | |
− | + | ||
− | {{ | + | ==== Install Images ==== |
− | * | + | Once the ramdisk image is loaded and the media containing the CM-T3530 Kernel and Angstrom Linux images is mounted, the installation can be done on either of the following: |
− | * | + | * [[#Install on the NAND flash|NAND Flash]] |
+ | * [[#Install on the MMC/SD Card|MMC/SD Card]] | ||
+ | |||
+ | ===== Install on the NAND flash ===== | ||
+ | The installation on the NAND flash can be done using the mounted media containing the CM-T3530 Kernel and Angstorm Linux images. | ||
+ | |||
+ | * In this section the term {{filename|/mount/point}} can be either of the following: | ||
+ | ** {{filename|/media/mmcblk0p{{parameter|X}}}} if MMC/SD card is used, where {{parameter|X}} is the partition number. | ||
+ | ** {{filename|/media/sd{{parameter|XY}}}} if USB storage is used, where {{parameter|X}} is the USB drive letter and {{parameter|Y}} is the partition number. | ||
+ | ** {{filename|/mnt/net}} if NFS drive is used. | ||
+ | |||
* Format the NAND flash kernel partition and write the kernel image onto it: | * Format the NAND flash kernel partition and write the kernel image onto it: | ||
<pre> | <pre> | ||
− | + | root@compulab:~# flash_erase /dev/mtd3 0 0 | |
− | + | root@compulab:~# nandwrite -p /dev/mtd3 /mount/point/uImage-cm-t3530 | |
</pre> | </pre> | ||
− | * Format the NAND flash root filesystem partition and write | + | * Format the NAND flash root filesystem partition and write Angstorm filesystem image onto it: |
<pre> | <pre> | ||
− | + | root@compulab:~# ubiformat -O 2048 /dev/mtd4 -f /mount/point/angstrom-image-cm-t3530.ubi | |
</pre> | </pre> | ||
− | * Continue to [[#After Installation | After Installation]] section | + | * Continue to the [[#After Installation | After Installation]] section. |
− | === | + | ===== Install on the MMC/SD Card ===== |
− | * | + | * MMC/SD card must be prepared as described in the [[CM-T3x: Linux: Booting from MMC/SD card|CM-T3x: Linux: Booting from MMC/SD card]] article. |
− | * | + | * In this subsection the term {{filename|/mount/point}} can be: |
− | * | + | ** {{filename|/mnt/net}} if NFS is used |
− | * | + | ** {{filename|/media/sd{{parameter|XY}}}} if USB storage is used, where {{parameter|X}} is the USB drive letter and {{parameter|Y}} is the partition number. |
− | *: - | + | * Make sure the MMC/SD card first (FAT) partition is mounted under the {{filename|/media/mmcblk0p1}}: |
− | * | + | <pre> |
+ | root@compulab:~# cat /proc/mounts | grep -c mmcblk0p1 | ||
+ | 1 | ||
+ | </pre> | ||
+ | * Copy the {{filename|uImage-cm-t3530}} to the MMC/SD card first (FAT) partition: | ||
+ | <pre> | ||
+ | root@compulab:~# cp /mount/point/uImage-cm-t3530 /media/mmcblk0p1/ | ||
+ | </pre> | ||
+ | * Unmount the MMC/SD card first (FAT) partition | ||
+ | <pre> | ||
+ | root@compulab:~# umount /dev/mmcblk0p1 | ||
+ | </pre> | ||
+ | * Create an additional partition for the Linux file system on the MMC/SD card: | ||
+ | <pre> | ||
+ | root@compulab:~# echo -e "n\np\n2\n\n\nw\neof\n" | fdisk /dev/mmcblk0 | ||
+ | </pre> | ||
+ | * Format the new partition with ext4 filesystem: | ||
+ | <pre> | ||
+ | root@compulab:~# mkfs.ext4 /dev/mmcblk0p2 | ||
+ | </pre> | ||
+ | * Mount the new MMC/SD card partition: | ||
+ | <pre> | ||
+ | root@compulab:~# mkdir -p /media/mmcblk0p2 && mount /dev/mmcblk0p2 /media/mmcblk0p2/ | ||
+ | </pre> | ||
+ | * Extract the content of {{filename|angstrom-image-cm-t3530.tar.bz2}} onto that partition: | ||
+ | <pre> | ||
+ | root@compulab:~# tar -xvpf /mount/point/angstrom-image-cm-t3530.tar.bz2 -C /media/mmcblk0p2 && sync | ||
+ | </pre> | ||
+ | * Continue to the [[#After Installation | After Installation]] section. | ||
+ | |||
+ | == Install Images on the MMC/SD Card using Linux Host workstation == | ||
+ | Installation of Linux kernel and Angstrom user space on MMC/SD card can be also performed using Linux Host workstation. | ||
+ | |||
+ | * Obtain a Linux PC workstation with a MMC/SD card reader. | ||
+ | * MMC/SD card must be prepared as described in the [[CM-T3x: Linux: Booting from MMC/SD card|CM-T3x: Linux: Booting from MMC/SD card]] article. | ||
+ | * Plug the MMC/SD card, supplied with the CM-T3530 Evaluation kit, into the MMC/SD card reader attached to the desktop workstation. | ||
+ | * Depending on the desktop system setup, following steps might require super user privileges. | ||
+ | * The following steps assume that the MMC/SD card is {{filename|/dev/sde}} (this might change depending on the desktop system setup) and the desktop system used does not perform automount. | ||
+ | * Mount the first (boot) partition of the MMC/SD card: | ||
<pre> | <pre> | ||
− | + | sudo mkdir -p /media/boot && sudo mount /dev/sde1 /media/boot/ | |
</pre> | </pre> | ||
− | * | + | * Copy the {{filename|uImage-cm-t3530}} to the MMC/SD card first (FAT) partition: |
<pre> | <pre> | ||
− | + | sudo cp cm-t3530-linux/images/uImage-cm-t3530 /media/boot/ | |
− | |||
</pre> | </pre> | ||
− | * | + | * Unmount the MMC/SD card first (FAT) partition |
<pre> | <pre> | ||
− | + | sudo umount /dev/sde1 | |
− | </pre> | + | </pre> |
− | * | + | * Create an additional partition for the Linux file system on the MMC/SD card: |
− | |||
<pre> | <pre> | ||
− | + | echo -e "n\np\n2\n\n\nw\neof\n" | sudo fdisk /dev/sde | |
− | </pre> | + | </pre> |
− | * | + | * Format the second MMC/SD card partition with ext4 filesystem: |
<pre> | <pre> | ||
− | + | sudo mkfs.ext4 /dev/sde2 | |
− | </pre> | + | </pre> |
− | * | + | * Mount the second MMC/SD card partition: |
+ | <pre> | ||
+ | sudo mkdir -p /media/rootfs && sudo mount /dev/sde2 /media/rootfs/ | ||
+ | </pre> | ||
+ | * Extract the content of the {{filename|angstrom-image-cm-t3530.tar.bz2}} onto that partition: | ||
<pre> | <pre> | ||
− | + | sudo tar -xpvf cm-t3530-linux/images/angstrom-image-cm-t3530.tar.bz2 -C /media/rootfs && sync | |
− | |||
</pre> | </pre> | ||
− | * | + | * Unmount all MMC/SD card partitions: |
<pre> | <pre> | ||
− | + | sudo umount /dev/sde1; sudo umount /dev/sde2 | |
</pre> | </pre> | ||
− | * Continue to [[#After Installation | After Installation]] section | + | * Continue to the [[#After Installation | After Installation]] section. |
== After Installation == | == After Installation == | ||
− | |||
* Reset the system. | * Reset the system. | ||
*: {{Note|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.}} | *: {{Note|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: | + | |
− | <pre> | + | * CM-T3530 will boot Angstrom Linux from the internal NAND flash or the MMC/SD card. |
− | {{ | + | *: {{Note|The first boot might take longer time because Angstrom Linux performs a lot of one-time initialization tasks.}} |
− | * For Linux automatic boot, type: | + | |
+ | === Boot from the NAND flash === | ||
+ | * Set the {{parameter|bootargs}} environment variable: | ||
+ | <pre> | ||
+ | CM-T3x # setenv bootargs 'ubi.mtd=rootfs,2048 root=ubi0:rootfs rw rootfstype=ubifs console=ttyO2,115200n8' | ||
+ | </pre> | ||
+ | * To boot Linux, type: | ||
+ | <pre>CM-T3x # nboot 82000000 nand0 2a0000; bootm</pre> | ||
+ | |||
+ | {{Note|The Linux kernel for CM-T3530 is shipped with built-in command line parameters. Setting U-Boot {{parameter|bootargs}} environment variable overrides default kernel command line.}} | ||
+ | |||
+ | * For Linux automatic boot, type: | ||
+ | <pre> | ||
+ | CM-T3x # setenv bootdelay 3 | ||
+ | CM-T3x # setenv bootcmd "nboot 82000000 nand0 2a0000; bootm" | ||
+ | CM-T3x # saveenv | ||
+ | CM-T3x # boot | ||
+ | </pre> | ||
+ | |||
+ | === Boot from the MMC/SD Card === | ||
+ | * Install SB-T35 E6 jumper or hold SW-1 (SD Boot) button. | ||
+ | * Reset the system. | ||
+ | * The boot from MMC/SD card will start automatically with default U-Boot environment. | ||
+ | |||
+ | === Configure video output === | ||
+ | |||
+ | ==== Select LCD model ==== | ||
+ | |||
+ | CM-T3530 Evaluation Kit can be equipped with either of the following LCD panels: Toppoly TDO35S or DataImage SCF0403852GGU04. | ||
+ | Toppoly TDO35S is registered as default OMAP DSS LCD device. | ||
+ | |||
+ | To set DataImage LCD as OMAP DSS LCD device add the following boot option to the kernel command line parameters: | ||
+ | <pre> | ||
+ | cm_t3x_lcd=dataimage | ||
+ | </pre> | ||
+ | |||
+ | ==== Select video out ==== | ||
+ | |||
+ | Default CM-T3530 video output device is LCD. Other video output devices can be used as well: | ||
+ | * DVI output can be enabled by adding the following boot options to the kernel command line parameters: | ||
+ | <pre> | ||
+ | omapfb.vram=1:4M vram=8M omapfb.mode=dvi:1024x768-24@60 omapdss.def_disp=dvi | ||
+ | </pre> | ||
+ | * TV output can be enabled by adding the following boot options to the kernel command line parameters: | ||
<pre> | <pre> | ||
− | + | omapfb.mode=tv:ntsc omapdss.def_disp=tv | |
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
Line 98: | Line 256: | ||
* [[Linux Development for ARM modules]] | * [[Linux Development for ARM modules]] | ||
* [[U-Boot for CM-T3530]] | * [[U-Boot for CM-T3530]] | ||
+ | * [[CM-T3x: U-Boot: Firmware Overview#Default MMC/SD card mapping|Default MMC/SD card mapping]] | ||
[[Category:Linux|Getting started]] | [[Category:Linux|Getting started]] | ||
[[Category:CM-T3530|Linux: Getting started]] | [[Category:CM-T3530|Linux: Getting started]] |
Latest revision as of 13:33, 28 October 2013
Contents
- 1 Preparation steps
- 2 Boot into the installation environment (ramdisk)
- 3 Install Images on the MMC/SD Card using Linux Host workstation
- 4 After Installation
- 5 See also
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 (link below).
- Download the Linux package for CM-T3530 from CompuLab website. Unzip the package to a directory on your host workstation.
- All image files mentioned below can be found in images subdirectory
- 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-T3530 evaluation system. The U-Boot boot-loader will start and you will get a command prompt.
If the boot settings of your CM-T3530 are different than default, you may need to press and hold Ctrl-C while turning the CM-T3530 on, in order to get command prompt. |
Boot into the installation environment (ramdisk)
The first step in CM-T3530 Linux installation is starting the installation environment (Linux kernel and Ramdisk image). This can be done using the following media:
Using installation environment on MMC/SD card
- Copy kernel.img, ramdisk.img and bootscr.img from Linux package for CM-T3530 to the root directory on the first partition of the MMC/SD card. Note, the partition must be FAT (16 or 32) formatted.
- Insert the MMC/SD card into the SD card socket (P13) on the SB-T35.
- Use the following U-boot commands to boot the installation environment on the CM-T3530:
CM-T3x # mmc rescan CM-T3x # fatload mmc 0:1 80400000 bootscr.img CM-T3x # source 80400000
- Continue to the Install Kernel and Angstrom Linux Images section.
Using installation environment from TFTP server
- Connect the CM-T3530 Ethernet port to your local network.
- Put kernel.img, ramdisk.img and bootscr.img from Linux package for CM-T3530 to a location 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
CM-T3x # dhcp
- or manually set ipaddr environment variable:
CM-T3x # setenv ipaddr <CM-T3530 ip address>
- Set serverip environment variable and save the new environment:
CM-T3x # setenv serverip <host ip address> CM-T3x # saveenv
- Use the following U-boot command to boot Linux on CM-T3530:
CM-T3x # tftp 80400000 bootscr.img && source 80400000
- Continue to the Install Kernel and Angstrom Linux Images section.
Install Kernel and Angstrom Linux Images
Mount the installation source media
The next step is installing the kernel and Angstorm Linux images. The following media can be used as a source for installation:
Mount an MMC/SD Card
- Copy the angstrom-image-cm-t3530.ubi, angstrom-image-cm-t3530.tar.bz2 and the uImage-cm-t3530 from the Linux package for CM-T3530 to the root directory of any partition on the MMC/SD card. The partition can be formatted either ext2/3/4 or FAT file system.
- Insert the MMC/SD card into the SD socket (P13) on the SB-T35.
- The MMC/SD card is mounted automatically under /media/mmcblk0pX. Where X is the partition number.
- If for some reason the MMC/SD card hasn't been mounted automatically, use the following mount command:
root@compulab:~# mkdir -p /media/mmcblk0pX && mount /dev/mmcblk0pX /media/mmcblk0pX
- Continue to the Install Images section.
Mount a USB Storage Device
- Copy the angstrom-image-cm-t3530.ubi, angstrom-image-cm-t3530.tar.bz2 and the uImage-cm-t3530 from Linux package for CM-T3530 to the root directory of any partition on the USB storage device.
- Plug the USB storage device to any port on the dual USB host connector (P17) on the SB-T35.
- 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-T3530 Ethernet port (connector P16 or P18 on the SB-T35) to your local network.
- Copy the angstrom-image-cm-t3530.ubi, angstrom-image-cm-t3530.tar.bz2 and the uImage-cm-t3530 from the Linux package for CM-T3530 to a directory exported through NFS.
- During Ramdisk image booting the CM-T3530 attempts to obtain an IP address using DHCP. If from some reason the IP address has not been obtained, use the following commands to obtain IP address for the CM-T3530:
- If P18 Ethernet port is connected (CM-T3530 SMSC Ethernet controller is used):
export eth_device=smsc911x.0
- If P16 Ethernet port is connected (SB-T35 SMSC Ethernet controller is used):
export eth_device=smsc911x.1
- Obtain IP using DHCP:
root@compulab:~# ifup `basename /sys/devices/platform/$eth_device/net/eth?`
- If you do not have a DHCP server, you can set a static IP address using ifconfig:
root@compulab:~# ifconfig `basename /sys/devices/platform/$eth_device/net/eth?` <ip address>
- If P18 Ethernet port is connected (CM-T3530 SMSC Ethernet controller is used):
- Mount the NFS share containing the uImage-cm-t3530 and the angstrom-image-cm-t3530.ubi files:
root@compulab:~# mount -o nolock <host ip>:/path/to/nfs/share /mnt/net
- Continue to Install Images section.
Install Images
Once the ramdisk image is loaded and the media containing the CM-T3530 Kernel and Angstrom Linux images is mounted, the installation can be done on either of the following:
Install on the NAND flash
The installation on the NAND flash can be done using the mounted media containing the CM-T3530 Kernel and Angstorm Linux images.
- In this section the term /mount/point can be either of the following:
- /media/mmcblk0pX if MMC/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.
- /mnt/net if NFS drive is used.
- Format the NAND flash kernel partition and write the kernel image onto it:
root@compulab:~# flash_erase /dev/mtd3 0 0 root@compulab:~# nandwrite -p /dev/mtd3 /mount/point/uImage-cm-t3530
- Format the NAND flash root filesystem partition and write Angstorm filesystem image onto it:
root@compulab:~# ubiformat -O 2048 /dev/mtd4 -f /mount/point/angstrom-image-cm-t3530.ubi
- Continue to the After Installation section.
Install on the MMC/SD Card
- MMC/SD card must be prepared as described in the CM-T3x: Linux: Booting from MMC/SD card article.
- In this subsection the term /mount/point can be:
- /mnt/net if NFS is used
- /media/sdXY if USB storage is used, where X is the USB drive letter and Y is the partition number.
- Make sure the MMC/SD card first (FAT) partition is mounted under the /media/mmcblk0p1:
root@compulab:~# cat /proc/mounts | grep -c mmcblk0p1 1
- Copy the uImage-cm-t3530 to the MMC/SD card first (FAT) partition:
root@compulab:~# cp /mount/point/uImage-cm-t3530 /media/mmcblk0p1/
- Unmount the MMC/SD card first (FAT) partition
root@compulab:~# umount /dev/mmcblk0p1
- Create an additional partition for the Linux file system on the MMC/SD card:
root@compulab:~# echo -e "n\np\n2\n\n\nw\neof\n" | fdisk /dev/mmcblk0
- Format the new partition with ext4 filesystem:
root@compulab:~# mkfs.ext4 /dev/mmcblk0p2
- Mount the new MMC/SD card partition:
root@compulab:~# mkdir -p /media/mmcblk0p2 && mount /dev/mmcblk0p2 /media/mmcblk0p2/
- Extract the content of angstrom-image-cm-t3530.tar.bz2 onto that partition:
root@compulab:~# tar -xvpf /mount/point/angstrom-image-cm-t3530.tar.bz2 -C /media/mmcblk0p2 && sync
- Continue to the After Installation section.
Install Images on the MMC/SD Card using Linux Host workstation
Installation of Linux kernel and Angstrom user space on MMC/SD card can be also performed using Linux Host workstation.
- Obtain a Linux PC workstation with a MMC/SD card reader.
- MMC/SD card must be prepared as described in the CM-T3x: Linux: Booting from MMC/SD card article.
- Plug the MMC/SD card, supplied with the CM-T3530 Evaluation kit, into the MMC/SD card reader attached to the desktop workstation.
- Depending on the desktop system setup, following steps might require super user privileges.
- The following steps assume that the MMC/SD card is /dev/sde (this might change depending on the desktop system setup) and the desktop system used does not perform automount.
- Mount the first (boot) partition of the MMC/SD card:
sudo mkdir -p /media/boot && sudo mount /dev/sde1 /media/boot/
- Copy the uImage-cm-t3530 to the MMC/SD card first (FAT) partition:
sudo cp cm-t3530-linux/images/uImage-cm-t3530 /media/boot/
- Unmount the MMC/SD card first (FAT) partition
sudo umount /dev/sde1
- Create an additional partition for the Linux file system on the MMC/SD card:
echo -e "n\np\n2\n\n\nw\neof\n" | sudo fdisk /dev/sde
- Format the second MMC/SD card partition with ext4 filesystem:
sudo mkfs.ext4 /dev/sde2
- Mount the second MMC/SD card partition:
sudo mkdir -p /media/rootfs && sudo mount /dev/sde2 /media/rootfs/
- Extract the content of the angstrom-image-cm-t3530.tar.bz2 onto that partition:
sudo tar -xpvf cm-t3530-linux/images/angstrom-image-cm-t3530.tar.bz2 -C /media/rootfs && sync
- Unmount all MMC/SD card partitions:
sudo umount /dev/sde1; sudo umount /dev/sde2
- Continue to the After Installation section.
After Installation
- Reset the system.
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. |
- CM-T3530 will boot Angstrom Linux from the internal NAND flash or the MMC/SD card.
The first boot might take longer time because Angstrom Linux performs a lot of one-time initialization tasks. |
Boot from the NAND flash
- Set the bootargs environment variable:
CM-T3x # setenv bootargs 'ubi.mtd=rootfs,2048 root=ubi0:rootfs rw rootfstype=ubifs console=ttyO2,115200n8'
- To boot Linux, type:
CM-T3x # nboot 82000000 nand0 2a0000; bootm
The Linux kernel for CM-T3530 is shipped with built-in command line parameters. Setting U-Boot bootargs environment variable overrides default kernel command line. |
- For Linux automatic boot, type:
CM-T3x # setenv bootdelay 3 CM-T3x # setenv bootcmd "nboot 82000000 nand0 2a0000; bootm" CM-T3x # saveenv CM-T3x # boot
Boot from the MMC/SD Card
- Install SB-T35 E6 jumper or hold SW-1 (SD Boot) button.
- Reset the system.
- The boot from MMC/SD card will start automatically with default U-Boot environment.
Configure video output
Select LCD model
CM-T3530 Evaluation Kit can be equipped with either of the following LCD panels: Toppoly TDO35S or DataImage SCF0403852GGU04. Toppoly TDO35S is registered as default OMAP DSS LCD device.
To set DataImage LCD as OMAP DSS LCD device add the following boot option to the kernel command line parameters:
cm_t3x_lcd=dataimage
Select video out
Default CM-T3530 video output device is LCD. Other video output devices can be used as well:
- DVI output can be enabled by adding the following boot options to the kernel command line parameters:
omapfb.vram=1:4M vram=8M omapfb.mode=dvi:1024x768-24@60 omapdss.def_disp=dvi
- TV output can be enabled by adding the following boot options to the kernel command line parameters:
omapfb.mode=tv:ntsc omapdss.def_disp=tv