image_download_8250()

Updated: April 19, 2023

Download an OS image

Synopsis:

unsigned int image_download_8250 (port, span, address)

Arguments:

port
The baud rate for the port used for the download
span
The offset from one port to the next port on the serial device
address
The address in memory to which the image must be downloaded.

Description:

The image_download_8250() function configures and controls the 8250 class of serial controllers. After it has set up a serial controller, it downloads an image from the specified serial port (port) to the specified address (address) using a custom protocol. On the host side, this protocol is implemented via the utility sendnto (you may need a NULL-modem cable — the protocol uses only TX, RX, and GND). The span parameter indicates the offset from one port to the next port on the serial device.

Before calling this function, call init_8250() to initialize the port.

Pass this image_download_*() function the address in RAM (QNX_LOAD_ADDR) where you want the image downloaded. If the image is compressed, copy it to a temporary location higher up in memory, and have the IPL jump to the startup at this location as the last thing it does. The startup will extract the compressed image to the location you specify.

If you must download the IFS and are working with hardware that isn't supported by a image_download_*() function included with your BSP, you can modify the source in the BSP's src/hardware/ipl/lib/ directory to create a new function for your hardware. We recommend that you call your new function image_download_board(), where board is a descriptive name for the hardware (e.g., image_download_8250() above).

Returns:

0
Success
1
Failure