This page is available in: en th

Booting the T-Engine from USB

Written by: Fauzi Abbas (CHiPES, NTU) and Mohit Sindhwani (TE@Onghu)

The T-Engine has a USB Host that allows developers to connect devices and peripherals, such as mass storage and human interface devices such as mouse and keyboard. In this article, we discuss how to boot the T-Engine development kit from a mass storage device connected to USB. The main benefit of this is that it frees up the PC Card Slot, allowing you to use PCMCIA devices in that slot, instead of a Compact Flash Card. In another article, we will discuss how to get a Wireless LAN PCMCIA Card working on the T-Engine Development Kit.

For the sake of this article, we assume that you are using the T-Engine from Personal Media Corporation. We have tried the following steps on the SH7727 T-Engine. If you try it out on another T-Engine, please let us know so that we can include the information on this page. Also, if the procedure does not work for you and you make some changes, do let us know so that we can make the information available to other users.

The steps are reasonably similar to the steps for booting from a Compact Flash Card in the PCMCIA slot.


When the system is started, the T-Monitor is the first program to execute out of the ROM Disk (internal flash memory). It initializes the system and starts the T-Kernel. Depending on the configuration, it can boot the kernel from flash memory, or from a Compact Flash Card.

Upon starting up, the T-Monitor reads PBOOT from the ROM Disk (rda) and can continue to boot from Compact Flash if a bootable Compact Flash Card is plugged into the PC Card slot. If a bootable CF Card is plugged into the PC Card slot, the system will always continue to boot from the PC Card (irrespective of other settings).

If not, the T-Monitor will also read the following files from the ROM: SBOOT, KERNEL.SYS, SYSCONF, DEVCONF, STARTUP.CMD, and chgsys. At this point, the T-Kernel has been loaded and contains the drivers that provide the support to read from the USB port. Now, it will continue to read the remaining files from the USB storage if a bootable disk is plugged in to the USB port. This is because the T-Monitor itself does not support the USB mass storage – this support is provided by the “upper OS”.

Therefore, technically speaking, the T-Engine does not boot from USB. The T-Monitor will actually start from the ROM and load the T-Kernel (and some basic drivers) from the ROM. After that, further processing will continue from the mass storage device on the USB. All other drivers need to be present on the USB mass storage device.

For more details about the booting and startup procedure of the T-Engine, refer to the latest manuals from PMC. Our main reference was Section 2.4 for from the T-Engine/SH7727 Development Kit Manual 1.A0.06 (January 2005).


For booting from USB, DIP switch 3 needs to be ON. For DIP switch settings, refer to the Development Kit manual. You may need to download the latest version of the manuals from the PMC website.

  1. Remove any bootable CF card that may be plugged in. Start the T-Engine. It will boot from ROM.
  2. Attach USB Storage. The T-Kernel should detect it automatically and load the correct drivers.
  3. Create a partition. For the partition size, you can choose any size.

[/SYS]% hdpart uda

uda  [C:977 H:4  S:32  B:125184 (61 MB)]

No System    Boot  StartCHS    End CHS      SecNo   SecCnt  MB
1  00 ------ 00   0: 0: 0    0: 0: 0          0       0    0
2  00 ------ 00   0: 0: 0    0: 0: 0          0       0    0
3  00 ------ 00   0: 0: 0    0: 0: 0          0       0    0
4  00 ------ 00   0: 0: 0    0: 0: 0          0       0    0

** Create/Delete/Boot/Edit/Quit ? c
Create PartNo (1-4) ? 1
Size [MB] (<62MB) ? 32

** Create/Delete/Boot/Edit/Update/Quit ? b
Boot PartNo (1-4) ? 1

** Create/Delete/Boot/Edit/Update/Quit ? u
** uda: Updated Master Boot Block


  1. Format the partition and copy ROM disk to the partition.

[/SYS]% format -b uda0 TE
Format uda0 [STD] TE
Logical Formatting...
Writing BootCode...
Disk Format Success.
[/SYS]% att uda0 A
uda0 -> A
[/SYS]% cp -b -v -r * /A
copied: SBOOT
copied: KERNEL.SYS
copied: bin
  1. Shutdown and restart. It should now boot from the USB.

[/SYS]% exit
<< EXIT cli >>
[IMS]% exit -3 

This will cause the T-Engine to restart without using SW1.

Note that the system will take a little longer to boot from USB.

When starting from the USB mass storage, you should be aware of the following points:

  • Changing DEVCONF, SYSCONF, STARTUP.CMD, etc.: When starting from USB, these files are actually not read from the mass storage device. They are read from the ROM. If you need to changes these files for some reason, you will need to use the T-Monitor to copy updated versions of these files into the ROM directly. We will discuss this in a separate article later.
  • Including your own startup programs: The easiest place to include your own startup programs is to change the STARTUP.CLI file since this is read from the USB.
  • Device Drivers: Drivers such as the USB host driver are compiled into the kernel. All other device drivers need to be present on the USB mass storage device so that the kernel can load them.
  • After you start up from USB, you can map the ROM by using the attach command: att rda A
  • You can actually delete the PBOOT, SBOOT, DEVCONF, SYSCONF, STARTUP.CMD, TKERNEL.SYS and chgsys from the USB mass storage device since these files are not read from there when the system starts.


(1) This article has been contributed to TE@Onghu by the Centre for High Performance Embedded Systems, and has been used by permission. Some of the information in this article has been received from the support staff at Personal Media Corporation.

©Centre for High Performance Embedded Systems, Nanyang Technological University, Singapore & Mohit Sindhwani, 2005.