mb/dell/snb_ivb_latitude/*/hda_verb.c: Use AZALIA_PIN_DESC macro
[coreboot.git] / util / scripts / show_platforms.sh
blob410a84cf42c4ec77f3ff424b3c8c592a4eeaf191
1 #!/bin/bash
3 # SPDX-License-Identifier: GPL-2.0-only
5 # This script finds all of the top-level mainboards, then goes through
6 # and finds the date the directory was added, the processor type, and
7 # the board type.
9 # This could be improved by finding all of the variants, then figuring
10 # out when those veriants were added.
11 # It's also very slow, but only needs to be run once in a while...
13 readarray -t platforms < <(find src/mainboard -mindepth 3 -name 'Kconfig' | sort)
15 echo '```eval_rst'
16 echo "+-------------------------------+------------------------+------------+-----------+"
17 echo "| Vendor/Board | Processor | Date added | Brd type |"
18 echo "+===============================+========================+============+===========+"
20 for file in "${platforms[@]}"; do
21 platformname="$(echo "${file}" | sed 's|.*/mainboard/||;s|/Kconfig||')"
22 if [[ ! -f "${file/Kconfig/board_info.txt}" ]]; then
23 continue
25 chips="$(grep "CPU_\|SOC_\|NORTHBRIDGE" "${file}" |
26 grep -v "SUBTYPE\|COMMON\|SOCKET\|ENABLE\|CONSOLE\|SMU\|depends on\|ESPI\|INTEL_CSE\|NORTHBRIDGE_AMD_AGESA\|INTEL_SLOT\|REBOOT\|DISABLE" |
27 sed -e 's|\s\+select\s\+||' \
28 -e 's|\s\+if.*||' \
29 -e 's|SKYLAKE_SOC_PCH|INTEL_SKYLAKE|' \
30 -e 's|CPU_AMD_AGESA|AMD|' \
31 -e 's|SOC_INTEL_ALDERLAKE_PCH_|INTEL_ALDERLAKE|' \
32 -e 's|QC_|QUALCOMM_|' \
33 -e 's/SOC_\|NORTHBRIDGE_\|PCH_\|CPU_//g' |
34 sort -u)"
35 if [[ ! -f ${file/Kconfig/board_info.txt} ]]; then
36 continue
38 create_date="$(git log --format="format:%cs" -- "${file}" | tail -n1)"
39 platform_type="$(sed -nE -e 's/Category: (.*)/\1/p' "${file/Kconfig/board_info.txt}" 2>/dev/null)"
40 for chip in ${chips}; do
42 printf "| %-29s | %-22s | %-10s | %-9s |\n" "${platformname}" "${chip}" "${create_date}" "${platform_type}"
43 echo "+-------------------------------+------------------------+------------+-----------+"
44 done
45 done
47 echo '```'