diff options
author | Brian J. Nemec <bnemec@chromium.org> | 2020-02-18 13:23:56 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-21 06:21:18 +0000 |
commit | 2f4c7fb74e849f67841746877da92c584cd09dfe (patch) | |
tree | ab25bb3a8eb3f7883a8ae868f506e838aa5d9045 /board/servo_v4 | |
parent | 05b951525aa490284085cec80094a477a69dd6a6 (diff) | |
download | chrome-ec-2f4c7fb74e849f67841746877da92c584cd09dfe.tar.gz |
Servo: Adds persistent storage of MAC address
Adds a field to the persistent storage to store the
MAC address of the device. This is enabled on ServoV4
in order to store the MAC address for the integrated
ethernet port. Added a console command to set and load
this value.
BUG=b:149506580
TEST=Verified setting and loading the MAC address using:
'macaddr set 12:34:56:78:90:ab' and 'macaddr' or 'macaddr load'
Verified that MAC addresses over 19 characters long return
an error response and not update the MAC.
Verified no set serial number will return the uninitialized string.
Verified that the MAC address can be updated independently of serialno
Verified that the persist_state fields restore during firmware updates
Change-Id: I8425ce9e13322e99a4f59df444ea0dc73821aa6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2063330
Tested-by: Brian Nemec <bnemec@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Brian Nemec <bnemec@chromium.org>
Diffstat (limited to 'board/servo_v4')
-rw-r--r-- | board/servo_v4/board.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/board/servo_v4/board.h b/board/servo_v4/board.h index ff46ae13e4..c2b08fa885 100644 --- a/board/servo_v4/board.h +++ b/board/servo_v4/board.h @@ -47,6 +47,8 @@ #define CONFIG_USB_SERIALNO #define DEFAULT_SERIALNO "Uninitialized" +#define CONFIG_MAC_ADDR +#define DEFAULT_MAC_ADDR "Uninitialized" /* USB interface indexes (use define rather than enum to expand them) */ #define USB_IFACE_CONSOLE 0 |