diff --git a/README.md b/README.md index b9225e6..ebd9947 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,16 @@ The rshim driver provides a way to access the rshim resources on the BlueField target from external host machine. The current version implements device files for boot image push and virtual console access. It also creates virtual network -interface to connect to the BlueField target and provides a way to access +interface to connect to the BlueField target and provides a way to access the internal rshim registers. *) Build Linux: - Make sure autoconf/automake tools are available. Run ./bootstrap.sh for the - first time to generate the configure file. Then run ./configure and make to - generate the bfrshim and 'make install' to install it. + Make sure autoconf/automake/pkg-config tools are available. Run bootstrap.sh + for the first time to generate the configure file. Then run the ./configure + script followed by make & make install to build and install it. FreeBSD: @@ -31,7 +31,7 @@ syntax: bfrshim [--help|-h] [--backend|-b usb|pcie|pcie_lf] *) Device Files Each rshim target will create a directory /dev/rshim\/ with the - following files. \ is the device id, which could be 0, 1, etc. + following device files. \ is the device id, which could be 0, 1, etc. - /dev/rshim\/boot @@ -41,20 +41,22 @@ syntax: bfrshim [--help|-h] [--backend|-b usb|pcie|pcie_lf] - /dev/rshim\/console - Console device, which can be used by console tools to connect to the ARM side, + Console device, which can be used by console apps to connect to the ARM side, such as screen /dev/rshim/console - /dev/rshim\/rshim - Device file used to access rshim register space. When reading / writing to - this file, encode the offset as "((rshim_channel << 16) | register_offset)". + Device file used to access the rshim registers. The read/write offset is + encoded as "((rshim_channel << 16) | register_offset)". - - /dev/rshim\/misc: + - /dev/rshim\/misc Key/Value pairs used to read/write misc information. For example, + Display the content: + cat /dev/rshim/misc DISPLAY_LEVEL 0 (0:basic, 1:advanced, 2:log) BOOT_MODE 1 (0:rshim, 1:emmc, 2:emmc-boot-swap) @@ -62,50 +64,32 @@ syntax: bfrshim [--help|-h] [--backend|-b usb|pcie|pcie_lf] SW_RESET 0 (1: reset) DEV_NAME usb-3.3 - Set display level to advanced will show more information. + Display more infomation: echo "DISPLAY_LEVEL 1" > cat /dev/rshim/misc - cat /dev/rshim/misc ... PEER_MAC 00:1a:ca:ff:ff:01 # Target-side MAC address PXE_ID 0x01020304 # PXE DHCP-client-identifier - The 'PEER_MAC' attribute can be used to display/set the target-side MAC + The 'PEER_MAC' attribute can be used to display and set the target-side MAC address of the rshim network interface. It works when the target-side is in UEFI BootManager or in Linux where the tmfifo has been loaded. The new MAC address will take effect in next boot. - Initiate a SW reset. + Initiate a SW reset: echo "SW_RESET 1" > /dev/rshim/misc *) Multiple Boards Support Multiple boards could connect to the same host machine. Each of them has its - own device directory /dev/rshim. Below are some guidelines how to set up - rshim networking properly in such case. - - - The host rshim network interface should have different MAC address and IP - address, which can be configured with ifconfig like below or save it in - configuration. - - `ifconfig tmfifo_net0 192.168.100.2/24 hw ether 02:02:02:02:02:02` + own device directory /dev/rshim/. Network subnet needs to be set properly + just like any other standard NIC. - - The ARM side tmfifo interface should have unique MAC and IP as well, which - can be done in the console. +*) How to change the MAC address of the ARM side interface -*) How to change the MAC address of the ARM side interface to be persistent + Update the 'PEER_MAC' attribute in the misc file like below. Display the value + to confirm it's set. Reboot the device to take effect. - Below is an example to change the MAC address from 00:1a:ca:ff:ff:01 to - 00:1a:ca:ff:ff:10. - - Turning on the 'rshim_adv_cfg' flag. - - cat /dev/rshim\/misc - - ... - PEER_MAC 00:1a:ca:ff:ff:01 # This is the current configured MAC address - ... - - echo "PEER_MAC 00:1a:ca:ff:ff:10" > /dev/rshim\/misc + echo "PEER_MAC 00:1a:ca:ff:ff:10" > /dev/rshim\/misc