This document describes how to configure and create white box packages.
Introduction to White Box Packages
A white box package is essentially an HPM package that provides customization capabilities through firmware updates. The range of customization includes image customization, web page style customization, and configuration customization. The following table lists the supported customization items.
| No. | Customization Category | Customization Item | File | Attribute |
|---|---|---|---|---|
| 1 | Image customization | Browse ICO | favicon.ico | / |
| 2 | Image customization | QR code | code1.png | / |
| 3 | Image customization | Login page background | login.png | / |
| 4 | Image customization | Login page icon | login_logo.png | / |
| 5 | Image customization | Model display on the main page | img_01.png img_02.png img_03.png | / |
| 6 | Image customization | Image in the upper left corner of the main page | header_logo.png | / |
| 7 | Style customization | Main page style | style_config.json | pageStyle |
| 8 | Configuration customization | Product contact person | web_custom.xml | sysContact |
| 9 | Configuration customization | Default security advisories | web_custom.xml | dBannerContent |
| 10 | Configuration customization | Preset certificate Common Name | web_custom.xml | PreSSLSeverCommonName |
| 11 | Configuration customization | Preset certificate Organization Name | web_custom.xml | PreSSLSeverOrgName |
| 12 | Configuration customization | Preconfigured certificate Country | web_custom.xml | PreSSLSeverCountry |
| 13 | Configuration customization | Official website | web_custom.xml | OfficalWeb |
| 14 | Configuration customization | Copyright information | web_custom.xml | Copyright |
| 15 | Configuration customization | Technical support website | web_custom.xml | SupportWeb |
| 16 | Configuration customization | web_custom.xml | ||
| 17 | Configuration customization | Phone | web_custom.xml | Phone |
| 18 | Configuration customization | Independent KVM | web_custom.xml | DownloadKVMLink |
| 19 | Configuration customization | QR code display flag (whether to display) | web_custom.xml | DocSupportFlag |
| 20 | Configuration customization | BMC software name | web_custom.xml | SoftwareName |
| 21 | Configuration customization | Alarm and event description | web_custom.xml | CustomAlarmName |
| 22 | Configuration customization | Redfish OEM name | web_custom.xml | CustomManufacturer |
| 23 | Configuration customization | BMC host name | web_custom.xml | HostName |
| 24 | Configuration customization | Customer name (used to make customized features take effect) | web_custom.xml | Customer |
White Box Package Customization Method
Creating a Code Repository for Storing Customization Files
Before creating a white box package, prepare the customization files. White box package customization files include the main page style description file, various customized images, configuration file web_custom.xml, and file list configuration filelist.conf.
- Customized image names must match those in the item customization table above.
- The main page style supports
beautiful,simple, andstandard. You need to create astyle_config.jsonfile.
The file configuration example is as follows:
{
"pageStyle": "beautiful"
}Configuring filelist.conf
The filelist.conf file describes white box package configuration items. The following is an example:
[Basic]
Version=2.00
[Filelist]
FileNum=10
[File0]
Name=code1.png
Path=/data/opt/pme/web/htdocs/theme/custom/img
[File1]
Name=favicon.ico
Path=/data/opt/pme/web/htdocs
[File2]
Name=web_custom.xml
Path=/data/opt/pme/web/conf
[File3]
Name=header_logo.png
Path=/data/opt/pme/web/custom
[File4]
Name=login.png
Path=/data/opt/pme/web/custom
[File5]
Name=login_logo.png
Path=/data/opt/pme/web/custom
[File6]
Name=img_01.png
Path=/data/opt/pme/web/custom
[File7]
Name=img_02.png
Path=/data/opt/pme/web/custom
[File8]
Name=img_03.png
Path=/data/opt/pme/web/custom
[File9]
Name=style_config.json
Path=/data/opt/pme/web/htdocs[Basic]: describes thefilelist.conffile version.[Filelist]: describes the number of configuration files.[Filex]: describes configuration file names and file paths.
The value of FileNum must match the actual number of File entries configured below. File names and file paths are fixed. You can customize them as required.
Configuring web_custom.xml
The web_custom.xml file contains attribute configurations. The following is an example:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Description: Currently official website, copyright information, independent KVM download link information, and document QR code display flags are used in the web page. -->
<CUSTOM_CONFIG>
<!-- System contact (Example: VALUE="https://openubmc.com") -->
<SysContact VALUE="CustomSysContact" />
<!-- Preset SSL certificate information. When the issuer information of the currently installed SSL certificate matches the preset information, the certificate is considered a preset certificate, and the web page will prompt the user to install a new certificate. -->
<PreSSLSeverCommonName VALUE="CustomCommonName"/>
<PreSSLSeverOrgName VALUE="CustomOrgName"/>
<PreSSLSeverCountry VALUE="Country"/>
<!-- Official website -->
<OfficalWeb VALUE="CustomOfficalWeb"/>
<!-- Copyright -->
<Copyright VALUE="CustomCopyright"/>
<!-- Technical support website -->
<SupportWeb VALUE="CustomSupportWeb"/>
<!-- Email -->
<Email VALUE="CustomEmail"/>
<!-- Phone -->
<Phone VALUE="CustomPhone"/>
<!-- Independent KVM client download link -->
<DownloadKVMLink VALUE="CustomDownloadKVMLink"/>
<!-- Whether to display the QR code. (Example: VALUE="1", where "0" or "1" are valid values. Other values default to "0", indicating that the OR code is not displayed.) -->
<DocSupportFlag VALUE="CustomDocSupportFlag"/>
<!-- Software name, used for customizing the BMC name in logs and the CLP prompt. -->
<SoftwareName VALUE="openUBMC"/>
<!-- Host name -->
<HostName VALUE="CustomHostName"/>
<!-- Security advisories -->
<dBannerContent VALUE="CustomdBannerContent"/>
<!-- Customer name -->
<Customer VALUE="CustomerName"/>
</CUSTOM_CONFIG>You can select appropriate customization items to put into web_custom.xml as required. Replace VALUE content with your customized content. You can delete unnecessary customization items.
Configuring manifest.yml for the Corresponding Product in the manifest Repository
After preparing the white box package customization files, start the build and packaging phase. The configuration steps are as follows:
(1) Determine the build code, such as WBD. (2) Determine the package name package_name. (3) Determine the build type. (4) Configure settings related to the white box package.
Build example:
manufacture:
# Build code.
WBD:
# package_name is the storage path and name of the white box package.
package_name: wbd/wbd_output.zip
# Build type. See bingo build types for optional values.
build_type: release
# White box package-related configuration.
wbd_hpms:
# repo is the repository address where white box package customization files are stored. Use the HTTPS download address.
- repo: https://test.git
# tag is the branch tag number where customization files are stored.
tag: 0.0.0
files:
# path is the storage path for white box package customization files. The dst path cannot be modified and must follow the format "wbd_up_file/filename" as shown in the following example.
- file: {path}/favicon.ico
dst: wbd_up_file/favicon.ico
- file: {path}/login_logo.png
dst: wbd_up_file/login_logo.png
- file: {path}/header_logo.png
dst: wbd_up_file/header_logo.png
- file: {path}/filelist.conf
dst: wbd_up_file/filelist.conf
- file: {path}/web_custom.xml
dst: wbd_up_file/web_custom.xml
# The following files are required for creating white box packages. Their paths are fixed and cannot be deleted.
- file: /usr/share/bmcgo/wbd-packet/beforeaction.sh
- file: /usr/share/bmcgo/wbd-packet/afteraction.sh
dst: afteraction.sh
- file: /usr/share/bmcgo/wbd-packet/CfgFileList.conf
- file: /usr/share/bmcgo/wbd-packet/firstboot.sh
- file: /usr/share/bmcgo/wbd-packet/hpm_wbd.config
- file: /usr/share/bmcgo/wbd-packet/packetwbd.sh
- file: /usr/share/bmcgo/wbd-packet/update.cfg
# dst is the name of the final white box package created.
files:
- file: ${work_out}/wbd_hpm1.hpm
dst: WBD-image.hpm
verify:
- pssNote: The number of customization files in
filesmust match the number of files infilelist.conf. Otherwise, the white box package upgrade will fail.
Running the White Box Build Command in the build Directory of the manifest Repository
Go to the manifest/build directory and run the following command:
bingo publish -z WBD -b openUBMC, where the-zoption is the white box package build code and the-boption is the model.
The package will be created at manifest/output/packet/wbd/wbd_output.zip.
Upgrading the White Box Package
Go to the openUBMC home page, navigate to Firmware Upgrade -> Firmware Update -> Upgrade File. If the Customer field is configured in the white box package, it will automatically restart to take effect after the update completes.
Clear Branding Package Creation Method
After customizing a white box package, if you need to restore the original configuration, you need to update with a clear branding package. A clear branding package is also a white box package, but the configuration in it is the default configuration. You need to create a white box package with the default configuration.
- For configuration customizations, modify the customization items in
web_custom.xmlto the desired default values. - For style customizations, set the
style_config.jsonfile to an empty object. - For image customizations, configure
filelist.conf, change the originalNametoCLEAR_ALL, and then create an empty file namedCLEAR_ALL. Note that when configuring the white box package inmanifest, you also need to add theCLEAR_ALLfile configuration.
filelist.conf example:
# For configurations that need to be restored to default, change Name to CLEAR_ALL.
[Basic]
Version=2.02
[Filelist]
FileNum=9
[File0]
Name=code1.png
Path=/data/opt/pme/web/htdocs/theme/custom/img
[File1]
Name=favicon.ico
Path=/data/opt/pme/web/htdocs
[File2]
Name=web_custom.xml
Path=/data/opt/pme/web/conf
[File3]
Name=CLEAR_ALL
Path=/data/opt/pme/web/custom
[File4]
Name=CLEAR_ALL
Path=/data/opt/pme/web/custom
[File5]
Name=CLEAR_ALL
Path=/data/opt/pme/web/custom
[File6]
Name=CLEAR_ALL
Path=/data/opt/pme/web/custom
[File7]
Name=img_02.png
Path=/data/opt/pme/web/custom
[File8]
Name=img_03.png
Path=/data/opt/pme/web/custom