2 programming an image, 3 accessing tftp and ftp servers, Programming an image – Kontron NetBootLoader User Manual
Page 22: Accessing tftp and ftp servers, Nbl operation netbootloader

ID 1022-8317, Rev. 2.0
NBL Operation
NetBootLoader
Page 14
When programming the NetBootLoader Flash memory using offsets (with the -o option), it is
possible to unintentionally overwrite portions of previously programmed images. This may re-
sult in either an invalid image or erroneous data contents of the NetBootLoader Flash memory.
It is recommended to first verify the contents of the NetBootLoader Flash memory using the
INFO command before performing any programming with offsets. Refer to the INFO command
for further information.
2.8.2
Programming an Image
The image itself must be compiled and linked to run from the DDR2-SDRAM base address 0x0
of the CPU. The entry point of the executable PPC code must be at offset 0x0 (FDT enabled)
or 0x100 (FDT disabled).
Gaining access to the image for programming to NBL Flash memory depends on where it is
located. The NetBootLoader can access up to five different sources for images:
• TFTP server
• FTP server
• Motorola S-Records (via the secondary serial interface)
• memory within the visible address range of the NetBootLoader
• NAND Flash
The NetBootLoader uses a single data buffer for downloading an image from a TFTP server,
FTP server, or an image as Motorola S-Records. These images must first be downloaded to
the data buffer prior to being programmed to NBL Flash memory. An image located within the
visible address range of the NetBootLoader is directly accessible for programming.
To access an image located on a TFTP server, the TFTP command is used. To access an im-
age located on an FTP server, the GET command is used. To perform Motorola S-Record ac-
quisition, the SL (SLoad) command is used. Once the image is in the data buffer, the NBL Flash
memory is programmed using the LF (Load Flash) command. For an image within visible mem-
ory, the LF command is used to program directly to NBL Flash memory.
2.8.3
Accessing TFTP and FTP Servers
To gain access to an image file stored on a TFTP or FTP server an Ethernet port is used. Im-
ages are downloaded to the data buffer using the FTP protocol. To use these interfaces, the
Ethernet port parameters must first be set, and the operator must have control of the NetBoot-
Loader.
To download an image from a TFTP server, the command TFTP is used. The TFTP server IP
and file name of the image must be known and provided to the TFTP command or be provided
by the DHCP server via the DHCP command.
To perform a download from an FTP server, the operator must first login to the FTP server. Af-
ter a successful login, the operator then locates the image file required and downloads it to the
data buffer. As with any type of server session, the operator should logout when the session is
finished.
Note ...
The commands TFTP, GET, and LS use the same data buffer. Therefore if an
LS command is issued after a TFTP or GET command the data buffer will be
overwritten. If an LF command follows the LS the NetBootLoader refuses to pro-
gram the overwritten data buffer to the NBL Flash memory.