Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki5385: QEMUAsAnOMAP3530BeagleboardTarget (Version 3)

Prerequisites#

IFS#

To build the IFS, simply type make at the top level directory of the unzipped BSP archive.

PMIC Problem#

There is currently a problem with the IFS's PMIC driver on the emulated Beagle board. To disable the PMIC driver, comment the relevant lines in $BSP_DIR/src/hardware/startup/boards/omap3530/beagle.build:

    #display_msg Configure power management chip
    #pmic_tw4030_cfg
    ...
    #display_msg Starting USB EHCI Host and OTG host driver...
    #io-usb -dehci-omap3 ioport=0x48064800,irq=77  -domap3530-mg ioport=0x480ab000,irq=92
    #waitfor /dev/io-usb/io-usb 4

NAND Drive#

The board will be booting and running off an emulated 256 MB NAND drive. This drive is composed of 2K pages, each followed by a 64 byte checksum value. It is thus insufficient to create a zeroed 256 MB file to use as an emulated file. The attached archive contains a script, mknand.sh, that creates the drive file and loads the different components (X-loader, U-boot, IFS) onto it. Whenever the drive file is modified, a checksum calculator should be executed to fix the checksum values. The calculator's source code is included in the archive as nand_ecc.c.

When mknand.sh is first executed, it will create the NAND drive file and load X-loader and U-boot into their appropriate locations. The script should also be given the path to the IFS image, which, if loaded from the BSP, is $BSP_DIR/images/ifs-omap350-beagle.bin. Subsequently, any change to the IFS requires mknand.sh to be invoked again in order to update the drive, followed by ecc_nand to compute the new checksum.

The mknand.sh script is invoked with the following command line:

 $ ./mknand.sh DRIVE_FILE IFS_PATH

Where DRIVE_FILE is a name for the NAND image and IFS_PATH is the full path to the QNX Beagle IFS file. The checksum calculator should be executed as follows:

 $ ./nand_ecc DRIVE_FILE 0x0 0xe80000

Where DRIVE_FILE is the file created by mknand.sh.

Makefile#

A Makefile included in the archive automates the steps above. Simply set the top-level directories as required, and type "make" to create the drive.

Running QEMU#

QEMU should be executed as follows:

$ qemu-system-arm -M beagle -m 256 -mtdblock DRIVE_FILE -nographic

Where DRIVE_FILE is the file created by mknand.sh. To emulate a serial connection to the board, append -serial pty to the command line (other serial emulators are available, such as a TCP socket).

Booting QNX#

By default, the image displays the U-boot menu. You need to manually stop the boot process (press any key), and use the following command to boot QNX:

 $ nand read 0x80100000 0x280000 0x400000; go 0x80100000

This boot command can be written into the NAND drive and executed automatically on subsequent boots:

 $ setenv bootcmd 'nand read 0x80100000 0x280000 0x400000; go 0x80100000'
 $ saveenv
Attachments:
Text mknand.sh [QEMUAsAnOMAP3530BeagleboardTarget/mknand.sh]
Text beagle-nand.tar.gz [QEMUAsAnOMAP3530BeagleboardTarget/beagle-nand.tar.gz]