U-Boot Platform NOS Interface Details

This section describes the U-Boot platform specific methods used to implement the NOS interface. See the Network Operating System Interface section for more about the NOS interface.

U-Boot platform Adding Kernel Command Arguments

In the case of U-Boot and Linux, the user can set additional kernel command line arguments by setting the onie_debugargs U-Boot environment variable.

The install_url kernel command line argument can be used to boot into ONIE and automatically use the URL as an install URL. For example:

=> setenv onie_debugargs 'install_url=http://10.0.1.249/nos_installer.bin'
=> run onie_bootcmd

U-Boot platform NOS Interface

On U-Boot platforms, ONIE communicates with the NOS via U-Boot environment variables. Both ONIE and the NOS must be able to read and write U-Boot environment variables. See the Network Operating System Interface section for more about the NOS interface.

U-Boot platform NOS Installer

The only requirement ONIE has for the NOS installer is that the NOS must update the nos_bootcmd U-Boot environment variable described in Platform-Independent Environment Variables. This signals U-Boot to load the NOS on subsequent boots, bypassing ONIE.

What goes into the nos_bootcmd is entirely up to the NOS vendor, but generally it will contain commands to load and boot the NOS image from NOR flash or from an SD card.

See the NOS Installer section for more about the NOS installer interface.

U-Boot platform Reinstalling or Installing a Different NOS

To invoke the install operation, the running NOS sets the onie_boot_reason U-Boot environment variable to the value install (see Platform-Independent Environment Variables), and then reboots the system. When the system starts up again, ONIE will see the onie_boot_reason and restart the discovery and installation phase.

Note

From the U-Boot prompt, you can also boot ONIE into the discovery and installation phase by typing:

=> run onie_bootcmd

See the Reinstalling or Installing a Different NOS section for more about the NOS reinstaller interface.

U-Boot platform NOS Uninstall

ONIE has an uninstall operation that wipes out the unused portions of NOR flash and the attached mass storage device (like an SD card or USB NAND flash). The only thing untouched is ONIE itself. This is a “reset to factory defaults”-like operation.

To invoke the uninstall operation, the running NOS sets the onie_boot_reason U-Boot environment variable to the value uninstall (see Platform-Independent Environment Variables), and then reboots the system. When the system starts up again, ONIE will see the onie_boot_reason and start the uninstall process.

Following the uninstall process, the system returns to the discovery and installation phase.

Note

From the U-Boot prompt you can also boot ONIE into the uninstall mode by typing:

=> run onie_uninstall

See the NOS Uninstall section for more about the NOS uninstall interface.

U-Boot platform Rescue and Recovery

To invoke the rescue operation, the running NOS sets the onie_boot_reason U-Boot environment variable to the value rescue (see Platform-Independent Environment Variables), and then reboots the system. When the system starts up again, ONIE will see the onie_boot_reason and enter rescue mode.

Note

From the U-Boot prompt you can also boot ONIE into rescue mode by typing:

=> run onie_rescue

See the Rescue and Recovery section for more about the NOS rescue interface.

U-Boot platform Updating and Embedding ONIE

On U-Boot platforms, only the update operation is supported; there is no embed command for U-Boot platforms. The update operation is not descructive to the currently installed NOS.

The update operation installs a new version of ONIE in the NOR flash, including:

  • An updated U-Boot image
  • An updated ONIE kernel and initramfs

To invoke the ONIE update operation, the running NOS sets the onie_boot_reason U-Boot environment variable to the value update (see Platform-Independent Environment Variables), and then reboots the system. When the system starts up again, ONIE will see the onie_boot_reason and enter ONIE self-update mode.

Note

From the U-Boot prompt you can also boot ONIE into ONIE self-update mode by typing:

=> run onie_update

See the Updating and Embedding ONIE section for more about the NOS update interface.

U-Boot Platform Hardware Diagnostics Interface [Optional]

This section describes a method for providing a hardware diagnostic for U-Boot platforms. See the Hardware Diagnostics [Optional] section for more about providing a hardware diagnostic.

The preferred storage location for the hardware diagnostic image is in a NOR flash partition. See the Boot Flash Partitioning section for more information on the NOR flash partitioning.

The diag image is located in the NOR flash in a specific diag partition. This allows the NOS installer to clearly identify the partition and avoid overwriting it.

In order to boot the diagnostic image, the implementation must create a new U-Boot environment variable called boot_diag. This variable contains all the U-Boot commands necessary to load and boot the diagnostic image.

To invoke the diagnostic image the user would type run boot_diag from the U-Boot loader prompt.