3 TOP
="$( cd "$
( dirname "${BASH_SOURCE[0]}" )"/../.. >/dev/null 2>&1 && pwd )"
4 MAINBOARDS
="src/mainboard"
5 OUTPUT_FILE
=${1:-$TOP/Documentation/security/vboot/list_vboot.md}
11 grep -rq "config VBOOT" $DIR
15 function get_vendor_name
19 sed -n '/config VENDOR/{n;s/^[\t[:space:]]\+bool "\(.*\)"/\1/;p;}' \
20 $VENDORDIR/Kconfig.name
23 function get_board_name
27 sed -n '/config BOARD/{n;s/^[\t[:space:]]\+bool "\(->\s\+\)\?\(.*\)"/\2/;p;}' \
28 $BOARDDIR/Kconfig.name
31 function list_vboot_boards
34 for BOARD
in $
(ls -d $VENDORDIR/*/)
36 has_vboot
$BOARD ||
continue
41 function generate_vboot_list
43 for VENDOR
in $
(ls -d $TOP/$MAINBOARDS/*/)
45 has_vboot
$VENDOR ||
continue
46 echo -e "\n## $(get_vendor_name $VENDOR)"
48 for BOARD
in $
(list_vboot_boards
$VENDOR)
55 (echo "# vboot-enabled devices"; generate_vboot_list
) > $OUTPUT_FILE