Procedure for preparing SD card for card based image booting

All the files needed for flashing the OS image to onboard NAND (C4) or running from an SD card are included with this release. This includes the OS image, XLoader, NAND and SD based eboot as well as all the tools necessary to perform the procedure.

There are several methods to boot a CE image on the Beagleboard board. The preferred method is to overwrite the factory Linux image, stored in NAND flash, with the native Windows CE boot loader and image. This has several advantages such as fast boot up and support for persistent registry etc.

As an alternative, it is possible to boot an image directly from the SD card if the SD card is properly prepared.

Note: There are two separate images, one for flashing into onboard NAND and one that will run from an SD card only. The SD based version does not have flash support and the NAND driver is not loaded by default.
Each image is avaialabe as a separate download.

Note: Only SD based image booting is available for Beagleboard xM's as there is no onboard NAND memory.

There are two versions of eboot included with the distribution. Ebootsd is the version of boot loader and is used to boot a SD card based image. Ebootsd does not contain any flash programming capabilities. This is for obvious safety reasons as many people wish to evaluate a CE image (SD card based) without the risk of overwriting their flashed Linux image stored in NAND flash.

You will need standard Windows PC with a standard USB host ports.

A terminal emulation program installed (HyperTerminal, Teraterm etc.).
Standard 9 pin serial cable.
SD card (256MB, 512MB, 1GB etc.).
SD reader (USB or other).
Preinstall procedure:

The terminal settings need to be 115200 baud, 8 data bits, No parity and one stop bit.

The following is a screen capture of an example terminal setup using Hyperterminal:

image002.jpg

Prepare bootable SD card:
  • You can use TI’s SDCardbootutility.
  • Alternately, use the HP Card Format Utility for USB drive key.

Using TI’s SD Card Boot Utility

Use USB reader, SD card and TI utility to prepare card:
image003.png
Select MLO file and for the OS files select ebootsd.nbo and nk,bin.

Insert SD card in beagleboard and reboot.
Note:For C4 Beagleboards it may be necessary to hold the USER button down during boot to force a SD based boot.

Using the HP format utility:
Use USB reader, SD card and HP format utility to prepare card with a clean, bootable, FAT32 partition:
image004.jpg
After the card is formatted, copy the MLO file from the built directory to the root of the SD card.
Note: It is important this file be copied first and by itself!

Copy the following files to the boot SD card:
  • ebootsd.nb0 (card based boot loader)
  • nk.bin (SD only image)
Insert SD card in Beagleboard and reboot.
Note:For C4 Beagleboards it may be necessary to hold the USER button down during boot to force a SD based boot.

Procedure for Flashing Windows CE image to NAND

Caution: This procedure will erase all remnants of the factory installed version of Linux!



There are several methods to initially load the necessary image files to NAND Flash. These include:

· Download files over a USB RNDIS connection from Platform Builder.

· Download files over a USB RNDIS connection from ESHELL utility.

· Download files over USB or serial connection using the TI flash programming utility.

· Copy files from SD storage card to flash.

The first three methods require some setup, which can be complicated. This procedure explains the last method which only requires the ability to copy files to a bootable SD card from a PC (USB microSD card reader/writer) and one serial console connection to the host PC running a terminal emulation program.

Note: Platform Builder and/or Visual Studio are not required to perform this procedure.

There are two versions of eboot included with the distribution. Ebootsd is the standard version of boot loader and is used to boot a SD card based image. Ebootsd does not contain any flash programming capabilities. This is for obvious safety reasons as many people wish to evaluate a CE image (SD card based) without the risk of overwriting their flashed Linux image stored in NAND flash. Ebootnd is another version of eboot, which has the NAND flash programming utilities enabled and can be run from ether an SD card or from NAND flash.

Prepare bootable SD card as outlined above “Procedure for preparing SD card for card based image booting”.

After completion, add these additional files to the files already on the SD card:
  • ebootND.nb0 (NAND based version of eboot with flash capability)
  • xldrnand.bin (.bin loadable version of NAND based xloader)
  • ebootND.bin (.bin loadable version of NAND based eboot)
  • NK.bin (flash based image)

Note: The boot up procedure will search for ebootND.nb0 on the SD card first, if not found it will search and load ebootSD.nb0.

Insert SD card, boot, erase and prepare NAND flash:

Note:For C4 Beagleboards it may be necessary to hold the USER button down during boot to force a SD based boot.

Place card in Beagleboard and boot. After initial time out you should be presented with a boot loader menu similar to the following:
image005.jpg
  • You should see ebootND loaded and the flash menu items are available.
  • Select “f” Flash Management
  • Select “1” and note the flash geometry
  • Erase the entire flash by selecting “4” (Erase block range) and entering 0 for the first block and to one less than the number of blocks shown in the geometry dump for the last block number. (For example 0 to 2047).
  • Answer yes (y) to confirm erasure of reserved blocks.
  • Select 0 to return to the Main Menu.
Load NAND based XLOADER and EBOOT:
  • Select 5 “SDCard settings”.
  • Select 2 “Enter Filename”.
  • Type “xldrnand.bin” for the xloader file.
  • Type 0 and return to main menu.
  • Type 2 to “Select Boot Device”.
  • Choose 3 for “SDCard FILE”.
  • Select 0 and 0 again to initiate loading of the file.
You should get a response similar to the following:
image006.jpg
  • Reboot and reenter the boot loader.
  • Repeat the above step this time setting “ebootnd.bin” as the load file name.
Load image file to NAND:

Reboot and reenter the boot loader. This time the flash may be recognized and automatically formatted. See “Formatting flash…” message.

image007.jpg
  • Return to the Flash Management screen and select “Format Flash” (7)
  • Confirm format of all unreserved blocks. (formatting flash again just to be sure)
  • Now select “8” “Enable flashing NK.bin”
  • Select 0 to return to main menu.
  • Select 2 and verify “SD card FILE” is still selected as boot device.
  • Select 0 again to load the default nk.bin file from the SD card.
You should get a response similar to the following after completion of the NAND programming:

image008.jpg
  • The image will automatically launch after programming. Turn power off.
  • Remove SD card (important!).
  • Power unit on and enter boot loader one last time.
  • Select Boot Device and this time select “4” “NK from NAND”.
  • Return to main menu and select desired display resolution
  • Return to main menu and select “s” “Save Settings” and confirm.
  • Select 0 or power cycle the unit.
Unit should now start from image stored in NAND flash automatically after brief delay.

Last edited Jun 7, 2011 at 5:07 PM by dvescovi, version 19

Comments

rakeshvec Dec 24, 2013 at 11:38 AM 
Hi, really very informative article.

is it possible to automatically update the image to Nandflash from SD card without user interaction? in case of no image on Nandflash or if OS get corrupted?

Basically in headless device.

- Rakesh