Stefan Reinauer | 2df124d | 2015-04-15 13:37:45 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # This file is part of the coreboot project. |
| 3 | # |
| 4 | # Copyright 2015 Google Inc. |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; version 2 of the License, or (at your option) |
| 9 | # any later version. |
| 10 | # |
| 11 | # This program is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | # DESCR: Check that every vendor and board has a Kconfig.name |
| 17 | |
| 18 | LC_ALL=C export LC_ALL |
| 19 | FAIL=0 |
| 20 | |
| 21 | for i in src/mainboard/*/; do |
| 22 | if [ -r $i/Kconfig ]; then |
| 23 | if [ ! -r $i/Kconfig.name ]; then |
| 24 | VENDOR="$(grep -A2 MAINBOARD_VENDOR $i/Kconfig | tail -1 | cut -f2 -d\")" |
| 25 | echo "Vendor $VENDOR missing $i/Kconfig.name." |
| 26 | FAIL=1 |
| 27 | fi |
| 28 | fi |
| 29 | done |
| 30 | |
| 31 | for i in src/mainboard/*/*/; do |
| 32 | if [ -r $i/Kconfig ]; then |
| 33 | if [ ! -r $i/Kconfig.name ]; then |
| 34 | BOARD="$(grep -A2 MAINBOARD_PART_NUMBER $i/Kconfig | tail -1 | cut -f2 -d\")" |
| 35 | echo "Mainboard $BOARD missing $i/Kconfig.name" |
| 36 | FAIL=1 |
| 37 | fi |
| 38 | fi |
| 39 | done |
| 40 | |
| 41 | exit $FAIL |