Skip to content

Commit b88c933

Browse files
committed
Put program to the OS folder
Signed-off-by: Konstantin Aladyshev <[email protected]>
1 parent c63fb89 commit b88c933

File tree

3 files changed

+99
-90
lines changed

3 files changed

+99
-90
lines changed

OS/README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Description
2+
3+
This program performs a transfer of SMBIOS tables from Host to BMC over IPMI BLOB protocol.
4+
5+
# Usage
6+
7+
Install the latest meson:
8+
```
9+
$ pip3 install --user meson
10+
$ source ~/.profile
11+
```
12+
Build [ipmi-blob-tool](https://github.com/openbmc/ipmi-blob-tool) library:
13+
```
14+
$ cd ~
15+
$ git clone https://github.com/openbmc/ipmi-blob-tool.git
16+
$ cd ipmi-blob-tool
17+
$ meson setup builddir
18+
$ cd builddir
19+
$ meson compile
20+
```
21+
Build and run `smbios_blob_transfer`:
22+
```
23+
$ cd ~
24+
$ git clone https://github.com/Kostr/smbios_blob_transfer.git
25+
$ cd smbios_blob_transfer
26+
$ g++ smbios_blob_transfer.cpp -L~/ipmi-blob-tool/builddir/src/ -lipmiblob -I~/ipmi-blob-tool/src/ -o smbios_blob_transfer
27+
$ sudo LD_LIBRARY_PATH=~/ipmi-blob-tool/builddir/src/ ./smbios_blob_transfer
28+
```
29+
After the program execution this file should be created on the BMC:
30+
```
31+
/var/lib/smbios/smbios2
32+
```
33+
34+
If you don't want to pass all the parameters for dynamic library linking, you can install `ipmi-blob-tool` to your system.
35+
36+
37+
# `smbios_transfer.go`
38+
39+
This program was written as an alternative to Go utility [smbios_transfer.go](https://github.com/u-root/u-root/blob/main/cmds/exp/smbios_transfer/smbios_transfer.go).
40+
41+
If you want to, you can use it instead.
42+
```
43+
$ git clone https://github.com/u-root/u-root.git
44+
$ cd u-root/cmds/exp/smbios_transfer/
45+
$ sudo go run smbios_transfer.go
46+
```
47+
48+
If you don't have `go`, you'll need to install it. If you can't use package manager you can find all the downloads at the [https://go.dev/dl/](https://go.dev/dl/):
49+
```
50+
$ cd ~
51+
$ wget https://go.dev/dl/go1.19.2.linux-amd64.tar.gz
52+
$ sudo tar -xvf go1.19.2.linux-amd64.tar.gz
53+
$ sudo mv go /usr/local
54+
```
55+
56+
Add this to your `~/.profile`:
57+
```
58+
export GOPATH=$HOME/go
59+
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
60+
```
61+
62+
Now check that `go` is working:
63+
```
64+
source ~/.profile
65+
$ go version
66+
go version go1.19.2 linux/amd64
67+
```
68+
69+
Access to smbios table files is not available for ordinary user, so you'll need to execute go program from root:
70+
```
71+
$ sudo -s
72+
```
73+
Therefore you need to midify `~/.profile` for the root user as well:
74+
```
75+
export GOPATH=$HOME/go
76+
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
77+
```
78+
Check that `go` is working for root:
79+
```
80+
$ source ~/.profile
81+
$ go version
82+
go version go1.19.2 linux/amd64
83+
```
84+
85+
Now run the `smbios_transfer.go` program:
86+
```
87+
$ cd ~/u-root/cmds/exp/smbios_transfer/
88+
$ go run smbios_transfer.go
89+
```
90+
Alternatively you can build the executable and run it without `go`:
91+
```
92+
$ go build smbios_transfer.go
93+
$ ./smbios_transfer
94+
```
95+
File renamed without changes.

README.md

Lines changed: 4 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,10 @@
11
# Description
22

3-
This program performs a transfer of SMBIOS tables from Host to BMC over IPMI BLOB protocol.
3+
This repo contains utilities to transfer SMBIOS tables from Host to BMC over IPMI BLOB protocol.
44

5-
# Usage
6-
7-
Install the latest meson:
8-
```
9-
$ pip3 install --user meson
10-
$ source ~/.profile
11-
```
12-
Build [ipmi-blob-tool](https://github.com/openbmc/ipmi-blob-tool) library:
13-
```
14-
$ cd ~
15-
$ git clone https://github.com/openbmc/ipmi-blob-tool.git
16-
$ cd ipmi-blob-tool
17-
$ meson setup builddir
18-
$ cd builddir
19-
$ meson compile
20-
```
21-
Build and run `smbios_blob_transfer`:
22-
```
23-
$ cd ~
24-
$ git clone https://github.com/Kostr/smbios_blob_transfer.git
25-
$ cd smbios_blob_transfer
26-
$ g++ smbios_blob_transfer.cpp -L~/ipmi-blob-tool/builddir/src/ -lipmiblob -I~/ipmi-blob-tool/src/ -o smbios_blob_transfer
27-
$ sudo LD_LIBRARY_PATH=~/ipmi-blob-tool/builddir/src/ ./smbios_blob_transfer
28-
```
29-
After the program execution this file should be created on the BMC:
30-
```
31-
/var/lib/smbios/smbios2
32-
```
33-
34-
If you don't want to pass all the parameters for dynamic library linking, you can install `ipmi-blob-tool` to your system.
5+
Two implementations are available:
6+
- [transfer SMBIOS tables from the UEFI firmware (`DXE_DRIVER`)](UEFI)
7+
- [transfer SMBIOS tables from the OS](OS)
358

369
# BMC requirements
3710

@@ -101,62 +74,3 @@ And here is an example of DIMM information display:
10174

10275
If you want to display PCI devices as well, you should probably check the IBM fork of [webui-vue](https://github.com/ibm-openbmc/webui-vue).
10376

104-
# `smbios_transfer.go`
105-
106-
This program was written as an alternative to Go utility [smbios_transfer.go](https://github.com/u-root/u-root/blob/main/cmds/exp/smbios_transfer/smbios_transfer.go).
107-
108-
If you want to, you can use it instead.
109-
```
110-
$ git clone https://github.com/u-root/u-root.git
111-
$ cd u-root/cmds/exp/smbios_transfer/
112-
$ sudo go run smbios_transfer.go
113-
```
114-
115-
If you don't have `go`, you'll need to install it. If you can't use package manager you can find all the downloads at the [https://go.dev/dl/](https://go.dev/dl/):
116-
```
117-
$ cd ~
118-
$ wget https://go.dev/dl/go1.19.2.linux-amd64.tar.gz
119-
$ sudo tar -xvf go1.19.2.linux-amd64.tar.gz
120-
$ sudo mv go /usr/local
121-
```
122-
123-
Add this to your `~/.profile`:
124-
```
125-
export GOPATH=$HOME/go
126-
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
127-
```
128-
129-
Now check that `go` is working:
130-
```
131-
source ~/.profile
132-
$ go version
133-
go version go1.19.2 linux/amd64
134-
```
135-
136-
Access to smbios table files is not available for ordinary user, so you'll need to execute go program from root:
137-
```
138-
$ sudo -s
139-
```
140-
Therefore you need to midify `~/.profile` for the root user as well:
141-
```
142-
export GOPATH=$HOME/go
143-
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
144-
```
145-
Check that `go` is working for root:
146-
```
147-
$ source ~/.profile
148-
$ go version
149-
go version go1.19.2 linux/amd64
150-
```
151-
152-
Now run the `smbios_transfer.go` program:
153-
```
154-
$ cd ~/u-root/cmds/exp/smbios_transfer/
155-
$ go run smbios_transfer.go
156-
```
157-
Alternatively you can build the executable and run it without `go`:
158-
```
159-
$ go build smbios_transfer.go
160-
$ ./smbios_transfer
161-
```
162-

0 commit comments

Comments
 (0)