From e54e093a6245f3fcc57f8cb1d6ce40d32cd8a992 Mon Sep 17 00:00:00 2001 From: Andrew Doran Date: Tue, 2 Jan 2024 12:24:43 -0800 Subject: [PATCH] add janga Summary: As title. Also include montblanc in list of BMC lite platforms. I'm thinking the platforms.thrift sync script should auto-generate all this stuff so it can be landed in the same commit but that's a bigger change. 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 3.376s ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/bletchley 0.006s ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/common 0.377s ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/galaxy100 0.010s ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/wedge100 0.009s ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/yamp 0.008s ok github.com/facebook/openbmc/tools/flashy/install 0.008s ok github.com/facebook/openbmc/tools/flashy/lib/fileutils 0.013s ok github.com/facebook/openbmc/tools/flashy/lib/flash 0.010s ok github.com/facebook/openbmc/tools/flashy/lib/flash/flashcp 0.010s ok github.com/facebook/openbmc/tools/flashy/lib/flash/flashutils 0.008s ok github.com/facebook/openbmc/tools/flashy/lib/flash/flashutils/devices 0.009s ok github.com/facebook/openbmc/tools/flashy/lib/step 0.008s ok github.com/facebook/openbmc/tools/flashy/lib/utils 0.446s ok github.com/facebook/openbmc/tools/flashy/lib/validate 0.008s ok github.com/facebook/openbmc/tools/flashy/lib/validate/image 0.008s ok github.com/facebook/openbmc/tools/flashy/lib/validate/partition 0.028s 0 ~/local/openbmc/tools/flashy $ ``` Reviewed By: kawmarco Differential Revision: D52481796 fbshipit-source-id: 8545bcbd9a24888cf8c627be030d2b85fc33aad0 --- tools/flashy/flash_procedure/flash_janga.go | 30 +++++++++++++++++++++ tools/flashy/lib/utils/system.go | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 tools/flashy/flash_procedure/flash_janga.go diff --git a/tools/flashy/flash_procedure/flash_janga.go b/tools/flashy/flash_procedure/flash_janga.go new file mode 100644 index 00000000000..67cafa1ed41 --- /dev/null +++ b/tools/flashy/flash_procedure/flash_janga.go @@ -0,0 +1,30 @@ + +/** + * Copyright 2020-present Facebook. All Rights Reserved. + * + * This program file is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +package flash_procedure + +import ( + "github.com/facebook/openbmc/tools/flashy/lib/flash" + "github.com/facebook/openbmc/tools/flashy/lib/step" +) + +func init() { + step.RegisterStep(flash.FlashCp) +} diff --git a/tools/flashy/lib/utils/system.go b/tools/flashy/lib/utils/system.go index 54298ce78e4..b5cdceeb1ba 100644 --- a/tools/flashy/lib/utils/system.go +++ b/tools/flashy/lib/utils/system.go @@ -368,7 +368,7 @@ var IsLFOpenBMC = func() (bool) { // IsBMCLite check whether the system is running BMC-lite // For S368275. Make this beautiful later. var IsBMCLite = func() (bool) { - magics := []string{"fbdarwin", "meru"} + magics := []string{"fbdarwin", "meru", "janga", "montblanc"} issueBuf, err := fileutils.ReadFile(etcIssueFilePath) if err != nil {