Skip to content

Commit

Permalink
Merge branch 'helium' into helium
Browse files Browse the repository at this point in the history
  • Loading branch information
williamspatrick authored Mar 27, 2024
2 parents 78a2c7f + 629c1e6 commit 4fee821
Show file tree
Hide file tree
Showing 698 changed files with 28,264 additions and 7,693 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,12 @@ workflows:
greatlakes,
inspirationpoint,
halfdome,
janga,
# lightning, Rocko
tahan,
meru,
minipack,
morgan800cc,
northdome,
qemux86,
# wedge, Rocko
Expand Down
132 changes: 132 additions & 0 deletions .jfconfig
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,39 @@
"openbmc_git"
]
},
{
"alias": "openbmc-cit-harma-determinator",
"args": {
"name": "openbmc-cit-harma-determinator",
"oncall": "openbmc",
"steps": [
{
"determinator": true,
"name": "openbmc-cit-harma-determinator",
"shell": "facebook/sandcastle/job.py cit-diff --platform harma"
}
]
},
"capabilities": {
"tenant": "openbmc",
"type": "lego",
"vcs": "openbmc-git"
},
"command": "SandcastleUniversalCommand",
"description": "Yocto diff listener",
"jellyfish_conditions": [
{
"type": "some_file_matches_some_regexp",
"value": [
"^meta-facebook/meta-harma/.*"
]
}
],
"scheduleType": "diff",
"tags": [
"openbmc_git"
]
},
{
"alias": "openbmc-cit-inspirationpoint-determinator",
"args": {
Expand Down Expand Up @@ -897,6 +930,39 @@
"openbmc_git"
]
},
{
"alias": "openbmc-cit-minerva-determinator",
"args": {
"name": "openbmc-cit-minerva-determinator",
"oncall": "openbmc",
"steps": [
{
"determinator": true,
"name": "openbmc-cit-minerva-determinator",
"shell": "facebook/sandcastle/job.py cit-diff --platform minerva"
}
]
},
"capabilities": {
"tenant": "openbmc",
"type": "lego",
"vcs": "openbmc-git"
},
"command": "SandcastleUniversalCommand",
"description": "Yocto diff listener",
"jellyfish_conditions": [
{
"type": "some_file_matches_some_regexp",
"value": [
"^meta-facebook/meta-minerva/.*"
]
}
],
"scheduleType": "diff",
"tags": [
"openbmc_git"
]
},
{
"alias": "openbmc-cit-minipack-determinator",
"args": {
Expand Down Expand Up @@ -963,6 +1029,39 @@
"openbmc_git"
]
},
{
"alias": "openbmc-cit-morgan800cc-determinator",
"args": {
"name": "openbmc-cit-morgan800cc-determinator",
"oncall": "openbmc",
"steps": [
{
"determinator": true,
"name": "openbmc-cit-morgan800cc-determinator",
"shell": "facebook/sandcastle/job.py cit-diff --platform morgan800cc"
}
]
},
"capabilities": {
"tenant": "openbmc",
"type": "lego",
"vcs": "openbmc-git"
},
"command": "SandcastleUniversalCommand",
"description": "Yocto diff listener",
"jellyfish_conditions": [
{
"type": "some_file_matches_some_regexp",
"value": [
"^meta-facebook/meta-morgan800cc/.*"
]
}
],
"scheduleType": "diff",
"tags": [
"openbmc_git"
]
},
{
"alias": "openbmc-cit-northdome-determinator",
"args": {
Expand Down Expand Up @@ -998,6 +1097,39 @@
"openbmc_git"
]
},
{
"alias": "openbmc-cit-tahan-determinator",
"args": {
"name": "openbmc-cit-tahan-determinator",
"oncall": "openbmc",
"steps": [
{
"determinator": true,
"name": "openbmc-cit-tahan-determinator",
"shell": "facebook/sandcastle/job.py cit-diff --platform tahan"
}
]
},
"capabilities": {
"tenant": "openbmc",
"type": "lego",
"vcs": "openbmc-git"
},
"command": "SandcastleUniversalCommand",
"description": "Yocto diff listener",
"jellyfish_conditions": [
{
"type": "some_file_matches_some_regexp",
"value": [
"^meta-facebook/meta-tahan/.*"
]
}
],
"scheduleType": "diff",
"tags": [
"openbmc_git"
]
},
{
"alias": "openbmc-cit-wedge100-determinator",
"args": {
Expand Down
2 changes: 1 addition & 1 deletion classes/python3flakes.bbclass
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
inherit python3native
def flakes_add_if_avail(d):
distro = d.getVar('DISTRO_CODENAME', True)
if distro in [ 'rocko' ]:
if distro in [ 'rocko', 'dunfell', 'kirkstone' ]:
return ""
else:
return "python3-flake8"
Expand Down
3 changes: 3 additions & 0 deletions common/images/fb-openbmc-image.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ require common/images/fb-openbmc-common.inc

# Include the package group that enables tests2 support.
IMAGE_INSTALL += "packagegroup-openbmc-tests2"

# Add the mfgtool.
IMAGE_INSTALL += "mfg-tool"
15 changes: 11 additions & 4 deletions common/recipes-connectivity/lldp-util/lldp-util/src/lldp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,17 @@ int lldp_process_packet(const uint8_t* buf,
buf += 6;
uint16_t ethertype = lldp_read_u16(&buf);

if (ethertype == ETHERTYPE_VLAN) {
uint16_t vlan __attribute__((unused)) = lldp_read_u16(&buf);
ethertype = lldp_read_u16(&buf);
}
/*
* For now, don't decode or print VLAN tagged packets. Doing this
* properly is tricky (e.g. recursion) and we don't have a use case
* internally for it at Meta. When we do, it might be more useful
* to move to a 3rd party tool that does this better.
*
* if (ethertype == ETHERTYPE_VLAN) {
* uint16_t vlan __attribute__((unused)) = lldp_read_u16(&buf);
* ethertype = lldp_read_u16(&buf);
* }
*/

if (ethertype == ETHERTYPE_LLDP) {
lldp_neighbor_t neighbor;
Expand Down
7 changes: 7 additions & 0 deletions common/recipes-core/cfg-util/files/cfg-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,20 @@ main(int argc, char **argv) {
return -1;
}

// Prevent important information from being cleared
// leading to the loss of some functionalities.
// Store the kv and restore after clear.
pal_store_key_value();

printf("Reset BMC data to default factory settings and BMC will be reset...\n");
if(system("rm /mnt/data/* -rf > /dev/null 2>&1") != 0) {
printf("Cleaning persistent storage failed!\n");
return 1;
}
sync();

pal_restore_key_value();

// Set the flag to identify the reboot is caused by cfg-util
mem_fd = open("/dev/mem", O_RDWR | O_SYNC);
if (mem_fd >= 0) {
Expand Down
2 changes: 1 addition & 1 deletion common/recipes-core/fscd3/fscd/fsc_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def run(self, sensors, ctx, ignore_mode):

if not exprout:
exprout = 0
if exprout < outmin:
if (exprout < outmin) or (mode == fan_mode["boost_mode"]):
exprout = outmin
else:
if (no_sane_flag != 1) and (display_progressive_flag != 1):
Expand Down
2 changes: 1 addition & 1 deletion common/recipes-core/fw-util/files/bios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ int BiosComponent::get_version(json& j) {
string sver((char *)ver + 3);
j["VERSION"] = sver.substr(0, end - 3);
} else {
j["VERISON"] = "NA";
j["VERSION"] = "NA";
}

return 0;
Expand Down
5 changes: 3 additions & 2 deletions common/recipes-core/fw-util/files/pldm_comp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ int PldmComponent::del_raw_image() const
return remove(raw_image.c_str());
}

int PldmComponent::pldm_update(const string& image, uint8_t specified_comp) {
int PldmComponent::pldm_update(const string& image, bool is_standard_descriptor, uint8_t specified_comp) {

int ret;

syslog(LOG_CRIT, "FRU %s Component %s upgrade initiated", fru.c_str(), component.c_str());

ret = oem_pldm_fw_update(bus, eid, (char *)image.c_str(), specified_comp);
ret = oem_pldm_fw_update(bus, eid, (char *)image.c_str(), is_standard_descriptor,
component, wait_apply_time, specified_comp);

if (ret)
syslog(LOG_CRIT, "FRU %s Component %s upgrade fail", fru.c_str(), component.c_str());
Expand Down
17 changes: 13 additions & 4 deletions common/recipes-core/fw-util/files/pldm_comp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,35 @@
#include "signed_decoder.hpp"

#define PLDM_VER_MAX_LENGTH 256
#define PLDM_COMPONENT_IDENTIFIER_DEFAULT 0
#define PLDM_APPLY_DELAY_TIME_DAFAULT 0

class PldmComponent : public InfoChecker
{
protected:
// Basic info to be record
std::string fru;
std::string component;
uint8_t bus, eid;
uint8_t bus, eid, component_identifier;
int wait_apply_time;
int find_image_index(uint8_t /*target_id*/) const;
int get_raw_image(const std::string& /*image*/, std::string& /*raw_image*/);
int del_raw_image() const;
const signed_header_t unuse_info;

public:
PldmComponent(const signed_header_t& info, const std::string &fru, const std::string &comp,
uint8_t bus, uint8_t eid): InfoChecker(info),
fru(fru), component(comp), bus(bus), eid(eid) {}
fru(fru), component(comp), bus(bus), eid(eid), component_identifier(PLDM_COMPONENT_IDENTIFIER_DEFAULT),
wait_apply_time(PLDM_APPLY_DELAY_TIME_DAFAULT) {}
PldmComponent(const std::string &fru, const std::string &comp, uint8_t bus, uint8_t eid,
uint8_t component_identifier, int wait_apply_time): InfoChecker(unuse_info),
fru(fru), component(comp), bus(bus), eid(eid), component_identifier(component_identifier),
wait_apply_time(wait_apply_time) {}
virtual ~PldmComponent() = default;
int pldm_update(const std::string& /*image*/, uint8_t specified_comp = 0xFF);
int pldm_update(const std::string& /*image*/, bool is_standard_descriptor, uint8_t specified_comp = 0xFF);
virtual int pldm_version(json& /*json*/) { return FW_STATUS_NOT_SUPPORTED; }
virtual int comp_update(const std::string& /*image*/) { return FW_STATUS_NOT_SUPPORTED; }
virtual int comp_fupdate(const std::string& /*image*/) { return FW_STATUS_NOT_SUPPORTED; }
virtual int comp_version(json& /*json*/) { return FW_STATUS_NOT_SUPPORTED; }
};
};
3 changes: 2 additions & 1 deletion common/recipes-core/fw-util/files/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ bool Scheduler::is_number(const string& task_id) const {
string Scheduler::exec_and_print(const string& cmd) const {

//use unique_ptr<T, del> so it can be automatically closed when we leave the scope.
unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(), "r"), pclose);
auto pipe_close = [](auto fd) { (void)pclose(fd); };
unique_ptr<FILE, decltype(pipe_close)> pipe(popen(cmd.c_str(), "r"), pipe_close);

if ( pipe == nullptr ) {
throw std::runtime_error("Failed to run popen function!");
Expand Down
Loading

0 comments on commit 4fee821

Please sign in to comment.