Martin L Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63799 )
Change subject: util/scripts: Add script to show platforms, CPU, type, and date added ......................................................................
util/scripts: Add script to show platforms, CPU, type, and date added
This is the script used to generate the list of platforms that were removed from the master branch at each release. Generate a list for the old branch, another for the new, and compare the two.
Signed-off-by: Martin Roth gaumless@gmail.com Change-Id: I4f7265d95df31f3a74aa2aa164f6a094c1139750 --- M util/scripts/description.md A util/scripts/show_platforms.sh 2 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/63799/1
diff --git a/util/scripts/description.md b/util/scripts/description.md index a08771d..7c996f5 100644 --- a/util/scripts/description.md +++ b/util/scripts/description.md @@ -23,5 +23,8 @@ headers `Shell` * _parse-maintainers.pl_ - Script to alphabetize MAINTAINERS file `Perl` + * _show_platforms.sh_ - Makes a list of platforms in the tree. Does + not show variants. + `Shell` * _ucode_h_to_bin.sh_ - Microcode conversion tool `Bash` * _update_submodules_ - Check all submodules for updates `Bash` diff --git a/util/scripts/show_platforms.sh b/util/scripts/show_platforms.sh new file mode 100755 index 0000000..e8f0fae --- /dev/null +++ b/util/scripts/show_platforms.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# +# SPDX-License-Identifier: GPL-2.0-only +# +# This script finds all of the top-level mainboards, then goes through +# and finds the date the directory was added, the processor type, and +# the board type. +# +# This could be improved by finding all of the variants, then figuring +# out when those veriants were added. + +platforms="$(find src/mainboard -name 'Kconfig' | + grep -v './Kconfig|./[^/]+/Kconfig' | + sed 's|^./||' | + sort)" + +echo "| Vendor/Board | Processor | Date added | Brd type |" +echo "|-----------------------------|------------------------|------------|----------|" + + +for file in ${platforms}; do + platformname="$(echo "${file}" | sed 's|.*/mainboard/||' | sed 's|/Kconfig.*||')" + if [[ ! -f ${file/Kconfig/board_info.txt} ]]; then + continue + fi + chips=$(grep "CPU_|SOC_|NORTHBRIDGE" "${file}" | + grep -v "SUBTYPE|COMMON|SOCKET|ENABLE|CONSOLE|SMU|depends on|ESPI|INTEL_CSE|NORTHBRIDGE_AMD_AGESA|INTEL_SLOT|REBOOT" | + sed 's|\s+select\s+||; s|\s+if.*||; s|SKYLAKE_SOC_PCH|INTEL_SKYLAKE|; s|CPU_AMD_AGESA|AMD|; s|SOC_INTEL_ALDERLAKE_PCH_|INTEL_ALDERLAKE|; s|QC_|QUALCOMM_|; s/SOC_|NORTHBRIDGE_|PCH_|CPU_//g' | + sort | uniq) + if [[ ! -f ${file/Kconfig/board_info.txt} ]]; then + continue + fi + create_date="$(git log --format="format:%cs" -- "${file}" | tail -n1)" + platform_type="$(grep "Category: " "${file/Kconfig/board_info.txt}" 2>/dev/null | sed 's/Category: //')" + for chip in ${chips}; do + + printf "| %-27s | %-22s | %-10s | %-8s |\n" "${platformname}" "${chip}" "${create_date}" "${platform_type}" + done + +done