Skip to content

Commit

Permalink
remove wedge40/galaxy100 support
Browse files Browse the repository at this point in the history
Summary: These platforms are out of service now.

Test Plan:
```
0 ~/local/openbmc/tools/flashy $ ./build.sh && ./build_dev.sh && go test ./...
?       github.com/facebook/openbmc/tools/flashy/flash_procedure        [no test files]
?       github.com/facebook/openbmc/tools/flashy/lib/logger     [no test files]
?       github.com/facebook/openbmc/tools/flashy/tests  [no test files]
?       github.com/facebook/openbmc/tools/flashy/utilities      [no test files]
ok      github.com/facebook/openbmc/tools/flashy        2.405s
ok      github.com/facebook/openbmc/tools/flashy/checks_and_remediations/bletchley      (cached)
ok      github.com/facebook/openbmc/tools/flashy/checks_and_remediations/common 0.215s
ok      github.com/facebook/openbmc/tools/flashy/checks_and_remediations/wedge100       (cached)
ok      github.com/facebook/openbmc/tools/flashy/checks_and_remediations/yamp   (cached)
ok      github.com/facebook/openbmc/tools/flashy/install        0.004s
ok      github.com/facebook/openbmc/tools/flashy/lib/fileutils  (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/flash      (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/flash/flashcp      (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/flash/flashutils   (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/flash/flashutils/devices   (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/step       (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/utils      (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/validate   (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/validate/image     (cached)
ok      github.com/facebook/openbmc/tools/flashy/lib/validate/partition (cached)
0 ~/local/openbmc/tools/flashy $
```

Reviewed By: lsiudut

Differential Revision: D67979091

fbshipit-source-id: 038033bef33dbdf2e456984300a8a90c0c227b27
  • Loading branch information
doranand authored and facebook-github-bot committed Jan 21, 2025
1 parent b205a61 commit 3a7b9e9
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 309 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,12 @@ func ExposeRealFlash0OnSecondaryBoot(stepParams step.StepParams) step.StepExitEr
return step.ExitSafeToReboot{Err: errors.Errorf("Unable to fetch machine: %v", err)}
}

etcIssueVer, err := utils.GetOpenBMCVersionFromIssueFile()
if err != nil {
return step.ExitSafeToReboot{Err: errors.Errorf("Unable to fetch /etc/issue: %v", err)}
}

// Bail if not running on AST2400 (armv5tejl) nor AST2500 (armv6l)
if machine != "armv5tejl" && machine != "armv6l" {
log.Printf("Remediation handles only AST2400 and AST2500")
return nil
}

// WDT2 reset logic doesn't work on old versions of cmm (it keeps rebooting to the other flash)
if etcIssueVer == "cmm-v29" {
log.Printf("Old galaxy cmm version detected (%v), skipping step...", etcIssueVer)
return nil
}

mem, err := MmapDevMemRw()
if err != nil {
return step.ExitSafeToReboot{Err: errors.Errorf("Unable to mmap /dev/mem: %v", err)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,29 +184,4 @@ func TestExposeRealFlash0OnSecondaryBoot(t *testing.T) {
}

})

t.Run("Should bail out if running old versions of galaxy cmm", func(t *testing.T) {
var buf bytes.Buffer
log.SetOutput(&buf)

GetMachineOrig := utils.GetMachine
defer func() { utils.GetMachine = GetMachineOrig }()
utils.GetMachine = func() (string, error) { return "armv6l", nil }

utils.GetOpenBMCVersionFromIssueFile = func() (string, error) { return "cmm-v29", nil}

res := ExposeRealFlash0OnSecondaryBoot(step.StepParams{})

if res != nil {
t.Errorf("Expected ExposeRealFlash0OnSecondaryBoot() to return nil, got %v", res)
}

re_expected_log_buffer := "" +
"^[^\n]+Old galaxy cmm version detected .cmm-v29., skipping step..."

if !regexp.MustCompile(re_expected_log_buffer).Match(buf.Bytes()) {
t.Errorf("Unexpected log buffer: %v", buf.String())
}

})
}

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tools/flashy/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
// all packages containing steps must be included to successfully run install
_ "github.com/facebook/openbmc/tools/flashy/checks_and_remediations/bletchley"
_ "github.com/facebook/openbmc/tools/flashy/checks_and_remediations/common"
_ "github.com/facebook/openbmc/tools/flashy/checks_and_remediations/galaxy100"
_ "github.com/facebook/openbmc/tools/flashy/checks_and_remediations/wedge100"
_ "github.com/facebook/openbmc/tools/flashy/checks_and_remediations/yamp"
_ "github.com/facebook/openbmc/tools/flashy/flash_procedure"
Expand Down
2 changes: 1 addition & 1 deletion tools/flashy/lib/utils/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ var GetOpenBMCVersionFromIssueFile = func() (string, error) {
}
etcIssueStr := strings.ToLower(string(etcIssueBuf))

// handle ancient galaxy100 linecard release with missing version info
// handle ancient release with missing version info
if strings.HasPrefix(etcIssueStr, "openbmc release \n") {
return "unknown-v1", nil
}
Expand Down
2 changes: 1 addition & 1 deletion tools/flashy/lib/utils/system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ func TestGetOpenBMCVersionFromIssueFile(t *testing.T) {
wantErr: nil,
},
{
name: "ancient galaxy100 /etc/issue",
name: "ancient /etc/issue",
etcIssueContents: `OpenBMC Release
`,
etcIssueReadErr: nil,
Expand Down
4 changes: 2 additions & 2 deletions tools/flashy/lib/validate/compatibility_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ func TestCheckImageBuildNameCompatibility(t *testing.T) {
{
name: "ancient image",
etcIssueVer: "unknown-v52.1",
imageFileVer: "wedge40-v2019.01.3",
imageFileVer: "wedge400-v2019.01.3",
want: nil,
},
{
name: "older image",
etcIssueVer: "unknown-v42",
imageFileVer: "wedge40-v2019.01.3",
imageFileVer: "wedge400-v2019.01.3",
want: nil,
},
}
Expand Down

0 comments on commit 3a7b9e9

Please sign in to comment.