Author: George Liu <liuxiwei!>
Created: 2021-10-12
When Redfish or scp cannot be used, BMC needs a new mechanism for images to get into the machine.
The openbmc project currently has a phosphor-software-manager repository. In order to perform an update, need first to bring the image into the BMC directory (/tmp/images). However, only TFTP and HTTP are currently supported, and USB is not yet supported.
The intent of this new application design is to enable the USB driver of BMC to enter the new image into BMC.
The following statements are reflective of the initial requirements.
/tmp/images
.The new code would be part of the phosphor-software-manager repository(eg: phosphor-usb-code-update). The design process is as follows:
usb-code-update
) in phosphor-software-manager repository to identify whether to enable the USB Code Update function, which is enabled by default.usb-code-update
enabled, install the udev rules file to /lib/udev/rules.d
during compilation./run/media/usb/sda1
directory and copies the first .tar
file in the directory to /tmp/images
and starts verification.The udev rules files for example:
SUBSYSTEM=="block", ACTION=="add", ENV{ID_USB_DRIVER}=="usb-storage", ENV{DEVTYPE}=="partition", ENV{SYSTEMD_WANTS}="usb-code-update@%k", TAG+="systemd"
If the OS fails to boot due to an error, so the firmware update cannot be done through the OS, or the network fails, and the update cannot be done through Redfish or scp, the server support staff can only uninstall the flash chip and re-flashing, this is not Reasonably, service support should have local access to the machine and update the system to a working firmware level.
This impacts security because it can copy files to the BMC via an external USB key. There is no expected performance impact since the process just copies files during runtime and exits automatically after completion.
dev/sda1
on qemu with some test scripts and start the service(eg: systemcl start usb-code-update@sda1.service
)