blob: c064394c63e02fea52830cc64c612a312120e703 [file] [log] [blame]
Patrick Williams0fdaf0b2023-08-06 18:49:47 -05001FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Vijay Khemkad2a6c6a2019-07-01 15:36:57 -07002
Patrick Williams5500d052023-08-05 09:21:19 -05003IPMB_CHANNELS ?= ""
4
5python do_ipmb_channels() {
6 import json
7 channels = []
8
9 for channel in d.getVar('IPMB_CHANNELS').split():
10 channels.append({
11 "type": "ipmb",
12 "slave-path": channel,
13 "bmc-addr": 32,
14 "remote-addr": 64,
15 "devIndex": len(channels)
16 })
17
18 data = { "channels" : channels }
19
20 path = os.path.join(d.getVar('D') + d.getVar('datadir'),
21 'ipmbbridge', 'ipmb-channels.json')
22
23 with open(path, 'w') as f:
24 json.dump(data, f, indent=4)
25}
26do_ipmb_channels[vardeps] += "IPMB_CHANNELS"
27addtask ipmb_channels after do_install before do_package
Vijay Khemkad2a6c6a2019-07-01 15:36:57 -070028
Patrick Williams6f746642021-08-06 07:40:55 -050029do_install:append() {
Patrick Williams5500d052023-08-05 09:21:19 -050030 install -d ${D}${datadir}/ipmbbridge
Vijay Khemkad2a6c6a2019-07-01 15:36:57 -070031}