» User Guide «
NetBootLoader
Composite User Guide for All CPU Boards Which Utilize the NetBootLoader Software
Doc. ID: 1022-8317, Rev. 2.0
November 30, 2010
If it’s embedded, it’s Kontron.
Preface |
NetBootLoader |
||
|
|
|
|
|
|
|
|
|
|
|
|
Publication Title: NetBootLoader User Guide
Doc. ID: 1022-8317
Rev. |
Brief Description of Changes |
Date of Issue |
|
|
|
1.0 |
Initial issue |
19-Sep-2008 |
|
|
|
2.0 |
“JUMP” Command added; new functionality added for the DHCP |
30-Nov-2010 |
|
and TFTP commands |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Kontron Modular Computers GmbH may be contacted via the following:
MAILING ADDRESS |
TELEPHONE AND E-MAIL |
Kontron Modular Computers GmbH |
+49 (0) 800-SALESKONTRON |
Sudetenstraße 7 |
sales@kontron.com |
D - 87600 Kaufbeuren Germany |
|
For information about other |
|
Kontron products, please |
www.kontron.com |
visit our Internet web site: |
Copyright © 2008-2010 Kontron AG. All rights reserved. All data is for information purposes only and not guaranteed for legal purposes. Information has been carefully checked and is believed to be accurate; however, no responsibility is assumed for inaccuracies. Kontron and the Kontron logo and all other trademarks or registered trademarks are the property of their respective owners and are recognized. Specifications are subject to change without notice.
Page ii |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
Preface |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table of Contents |
|
Revision History ......................................................................................................... |
ii |
|||
Imprint |
........................................................................................................................ |
|
ii |
|
Disclaimer .................................................................................................................. |
|
ii |
||
Table of ......................................................................................................Contents |
iii |
|||
List of Tables .............................................................................................................. |
|
v |
||
Proprietary .......................................................................................................Note |
vii |
|||
Trademarks .............................................................................................................. |
|
vii |
||
1. |
Introduction .................................................................................................... |
1 |
||
|
1.1 ........................................................................................... |
Basic Operation |
1 |
|
|
1.2 .......................................................................... |
NetBootLoader Interfacing |
1 |
|
2. |
NetBootLoader .............................................................................Operation |
3 |
||
|
2.1 ............................................................................... |
NetBootLoader Control |
3 |
|
|
2.2 ...................................................................................... |
Network Accessing |
4 |
|
|
2.2.1 ............................................... ............ |
DHCP/ BOOTP Server Access |
5 |
|
|
2.2.2 ........................................................... ........ |
TFTP/FTP Server Access |
5 |
|
|
2.2.3 ......................................................................... .......... |
Remote Access |
5 |
|
|
2.3 ................................................................................... |
NBL Flash Operation |
5 |
|
|
2.4 ............................................................................... |
NAND Flash Operation |
6 |
|
|
2.5 ........................................................................... |
System Status Monitoring |
7 |
|
|
2.6 ..................................................................... |
Operating the NetBootLoader |
7 |
|
|
2.6.1 ............................................................................... .......... |
Initial Setup |
7 |
|
|
2.6.2 ................................................ ............ |
Accessing the NetBootLoader |
7 |
|
|
2.6.3 ....................................................................... ............ |
System Booting |
8 |
|
|
2.7 .................................................................................. |
Command Specifics |
10 |
|
|
2.7.1 ............................................................................... ............. |
ASSIGN |
10 |
|
|
2.7.2 ........................................................................................... .......... |
BL |
10 |
|
|
2.7.3 ..................................................................................................... |
BW |
11 |
|
|
2.7.4 .................................................................................................... |
CBL |
11 |
|
|
2.7.5 .............................................................................................. |
CLONE |
11 |
|
|
2.7.6 ...................................................................................... .......... |
DHCP |
12 |
|
|
2.7.7 ......................................................................................... .......... |
FDT |
12 |
ID 1022-8317, Rev. 2.0 |
Page iii |
Preface |
NetBootLoader |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
2.7.8 |
NET ................................................................................................... |
12 |
|
|
2.7.9 |
PASSWD ........................................................................................... |
12 |
|
|
2.7.10 |
PF ...................................................................................................... |
12 |
|
|
2.7.11 |
SCRIPT ............................................................................................. |
12 |
|
|
2.7.12 |
SQ ..................................................................................................... |
12 |
|
|
2.7.13 |
telnet Login ........................................................................................ |
13 |
|
|
2.8 |
NBL Flash Operations ............................................................................... |
13 |
|
|
2.8.1 |
NBL Flash Offsets ............................................................................. |
13 |
|
|
2.8.2 |
Programming an Image ..................................................................... |
14 |
|
|
2.8.3 |
Accessing TFTP and FTP Servers .................................................... |
14 |
|
|
2.8.4 |
Motorola S-Records .......................................................................... |
15 |
|
|
2.8.5 |
Updating the NetBootLoader ............................................................. |
15 |
|
|
2.8.6 |
Uploading an NBL Flash Memory Area ............................................. |
16 |
|
|
2.9 |
Plug and Play ............................................................................................. |
16 |
|
|
2.10 Porting an Operating System to the CPU Board ....................................... |
16 |
||
|
2.11 NBL Flash and NAND Flash Usage ........................................................... |
16 |
||
|
2.11.1 |
NBL Flash Usage .............................................................................. |
17 |
|
|
2.11.2 |
NAND Flash Usage ........................................................................... |
17 |
|
3. |
Product Command Support ........................................................................ |
19 |
||
4. |
Command Syntax Reference ...................................................................... |
23 |
Page iv |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
Preface |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
List of Tables |
|
1 |
NetBootLoader Control Commands .............................................................. |
3 |
2 |
Network Accessing Commands .................................................................... |
4 |
3 |
NBL Flash Operation Commands ................................................................. |
5 |
4 |
NAND Flash Operation Commands .............................................................. |
6 |
5 |
System Status Monitoring Commands .......................................................... |
7 |
6 |
Command / Product Table .......................................................................... |
19 |
ID 1022-8317, Rev. 2.0 |
Page v |
Preface |
NetBootLoader |
||
|
|
|
|
|
|
|
|
|
|
|
|
This page has been intentionally left blank.
Page vi |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
Preface |
||
|
|
|
|
|
|
|
|
|
|
|
|
This document contains information proprietary to Kontron. It may not be copied or transmitted by any means, disclosed to others, or stored in any retrieval system or media without the prior written consent of Kontron or one of its authorized agents.
The information contained in this document is, to the best of our knowledge, entirely correct. However, Kontron cannot accept liability for any inaccuracies or the consequences thereof, or for any liability arising from the use or application of any circuit, product, or example shown in this document.
Kontron reserves the right to change, modify, or improve this document or the product described herein, as seen fit by Kontron without further notice.
This document may include names, company logos and trademarks, which are registered trademarks and, therefore, proprietary to their respective owners.
ID 1022-8317, Rev. 2.0 |
Page vii |
Preface |
NetBootLoader |
||
|
|
|
|
|
|
|
|
|
|
|
|
This page has been intentionally left blank.
Page viii |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
Introduction |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.Introduction
The NetBootLoader is a proprietary software utility for Kontron’s families of PowerPC products
– E²Brains, AMC CPUs, CPCI CPUs, VME CPUs – which is designed to initialize and configure these modules for operation before turning control over to either an application or to an operator. This software also provides the capability to monitor and control the operation of the NetBootLoader itself, display system status information, to program executable code and data to the NBL Flash memory, and to load and start application software.
Depending on the product type, there are either one or two NOR Flash memories (NBL-Flash0, NBL-Flash1) available which are used to store the NetBootLoader itself as well as providing memory space for bootable images or other data. Where two NOR-Flashes are available, these memories are identical and are redundant of one another. Only one of these Flash memories can be in use at any given time. The other is redundantly available, and, if required, it can be swapped with the currently used memory.
All CPU modules are delivered with the NetBootLoader (NBL) software already programmed into their NOR Flash memory chip(s) (NBL Flash).
Upon power on or a system reset, the NetBootLoader is started. The CPU module is configured for operation and control is passed either to an application or an operator. In the event a valid image has been programmed into the NBL Flash memory and no operator or SCRIPT command intervention takes place, a specified image is copied into the CPU module’s data buffer and control is passed to the image which can either be an operating system or a customized application. If the NetBootLoader does not find a valid image or operator intervention has occurred, control is passed to the operator. The operator now has control to determine the system status, make configuration changes, read or program the NBL Flash memory, invoke the RUN command, or to restart or power down the system.
The operator command interfacing with the NetBootLoader is accomplished either through a serial or Ethernet port. During the boot operation a command interpreter is started which allows the operator to input commands to the NetBootLoader. Prior to interfacing using an Ethernet port, the port must be configured either via the serial port or a DHCP/BOOTP server.
There are three possibilities to interface with the NetBootLoader:
•Via the primary serial interface
•Via the secondary serial interface
•Via an Ethernet port interface
During the boot wait time, which is a time frame provided by the NetBootLoader during the boot process for operator intervention, interfacing is done directly using the primary serial interface or remotely by either performing a telnet login or using the Serial Over LAN feature via an Ethernet port. If the operator does not intervene, the boot operation is continued after the boot wait time has elapsed.
The secondary serial port is used to provide the NetBootLoader with the ability to access Motorola S-Records for programming an image to NBL Flash memory. A command interpreter is not available for this interface.
ID 1022-8317, Rev. 2.0 |
Page 1 |
Introduction |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This page has been intentionally left blank.
Page 2 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The basic function of the NetBootLoader is to configure the CPU module for operation and then to load and start an operating system. In addition, it provides functionality for controlling the operation of the NetBootLoader itself, for programming images or data to the NBL-Flash(es) and NAND Flash, remote operation access, accessing TFTP or FTP servers, and acquiring Motorola S-Record images.
Note ...
In the following sections the command title (CMD TITLE) is expressed in capital letters and is not the same as the syntax of the command. The command syntax is always written using small letters.
The NetBootLoader provides various functions for controlling the operation of the NetBootLoader itself as well as the setting of operational parameters. The following table provides an overview of available NetBootLoader control functions.
Table 1: NetBootLoader Control Commands
CMD TITLE |
ALIAS |
FUNCTION |
REMARKS |
|
|
|
|
|
|
ABORT |
- |
Terminate boot wait |
|
|
|
|
|
|
|
ASSIGN |
- |
Assign or display device |
For CPUs with multicore processors |
|
|
|
assignments |
|
|
|
|
|
|
|
ASSIGNMEM |
- |
Assign or display memory |
For CPUs with multicore processors |
|
|
|
assignments |
|
|
|
|
|
|
|
BL |
Bootline |
Set or display bootline |
Bootline stored in RAM |
|
|
|
|
|
|
BW |
Boot Wait |
Set or display boot wait time |
|
|
|
|
|
|
|
CBL |
Change Bootline |
Set or display a bootline |
Applies to a specific image or all images in |
|
|
|
|
NBL Flash |
|
|
|
|
|
|
DHCP |
- |
Dynamically set Ethernet port |
Requires that a DHCP or BOOTP server be |
|
|
|
parameters |
available in the same network as the Net- |
|
|
|
|
BootLoader |
|
|
|
|
|
|
EXE |
Execute |
Execute config file |
File source NAND Flash |
|
|
|
|
|
|
FDT |
- |
Enable creation of FDT |
|
|
|
|
|
|
|
NET |
- |
Manually set Ethernet port |
Must be set before attempting to use an |
|
|
|
parameters |
Ethernet port; see also the DHCP command |
|
|
|
|
|
|
PF |
Port Format |
Set serial port parameters |
Used for the primary and secondary ports |
|
|
|
|
|
|
RS |
Reset |
Resets system |
|
|
|
|
|
|
|
RUN |
- |
(Loads and) starts image |
If image is not in the data buffer, it is first |
|
|
|
|
loaded then started |
|
|
|
|
|
ID 1022-8317, Rev. 2.0 |
Page 3 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 1: NetBootLoader Control Commands
CMD TITLE |
ALIAS |
FUNCTION |
REMARKS |
|
|
|
|
|
|
SCRIPT |
- |
NBL command scripting |
Contents are executed only during boot up |
|
|
|
|
|
|
SETCORE |
- |
Set or display core number |
For CPUs with multicore processors |
|
|
|
|
|
|
SPEED |
- |
Set or display fast booting |
|
|
|
|
|
|
|
SQ |
Boot Sequence |
Set or display boot sequence |
Defines the image boot order |
|
|
|
|
|
|
SWAP |
- |
Set or display NBL Flash usage |
For CPUs with two NBL Flashes |
|
|
|
|
|
To support application development and operational requirements for various boot strategies, the NetBootLoader provides several functions for gaining access to network services. These functions include: access to DHCP/BOOTP servers, accessing TFTP servers, accessing FTP servers, and having access to the target CPU from remote locations.
To achieve this, certain network parameters must first be configured. This can be done manually via a terminal (primary serial port) or dynamically via the network (an Ethernet port). If the required parameters are known, they can be set with the NET command. Otherwise, the command DHCP makes it possible to download such parameters and to configure an Ethernet port for network operation. Once the Ethernet port is configured, the commands TFTP and FTP are available to download bootable images and other files as required. For remote access to the CPU module, either telnet or the Serial Over LAN feature may be used.
The following table provides an overview of available TFTP/FTP server and remote accessing functions.
Table 2: Network Accessing Commands
CMD TITLE |
ALIAS |
FUNCTION |
REMARKS |
|
|
|
|
BYE |
- |
Terminate session with FTP server |
|
|
|
|
|
CD |
Change |
Change FTP server directory |
|
|
Directory |
|
|
|
|
|
|
GET |
- |
Download a file from FTP server |
Data buffer is target. |
|
|
|
|
LOGIN |
- |
Login to FTP server |
|
|
|
|
|
LOGOUT |
- |
Terminate telnet session |
|
|
|
|
|
LS |
List Directory |
List FTP server directory |
Lists contents of directory. |
|
|
|
|
PASSWD |
Password |
Set telnet password |
Must be set before attempting telnet login |
|
|
|
|
PING |
- |
Verify network status |
|
|
|
|
|
PUT |
- |
Upload a file to FTP server |
Data buffer is source. |
|
|
|
|
PWD |
Print Working |
Display current FTP server directory |
Lists name of directory |
|
Directory |
|
|
|
|
|
|
TFTP |
- |
Download a file from TFTP server |
Data buffer is target. |
|
|
|
|
Page 4 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2.2.1DHCP/ BOOTP Server Access
Use of this access method requires the availability of either a DHCP or BOOTP server in the same network as the NetBootLoader. The DHCP command causes the NetBootLoader to first attempt to establish contact with a DHCP server. If contact is not achieved, it then tries to contact a BOOTP server. When contact is established, parameters required by the NetBootLoader are provided accordingly and the Ethernet port is configured and then made available for normal operation.
In the event the NetBootLoader is reset or cold started the configuration parameters set by the above method are lost. Only if the parameters have been set by the NET command are they still available.
Some products require that prior to using the DHCP command, the IP address of the CPU module be set to 255.255.255.255 using the NET command.
The NetBootLoader provides various functions for interfacing with either a TFTP or FTP server.
The TFTP server access is a simple method of acquiring a userimage from a remote source. Its primary use is to download a single executable image from a given source. For example, once an image has been created it would be possible to store it at a remote location where it then would be available for remote booting of an CPU module via an Ethernet port.
The TFTP/FTP server commands provide various functions consistent with interfacing with such a server.
All products supported by the NetBootLoader may be remotely accessed via telnet. In addition to telnet, the AM4100 and AM4101 also support Serial Over LAN for remote access to the NetBootLoader. This requires appropriate software running at the remote location, for example, “ipmitool”.
In the case of Serial Over LAN, the NetBootLoader supports RMCP only. RMCP+ is not supported.
The NetBootLoader provides various functions for performing operations with the NBL Flash memory. The following table provides an overview of the available NBL Flash memory operation functions.
Table 3: NBL Flash Operation Commands
CMD TITLE |
ALIAS |
FUNCTION |
REMARKS |
|
|
|
|
CHECK |
- |
Image validation; displays informa- |
Verifies validity of user image programmed |
|
|
tion for each image |
to NBL Flash memory |
|
|
|
|
CLONE |
- |
Program NetBootLoader to NBL |
Uses data buffer or redundant NBL Flash as |
|
|
Flash memory |
source |
|
|
|
|
LF |
Load Flash |
Program image to NBL Flash |
Uses data buffer as source |
|
|
memory |
|
|
|
|
|
ID 1022-8317, Rev. 2.0 |
Page 5 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 3: |
NBL Flash Operation Commands |
|
||
|
|
|
|
|
CMD TITLE |
|
ALIAS |
FUNCTION |
REMARKS |
|
|
|
|
|
SF |
|
Store Flash |
Reads NBL Flash memory to data |
Uses data buffer as target |
|
|
|
buffer |
|
|
|
|
|
|
SL |
|
SLoad |
Download Motorola S-Records |
Uses data buffer as target |
|
|
|
|
|
The NetBootLoader provides various functions for performing operations with the NAND Flash memory. The following table provides an overview of the available NAND Flash memory operation functions.
Table 4: NAND Flash Operation Commands
CMD TITLE |
ALIAS |
FUNCTION |
REMARKS |
|
|
|
|
CD, CDCF |
Change |
Change NAND Flash directory |
Use CDCF when logged into FTP server |
|
Directory |
|
|
|
|
|
|
ECAT |
- |
Create or view boot script config |
Single line files only |
|
|
files on the NAND Flash |
|
|
|
|
|
FDISK |
- |
Create or remove primary partitions |
|
|
|
on the NAND Flash |
|
|
|
|
|
JUMP |
- |
Jump to the specified script in the |
Standard boot process only; if encountered |
|
|
NAND Flash (when the current |
during the alternate boot process (netboot) is |
|
|
script has been executed) |
ignored |
|
|
|
|
LOAD |
- |
Load an operating system image |
Uses data buffer as target |
|
|
and optionally a RAMdisk from |
|
|
|
NAND Flash |
|
|
|
|
|
LS, LSCF |
List Directory |
List NAND Flash directory |
Lists contents of directory. |
|
|
|
|
MD5 |
- |
Perform md5 checksum verification |
Verifies data buffer contents |
|
|
|
|
MKDIR, |
Make Directory |
Create a directory on the NAND |
Use MKDIRCF when logged into FTP |
MKDIRCF |
|
Flash |
server |
|
|
|
|
MKFS |
Make |
Create a filesystem for the partition |
|
|
Filesystem |
specified on the NAND Flash |
|
|
|
|
|
MV, MVCF |
- |
Rename a file on the NAND Flash |
Use MVCF when logged into FTP server |
|
|
|
|
PWD, |
- |
Display the current NAND Flash |
Use PWDCF when logged into FTP server |
PWDCF |
|
directory path |
|
|
|
|
|
RM, RMCF |
- |
Remove a file on the NAND Flash |
Use RMCF when logged into FTP server |
|
|
|
|
RMDIR, |
- |
Remove a directory on the NAND |
Use RMDIRCF when logged into FTP |
RMDIRCF |
|
Flash |
server |
|
|
|
|
SAVE |
- |
Store contents of the data buffer to |
|
|
|
a file in the NAND Flash |
|
|
|
|
|
Page 6 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The NetBootLoader provides various functions for monitoring the overall status of the system during the operation of the NetBootLoader. The following table provides an overview of available system status monitoring functions.
Table 5: |
System Status Monitoring Commands |
|
||
|
|
|
|
|
CMD TITLE |
|
ALIAS |
FUNCTION |
REMARKS |
|
|
|
|
|
FDT_SHOW |
|
- |
Display FDT |
Flattened Device Tree |
|
|
|
|
|
FRU |
|
- |
Display FRU info |
For AMC CPUs |
|
|
|
|
|
HELP or ? |
|
- |
Display online HELP pages |
|
|
|
|
|
|
INFO |
|
- |
Display system information |
|
|
|
|
|
|
IPMI |
|
- |
Display IPMI information |
|
|
|
|
|
|
MD |
|
Memory |
Display memory contents |
Applies to all memory |
|
|
Display |
|
|
|
|
|
|
|
PCI |
|
- |
Display PCI device information |
|
|
|
|
|
|
The CPU module is delivered with the NetBootLoader already installed in the NBL Flash memory and is ready for operation. However, in order for the CPU module to be used in a system, application software must be made available for use. This may be accomplished by programming such an image either to the NBL Flash memory where the NetBootLoader is located or to the NAND Flash when available.
Upon initial power up, the NetBootLoader is started automatically. As soon as the NetBootLoader has completed initialization of the CPU module, it initiates a command interpreter which the operator can access either via the primary serial or an Ethernet interface. As long as the command interpreter is available, the operator has the opportunity to intervene for programming an image.
Prior to programming an image it may be necessary to configure the NetBootLoader or perform other functions depending on the user’s application development environment or application requirements. Once this has been accomplished and the image has been programmed, the NetBootLoader is ready for operation.
Initial access to the NetBootLoader can only be achieved via the primary serial interface. Use of this interface requires either a terminal or a terminal emulator. In addition, the command interpreter is required.
ID 1022-8317, Rev. 2.0 |
Page 7 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Availability of the command interpreter depends on the system status. If a valid image is not available, the command interpreter is active as long as the operator requires it. If a valid image is available, the command interpreter is only active for the duration of the boot wait time. If the operator requires the command interpreter for a longer time he must terminate the boot operation before the boot wait time has elapsed.
Prior to using the network interface for remote access, Ethernet port parameters must be set and this can only be accomplished initially via the primary serial interface.
The operator must either manually set the parameters using the NET command or dynamically via the DHCP command. Some products require that prior to using the DHCP command, the IP address of the CPU module be set to 255.255.255.255 using the NET command. If the DHCP command returns a failure message, then the IP address should be set to 255.255.255.255, and the DHCP command reissued.
Once valid Ethernet port parameters have been set, the NetBootLoader may be remotely accessed either via telnet (all CPU modules) or Serial Over LAN (AM4100 and AM4101 only). When the command interpreter is available during the bootwait time, a successful telnet login or the initiation of a Serial Over LAN session will automatically terminate the boot operation, and a command prompt is sent to the remote interface.
Once the operator has control of the NetBootLoader, he may perform any required action. To continue with the operation of the CPU module, the system may either be cold started, the RS (reset) command issued, or the RUN command issued.
Assuming a fully configured system, beginning with power on (to the payload), the NetBootLoader is started. It then preforms basic configuration of the system, and then waits shortly for operator intervention. After this wait period with no intervention, the boot process continues with the loading of an operating system either from NBL Flash or NAND Flash to the data buffer and then starting it. Once the operating system is started the NetBootLoader is no longer available. The OS and application now have control.
While this may seem simple, control of the boot process can be very complex, depending on the application requirements and the configuration of the system.
The NetBootLoader offers a very comprehensive set of commands not only for supporting application development but to provide a secure and highly available system.
For example, validity control of images is supported for all images, either through CRC checks or an md5 checksum verification. Selective loading and starting of images is provided by appropriate command options for the LOAD, MD5, and RUN commands.
Passing operational parameters to an operating system is also supported by various commands or configuration files, e.g. BL, CBL, FDT, nbl0..9.cfg, net.cfg, etc.
In addition, with modules that support IPMI (for example the AM4100 or AM4101), the boot process can also be controlled via IPMI and the onboard MMC (Module Management Controller).
The following sections present the two primary methods of controlling the boot process.
2.6.3.1Standard Boot Process
The standard boot process foresees the use of predefined NetBootLoader functionality without external intervention at the time the system is to be booted. This is accomplished through the
Page 8 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use of appropriate configuration files, pre-setting of the SCRIPT command, pre-setting of the SQ (Sequence) command, and pre-programming of bootable images to the NOR and/or NAND Flashes.
In this case, the boot process is controlled by the contents of the above mentioned entities as follows:
•With modules that provide NAND Flash capability, the NetBootLoader first searches for a FAT partition that is marked bootable (only one partition may be so marked)
•If such a partition is found, it then searches for “nbl<n>.cfg” configuration files beginning with the file “nbl0.cfg”. When a file is found, the NetBootLoader executes it.
•If the file execution does not result in an image being loaded and started or the boot process being aborted, the NetBootLoader searches for the next available configuration file, and, if one is found, it is executed. This continues until either all “nbl<n>.cfg” files have been executed, the boot process is aborted, or an image is loaded and started.
•In the event a bootable FAT partition is not found or all available “nbl<n>.cfg” files have been executed without either aborting the boot process or loading and starting an image, the NetBootLoader searches for any script previously specified by the SCRIPT command. If found, it is also executed.
•If a script is not found, or if the script execution does not result in an image being loaded and started or in the boot process being aborted, the NetBootLoader continues with the processing of image(s) stored in NOR Flash (according to the order defined by the SQ command if specified, or 0, 1, 2, 3 if not specified). The first valid (CRC check passed) image found is loaded and started. If a valid image is not found, the boot process is aborted and a command interpreter is made available.
With the introduction of NAND Flash, the boot process may indirectly be influenced via an operating system. After an initial boot up and starting of an operating system, the contents of files in the NAND Flash may be altered via OS functions, so that a very customized boot process may be specified without having to use NetBootLoader file editing functions. With the next boot up, the “new” boot process can then be executed.
2.6.3.2Alternate Boot Process
For modules which support IPMI and NAND Flash, there is an alternate boot capability (known as netboot) which can be invoked from a remote location using IPMI commands. This can be used for situations where the standard boot process fails leaving the module payload inoperable or a non-standard application configuration is required for whatever reason. This is achieved by setting the boot order via IPMI and then having the MMC reboot the payload.
For example, using the “ipmitool” software the following command line can be invoked to set a register that is evaluated by the NetBootLoader on the next payload restart:
ipmitool -l 0x00 0x3E 0x20 0x9D 0x00 or 0x01
where 0x00 is for standard boot process and 0x01 for the alternate boot process. This value must be explicitly set (reset) as it is stored in non-volatile memory.
At reboot start, the NetBootLoader first searches for a FAT partition on the NAND Flash that is marked bootable. If such a partition is found, it then searches for a configuration file named “net.cfg”. If found, the NetBootLoader executes it.
ID 1022-8317, Rev. 2.0 |
Page 9 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In the event a bootable FAT partition is not found or if a “net.cfg” file is not found or its execution does not result in an image being loaded and started or the boot process being aborted, the NetBootLoader executes the following command sequence: “dhcp; tftp; run”. If this command sequence is not successfully executed, the boot process is aborted and a command interpreter is made available for operator inputs.
2.6.3.3Dual Core Operation (SMP/ASMP)
The NetBootLoader also supports the booting of modules with dual cores (for example, the AM4100 and AM4101). Modules with dual cores can be operated using only one core, using both cores with the same operating system (SMP), or using both cores with different operating systems (ASMP).
Single core usage is principally the same as with modules with only one core. Dual core operation is a function of the application whereby two possible modes of operation are available: symmetric multiprocessing (SMP) and asymmetric multiprocessing (ASMP).
In the case of SMP operation, the NetBootLoader itself runs using core 0, loads and starts the operating system for core 0. Once the operating system is started, the OS starts the operation of the second core (core 1).
For ASMP operation, the NetBootLoader itself runs using core 0, loads and starts different operating systems for core 0 and core 1.
Essentially the standard boot process for both SMP and ASMP is the same with the exception that when using ASMP mode, the NOR Flash image sequence is not supported. In this case, the RUN command must explicitly specify the NOR Flash image to be used.
The alternate boot process is different for ASMP. In this case, only the “net.cfg” configuration file is executed. If this does not result in images being loaded and started the boot process is aborted and a command interpreter is made available.
The following sections present either command specific or more detailed information on commands as well as operational aspects of the NetBootLoader with regards to particular commands.
The use of this command requires a CPU module with two cores configured for asymmetric multiprocessing (ASMP) operation. It permits the assignment of devices to one or the other of the cores whereby a device may only be assigned to one core at a time.
A CPU module with two cores configured for symmetric multiprocessing (SMP) operation has automatically all available devices assigned to core 0.
2.7.2BL
When specified, this command stores a bootline in RAM for use of an image in the data buffer at the time the image is started with the RUN command.
When ASMP operation is selected, this command is core sensitive, meaning that it can specify the bootline to be used with the image for either core0 or core1 depending on the core selected by the last issue of SETCORE. A bootline for each core may be specified.
Page 10 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Refer to the SETCORE command for further information.
When RUN is executed, BL is used in addition to the common bootline from the NBL EEPROM which was set with “cbl c <commonbootline>”.
The sum of all bootlines (bl and cbl) for one core must not exceed 256 characters. To verify the status of bootlines, use the FDT_SHOW command.
When no bootline is specified, the bootline 0 from the NBL EEPROM (cbl 0) is used as the bootline.
2.7.3BW
This command is used to display or set the actual boot wait time used by the NetBootLoader to delay the boot operation before proceeding with the loading and starting of an application. If this time is set too short it may not be possible to gain access to the NetBootLoader.
The boot wait time value is stored in the boot section of the serial EEPROM. This section is validated with a CRC code to avoid the setting of random parameters.
Note ...
If the CRC of the boot section is not valid, changing the boot wait time will have no effect because the BW command does not validate an invalid CRC. In this case, a default timing of 5 seconds is always used.
To validate an invalid CRC, an operating system utility must be used, or, alternatively, the “-f” option of the BW command must be issued.
WARNING!
Using the “bw -f” command to validate invalid entries may adversely impact the operation of the operating system.
2.7.4CBL
This command is used to set or display a bootline associated with a particular kernel image or which is common to all images.
When an image is programmed to NBL Flash memory, it is assigned an ID number (0, 1, 2, or 3). This number is used to identify which image is to be addressed by the command CBL.
In addition, a bootline common to all images may also be defined using the “c” parameter.
The sum of all bootlines (bl and cbl) for one image must not exceed 256 characters. To verify the status of bootlines, use the FDT_SHOW command.
Products which have only one NOR Flash require access to additional Flash memory to support the CLONE command without the “-n” option. E²Brains require that their carrier boards provide this functionality if it is to be supported. Other products may or may not provide this capability with onboard Flash. Refer to the product User Guide for further information or contact Kontron for assistance.
ID 1022-8317, Rev. 2.0 |
Page 11 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This command is used to obtain automatically networking parameters from either a DHCP or BOOTP server for an Ethernet port. Its use requires the availability of one or the other of these servers to function.
Initially the CPU module does not have a valid Ethernet interface configuration, and, therefore, this interface is inoperable. The initial configuration must be done either manually from a serial interface using the command NET, or, if a DHCP or BOOTP server is available, it can be done automatically by the DHCP command.
2.7.7FDT
This command is used to enable the creation of a flattened device tree.
The flattened device tree provides information required by certain operating systems for operation of system devices. In the case of the AM4100 and AM4101, the flattened device tree is always generated.
2.7.8NET
This command is used to set or display the parameters for the configuration of the specified Ethernet port of the NetBootLoader. The Ethernet interfaces are only available after these settings have been made.
This command is used to set the password used by the NetBootLoader for the operation of the telnet interface. No password is required for access from the primary serial interface or for Serial Over LAN
2.7.10PF
This command is used to set the port parameters for the primary and secondary serial interfaces only for the current operator session. The next system restart will cause these settings to revert to the default settings of: 9600 Baud, 8 bits per character, 1 stop bit, and no parity. This is done to preclude a system lockout when restarting due to incompatible settings.
This command permits the automatic invoking of NetBootLoader commands during boot up. The operator issues this command with appropriate options and then restarts the system. During the boot operation at boot wait time expiration, the script commands will be executed.
Use of this command permits, for example, remote booting from a TFTP server.
2.7.12SQ
This command is used to set or display the order in which images are to be booted.
The NetBootLoader provides the capability to program up to four images into the NBL Flash memory. With this command the operator can define the order in which images may be used when the system is booted. This provides operational flexibility as well as the possibility for the system to compensate for a defective image.
Page 12 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For example, in the event the first image specified is defect, the NetBootLoader will attempt to load the next image specified. This is continued until either a valid image is loaded or no further image is available.
If no valid image is found, the NetBootLoader remains available for inputs.
A telnet login to the NetBootLoader is only possible during the boot wait time or when the boot operation has been terminated either by operator action or automatically by the NetBootLoader. In either case, the Ethernet port parameters and the telnet password must be set prior to attempting the telnet login.
To effect a telnet login the operator performs the standard telnet login procedure. The NetBootLoader responds by requesting a login password. The operator then enters a password. If the password is valid, the operator can now access the NetBootLoader. If the password is invalid, the telnet login procedure is terminated and the boot operation continues.
In the case of an invalid password, the login procedure may be repeated as often as required within the boot wait time or as long as the NetBootLoader telnet server is active after the boot wait time has been exceeded. Once the NetBootLoader telnet server is terminated, a telnet login is no longer possible.
To achieve an operable system for an application, the application software may be programmed to NBL Flash memory. As mentioned before, the NetBootLoader supports the programming of up to four images to NBL Flash memory whereby each image is assigned its own image number. In addition to this, it also supports the updating of the NetBootLoader itself as well as data transfer from the NBL Flash memory to the data buffer and from the data buffer to an FTP server. The following chapters provide information on performing the various types of NBL Flash memory operations.
The currently used NBL Flash memory is one uniform Flash memory. All offsets are based from the beginning of this Flash memory area. The NetBootLoader itself is located at the beginning of the NBL Flash memory area and for this reason this area cannot be used for other image programming. To display an overview of the currently used NBL Flash memory organization use the INFO command.
If the image is an operating system (which is the default case), it must be programmed without an offset. When such an image is programmed to NBL Flash memory, the image length and CRC information is also programmed along with the image. This information is used by the NetBootLoader to determine the validity of the image during the boot operation. During system startup, a valid image is copied to DDR2-SDRAM address 0x0 and started at offset 0x0 (FDT enabled) or 0x100 (FDT disabled).
If an offset is specified, the image will be programmed exactly at this offset without adding length or CRC information. This option is intended for the storing of configuration information which is required to be located in NBL Flash memory.
ID 1022-8317, Rev. 2.0 |
Page 13 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 result 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.
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 image located on an FTP server, the GET command is used. To perform Motorola S-Record acquisition, 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 memory, the LF command is used to program directly to NBL Flash memory.
To gain access to an image file stored on a TFTP or FTP server an Ethernet port is used. Images 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 NetBootLoader.
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. After 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 program the overwritten data buffer to the NBL Flash memory.
Page 14 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2.8.4Motorola S-Records
The NetBootLoader will also accept Motorola S-Records as an image. The SL command accepts S1, S2 and S3 records. Operation is terminated by the appropriate S9, S8 or S7 record. Other types of records are ignored.
The checksum of every record except end records is checked. Bad records are rejected by the NetBootLoader. The address range of every record is also checked. Records which fall outside of the internal buffer are rejected.
The records must be 0-based. This means that each record’s address must correspond to the address where it will be loaded in the data buffer relative to its start. If necessary, the base address can be modified with the -o option of the SL command.
Note ...
If the data buffer is programmed to NBL Flash memory without the -o option (program a startable image) the downloaded image is copied to RAM during startup and is executed there. For this reason images which require to be programmed must start at the address 0x0.
The image must start at the absolute address 0x0 and the entry point of the executable PPC code must be at address 0x0 (FDT enabled) or 0x100 (FDT disabled). If S1 or S2 record input is preferred, please note that these records only include 16 and 24-bit wide addresses.
Note ...
Neither the SL nor LF command can be used to program Motorola S-Records to RAM areas.
For accessing the Motorola S-Records, both the primary and secondary serial interfaces can be used. If available, the user specific LED (ULED0) blinks green while downloading indicating that the transfer is in progress. The transfer itself may take several minutes to complete.
Ensure that the XON/XOFF protocol is used on the host side. This is a fixed setting and cannot be changed. Additionally, ensure that the host does not stop transmission after a number of lines (e.g. OS-9: use the ‘nopause’ attribute).
The SER0 and SER1 serial interface parameters can be modified with the PF command.
In addition to programming an image to NBL Flash memory, the NetBootLoader itself can be updated. The image can be downloaded in the same way as any other image to the data buffer, or, if available, a redundant NBL Flash can also be the source of a NetBootLoader image. The new version of the NetBootLoader image is then programmed to NBL Flash memory using the CLONE command.
ID 1022-8317, Rev. 2.0 |
Page 15 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The NetBootLoader also has the possibility to upload certain areas of the NBL Flash memory to a host using an Ethernet port. To use this interface, the Ethernet port parameters must first be set and then the operator must gain control of the NetBootLoader and perform an FTP server login. After a successful login, the operator then stores the NBL Flash memory area to be uploaded to the local data buffer using the SF command. Using the PUT command transfers the contents of the data buffer to the FTP server. As with any type of server session, the operator should logout when the session is finished.
The NetBootLoader includes “Plug and Play” functionality. This ensures that the CPU module is completely initialized and that all resources necessary for PCI devices (addresses, interrupts etc.) are assigned automatically. This important feature has the advantage that conflicts do not arise when PCI devices are added or removed as the operating system itself does not include the board initialization code.
The image for the absolute address 0x0 should be linked with an entry point at the absolute address 0x0 (FDT enabled) or 0x100 (FDT disabled).
One should not attempt to reassign the PCI BAR registers. The assigned values should be read back and these should always be used in the drivers.
Downloaded images are never executed from the NBL Flash memory. The programmed image is always downloaded to DDR2-SDRAM, the absolute address 0x0 being downloaded first. There is no configuration option available to amend this process. If it is necessary to relocate the image to another address after download, simply add a small assembly routine at the beginning of the code which will move the image to the correct address.
The NetBootLoader was originally designed for CPU modules that only had a single NBL Flash memory device. The introduction of CPU modules with two NBL Flashes and NAND Flash has significantly increased the flexibility of systems not only with regards to the NetBootLoader itself, but also with regards to operating systems and ultimately applications as a whole.
The first Kontron product with these features, the AM4100 AMC CPU module, was provided with both redundant NBL Flash as well as NAND Flash. These features have contributed to increased system availability (NetBootLoader backup controlled by IPMI system management) and a very high degree of system autonomy and ruggedness (high capacity of onboard solid state memory for operating systems and applications).
To support these enhancement features, various existing commands were modified and new commands were added.
Page 16 |
ID 1022-8317, Rev. 2.0 |
NetBootLoader |
NBL Operation |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With the introduction of a redundant NBL Flash device, the capability to support different versions of the NetBootLoader and provide backup capability was added. This functionality is supported by the NetBootLoader, the onboard IPMI management system, and onboard hardware switching. The exact configuration is a function of application requirements.
For initial booting purposes, the NBL Flash has adequate storage capability for the NetBootLoader, an operating system image, and, depending on the application requirements, even space for a smaller application. However, once an operating system or application has been started, neither the NetBootLoader nor the NBL Flash is available to the OS or application. Without an onboard mass storage device, the OS and application and their related data are fully contained in RAM.
The NAND Flash, as a mass storage device, fulfills both the requirements of storing and starting an operating system and applications, as well as providing high capacity local data storage.
ID 1022-8317, Rev. 2.0 |
Page 17 |
NBL Operation |
NetBootLoader |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This page has been intentionally left blank.
Page 18 |
ID 1022-8317, Rev. 2.0 |