diff options
| author | Christian Kohn <chris.kohn@amd.com> | 2022-11-29 16:27:08 -0800 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2022-11-30 12:54:28 -0600 |
| commit | 709bdb6889dfc638513d9a366cf76a2b1b667be8 (patch) | |
| tree | 8903bb8c405d2b6c6454b9abf1cf0c93c50fbde6 | |
| parent | 529b354b477dd6546825371f9a176147b061a594 (diff) | |
| download | meta-xilinx-709bdb6889dfc638513d9a366cf76a2b1b667be8.tar.gz | |
freeipmi: Add new recipe
The freeipmi project provides a utility named ipmi-fru which allows reading and
interpreting FRU data based that can be read from a binary file or EEPROM.
The patches add additional functionality to interpret the Xilinx OEM records and
format them properly when printing the output. They're cherry-picked from
upstream:
http://git.savannah.gnu.org/cgit/freeipmi.git/commit/?h=freeipmi-1-6-0-stable&id=181e279da345315efa06f593edaf0f04af614da5
http://git.savannah.gnu.org/cgit/freeipmi.git/commit/?h=freeipmi-1-6-0-stable&id=c578c999b7d9aabbd6e54b0310a609b8f96ae962
Signed-off-by: Christian Kohn <chris.kohn@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
3 files changed, 455 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch b/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch new file mode 100644 index 00000000..c7d4aefd --- /dev/null +++ b/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch | |||
| @@ -0,0 +1,370 @@ | |||
| 1 | From 1128691f6e2709b44eccafb0b303b07da55a814e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Christian Kohn <chris.kohn@amd.com> | ||
| 3 | Date: Mon, 17 Oct 2022 19:28:22 -0700 | ||
| 4 | Subject: [PATCH] Add initial support for Xilinx OEM FRU records | ||
| 5 | |||
| 6 | The supported Xilinx OEM FRU records are MAC_ID and FREE_FORM. This FRU OEM | ||
| 7 | extension parses these records and prints them with proper formatting. | ||
| 8 | |||
| 9 | To use this feature, run the ipmi-fru command as follows: | ||
| 10 | $ sudo ./ipmi-fru --fru-file=/sys/devices/platform/axi/ff030000.i2c/i2c-1/1-0051/eeprom \ | ||
| 11 | --interpret-oem-data | ||
| 12 | |||
| 13 | Note: The EEPROM address can vary between different platforms. This is just an | ||
| 14 | example. | ||
| 15 | |||
| 16 | This feature has been tested with the Xilinx Kria KV260 and KR260 Starter Kits. | ||
| 17 | |||
| 18 | Signed-off-by: Christian Kohn <chris.kohn@amd.com> | ||
| 19 | --- | ||
| 20 | ipmi-fru/Makefile.am | 2 + | ||
| 21 | ipmi-fru/ipmi-fru-oem-xilinx.c | 171 ++++++++++++++++++ | ||
| 22 | ipmi-fru/ipmi-fru-oem-xilinx.h | 33 ++++ | ||
| 23 | ipmi-fru/ipmi-fru-output.c | 14 ++ | ||
| 24 | libfreeipmi/include/freeipmi/freeipmi.h.in | 1 + | ||
| 25 | .../oem/ipmi-fru-xilinx-oem-record-format.h | 45 +++++ | ||
| 26 | .../spec/ipmi-iana-enterprise-numbers-spec.h | 1 + | ||
| 27 | 7 files changed, 267 insertions(+) | ||
| 28 | create mode 100644 ipmi-fru/ipmi-fru-oem-xilinx.c | ||
| 29 | create mode 100644 ipmi-fru/ipmi-fru-oem-xilinx.h | ||
| 30 | create mode 100644 libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h | ||
| 31 | |||
| 32 | diff --git a/ipmi-fru/Makefile.am b/ipmi-fru/Makefile.am | ||
| 33 | index c92ba0e8c..c8545eede 100644 | ||
| 34 | --- a/ipmi-fru/Makefile.am | ||
| 35 | +++ b/ipmi-fru/Makefile.am | ||
| 36 | @@ -25,6 +25,8 @@ ipmi_fru_SOURCES = \ | ||
| 37 | ipmi-fru-argp.h \ | ||
| 38 | ipmi-fru-oem-wistron.c \ | ||
| 39 | ipmi-fru-oem-wistron.h \ | ||
| 40 | + ipmi-fru-oem-xilinx.c \ | ||
| 41 | + ipmi-fru-oem-xilinx.h \ | ||
| 42 | ipmi-fru-output.c \ | ||
| 43 | ipmi-fru-output.h | ||
| 44 | |||
| 45 | diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.c b/ipmi-fru/ipmi-fru-oem-xilinx.c | ||
| 46 | new file mode 100644 | ||
| 47 | index 000000000..87bb18f00 | ||
| 48 | --- /dev/null | ||
| 49 | +++ b/ipmi-fru/ipmi-fru-oem-xilinx.c | ||
| 50 | @@ -0,0 +1,171 @@ | ||
| 51 | +/* | ||
| 52 | + * Copyright (C) 2022, Advanced Micro Devices, Inc. | ||
| 53 | + * | ||
| 54 | + * This program is free software: you can redistribute it and/or modify | ||
| 55 | + * it under the terms of the GNU General Public License as published by | ||
| 56 | + * the Free Software Foundation, either version 3 of the License, or | ||
| 57 | + * (at your option) any later version. | ||
| 58 | + * | ||
| 59 | + * This program is distributed in the hope that it will be useful, | ||
| 60 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 61 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 62 | + * GNU General Public License for more details. | ||
| 63 | + * | ||
| 64 | + * You should have received a copy of the GNU General Public License | ||
| 65 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 66 | + * | ||
| 67 | + */ | ||
| 68 | + | ||
| 69 | +#if HAVE_CONFIG_H | ||
| 70 | +#include "config.h" | ||
| 71 | +#endif /* HAVE_CONFIG_H */ | ||
| 72 | + | ||
| 73 | +#include <stdio.h> | ||
| 74 | +#include <stdlib.h> | ||
| 75 | +#if STDC_HEADERS | ||
| 76 | +#include <string.h> | ||
| 77 | +#endif /* STDC_HEADERS */ | ||
| 78 | +#include <assert.h> | ||
| 79 | + | ||
| 80 | +#include <freeipmi/freeipmi.h> | ||
| 81 | + | ||
| 82 | +#include "ipmi-fru_.h" | ||
| 83 | +#include "ipmi-fru-oem-xilinx.h" | ||
| 84 | + | ||
| 85 | +#include "freeipmi-portability.h" | ||
| 86 | + | ||
| 87 | +static char * | ||
| 88 | +_version_str (uint8_t version) | ||
| 89 | +{ | ||
| 90 | + switch (version) | ||
| 91 | + { | ||
| 92 | + case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_BOARD: | ||
| 93 | + return "Board"; | ||
| 94 | + case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_SYSCTL: | ||
| 95 | + return "System Controller"; | ||
| 96 | + case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_MODULE: | ||
| 97 | + return "Module"; | ||
| 98 | + case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_MAC: | ||
| 99 | + return "DUT - MAC"; | ||
| 100 | + case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT: | ||
| 101 | + return "DUT - EtherCAT"; | ||
| 102 | + default: | ||
| 103 | + return ""; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + return (NULL); /* NOT REACHED */ | ||
| 107 | +} | ||
| 108 | + | ||
| 109 | +int | ||
| 110 | +ipmi_fru_oem_xilinx_oem_record (ipmi_fru_state_data_t *state_data, | ||
| 111 | + uint8_t record_type_id, | ||
| 112 | + uint32_t manufacturer_id, | ||
| 113 | + uint8_t *oem_data, | ||
| 114 | + unsigned int oem_data_len) | ||
| 115 | +{ | ||
| 116 | + assert (state_data); | ||
| 117 | + assert (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_XILINX); | ||
| 118 | + assert (oem_data); | ||
| 119 | + | ||
| 120 | + /* The MAC_ID record type ID is 0xD2. The MAC ID record consists of a 1 byte | ||
| 121 | + * version ID followed by one or more 6-byte MAC addresses. If the MAC ID | ||
| 122 | + * version is set to "DUT - EtherCAT", a 4-byte EtherCAT ID is used instead of | ||
| 123 | + * a 6-byte MAC address. | ||
| 124 | + */ | ||
| 125 | + if (record_type_id == IPMI_FRU_OEM_XILINX_MAC_ID && oem_data_len) | ||
| 126 | + { | ||
| 127 | + uint8_t version = oem_data[0]; | ||
| 128 | + unsigned int len = oem_data_len - 1; | ||
| 129 | + | ||
| 130 | + pstdout_printf (state_data->pstate, | ||
| 131 | + " FRU OEM MAC Version: %s (%xh)\n", | ||
| 132 | + _version_str(version), | ||
| 133 | + version); | ||
| 134 | + | ||
| 135 | + /* The MAC_ID record can hold multiple MAC addresses that are 6 bytes long | ||
| 136 | + * each if version is set to 0x31. | ||
| 137 | + */ | ||
| 138 | + if ((version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_BOARD || | ||
| 139 | + version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_SYSCTL || | ||
| 140 | + version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_MODULE || | ||
| 141 | + version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_MAC ) && | ||
| 142 | + (len % 6) == 0) | ||
| 143 | + { | ||
| 144 | + unsigned int i, j, start, stop; | ||
| 145 | + unsigned int mac_cnt = len / 6; | ||
| 146 | + | ||
| 147 | + for (j = 0; j < mac_cnt; j++) | ||
| 148 | + { | ||
| 149 | + pstdout_printf (state_data->pstate, " FRU OEM MAC ID %d: ", j); | ||
| 150 | + | ||
| 151 | + start = j*6 + 1; | ||
| 152 | + stop = start + 5; | ||
| 153 | + | ||
| 154 | + for (i = start; i < stop; i++) | ||
| 155 | + { | ||
| 156 | + pstdout_printf (state_data->pstate, "%02x:", oem_data[i]); | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + pstdout_printf (state_data->pstate, "%02x\n", oem_data[i]); | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + return (1); | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + /* The MAC_ID record holds one EtherCAT ID that is 4 bytes long if version | ||
| 166 | + * is set to 0x32. The assigned EtherCAT ID for Xilinx is 0x0000056F. | ||
| 167 | + */ | ||
| 168 | + if (version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT && | ||
| 169 | + len == 4) | ||
| 170 | + { | ||
| 171 | + pstdout_printf (state_data->pstate, " FRU OEM EtherCAT ID: 0x"); | ||
| 172 | + | ||
| 173 | + for (unsigned int i = 1; i < len+1; i++) | ||
| 174 | + { | ||
| 175 | + pstdout_printf (state_data->pstate, "%02X", oem_data[i]); | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + pstdout_printf (state_data->pstate, "\n"); | ||
| 179 | + | ||
| 180 | + return (1); | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + /* The free form data record type ID is 0xD3. It consists of one or more | ||
| 185 | + * fields where each field is split into N byte identifier and M byte data | ||
| 186 | + * followed by a 0x00 end of field delimiter. The below code parses the free | ||
| 187 | + * form record and prints each field on a new line prefixed with 'FRU OEM '. | ||
| 188 | + */ | ||
| 189 | + if (record_type_id == IPMI_FRU_OEM_XILINX_FREE_FORM && oem_data_len) | ||
| 190 | + { | ||
| 191 | + unsigned int i; | ||
| 192 | + unsigned int new_field = 1; | ||
| 193 | + | ||
| 194 | + for (i = 0; i < oem_data_len; i++) | ||
| 195 | + { | ||
| 196 | + /* 0x00 marks the end of the field */ | ||
| 197 | + if (oem_data[i] == 0) | ||
| 198 | + { | ||
| 199 | + if (new_field == 0) | ||
| 200 | + { | ||
| 201 | + pstdout_printf (state_data->pstate, "\n"); | ||
| 202 | + } | ||
| 203 | + new_field = 1; | ||
| 204 | + continue; | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + /* Start of a new field */ | ||
| 208 | + if (new_field == 1) | ||
| 209 | + { | ||
| 210 | + new_field = 0; | ||
| 211 | + pstdout_printf (state_data->pstate, " FRU OEM "); | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + pstdout_printf (state_data->pstate, "%c", oem_data[i]); | ||
| 215 | + } | ||
| 216 | + | ||
| 217 | + return (1); | ||
| 218 | + } | ||
| 219 | + | ||
| 220 | + return (0); | ||
| 221 | +} | ||
| 222 | diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.h b/ipmi-fru/ipmi-fru-oem-xilinx.h | ||
| 223 | new file mode 100644 | ||
| 224 | index 000000000..2484cd515 | ||
| 225 | --- /dev/null | ||
| 226 | +++ b/ipmi-fru/ipmi-fru-oem-xilinx.h | ||
| 227 | @@ -0,0 +1,33 @@ | ||
| 228 | +/* | ||
| 229 | + * Copyright (C) 2022, Advanced Micro Devices, Inc. | ||
| 230 | + * | ||
| 231 | + * This program is free software: you can redistribute it and/or modify | ||
| 232 | + * it under the terms of the GNU General Public License as published by | ||
| 233 | + * the Free Software Foundation, either version 3 of the License, or | ||
| 234 | + * (at your option) any later version. | ||
| 235 | + * | ||
| 236 | + * This program is distributed in the hope that it will be useful, | ||
| 237 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 238 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 239 | + * GNU General Public License for more details. | ||
| 240 | + * | ||
| 241 | + * You should have received a copy of the GNU General Public License | ||
| 242 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 243 | + * | ||
| 244 | + */ | ||
| 245 | + | ||
| 246 | +#ifndef IPMI_FRU_OEM_XILINX_H | ||
| 247 | +#define IPMI_FRU_OEM_XILINX_H | ||
| 248 | + | ||
| 249 | +#include <freeipmi/freeipmi.h> | ||
| 250 | + | ||
| 251 | +#include "ipmi-fru_.h" | ||
| 252 | + | ||
| 253 | +/* Returns 1 on interpretation, 0 if not, -1 on error */ | ||
| 254 | +int ipmi_fru_oem_xilinx_oem_record (ipmi_fru_state_data_t *state_data, | ||
| 255 | + uint8_t record_type_id, | ||
| 256 | + uint32_t manufacturer_id, | ||
| 257 | + uint8_t *oem_data, | ||
| 258 | + unsigned int oem_data_len); | ||
| 259 | + | ||
| 260 | +#endif /* IPMI_FRU_OEM_XILINX_H */ | ||
| 261 | diff --git a/ipmi-fru/ipmi-fru-output.c b/ipmi-fru/ipmi-fru-output.c | ||
| 262 | index 845971018..d29c4470e 100644 | ||
| 263 | --- a/ipmi-fru/ipmi-fru-output.c | ||
| 264 | +++ b/ipmi-fru/ipmi-fru-output.c | ||
| 265 | @@ -51,6 +51,7 @@ | ||
| 266 | #include "ipmi-fru_.h" | ||
| 267 | #include "ipmi-fru-output.h" | ||
| 268 | #include "ipmi-fru-oem-wistron.h" | ||
| 269 | +#include "ipmi-fru-oem-xilinx.h" | ||
| 270 | #include "tool-util-common.h" | ||
| 271 | |||
| 272 | #include "freeipmi-portability.h" | ||
| 273 | @@ -1201,6 +1202,19 @@ ipmi_fru_output_oem_record (ipmi_fru_state_data_t *state_data, | ||
| 274 | if (ret) | ||
| 275 | return (0); | ||
| 276 | } | ||
| 277 | + | ||
| 278 | + if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_XILINX) | ||
| 279 | + { | ||
| 280 | + if ((ret = ipmi_fru_oem_xilinx_oem_record (state_data, | ||
| 281 | + record_type_id, | ||
| 282 | + manufacturer_id, | ||
| 283 | + oem_data, | ||
| 284 | + oem_data_len)) < 0) | ||
| 285 | + return (-1); | ||
| 286 | + | ||
| 287 | + if (ret) | ||
| 288 | + return (0); | ||
| 289 | + } | ||
| 290 | } | ||
| 291 | |||
| 292 | if (oem_data_len) | ||
| 293 | diff --git a/libfreeipmi/include/freeipmi/freeipmi.h.in b/libfreeipmi/include/freeipmi/freeipmi.h.in | ||
| 294 | index a03178e97..fbd6749e9 100644 | ||
| 295 | --- a/libfreeipmi/include/freeipmi/freeipmi.h.in | ||
| 296 | +++ b/libfreeipmi/include/freeipmi/freeipmi.h.in | ||
| 297 | @@ -82,6 +82,7 @@ extern "C" { | ||
| 298 | #include <freeipmi/record-format/ipmi-sdr-record-format.h> | ||
| 299 | #include <freeipmi/record-format/ipmi-sel-record-format.h> | ||
| 300 | #include <freeipmi/record-format/oem/ipmi-fru-wistron-oem-record-format.h> | ||
| 301 | +#include <freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h> | ||
| 302 | #include <freeipmi/record-format/oem/ipmi-sdr-oem-intel-node-manager-record-format.h> | ||
| 303 | #include <freeipmi/record-format/oem/ipmi-sdr-oem-intel-record-format.h> | ||
| 304 | #include <freeipmi/record-format/oem/ipmi-sel-oem-intel-record-format.h> | ||
| 305 | diff --git a/libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h b/libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h | ||
| 306 | new file mode 100644 | ||
| 307 | index 000000000..434e2031a | ||
| 308 | --- /dev/null | ||
| 309 | +++ b/libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h | ||
| 310 | @@ -0,0 +1,45 @@ | ||
| 311 | +/* | ||
| 312 | + * Copyright (C) 2022, Advanced Micro Devices, Inc. | ||
| 313 | + * | ||
| 314 | + * This program is free software: you can redistribute it and/or modify | ||
| 315 | + * it under the terms of the GNU General Public License as published by | ||
| 316 | + * the Free Software Foundation, either version 3 of the License, or | ||
| 317 | + * (at your option) any later version. | ||
| 318 | + * | ||
| 319 | + * This program is distributed in the hope that it will be useful, | ||
| 320 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 321 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 322 | + * GNU General Public License for more details. | ||
| 323 | + * | ||
| 324 | + * You should have received a copy of the GNU General Public License | ||
| 325 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 326 | + * | ||
| 327 | + */ | ||
| 328 | + | ||
| 329 | +#ifndef IPMI_FRU_OEM_XILINX_RECORD_FORMAT_H | ||
| 330 | +#define IPMI_FRU_OEM_XILINX_RECORD_FORMAT_H | ||
| 331 | + | ||
| 332 | +#ifdef __cplusplus | ||
| 333 | +extern "C" { | ||
| 334 | +#endif | ||
| 335 | + | ||
| 336 | +#include <freeipmi/fiid/fiid.h> | ||
| 337 | + | ||
| 338 | +/* OEM multi-record IDs used by Xilinx */ | ||
| 339 | +#define IPMI_FRU_OEM_XILINX_THERMAL 0xD0 | ||
| 340 | +#define IPMI_FRU_OEM_XILINX_POWER 0xD1 | ||
| 341 | +#define IPMI_FRU_OEM_XILINX_MAC_ID 0xD2 | ||
| 342 | +#define IPMI_FRU_OEM_XILINX_FREE_FORM 0xD3 | ||
| 343 | + | ||
| 344 | +/* OEM MAC ID versions used by Xilinx */ | ||
| 345 | +#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_BOARD 0x01 | ||
| 346 | +#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_SYSCTL 0x11 | ||
| 347 | +#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_MODULE 0x21 | ||
| 348 | +#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_MAC 0x31 | ||
| 349 | +#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT 0x32 | ||
| 350 | + | ||
| 351 | +#ifdef __cplusplus | ||
| 352 | +} | ||
| 353 | +#endif | ||
| 354 | + | ||
| 355 | +#endif /* IPMI_FRU_OEM_XILINX_RECORD_FORMAT_H */ | ||
| 356 | diff --git a/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h b/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h | ||
| 357 | index d286f33a4..4c24b5259 100644 | ||
| 358 | --- a/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h | ||
| 359 | +++ b/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h | ||
| 360 | @@ -29,6 +29,7 @@ extern "C" { | ||
| 361 | #define IPMI_IANA_ENTERPRISE_ID_SUN_MICROSYSTEMS 42 | ||
| 362 | #define IPMI_IANA_ENTERPRISE_ID_INTEL 343 | ||
| 363 | #define IPMI_IANA_ENTERPRISE_ID_DELL 674 | ||
| 364 | +#define IPMI_IANA_ENTERPRISE_ID_XILINX 4314 | ||
| 365 | #define IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES 5593 | ||
| 366 | #define IPMI_IANA_ENTERPRISE_ID_QUANTA 7244 | ||
| 367 | #define IPMI_IANA_ENTERPRISE_ID_FUJITSU 10368 | ||
| 368 | -- | ||
| 369 | 2.17.1 | ||
| 370 | |||
diff --git a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch b/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch new file mode 100644 index 00000000..c0f36405 --- /dev/null +++ b/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From c578c999b7d9aabbd6e54b0310a609b8f96ae962 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Albert Chu <chu11@llnl.gov> | ||
| 3 | Date: Tue, 8 Nov 2022 16:33:39 -0800 | ||
| 4 | Subject: [PATCH] ipmi-fru: fix compilation for non C99 compilation | ||
| 5 | |||
| 6 | --- | ||
| 7 | ipmi-fru/ipmi-fru-oem-xilinx.c | 4 +++- | ||
| 8 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 9 | |||
| 10 | diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.c b/ipmi-fru/ipmi-fru-oem-xilinx.c | ||
| 11 | index 87bb18f00..937aa7614 100644 | ||
| 12 | --- a/ipmi-fru/ipmi-fru-oem-xilinx.c | ||
| 13 | +++ b/ipmi-fru/ipmi-fru-oem-xilinx.c | ||
| 14 | @@ -118,9 +118,11 @@ ipmi_fru_oem_xilinx_oem_record (ipmi_fru_state_data_t *state_data, | ||
| 15 | if (version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT && | ||
| 16 | len == 4) | ||
| 17 | { | ||
| 18 | + unsigned int i; | ||
| 19 | + | ||
| 20 | pstdout_printf (state_data->pstate, " FRU OEM EtherCAT ID: 0x"); | ||
| 21 | |||
| 22 | - for (unsigned int i = 1; i < len+1; i++) | ||
| 23 | + for (i = 1; i < len+1; i++) | ||
| 24 | { | ||
| 25 | pstdout_printf (state_data->pstate, "%02X", oem_data[i]); | ||
| 26 | } | ||
| 27 | -- | ||
| 28 | 2.17.1 | ||
| 29 | |||
diff --git a/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb b/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb new file mode 100644 index 00000000..a9d60465 --- /dev/null +++ b/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | SUMMARY = "Tools and libraries for IPMI" | ||
| 2 | DESCRIPTION = " \ | ||
| 3 | FreeIPMI provides in-band and out-of-band IPMI software based on the IPMI \ | ||
| 4 | v1.5/2.0 specification. The IPMI specification defines a set of interfaces \ | ||
| 5 | for platform management and is implemented by a number vendors for system \ | ||
| 6 | management. The features of IPMI that most users will be interested in are \ | ||
| 7 | sensor monitoring, system event monitoring, power control, and \ | ||
| 8 | serial-over-LAN (SOL). The FreeIPMI tools and libraries listed below should \ | ||
| 9 | provide users with the ability to access and utilize these and many other \ | ||
| 10 | features. A number of useful features for large HPC or cluster environments \ | ||
| 11 | have also been implemented into FreeIPMI. \ | ||
| 12 | " | ||
| 13 | HOMEPAGE = "https://www.gnu.org/software/freeipmi/" | ||
| 14 | |||
| 15 | LICENSE = "GPL-3.0-only & BSD-3-Clause" | ||
| 16 | LIC_FILES_CHKSUM = " \ | ||
| 17 | file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 18 | file://COPYING.ZRESEARCH;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 19 | file://COPYING.bmc-watchdog;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 20 | file://COPYING.ipmi-dcmi;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 21 | file://COPYING.ipmi-fru;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 22 | file://COPYING.ipmiconsole;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 23 | file://COPYING.ipmidetect;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 24 | file://COPYING.ipmimonitoring;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 25 | file://COPYING.ipmipower;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 26 | file://COPYING.ipmiseld;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 27 | file://COPYING.pstdout;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 28 | file://COPYING.sunbmc;md5=c03f21cd76ff5caba6b890d1213cbfbb \ | ||
| 29 | " | ||
| 30 | |||
| 31 | BRANCH ?= "freeipmi-1-6-0-stable" | ||
| 32 | SRC_URI = " \ | ||
| 33 | git://git.savannah.gnu.org/freeipmi.git;iprotocol=https;branch=${BRANCH} \ | ||
| 34 | file://0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch \ | ||
| 35 | file://0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch \ | ||
| 36 | " | ||
| 37 | SRCREV ?= "1f7eea294c2967802019100b07cf1e44b3160a2b" | ||
| 38 | |||
| 39 | S = "${WORKDIR}/git" | ||
| 40 | |||
| 41 | inherit autotools-brokensep pkgconfig systemd | ||
| 42 | |||
| 43 | PACKAGECONFIG ??= "" | ||
| 44 | PACKAGECONFIG[libgcrypt] = "--with-encryption,--without-encryption,libgcrypt," | ||
| 45 | |||
| 46 | EXTRA_OECONF = " \ | ||
| 47 | --without-random-device \ | ||
| 48 | --with-systemdsystemunitdir=${systemd_system_unitdir} \ | ||
| 49 | " | ||
| 50 | |||
| 51 | SYSTEMD_SERVICE:${PN} = " \ | ||
| 52 | bmc-watchdog.service \ | ||
| 53 | ipmidetectd.service \ | ||
| 54 | ipmiseld.service \ | ||
| 55 | " | ||
| 56 | SYSTEMD_AUTO_ENABLE = "disable" | ||
