summaryrefslogtreecommitdiff
path: root/util/lint/lint-stable-005-board-status
blob: 952a9b5c6f203bd6b7f70329ca52d75128333858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# This file is part of the coreboot project.
#
# Copyright (C) 2014 Vladimir Serbinenko <phcoder@gmail.com>
#
# This program 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, or (at your option)
# any later version.
#
# 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.
#
# DESCR: Check that every board has a meaningful board_info.txt

LC_ALL=C export LC_ALL
for mobodir in $(git ls-files src/mainboard | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\)/.*$,\1,p'|sort|uniq); do
    board_info="$mobodir/board_info.txt"
    if ! [ -f "$board_info" ]; then
       echo "No $board_info found"
       continue
    fi
    category="$(sed -n 's#^Category: \(.*\)$#\1#p' < "$board_info")"
    case "$category" in
	desktop|server|laptop|half|mini|settop|"eval"|sbc|emulation|misc)
	    ;;
	"")
	    echo "$board_info doesn't contain 'Category' tag"
	    continue
	    ;;
	*)
	    echo "$board_info specifies unknown category '$category'"
	    continue
	    ;;
    esac
done

exit 0