From 5e9ec24c72142e2fe9ba10ab96111b9fbfc0b3c1 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 27 Oct 2015 16:02:39 -0400 Subject: board/x200: Split into x200_4mb and x200_8mb --- (limited to 'src') 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 . -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 . -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 -- cgit v0.9.1