mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-19 08:42:26 +00:00
Explain the smc bmc license issue
Add documentation and a helper license script.
This commit is contained in:
parent
26e1b7c49b
commit
6519f28d26
68
contrib/upload-smc-license.py
Normal file
68
contrib/upload-smc-license.py
Normal file
@ -0,0 +1,68 @@
|
||||
#!/usr/bin/python3
|
||||
# SPDX-License-Identifier: LGPL-2.1+
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
from urllib import request, parse
|
||||
import base64
|
||||
import ssl
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"-u",
|
||||
"--user",
|
||||
type=str,
|
||||
help="Redfish user name",
|
||||
default="ADMIN",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-p",
|
||||
"--password",
|
||||
type=str,
|
||||
help="Redfish user password",
|
||||
default="ADMIN",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-f",
|
||||
"--file",
|
||||
type=str,
|
||||
help="License file",
|
||||
)
|
||||
parser.add_argument("hostname", type=str, help="BMC IP of hostname")
|
||||
|
||||
args = parser.parse_args()
|
||||
license = ""
|
||||
if len(sys.argv) == 1:
|
||||
print("hostname required")
|
||||
sys.exit(1)
|
||||
if not args.file:
|
||||
print("License:")
|
||||
license = sys.stdin.read()
|
||||
else:
|
||||
with open(args.file, "r") as fd:
|
||||
license = fd.read()
|
||||
|
||||
sslctx = ssl.create_default_context()
|
||||
sslctx.check_hostname = False
|
||||
sslctx.verify_mode = ssl.CERT_NONE
|
||||
url = (
|
||||
f"https://{args.hostname}/redfish/v1/Managers/1/LicenseManager/ActivateLicense"
|
||||
)
|
||||
auth = str(
|
||||
base64.b64encode(bytes(f"{args.user}:{args.password}", "latin1")),
|
||||
encoding="latin1",
|
||||
)
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": f"Basic {auth}",
|
||||
}
|
||||
req = request.Request(url, headers=headers, data=bytes(license, "latin1"))
|
||||
resp = request.urlopen(req, context=sslctx)
|
||||
|
||||
if resp.status < 300:
|
||||
print("Success")
|
||||
else:
|
||||
print("Failed")
|
||||
sys.exit(-1)
|
@ -75,6 +75,15 @@
|
||||
<ul>
|
||||
<li><a href="libfwupdplugin/ds20.html">Documentation</a></li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1>Supermicro BMC license issue</h1>
|
||||
<div class="description">
|
||||
<p>Fixing the missing license issue when updating Supermicro boards</p>
|
||||
</div>
|
||||
</header>
|
||||
<ul>
|
||||
<li><a href="libfwupdplugin/supermicro-license.html">Issue</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
20
docs/supermicro-license.md
Normal file
20
docs/supermicro-license.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Supermicro BMC License
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
While all newer (some X10, all X11 and H12 series) mainboard for Supermicro
|
||||
support Redfish some features are only available after buying them as
|
||||
additional feature. One of those are applying BIOS and BMC firmware updates.
|
||||
|
||||
## Details
|
||||
|
||||
If you want to update your Supermicro board via redfish using fwupd you will
|
||||
need either the [SFT-OOB-LIC](https://store.supermicro.com/out-of-band-sft-oob-lic.html) or the [SFT-DCMS-Single](https://store.supermicro.com/supermicro-server-manager-dcms-license-key-sft-dcms-single.html) license.
|
||||
|
||||
The license can be installed via redfish by POSTing it to
|
||||
`/redfish/v1/Managers/1/LicenseManager/ActivateLicense`, using the web
|
||||
interface or using the `contrib/upload-smc-license.py` If the license is not
|
||||
installed fwupd will add the FWUPD_DEVICE_PROBLEM_MISSING_LICENSE flag to the
|
||||
device.
|
Loading…
Reference in New Issue
Block a user