Sponsor:

Your company here — click to reach over 10,000 unique daily visitors

bfb-install - Man Page

BFB installing script for BlueField SoC over rshim driver

Synopsis

bfb-install -b, --bfb <bfb_file> -r, --rshim [<ip:>[:port]:]rshim<N> [-m, --remote-mode <scp|nc|ncpipe>] [-R, --reverse-nc] [-c, --config <config_file>] [-f, --rootfs <rootfs_file>] [-h, --help] [-v, --verbose]

Description

bfb-install is a utility script to install BFB images on BlueField SoC over the rshim driver.

When the "--rshim" option doesn't provide an "ip" argument, the script will run in local mode and try to access the local rshim device and install the BFB image through it.

When the "--rshim" option provides an "ip" argument, the script will run in remote mode and try to access the remote rshim device and install the BFB image through it.  There are three remote modes: "scp", "nc", and "ncpipe". The default remote mode is "scp". "scp" uses the scp command to transfer the BFB image to the remote rshim device. "nc" uses the nc command to transfer the BFB image to the remote rshim device. "ncpipe" is similar to "nc" but uses a named pipe on the remote device to help transfer the BFB image and achieve faster speed.

The "--reverse-nc" flag, used with "nc" or "ncpipe" remote modes, enables a reversed connection method where the remote host operates as a netcat server and the local host, as a client, initiates the connection. This method is particularly useful for environments with firewall restrictions on the local host side.

Options

-b,  --bfb

This is the BFB image to use, which is pushed as the boot stream.

-c,  --config

This is an optional configuration file to use, usually called bf.cfg.

-f,  --rootfs

This is the optional rootfs tar.xz file which is uaually used when installing Yocto.

-h,  --help

Show the help message.

-m , --remote-mode

Specify the remote mode to use. The default mode is "scp". The available modes are "scp", "nc", and "ncpipe".

-r,  --rshim

This is the rshim device to use, in the format of [<ip>:<port>:]rshim<N>. The "ip" and "port" are optional and only used when the remote mode is specified. These two fields will be ignored when the remote mode is not specified. Both IP address and host name are supported for the "ip" field. If the port is not provided, the default port 9527 is used. The "N" is the rshim device number, usually 0 or 1.

-R,  --reverse-nc

Enables a reverse connection for "nc" and "ncpipe" modes, allowing the local host to initiate a connection to a netcat server running on the remote.

-v,  --verbose

Show verbose output.

Examples

To install a BFB image using the host rshim method:

bfb-install --bfb bluefield.bfb --rshim rshim0

To install a BFB image using the BMC rshim scp method:

bfb-install --bfb bluefield.bfb --rshim 10.15.8.200:rshim0

To install a BFB image using the BMC rshim nc method:

bfb-install --bfb bluefield.bfb --rshim 10.15.8.200:rshim0 --remote-mode nc

To install a BFB image using the BMC rshim ncpipe method with custom port number and verbose output:

bfb-install --bfb bluefield.bfb --rshim 10.15.8.200:9709:rshim0 --remote-mode ncpie --verbose

To install a BFB image in local mode with a custom configuration file:

bfb-install --bfb bluefield.bfb --rshim rshim0 --config bf.cfg

To install a BFB image with the BMC rshim using the netcat pipe method and a reverse connection, specifying a local port within the rshim value:

bfb-install --bfb bluefield.bfb --rshim 10.15.8.200:9709:rshim0 --remote-mode ncpipe --reverse-nc

Known Issues

When using remote mode nc or ncpipe, there's a short window of time when there is a netcat server running on the local or remote host on the specified TCP port (default 9527). This could be a potential security risk. So these two methods should only be used on a secure network and the security implications are understood.

Info

2 Feb 2024 3.0 bfb-install man page