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

From Compulab Mediawiki
Jump to: navigation, search
(Preparation steps)
(Mount the MMC/SD Card)
Line 1: Line 1:
 
== Preparation steps ==
 
== Preparation steps ==
* Obtain a Linux PC workstation with a serial communication port and a micro SD card reader.
+
* Obtain a Linux 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 Linux package for CM-T3730 (link below).
 
* Download the [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres Linux package for CM-T3730] from CompuLab website. Unzip the package to a directory on your host workstation.
 
* Download the [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres Linux package for CM-T3730] 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.
 
* All image files mentioned below can be found in {{filename|images}} subdirectory.
* The micro SD card, supplied with the CM-T3730 Evaluation kit, has already been pre-partitioned as described in [[CM-T3x: U-Boot: Firmware Overview#Default MMC/SD card mapping|CM-T3x: U-Boot: Firmware Overview]] article.
+
* 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-T3730 evaluation system. The U-Boot boot-loader will start and you will get a command prompt.
 +
*: {{Note|If the boot settings of your CM-T3730 are different than default, you may need to press and hold '''Ctrl-C''' while turning the CM-T3730 on, in order to get command prompt.}}
 +
 
 +
== Boot into the installation environment (ramdisk) ==
 +
The first step in CM-T3730 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/CD 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-t3730/#devres Linux package for CM-T3730] to the root directory on the first partition of the MMC/SD card. Note, the partition must be FAT (16 or 32) formated.
 +
* Insert the MMC/SD card into the SD socket (P13) on the SB-T35.
 +
* Use the following U-boot commands to boot the installation environment on the CM-T3730:
 +
<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-T3730 Ethernet port (connector P18 on the SB-T35) 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-t3730/#devres Linux package for CM-T3730] 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 or manually set {{parameter|ipaddr}} environment variable:
 +
<pre>
 +
CM-T3x # setenv ipaddr <CM-T3730 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-T3730:
 +
<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 ==
 +
After the ramdisk image is loaded the Linux login prompt will appear. Login as {{parameter|root}} into the system. Use {{parameter|111111}} password for login:
 +
<pre>
 +
compulab login: root
 +
Password: 111111
 +
</pre>
 +
The next step is installing the kernel and Angstrom Linux images. The following media can be used as a source for installation:
 +
* [[#Mount the MMC/SD Card|MMC/CD Card]]
 +
* [[#Mount a USB Storage Device|USB storage device]]
 +
* [[#Mount the NFS drive|NFS drive]]
  
== Image installation ==
+
=== Mount the MMC/SD Card ===
* Plug the micro SD card, supplied with CM-T3730 Evaluation kit, into the micro SD card reader attached to your desktop workstation.
+
* Copy the {{filename|Angstrom-image-cm-t3730.ubi}} and the {{filename|uImage-cm-t3730.bin}} from the [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres Linux package for CM-T3730] 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.
* Depending on your desktop system setup, following steps might require super user privileges.
+
* 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:
 +
<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-t3730.ubi}}, the {{filename|Angstrom-image-cm-t3730.tar.bz2}} and the {{filename|uImage-cm-t3730.bin}} from [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres Linux package for CM-T3730] 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:
 +
<pre>
 +
root@compulab:~# mkdir -p /media/sdXY && mount /dev/sdXY /media/sdXY
 +
</pre>
 +
* Continue to the [[#Install Images | Install Images]] section.
 +
 
 +
=== Mount the NFS drive ===
 +
* Connect the CM-T3730 Ethernet port (connector P18 on the SB-T35) to your local network.
 +
* Copy the {{filename|Angstrom-image-cm-t3730.ubi}}, the {{filename|Angstrom-image-cm-t3730.tar.bz2}} and the {{filename|uImage-cm-t3730.bin}} from the [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres Linux package for CM-T3730] to a directory exported through NFS.
 +
* During Ramdisk image booting the CM-T3730 attempts to obtain an IP address using DHCP. If from some reason the IP address has not been obtained, use the following command to obtain IP address for the CM-T3730:
 +
** Using DHCP:<pre>root@compulab:~#  ifup `basename /sys/devices/platform/smsc911x.0/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/smsc911x.0/net/eth?` <ip address></pre>
 +
* Mount the NFS share containing the {{filename|uImage-cm-t3730.bin}}, the {{filename|Angstrom-image-cm-t3730.ubi}} and the {{filename|Angstrom-image-cm-t3730.tar.bz2}} files:
 +
<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-T3730 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 Micro SD Card|Micro SD Card]]
 +
 
 +
==== Install on the NAND flash ====
 +
* In this subsection the term {{filename|/mount/point}} can be:
 +
** {{filename|/media/mmcblk0pX}} if MMC/CD 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.
 +
* Format the NAND flash kernel partition and write the kernel image onto it:
 +
<pre>
 +
$ flash_erase /dev/mtd3 0 0
 +
$ nandwrite -p /dev/mtd3 /mount/point/uImage-cm-t3730.bin
 +
</pre>
 +
* Format the NAND flash root filesystem partition and write the Angstrom filesystem image onto it:
 +
<pre>
 +
$ ubiformat -O 2048 /dev/mtd4 -f /mount/point/Angstrom-image-cm-t3730.ubi
 +
</pre>
 +
* Continue to the [[#After Installation | After Installation]] section.
 +
 
 +
==== Install on the Micro SD Card ====
 +
* In this subsection the term {{filename|/mount/point}} can be:
 +
** {{filename|/mnt/net}} if NFS is used
 +
** {{filename|/media/sdXY}} if USB storage is used, where X is the USB drive letter and Y is the partition number.
 +
* Make sure the micro 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-t3730.bin}} to the micro SD card first (FAT) partition and name it {{filename|uImage-cm-t3730}}:
 +
<pre>
 +
root@compulab:~# cp /mount/point/uImage-cm-t3730.bin /media/mmcblk0p1/uImage-cm-t3730
 +
</pre>
 +
* Unmount the micro SD card first (FAT) partition
 +
<pre>
 +
root@compulab:~# umount /dev/mmcblk0p1
 +
</pre>
 +
* Create an additional partition for the Linux file system on the micro SD card:
 +
<pre>
 +
root@compulab:~# fdisk /dev/mmcblk0 << eof
 +
> n
 +
> p
 +
> 2
 +
> 239
 +
>
 +
> w
 +
> eof
 +
 
 +
The number of cylinders for this disk is set to 15318.
 +
There is nothing wrong with that, but this is larger than 1024,
 +
and could in certain setups cause problems with:
 +
1) software that runs at boot time (e.g., old versions of LILO)
 +
2) booting and partitioning software from other OSs
 +
  (e.g., DOS FDISK, OS/2 FDISK)
 +
 
 +
Command (m for help): Command action
 +
  e  extended
 +
  p  primary partition (1-4)
 +
Partition number (1-4): First cylinder (1-15318, default 1): Last cylinder or +size or +sizeM or +sizeK (239-15318, default 15318): Using default value 15318
 +
 
 +
Command (m for help): The partition table has been altered.
 +
Calling ioctl() to re-read partition table
 +
mmcblk0: p1 p2
 +
</pre>
 +
* Format the new partition with ext4 filesystem:
 +
<pre>
 +
root@compulab:~# mkfs.ext4 /dev/mmcblk0p2
 +
</pre>
 +
* Mount the new micro SD card partition:
 +
<pre>
 +
root@compulab:~# mkdir -p /media/rootfs && mount /dev/mmcblk0p2 /media/rootfs/
 +
</pre>
 +
* Extract the content of {{filename|Angstrom-image-cm-t3730.tar.bz2}} onto that partition:
 +
<pre>
 +
root@compulab:~# tar -xvpf /mount/point/Angstrom-image-cm-t3730.tar.bz2 -C /media/rootfs && sync
 +
</pre>
 +
* Continue to the [[#After Installation | After Installation]] section.
 +
 
 +
== Install Images on the micro SD Card using Linux Host workstation ==
 +
* Obtain a Linux PC workstation with a micro SD card reader.
 +
* The micro SD card, supplied with the CM-T3730 Evaluation kit, has already been pre-partitioned as described in the [[CM-T3x: U-Boot: Firmware Overview#Default MMC/SD card mapping|CM-T3x: U-Boot: Firmware Overview]] article.
 +
* Plug the micro SD card, supplied with the CM-T3730 Evaluation kit, into the micro 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 micro SD card is {{filename|/dev/sde}} (this might change depending on the desktop system setup) and the desktop system used does not perform automount.
 
* The following steps assume that the micro 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 micro SD card:
+
* Mount the first (boot) partition of the micro SD card:
 
<pre>
 
<pre>
 
sudo mkdir -p /media/boot && sudo mount /dev/sde1 /media/boot/
 
sudo mkdir -p /media/boot && sudo mount /dev/sde1 /media/boot/
Line 17: Line 181:
 
sudo cp cm-t3730-linux/images/uImage-cm-t3730.bin /media/boot/uImage-cm-t3730
 
sudo cp cm-t3730-linux/images/uImage-cm-t3730.bin /media/boot/uImage-cm-t3730
 
</pre>
 
</pre>
* Copy the {{filename|bootscr.img}} to the micro SD card first (FAT) partition and name it {{filename|boot.scr}}:
+
* Format the second micro SD card partition with ext4 filesystem:
<pre>
 
sudo cp cm-t3730-linux/images/bootscr.img /media/boot/boot.scr
 
</pre>
 
* Format the third micro SD card partition with EXT4 filesystem:
 
 
<pre>
 
<pre>
sudo mkfs.ext4 /dev/sde3
+
sudo mkfs.ext4 /dev/sde2
 
</pre>
 
</pre>
* Mount the third micro SD card third partition:
+
* Mount the second micro SD card partition:
 
<pre>
 
<pre>
sudo mkdir -p /media/rootfs && sudo mount /dev/sde3 /media/rootfs/
+
sudo mkdir -p /media/rootfs && sudo mount /dev/sde2 /media/rootfs/
 
</pre>
 
</pre>
* Extract the content of {{filename|Angstrom-image-cm-t3730.tar.bz2}} onto that partition:
+
* Extract the content of the {{filename|Angstrom-image-cm-t3730.tar.bz2}} onto that partition:
 
<pre>
 
<pre>
sudo tar -xpjvf cm-t3730-linux/images/Angstrom-image-cm-t3730.tar.bz2 -C /media/rootfs && sync
+
sudo tar -xpvf cm-t3730-linux/images/Angstrom-image-cm-t3730.tar.bz2 -C /media/rootfs && sync
 
</pre>
 
</pre>
 
* Unmount all micro SD card partitions:
 
* Unmount all micro SD card partitions:
 
<pre>
 
<pre>
sudo umount /dev/sde1; sudo umount /dev/sde3
+
sudo umount /dev/sde1; sudo umount /dev/sde2
 
</pre>
 
</pre>
 
* Remove the micro SD card from the SD card reader and install it in the CM-T3730 micro SD card socket (P5).
 
* Remove the micro SD card from the SD card reader and install it in the CM-T3730 micro SD card socket (P5).
 +
* Continue to the [[#After Installation | After Installation]] section.
  
== Starting the CM-T3730 ==
+
== After Installation ==
* Connect the host PC to the SB-T35 base-board (connector P12) via the serial cable supplied with the evaluation kit.
+
* Make sure there is no MMC/SD card in the SD socket (P13) on the SB-T35.
* 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.
+
* Reset the system.
* Turn on the CM-T3730 evaluation system. The U-Boot boot-loader will start and load the Linux kernel.
+
{{Note|If the boot settings of the CM-T3730 are different than default, you may need to press and hold '''Ctrl-C''' while turning the CM-T3730 on, in order to get command prompt.}}
{{Note|If you want to get back to U-Boot prompt, hold '''Ctrl-C''' during reset.}}
+
* CM-T3730 will boot Angstrom Linux from the internal NAND flash or the micro SD card.
CM-T3730 will boot Angstrom Linux from the micro SD card.<br>
+
{{Note|The first boot might take longer time because Angstrom Linux performs a lot of one-time initialization tasks.}}
Note, that the first boot takes a long time because Angstrom Linux performs a lot of one-time initialization tasks.
+
 
{{Important|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.}}
+
=== Boot from the NAND flash ===
 +
* Set the {{parameter|bootargs}} environment variable:
 +
<pre>
 +
CM-T3x # setenv bootargs 'ubi.mtd=4,2048 root=ubi0:rootfs rw rootfstype=ubifs console=ttyO2,115200 \
 +
omapfb.mode=dvi:1024x768-24@60 omapfb.vram=1:4M vram=8M omapdss.def_disp=dvi ip=dhcp'
 +
</pre>
 +
* To boot Linux, type:
 +
<pre>
 +
CM-T3x # setenv bootdelay 3
 +
CM-T3x # setenv bootcmd "nboot 82000000 nand0 2a0000; bootm"
 +
CM-T3x # saveenv
 +
CM-T3x # boot
 +
</pre>
  
== Troubleshooting ==
+
=== Boot from the Micro SD Card ===
* CM-T3730 does not load Angstrom Linux:
+
* Reset the system.
** Check that you followed all the above steps closely.
+
* The boot from micro SD card will start automatically with default U-Boot environment.
** Power on the CM-T3730 while holding '''Ctrl-C'''.
 
** In U-Boot command prompt, restore the default environment:<pre>CM-T3730 # env default -f</pre>
 
** Save the environment onto the micro SD card:<pre>CM-T3730 # saveenv</pre>
 
** Reset the CM-T3730 (SW2 on SB-T35)
 
  
 
== See also ==
 
== See also ==

Revision as of 14:00, 7 November 2012

Preparation steps

  • Obtain a Linux 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-T3730 (link below).
  • Download the Linux package for CM-T3730 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-T3730 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-T3730 are different than default, you may need to press and hold Ctrl-C while turning the CM-T3730 on, in order to get command prompt.

Boot into the installation environment (ramdisk)

The first step in CM-T3730 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-T3730 to the root directory on the first partition of the MMC/SD card. Note, the partition must be FAT (16 or 32) formated.
  • Insert the MMC/SD card into the SD socket (P13) on the SB-T35.
  • Use the following U-boot commands to boot the installation environment on the CM-T3730:
CM-T3x # mmc rescan
CM-T3x # fatload mmc 0:1 80400000 bootscr.img
CM-T3x # source 80400000

Using installation environment from TFTP server

  • Connect the CM-T3730 Ethernet port (connector P18 on the SB-T35) to your local network.
  • Put kernel.img, ramdisk.img and bootscr.img from Linux package for CM-T3730 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 or manually set ipaddr environment variable:
CM-T3x # setenv ipaddr <CM-T3730 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-T3730:
CM-T3x # tftp 80400000 bootscr.img && source 80400000

Install Kernel and Angstrom Linux Images

After the ramdisk image is loaded the Linux login prompt will appear. Login as root into the system. Use 111111 password for login:

compulab login: root
Password: 111111

The next step is installing the kernel and Angstrom Linux images. The following media can be used as a source for installation:

Mount the MMC/SD Card

  • Copy the Angstrom-image-cm-t3730.ubi and the uImage-cm-t3730.bin from the Linux package for CM-T3730 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

Mount a USB Storage Device

  • Copy the Angstrom-image-cm-t3730.ubi, the Angstrom-image-cm-t3730.tar.bz2 and the uImage-cm-t3730.bin from Linux package for CM-T3730 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

Mount the NFS drive

  • Connect the CM-T3730 Ethernet port (connector P18 on the SB-T35) to your local network.
  • Copy the Angstrom-image-cm-t3730.ubi, the Angstrom-image-cm-t3730.tar.bz2 and the uImage-cm-t3730.bin from the Linux package for CM-T3730 to a directory exported through NFS.
  • During Ramdisk image booting the CM-T3730 attempts to obtain an IP address using DHCP. If from some reason the IP address has not been obtained, use the following command to obtain IP address for the CM-T3730:
    • Using DHCP:
      root@compulab:~#  ifup `basename /sys/devices/platform/smsc911x.0/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/smsc911x.0/net/eth?` <ip address>
  • Mount the NFS share containing the uImage-cm-t3730.bin, the Angstrom-image-cm-t3730.ubi and the Angstrom-image-cm-t3730.tar.bz2 files:
root@compulab:~#  mount -o nolock <host ip>:/path/to/nfs/share /mnt/net

Install Images

Once the ramdisk image is loaded and the media containing the CM-T3730 Kernel and Angstrom Linux images is mounted, the installation can be done on either of the following:

Install on the NAND flash

  • In this subsection the term /mount/point can be:
    • /media/mmcblk0pX if MMC/CD 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.
  • Format the NAND flash kernel partition and write the kernel image onto it:
$ flash_erase /dev/mtd3 0 0
$ nandwrite -p /dev/mtd3 /mount/point/uImage-cm-t3730.bin
  • Format the NAND flash root filesystem partition and write the Angstrom filesystem image onto it:
$ ubiformat -O 2048 /dev/mtd4 -f /mount/point/Angstrom-image-cm-t3730.ubi

Install on the Micro SD Card

  • 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 micro SD card first (FAT) partition is mounted under the /media/mmcblk0p1:
root@compulab:~# cat /proc/mounts | grep -c mmcblk0p1
1
  • Copy the uImage-cm-t3730.bin to the micro SD card first (FAT) partition and name it uImage-cm-t3730:
root@compulab:~# cp /mount/point/uImage-cm-t3730.bin /media/mmcblk0p1/uImage-cm-t3730
  • Unmount the micro SD card first (FAT) partition
root@compulab:~# umount /dev/mmcblk0p1
  • Create an additional partition for the Linux file system on the micro SD card:
root@compulab:~# fdisk /dev/mmcblk0 << eof
> n
> p
> 2
> 239
> 
> w
> eof

The number of cylinders for this disk is set to 15318.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-15318, default 1): Last cylinder or +size or +sizeM or +sizeK (239-15318, default 15318): Using default value 15318

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table
 mmcblk0: p1 p2
  • Format the new partition with ext4 filesystem:
root@compulab:~# mkfs.ext4 /dev/mmcblk0p2
  • Mount the new micro SD card partition:
root@compulab:~# mkdir -p /media/rootfs && mount /dev/mmcblk0p2 /media/rootfs/
  • Extract the content of Angstrom-image-cm-t3730.tar.bz2 onto that partition:
root@compulab:~# tar -xvpf /mount/point/Angstrom-image-cm-t3730.tar.bz2 -C /media/rootfs && sync

Install Images on the micro SD Card using Linux Host workstation

  • Obtain a Linux PC workstation with a micro SD card reader.
  • The micro SD card, supplied with the CM-T3730 Evaluation kit, has already been pre-partitioned as described in the CM-T3x: U-Boot: Firmware Overview article.
  • Plug the micro SD card, supplied with the CM-T3730 Evaluation kit, into the micro 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 micro 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 micro SD card:
sudo mkdir -p /media/boot && sudo mount /dev/sde1 /media/boot/
  • Copy the uImage-cm-t3730.bin to the micro SD card first (FAT) partition and name it uImage-cm-t3730:
sudo cp cm-t3730-linux/images/uImage-cm-t3730.bin /media/boot/uImage-cm-t3730
  • Format the second micro SD card partition with ext4 filesystem:
sudo mkfs.ext4 /dev/sde2
  • Mount the second micro SD card partition:
sudo mkdir -p /media/rootfs && sudo mount /dev/sde2 /media/rootfs/
  • Extract the content of the Angstrom-image-cm-t3730.tar.bz2 onto that partition:
sudo tar -xpvf cm-t3730-linux/images/Angstrom-image-cm-t3730.tar.bz2 -C /media/rootfs && sync
  • Unmount all micro SD card partitions:
sudo umount /dev/sde1; sudo umount /dev/sde2
  • Remove the micro SD card from the SD card reader and install it in the CM-T3730 micro SD card socket (P5).
  • Continue to the After Installation section.

After Installation

  • Make sure there is no MMC/SD card in the SD socket (P13) on the SB-T35.
  • Reset the system.
Admolition note.png If the boot settings of the CM-T3730 are different than default, you may need to press and hold Ctrl-C while turning the CM-T3730 on, in order to get command prompt.
  • CM-T3730 will boot Angstrom Linux from the internal NAND flash or the micro SD card.
Admolition note.png 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=4,2048 root=ubi0:rootfs rw rootfstype=ubifs console=ttyO2,115200 \
 omapfb.mode=dvi:1024x768-24@60 omapfb.vram=1:4M vram=8M omapdss.def_disp=dvi ip=dhcp'
  • To boot Linux, type:
CM-T3x # setenv bootdelay 3
CM-T3x # setenv bootcmd "nboot 82000000 nand0 2a0000; bootm"
CM-T3x # saveenv
CM-T3x # boot

Boot from the Micro SD Card

  • Reset the system.
  • The boot from micro SD card will start automatically with default U-Boot environment.

See also