Patrick Williams | 0fdaf0b | 2023-08-06 18:49:47 -0500 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Vijay Khemka | d2a6c6a | 2019-07-01 15:36:57 -0700 | [diff] [blame] | 2 | |
Patrick Williams | 5500d05 | 2023-08-05 09:21:19 -0500 | [diff] [blame] | 3 | IPMB_CHANNELS ?= "" |
| 4 | |
| 5 | python 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 | } |
| 26 | do_ipmb_channels[vardeps] += "IPMB_CHANNELS" |
| 27 | addtask ipmb_channels after do_install before do_package |
Vijay Khemka | d2a6c6a | 2019-07-01 15:36:57 -0700 | [diff] [blame] | 28 | |
Patrick Williams | 6f74664 | 2021-08-06 07:40:55 -0500 | [diff] [blame] | 29 | do_install:append() { |
Patrick Williams | 5500d05 | 2023-08-05 09:21:19 -0500 | [diff] [blame] | 30 | install -d ${D}${datadir}/ipmbbridge |
Vijay Khemka | d2a6c6a | 2019-07-01 15:36:57 -0700 | [diff] [blame] | 31 | } |