Hard Disk Based Emulation

Introduction

The CAT-DEV features an internal hard drive which emulates the Cafe optical drive. When enabled, this testing mode exercises software and hardware paths similar to those executed on production systems.

The primary benefits of this test mode are:

Applications are written into one of several 'banks' on the hard drive. Each bank is 25 GB in size by default, which corresponds to the maximum size of disc images.

NOTE:
As of this writing, the performance of the hard drive does not match that of the optical drive. This mode is a test of logical correctness rather than of speed.

Notes about the Internal Hard Drive

  1. The number of banks is configurable on the CAT-DEV webpage. Type the IP address of your CAT-DEV into a browser and select Parameters Setup From there, find the Internal HDD Bank Size drop down and change it. The number of banks available is determined by the size of the banks.
  2. The maximum bank size is 25 GB, which is the default. This results in 11 banks, labeled 0-10
  3. If the user uploads an image that is larger than the current size of the bank, the upload will fail. No attempt is made to write to neighboring banks.
  4. It is not possible to "add files" to a bank. Uploading will always overwrite the entire contents of the target bank.

Writing an Image to the Hard Drive

To write an image to the CAT-DEV hard drive, use the following command from a Cafe Cygwin shell:

$ uploadimg.sh [-a] <HDD_banknum> <image> <host_bridge_ipaddr> <work_dir>

Where:

-a <image> is a master archive image (.wumad). This option only needs to be specified if the user intends to define <work_dir>.
<HDD_banknum> The bank into which the image will be written.
<image> This parameter can be one of three values, as described below:
  1. A filename for a WUMAD image archive. The archive will be unzipped to a temporary directory, and its contents will be uploaded to the CAT-DEV.
  2. A filename for a WUM (padded) image, which will be uploaded to the CAT-DEV "as is".
  3. A directory name. In this case, the directory must contain the contents of a WUMAD archive, including masterheader.bin.
<host_bridge_ipaddr> Optional; IP address of the CAT-DEV to use. If not specified, $BRIDGE_CURRENT_IP_ADDRESS is used.
<work_dir> Optional; specify a path for intermediate work files. Image must be a master archive image (.wumad) and -a must be specified.
NOTE:
When a directory is passed in as the image parameter (case c above), the directory contents must be manually unzipped from a WUMAD master archive prior to invoking the uploadimg.sh script. This may be performed in Windows by renaming the WUMAD file to a ZIP file.

Examples:

$ uploadimg.sh 1 testimage.wumad 10.46.193.40
$ uploadimg.sh 1 /cygdrive/c/temp/my_image_folder 10.46.193.40
$ uploadimg.sh -a 1 testimage.wumad 10.46.193.40 /cygdrive/c/temp/my_working_directory

File testimage.wumad will be written to bank 1 of the CAT-DEV having IP address 10.46.193.40. The directory specified by $WORK_DIR will be used by the tool for intermediate and temporary work files.

Simultaneous Image Writing to Multiple CAT-DEVs

To write a WUMAD image to several CAT-DEV hard drives simultaneously, use the following command from a Cafe Cygwin shell:

$ uploadimg_simultaneous.sh [-b <HDD_banknum>] <image> <ip_address> [<ip_address>...]

Where:

-b <HDD_banknum> Optional; The bank (1-10) into which the image will be written. The default is bank 10.
<image> A filename for a WUMAD image archive. The archive will be unzipped to a temporary directory and its contents uploaded to all CAT-DEVs.
<ip_address> IP address of the first CAT-DEV to use.
<ip_address>... Optional; additional IP addresses of CAT-DEVs to use.

The WUMAD file contents will be extracted to the $TMP folder then used to upload all CAT-DEV IPs given on the command line. This script is a wrapper around uploadimg.sh which does the actual writing of the extracted WUMAD to the CAT-DEV.

Examples:

$ uploadimg_simultaneous.sh testimage.wumad 10.46.193.40 10.46.193.41 10.46.193.42

File testimage.wumad will be written to bank 10 of the CAT-DEVs having IP addresses 10.46.193.40, 10.46.193.41 and 10.46.193.42.

$ uploadimg.sh -b 1 testimage.wumad 10.46.193.50 10.46.193.68

File testimage.wumad will be written to bank 1 of the CAT-DEVs having IP addresses 10.46.193.50 and 10.46.193.68.

Notes

Running an Application from the Hard Drive

To execute an image from the CAT-DEV hard drive, use cafediscrun from a Cafe Cafe Cygwin shell and specify the title ID of the application to run:

$ cafediscrun -e h:<HDD_banknum> -t <Title_id>

Where HDD_banknum specifies the bank from which the image is to be executed. Alternatively, you can specify the name of the application to run:

$ cafediscrun -e h:<HDD_banknum> <rpx file>.rpx

To execute an image from the host PC's hard drive, use cafediscrun from a Cafe Cygwin shell and specify the path to the master image - or a directory the image has been extracted to - and the application name to run:

$ cafediscrun -e wumad:<wumad_file_or_dir> <RPX app>

Where wumad_file_or_dir specifies the location of the master master image file - or a directory that contains an extracted master image on the host PC. RPX app is optional.

For more information, see the cafediscrun reference page.

Using System Config Tool

You can "pre-mount" an image when invoking System Config Tool by specifying the HDD bank number:

$ caferun -e h:<HDD_banknum> $CAFE_ROOT/data/mlc/sys/title/00050010/1f700500/code/system_config_tool.rpx

or

$ caferun -e h:<HDD_banknum> -t 0x000500101f700500

or

$ cafediscrun -e h:<HDD_banknum> -t 0x000500101f700500

The -e h:<HDD_banknum> option is required for cafediscrun. However, it is not required for caferun calls to System Config Tool. In either instance, any valid HDD bank is acceptable.

Select "Titles Manager and Launcher". Applications associated with device type odd0x are available for execution from the specified bank.

See Also

Application Mastering Overview
cafediscrun
System Config Tool
Using R-Discs

Revision History

2015/03/16 Updated examples and options for uploadimg.sh
2014/01/28 Included notes/limitations about the internal HDD
2013/07/29 An argument when using -e wumad with cafediscrun is now optional
2013/05/08 Automated cleanup pass.
2013/01/23 Updates for System Config Tool
2012/12/21 Added description about using host PC hard disk based image emulation.
2012/04/17 Describe uploadimg.sh uses $BRIDGE_CURRENT_IP_ADDRESS if IP address of the CAT-DEV is not specified.
2012/02/29 Changed file format from full master image file (.wum) to master archive file (.wumad). Simplified required options for cafediscrun to run an application.
2012/01/23 Remove SD Card mastering. Add real disc mastering and CAT-DEV HDD feature.
2011/07/20 Distributing and running applications updated for SDK 1.7.
2011/05/30 Deprecated SD Card mastering+boot; added "Application Distribution" section.
2011/04/08 Modify to support the feature of SD Card boot.
2011/03/28 Initial version.


CONFIDENTIAL