diff options
-rw-r--r-- | src/board/local.mk | 3 | ||||
-rw-r--r-- | src/board/x200_4mb.sh (copied from src/board/x200.sh) | 38 | ||||
-rw-r--r-- | src/board/x200_8mb.sh (renamed from src/board/x200.sh) | 38 |
3 files changed, 42 insertions, 37 deletions
diff --git a/src/board/local.mk b/src/board/local.mk index db71a85..d51b149 100644 --- a/src/board/local.mk +++ b/src/board/local.mk @@ -1,2 +1,3 @@ firman_SOURCES += \ - src/board/x200.sh + src/board/x200_4mb.sh \ + src/board/x200_8mb.sh diff --git a/src/board/x200.sh b/src/board/x200_4mb.sh index 1c9b3a2..d853501 100644 --- a/src/board/x200.sh +++ b/src/board/x200_4mb.sh @@ -1,4 +1,4 @@ -# Lenovo ThinkPad X200 board +# Lenovo ThinkPad X200 (4-MiB flash) board # # Copyright (C) 2015 Patrick "P. J." McDermott # @@ -15,41 +15,43 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -board_x200_get_name() +board_x200_4mb_get_name() { - printf 'Lenovo ThinkPad X200' + printf 'Lenovo ThinkPad X200 (4-MiB flash)' return 0 } -board_x200_match() +board_x200_4mb_match() { local vendor="${1}" local part="${2}" - shift 2 + local chip="${3}" + shift 3 - if [ "x${vendor}" = 'xLENOVO' ] && [ "x${part}" = 'xThinkPad X200' ] - then - return 0 - else - return 1 - fi + [ "x${vendor}" = 'xLENOVO' ] || return 1 + [ "x${part}" = 'xThinkPad X200' ] || return 1 + case "${chip}" in + 'AT25DF321');; # AT26DF321-SU + 'MX25L3205D');; # MX25L3205DM2I-12G + *) return 1;; + esac + return 0 } -board_x200_validate_chip() +board_x200_4mb_validate_chip() { local chip="${1}" shift 1 case "${chip}" in - 'AT25DF321') return 0;; # AT26DF321-SU - 'MX25L3205D') return 0;; # MX25L3205DM2I-12G - 'MX25L6405D') return 0;; # MX25L6405DMI-12G - 'W25X64') return 0;; # W25X64VSFIG - *) return 1;; + 'AT25DF321');; # AT26DF321-SU + 'MX25L3205D');; # MX25L3205DM2I-12G + *) return 1;; esac + return 0 } -board_x200_get_dists() +board_x200_4mb_get_dists() { printf 'libreboot libiquity' return 0 diff --git a/src/board/x200.sh b/src/board/x200_8mb.sh index 1c9b3a2..bbf7b9d 100644 --- a/src/board/x200.sh +++ b/src/board/x200_8mb.sh @@ -1,4 +1,4 @@ -# Lenovo ThinkPad X200 board +# Lenovo ThinkPad X200 (8-MiB flash) board # # Copyright (C) 2015 Patrick "P. J." McDermott # @@ -15,41 +15,43 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -board_x200_get_name() +board_x200_8mb_get_name() { - printf 'Lenovo ThinkPad X200' + printf 'Lenovo ThinkPad X200 (8-MiB flash)' return 0 } -board_x200_match() +board_x200_8mb_match() { local vendor="${1}" local part="${2}" - shift 2 + local chip="${3}" + shift 3 - if [ "x${vendor}" = 'xLENOVO' ] && [ "x${part}" = 'xThinkPad X200' ] - then - return 0 - else - return 1 - fi + [ "x${vendor}" = 'xLENOVO' ] || return 1 + [ "x${part}" = 'xThinkPad X200' ] || return 1 + case "${chip}" in + 'MX25L6405D');; # MX25L6405DMI-12G + 'W25X64');; # W25X64VSFIG + *) return 1;; + esac + return 0 } -board_x200_validate_chip() +board_x200_8mb_validate_chip() { local chip="${1}" shift 1 case "${chip}" in - 'AT25DF321') return 0;; # AT26DF321-SU - 'MX25L3205D') return 0;; # MX25L3205DM2I-12G - 'MX25L6405D') return 0;; # MX25L6405DMI-12G - 'W25X64') return 0;; # W25X64VSFIG - *) return 1;; + 'MX25L6405D');; # MX25L6405DMI-12G + 'W25X64');; # W25X64VSFIG + *) return 1;; esac + return 0 } -board_x200_get_dists() +board_x200_8mb_get_dists() { printf 'libreboot libiquity' return 0 |