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
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)
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
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\+||' \
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' |
35 if [[ ! -f ${file/Kconfig/board_info.txt} ]]; then
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 "+-------------------------------+------------------------+------------+-----------+"