Commit Graph

46 Commits

Author SHA1 Message Date
Erik Bjorge 81083bca03 Flake8 Cleanup
- Remove unused imports
- Improve spacing of functions/methods for readability
- Indentation updates
- Exception expression updates

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2022-02-16 08:23:01 -08:00
brentholtsclaw 0e53326a83 Create exceptions.py for chipsec exceptions
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2021-08-26 10:50:51 -07:00
Nathaniel Mitchell c8c14e21be Remove shebang from all but the entry points. Update ep to py3
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com>
2021-08-12 08:27:33 -07:00
Aaron Frinzell 1331e86c39 Add very verbose command-line option 2021-01-26 16:13:22 -08:00
Nathaniel Mitchell 749de73d38 Merge branch 'master' into nobanner 2020-09-24 15:22:54 -07:00
brentholtsclaw 51ce222498 Add skip_config option
option skips driver load and configuration loading

Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2020-09-24 09:54:30 -07:00
brentholtsclaw f23d408abc Add -nb --no_banner option
Will allow to run main and util without a banner

Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2020-08-28 14:50:19 -07:00
brentholtsclaw f7fe1be074 More whitespace cleanup
E231, E201, E226

Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2020-07-31 13:46:13 -07:00
brentholtsclaw a00b2838e5 Cleanup trailing whitespace
W291,W293,W391

Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2020-07-01 15:44:21 -07:00
brentholtsclaw 3bb2b443b7 Don't display pch information for atom
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com>
2020-05-26 12:37:35 -07:00
BrentHoltsclaw 514c23d84d Modify files based upon chipset.py changes
Fixup files that relied on CHIPSET_ID_XXX logic
Modify files for functions moved within cs class

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-04-20 08:39:02 -07:00
carlsbad 38829ad819 chipsec_util.py: Warn if Python architecture is different from OS architecture. 2020-03-20 17:47:20 -07:00
BrentHoltsclaw a7754ef7bd Edit chipsec banner information
Add ability to display a message from MESSAGE file within chipsec directory

Modify get version function to check for VERSION files not VERSION and CUSTOM_VERSION files

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-03-02 13:45:23 -08:00
Assaf Carlsbad 762b16883b The path to library.zip should be relative to the root executable, not to the current working directory. 2020-02-05 11:06:04 -08:00
BrentHoltsclaw 8819b9a64a Fixup chipsec_util unsupported platform logic
Enforce the -i option

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-01-23 08:54:46 -08:00
npmitche 203813a978 Revert "Fixup chipsec_util unsupported platform logic"
This reverts commit 9ec064d08e.
2020-01-22 16:01:28 -08:00
BrentHoltsclaw 9ec064d08e Fixup chipsec_util unsupported platform logic
Enforce the -i option

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2020-01-22 15:54:18 -08:00
Assaf Carlsbad 60eb5b438a Expose the --helper option to chipsec_util as well. 2020-01-13 10:36:16 -08:00
Assaf Carlsbad af7545d27b Fix couple of issues with running chipsec_util as a standalone executable. 2019-12-18 16:28:48 -08:00
BrentHoltsclaw 7562a21a59 Add helper/driver information to chipsec_main and chipsec_util
Add self.name and self.driverpath to Helper baseclass
Add get_info function into Helper baseclass which returns self.name and self.driverpath
Modify helpers to have proper name and driver location for driver loaded

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:22:09 -08:00
BrentHoltsclaw 0f804c588a Fix python3 utilcmd help issue
Help was not being displayed in python3 when no arguments were provided

Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-11-18 15:16:41 -08:00
BrentHoltsclaw 75fe4e2dd8 Add python architecture to chipsec_main and chipsec_util banner
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-10-21 14:46:52 -07:00
BrentHoltsclaw 9ca6537936 Change driver unload conditional
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-10-21 14:18:01 -07:00
BrentHoltsclaw 12bd1701f6 Change chipsec_util arg_parse and command execution logic
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-03 22:27:57 -07:00
BrentHoltsclaw 6140237b7e Create import cmd function within chipsec_util
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-03 22:27:57 -07:00
BrentHoltsclaw c1de2e9ff0 Cleanup chipsec_util imports
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com>
2019-09-03 22:27:57 -07:00
Erik Bjorge dcef92048b Updated header output
- Updated chipsec_main and chipsec_util to include python version
- Added OS and chip information to chipsec_util

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-09-03 13:52:33 -07:00
Daniel Schaefer adc1b2c615 Don't catch exception with None
Works in Python2 but doesn't in Python3 as every exception has to be
descendant of BaseException and None obviously isn't.
See: https://stackoverflow.com/a/19327342/5932056
2019-09-03 10:07:12 -07:00
BrentHoltsclaw 2efeda4345 Merge python3-rc2 branch into master (#656) 2019-08-15 14:11:20 -07:00
Erik Bjorge 3d845d9a4c Made logging modes selectable
Verbose, HAL and debug logging modes are now each selectable.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-07-23 11:14:53 -07:00
BrentHoltsclaw 8920531c7a chipsec_util return proper error codes
comm.run will return the exitcode from the command
If a command is not defined returns 2.
For no command present or help command display the list of commands and help return 0.
2019-07-16 09:47:48 -07:00
BrentHoltsclaw 0db6f1263a Allow utilcmds to return Exitcodes 2019-06-13 13:16:57 -07:00
Richard Hughes 66a399dd0a Add the eXecute permission on the launchable binaries
This means on Linux you can just do ./chipsec_util.py rather than using the
Python binary to invoke it.
2019-05-15 18:20:39 -07:00
BrentHoltsclaw 66710206e7 Changes based upon comments 2019-04-25 14:19:08 -07:00
BrentHoltsclaw f25f9781af Allow arguments within chipsec_util to passthrough to command 2019-04-02 14:47:30 -07:00
Erik Bjorge 6d92c8814e Continue to load commands on import failures
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2019-02-05 10:06:17 -08:00
BrentHoltsclaw 364e6c72e6 Use argparse within chipsec_util 2019-01-29 11:25:47 -08:00
BrentHoltsclaw 87a456d11b Rewrite of XML and JSON logger 2018-10-15 17:18:45 -07:00
Erik Bjorge 0e40912ffc Added ability to override PCH detection.
Added the --pch <PCH_ID> command line option.  This allows the user to
specify the PCH to be used.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
2018-04-09 17:36:02 -07:00
Thiebaud Weksteen 5f6451e8ea Fix version displayed in chipsec_utils 2017-06-23 11:24:20 -07:00
c7zero 5c5ae294eb Updated version and manual 2017-03-20 18:08:42 -07:00
Erik Bjorge 61b262814a Fixed exception in chipsec_util with no command.
If no command is present when running chipsec_util the help command is
assumed to be present. This will list all available commands.
2017-03-03 17:30:07 -08:00
c7zero d024dc6169 Added command-line options support to chipsec_util (#158)
* Added command-line options support to chipsec_util

* Fixed util test
2017-03-02 02:10:14 -08:00
Thiébaud Weksteen 1e9898f11d Do not catch exception in chipset initialization (#145) 2017-02-05 13:08:03 -08:00
c7zero 06b1f0dd5f More documentation update
Fixed passing the argv to chipsec_main.main() and chipsec_util.main()
when importing them as packages
2016-10-19 20:06:28 -07:00
abazhaniuk 94fe7f02f1 change setup.py build driver by default. change root directory of chipsec. move WARNING.txt to chipsec. remove PKG-INFO (#107) 2016-10-18 18:19:42 -07:00