Debian Codegraph @

util/release/genrelnotes

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 #
3 # SPDX-License-Identifier: GPL-2.0-only
4
5 # This script creates a list of commits between two releases, broken out into
6 # fairly inexact categories, based on the directories that files are in. If
7 # a commit touched anything in the path that is checked earlier, it's counted
8 # as being in that category.
9 #
10 # Don't run this in your current working tree, it checks out different versions
11 # and can lose things.
12
13 # set -x # uncomment for debug
14
15 # Check for tools
16
17 if ! ( gitscip-shell system . . git. --version && cloc --version && rename --version ) > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
18 then
19 echoscip-shell system . . echo. "ERROR: cloc, git or rename is not installed. Exiting" >&2
20 exit 1
21 fi
22
23 if ! { cdup="$(gitscip-shell system . . git. rev-parse --show-cdup 2>/dev/nullscip-shell filesystem . . `/dev/null`.)" && [scip-shell system . . `[`. -z "${cdup}" ]; }
24 then
25 echoscip-shell system . . echo. "ERROR: This is not the top directory of a git repo. Exiting." >&2
26 exit 1
27 fi
28
29 # Try to verify that the repo is clean before losing state.
30 if ! gitscip-shell system . . git. diff-index --quiet --cached HEAD 2>/dev/nullscip-shell filesystem . . `/dev/null`. || \
31 [ "$(gitscip-shell system . . git. diff origin/main --shortstat 2>/dev/nullscip-shell filesystem . . `/dev/null`. | tailscip-shell system . . tail. -n1)" != "" ]; then
32 echoscip-shell system . . echo. "ERROR: repo is not clean. Exiting." >&2
33 exit 1
34 fi
35
36 # Verify the command line arguments
37 if [scip-shell system . . `[`. "$1" == "--help" ] || [scip-shell system . . `[`. -z "$1" ] || [scip-shell system . . `[`. -z "$2" ]; then
38 echoscip-shell system . . echo.
39 echoscip-shell system . . echo. "Usage: $0 <old_version> <new_version> [release notes file]"
40 echoscip-shell system . . echo. "Old version should be a tag (4.1), a branch (origin/4.1), or a commit id"
41 echoscip-shell system . . echo. "New version can be a branch (origin/main) a tag (4.2), or a commit id"
42 echoscip-shell system . . echo. "Logfile can be a new file or an existing file to update"
43 echoscip-shell system . . echo. "Example: \"$0 origin/4.1 4.2 rnotes.txt\""
44 echoscip-shell system . . echo.
45 echoscip-shell system . . echo. "Note that the script starts at the commit AFTER the old version."
46 echoscip-shell system . . echo.
47 exit 1
48 else
49 OLD_GIT_VERSION="$1"
50 NEW_GIT_VERSION="$2"
51 if [[ "$OLD_GIT_VERSION" = "HEAD" || "$NEW_GIT_VERSION" = "HEAD" ]]; then
52 echoscip-shell system . . echo. "Error: using HEAD as a reference doesn't work" >&2
53 echoscip-shell system . . echo.
54 exit 1
55 fi
56 TOTAL_COMMITS=$(gitscip-shell system . . git. log --pretty=oneline \
57 "${OLD_GIT_VERSION}..${NEW_GIT_VERSION}" 2>/dev/null | wc -l)
58 fi
59
60 TOP=$(pwdscip-shell system . . pwd.)
61
62 if [scip-shell system . . `[`. -n "$3" ]; then
63 MAIN_LOGFILE="${TOP}/$3"
64 else
65 MAIN_LOGFILE="${TOP}/relnotes.txt"
66 fi
67
68 # Figure out which logfile we're writing to. If the specified logfile exists,
69 # we need to write to a temporary logfile, then append changes to the main
70 # logfile.
71 if [scip-shell system . . `[`. -f "$MAIN_LOGFILE" ]; then
72 LOGFILE="$(mktempscip-shell system . . mktemp. "LOGFILE.XXXX")"
73 LOGFILE="${TOP}/$LOGFILE"
74 UPDATE_MAIN_LOGFILE=1
75 else
76 LOGFILE="$MAIN_LOGFILE"
77 fi
78
79 get_author_commit_countscip-shell shell coreboot 25.09+dfsg-1 get_author_commit_count().() {
80 gitscip-shell system . . git. log "${NEW_GIT_VERSION}" 2>/dev/nullscip-shell filesystem . . `/dev/null`. | grepscip-shell system . . grep. -c "^Author: $1"
81 }
82
83 # Print and log the versions
84 log_versionsscip-shell shell coreboot 25.09+dfsg-1 log_versions().() {
85 echoscip-shell system . . echo. "Log of commit $1 to commit $2"
86 echoscip-shell system . . echo. "Log of commit $1 to commit $2" >> "$LOGFILE"
87 echoscip-shell system . . echo. "Total commits: ${TOTAL_COMMITS}"
88 echoscip-shell system . . echo. "Total commits: ${TOTAL_COMMITS}" >> "$LOGFILE"
89 echoscip-shell system . . echo.
90 }
91
92 # Get the first commit id in the current tree
93 get_latest_commit_idscip-shell shell coreboot 25.09+dfsg-1 get_latest_commit_id().() {
94 (
95 cd "$1" || exit 1
96 gitscip-shell system . . git. log -n 1 2>/dev/nullscip-shell filesystem . . `/dev/null`. | grepscip-shell system . . grep. '^commit ' | headscip-shell system . . head. -1 | sedscip-shell system . . sed. 's/commit //' | sedscip-shell system . . sed. 's/ .*//'
97 )
98 }
99
100 # Main get log function
101 _get_logscip-shell shell coreboot 25.09+dfsg-1 _get_log().() {
102 local oldver="$1"
103 local newver="$2"
104 local title="$3"
105 local paths="$4"
106 local keywords="$5"
107
108 # Leave ${paths} unquoted in the git commands
109 # shellcheck disable=SC2086
110 { \
111 if [scip-shell system . . `[`. -n "$paths" ]; then \
112 git log --abbrev-commit --pretty=oneline \
113 "${oldver}..${newver}" -- ${paths} \
114 2>/dev/nullscip-shell filesystem . . `/dev/null`.; \
115 fi; \
116 if [scip-shell system . . `[`. -n "$keywords" ]; then \
117 git log --abbrev-commit --pretty=oneline \
118 "${oldver}..${newver}" 2>/dev/nullscip-shell filesystem . . `/dev/null`. \
119 | grepscip-shell system . . grep. -i "$keywords"; \
120 fi \
121 } | sortscip-shell system . . sort. -t ' ' -k 2 | uniqscip-shell system . . uniq.
122 }
123
124 # Output to a new log, then compare to the first logfile, and only output
125 # non duplicated lines to the final file.
126 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe().() {
127 local title="$1"
128 local paths="$2"
129 local keywords="$3"
130 local log
131 local commits
132
133 dedupe_tmpfile="$(mktempscip-shell system . . mktemp. "LOGFILE.XXXX")"
134
135 log=$(_get_logscip-shell shell coreboot 25.09+dfsg-1 _get_log(). "$OLD_GIT_VERSION" "$NEW_GIT_VERSION" \
136 "$title" "$paths" "$keywords")
137
138 echoscip-shell system . . echo. "$log" > "$dedupe_tmpfile"
139
140 log=$(grepscip-shell system . . grep. -Fxv -f "$LOGFILE" "$dedupe_tmpfile")
141 commits=$(echoscip-shell system . . echo. "$log" | wcscip-shell system . . wc. -l)
142
143 if [scip-shell system . . `[`. -n "$log" ]; then
144 #echo "$title: $paths $keywords" >> "$LOGFILE"
145 pscip-shell system . . printf.rintfscip-shell system . . printf. "%s\n%s\n\n" "##### $title ($commits commits) #####" \
146 "$log" >> "$LOGFILE"
147 fi
148
149 rmscip-shell system . . rm. "$dedupe_tmpfile"
150 }
151
152 # get logs for the submodules
153 get_log_submodulescip-shell shell coreboot 25.09+dfsg-1 get_log_submodule().() {
154 local old_version="$1"
155 local new_version="$2"
156 local submodule_dir="$3"
157 local log
158 local commits
159
160 printfscip-shell system . . printf. "Submodule %s\n" "$submodule_dir"
161 printfscip-shell system . . printf. "commit %s to commit %s\n\n" "$old_version" "$new_version"
162
163 if ! (
164 cd "${TOP}/$submodule_dir" || exit 1
165 log="$(_get_logscip-shell shell coreboot 25.09+dfsg-1 _get_log(). "$old_version" "$new_version" "$submodule_dir" "." "")" || exit 1
166 commits=$(echoscip-shell system . . echo. "$log" | wcscip-shell system . . wc. -l)
167
168 if [scip-shell system . . `[`. -n "$log" ]; then
169 printfscip-shell system . . printf. "* %s: Update from commit id %s to %s (%s commits)\n" "${submodule_dir}" "${old_version:0:10}" "${new_version:0:10}" "${commits}" >> "$LOGFILE"
170 fi
171 ); then
172 version_ctrl_cscip-shell shell coreboot 25.09+dfsg-1 version_ctrl_c().
173 fi
174 }
175
176 find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas().() {
177 local directory="$1"
178 local filename="$2"
179 local skip="$3"
180 findscip-shell system . . find. "$directory" -name "$filename" | sedscip-shell system . . sed. "s|/$filename||" | sedscip-shell system . . sed. "s|/$directory||" | grepscip-shell system . . grep. -v "$skip" | sortscip-shell system . . sort.
181 }
182
183 # Make sure things get cleaned up if ctl-c is pressed while the old version
184 # is checked out and files are renamed. This can be a real mess to clean
185 # up manually.
186 version_ctrl_cscip-shell shell coreboot 25.09+dfsg-1 version_ctrl_c().() {
187 printfscip-shell system . . printf. "\n Cleaning up and exiting.\n" >&2
188 gitscip-shell system . . git. checkout origin/main > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
189 gitscip-shell system . . git. submodule update --init --checkout > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
190 rmscip-shell system . . rm. "$LOGFILE"
191 exit 1;
192 }
193
194 # Calculate areas that have been added or removed based on file lists
195 show_diffscip-shell shell coreboot 25.09+dfsg-1 show_diff(). () {
196 local new
197 local old
198
199 new="$(commscip-shell system . . comm. -13 <(echoscip-shell system . . echo. "$2") <(echoscip-shell system . . echo. "$3"))"
200 old="$(commscip-shell system . . comm. -23 <(echoscip-shell system . . echo. "$2") <(echoscip-shell system . . echo. "$3"))"
201
202 # Allow running a postprocessor, given as 4th argument over the
203 # resulting diff, provide context if it's old or new data
204 if [scip-shell system . . `[`. -n "$4" ]; then
205 new=$(echoscip-shell system . . echo. "$new" | $4 new | sortscip-shell system . . sort.)
206 old=$(echoscip-shell system . . echo. "$old" | $4 old | sortscip-shell system . . sort.)
207 fi
208 new="$(printfscip-shell system . . printf. "%s" "$new" | sedscip-shell system . . sed. 's/^/* /')"
209 old="$(printfscip-shell system . . printf. "%s" "$old" | sedscip-shell system . . sed. 's/^/* /')"
210
211 if [scip-shell system . . `[`. -n "$new" ]; then
212 prscip-shell system . . printf.intfscip-shell system . . echo. "Added %s $scip-shell system . . wc.1:\n-------------------\n%s\n\n" \
213 "$(echo "$new" | wc -l)" "$new" >> "$LOGFILE"
214 fi
215 if [scip-shell system . . `[`. -n "$old" ]; then
216 prscip-shell system . . printf.intfscip-shell system . . echo. "Removed %sscip-shell system . . wc. $1:\n-------------------\n%s\n\n" \
217 "$(echo "$old" | wc -l)" "$old" >> "$LOGFILE"
218 fi
219 }
220
221 get_slocscip-shell shell coreboot 25.09+dfsg-1 get_sloc(). () {
222 local base
223 base=$(mktempscip-shell system . . mktemp.)
224
225 cloc --progress-rate=0 --quiet \
226 --script-lang="Bourne Shell",bash --exclude-ext=inc \
227 --exclude-dir=vendorcode "--out=${base}" src
228 cloc --progress-rate=0 --quiet \
229 "--exclude-list-file=${base}.mk" --force-lang=c,inc \
230 --exclude-dir=vendorcode "--out=${base}.c" src
231 cloc --progress-rate=0 --quiet \
232 "--list-file=${base}.mk" --force-lang=make,inc \
233 --exclude-dir=vendorcode "--out=${base}.m" src
234 cloc --progress-rate=0 --quiet --sum-reports \
235 "${base}" "${base}.c" "${base}.m" --out "${base}.result"
236
237 echoscip-shell system . . echo.
238 catscip-shell system . . cat. "${base}.result.lang"
239
240 rmscip-shell system . . rm. -f "${base}"*
241 }
242
243 # Start collecting data from the old and new revisions.
244 # This is relatively disruptive to the tree, so trap on ctl-c so that
245 # things can be put back to normal
246 trap version_ctrl_c SIGINT
247
248 #check out old version and get information
249 echoscip-shell system . . echo. "Finding old submodule versions..." >&2
250 gitscip-shell system . . git. checkout "$OLD_GIT_VERSION" > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
251 echoscip-shell system . . echo. "Git version: $(gitscip-shell system . . git. log --oneline -n 1)"
252 gitscip-shell system . . git. submodule update --init --checkout > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
253 for module in $(gitscip-shell system . . git. submodule --quiet foreach pwd); do
254 name="$(basenamescip-shell system . . basename. "$module" | sedscip-shell system . . sed. 's/-/_/g')"
255 version="${name^^}_OLD_VERSION"
256 declare "$version"="$(get_latest_commit_idscip-shell shell coreboot 25.09+dfsg-1 get_latest_commit_id(). "$module")"
257 done
258
259 printfscip-shell system . . printf. "Logging directories in the old tree\n" >&2
260 mainboard_list_old=$(grepscip-shell system . . grep. -h "^[[:space:]]*config\>[[:space:]]*\<BOARD_" src/mainboard/*/*/Kconfig.name 2>/dev/nullscip-shell filesystem . . `/dev/null`. | sedscip-shell system . . sed. "s,^.*\<BOARD_\([A-Z0-9_]*\)\>.*$,\1," | sortscip-shell system . . sort.)
261 cpu_list_old=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/cpu" "Kconfig" "intel/common")
262 soc_list_old=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/soc" "Makefile.mk" "intel/common\|amd/common\|romstage")
263 northbridge_list_old=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/northbridge" "Kconfig" "")
264 sio_list_old=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/superio" "Makefile.mk" "")
265 southbridge_list_old=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/southbridge" "Kconfig" "")
266
267 echoscip-shell system . . echo. "Calculating old SLOC"
268 OLD_SLOC=$(get_slocscip-shell shell coreboot 25.09+dfsg-1 get_sloc().)
269
270 #check out new version and get information
271 printfscip-shell system . . printf. -- "\nFinding new submodule versions...\n" >&2
272 gitscip-shell system . . git. checkout "$NEW_GIT_VERSION" > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
273 echoscip-shell system . . echo. "Git version: $(gitscip-shell system . . git. log --oneline -n 1)"
274 gitscip-shell system . . git. submodule update --init --checkout > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
275
276 for module in $(gitscip-shell system . . git. submodule --quiet foreach pwd); do
277 name="$(basenamescip-shell system . . basename. "$module" | sedscip-shell system . . sed. 's/-/_/g')"
278 version="${name^^}_NEW_VERSION"
279 declare "$version"="$(get_latest_commit_idscip-shell shell coreboot 25.09+dfsg-1 get_latest_commit_id(). "$module")"
280 done
281
282 echoscip-shell system . . echo. "Logging directories in the new tree." >&2
283 mainboard_list_new=$(grepscip-shell system . . grep. -h "^[[:space:]]*config\>[[:space:]]*\<BOARD_" src/mainboard/*/*/Kconfig.name 2>/dev/nullscip-shell filesystem . . `/dev/null`. | sedscip-shell system . . sed. "s,^.*\<BOARD_\([A-Z0-9_]*\)\>.*$,\1," | sortscip-shell system . . sort.)
284 cpu_list_new=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/cpu" "Kconfig" "intel/common")
285 soc_list_new=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/soc" "Makefile.mk" "intel/common\|amd/common\|romstage")
286 northbridge_list_new=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/northbridge" "Kconfig" "")
287 sio_list_new=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/superio" "Makefile.mk" "")
288 southbridge_list_new=$(find_areasscip-shell shell coreboot 25.09+dfsg-1 find_areas(). "src/southbridge" "Kconfig" "")
289
290 printfscip-shell system . . printf. "Calculating new SLOC\n"
291 NEW_SLOC=$(get_slocscip-shell shell coreboot 25.09+dfsg-1 get_sloc().)
292
293 gitscip-shell system . . git. checkout origin/main > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
294 gitscip-shell system . . git. submodule update --init --checkout > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
295 trap "" SIGINT
296
297 # Done collecting data from the old and new versions
298
299 # Start outputting to logfile
300 echoscip-shell system . . echo. "Generating release notes from version ${OLD_GIT_VERSION} to ${NEW_GIT_VERSION}"
301 echoscip-shell system . . echo.; echoscip-shell system . . echo. "Main repo"
302 echoscip-shell system . . echo. "Main repo" >> "$LOGFILE"
303 echoscip-shell system . . echo. "------------------" >> "$LOGFILE"
304 log_versionsscip-shell shell coreboot 25.09+dfsg-1 log_versions(). "$(gitscip-shell system . . git. log --pretty=%H \
305 "${OLD_GIT_VERSION}..${NEW_GIT_VERSION}" 2>/dev/null | tail -1)" \
306 "$(gscip-shell system . . git.it log --pretty=%H \
307 "${OLD_GIT_VERSION}..${NEW_GIT_VERSION}" 2>/dev/null | head -1 )"
308 echoscip-shell system . . echo. "" >> "$LOGFILE"
309
310 ### SPECIFIC AREAS FOR RELEASE ###
311 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Documentation" "Documentation README"
312
313 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "cleanup" "" "add missing\|fix typo\|clean up\|spelling\|Use tabs\|space [around\|before]\|code formatting\|commented code\|code cleanup\|capitalize\|[unnecessary\|unneeded\|trailing] whitespace\|checkpatch\|remove [unused\|dead\|unneeded\|duplicated\|not used]\|[transition away from\|get rid of\|don't use] device_t"
314
315 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "ACPI Changes" "" "ASL 2.0 syntax"
316
317 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Kahlee / AMD Gardenia" "src/mainboard/google/kahlee src/mainboard/amd/gardenia" "kahlee\|gardenia"
318 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "AMD Stoney Ridge" "src/soc/amd/stoneyridge" "stoney"
319
320 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Zork / AMD Mandolin / AMD Bilby" "src/mainboard/amd/mandolin src/mainboard/google/zork src/mainboard/amd/bilby" "mandolin\|zork\|bilby"
321 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "AMD Picasso" "src/soc/amd/picasso" "picasso"
322
323 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Guybrush / AMD Majolica" "src/mainboard/google/guybrush src/mainboard/amd/majolica" "majolica\|guybrush"
324 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "AMD cezanne" "src/soc/amd/cezanne" "cezanne"
325
326 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "AMD chausie / Google Skyrim" "src/mainboard/amd/chausie src/mainboard/google/skyrim" "chausie\|skyrim"
327 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "AMD sabrina" "src/soc/amd/sabrina" "sabrina"
328
329 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Brya / Intel adlrvp" "src/mainboard/intel/adlrvp src/mainboard/google/brya" "brya\|adlrvp"
330 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Alder Lake" "src/soc/intel/alderlake" "alderlake\|adl\|alder lake"
331
332 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "intel Elkhart Lake" "src/soc/intel/elkhartlake" "elkhartlake\|ehl\|elkhart lake"
333
334 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Dedede" "src/mainboard/google/dedede" "dedede"
335 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "intel Jasper Lake" "src/soc/intel/jasperlake" "jasperlake\|jsl\|jasper lake"
336
337 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Tiger Lake" "src/soc/intel/tigerlake" "tigerlake\|tgl\|tiger lake"
338
339 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Hatch" "src/mainboard/google/hatch" "hatch"
340 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Comet Lake" "src/soc/intel/cometlake" "cometlake\|cml\|comet lake"
341
342 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Eve / Poppy / Fizz / Soraka / Nautilus / Intel KblRvp" "src/mainboard/google/eve src/mainboard/google/poppy src/mainboard/google/fizz src/mainboard/intel/kblrvp" "eve[ :]\|poppy\|fizz\|soraka\|nautilus\|kblrvp"
343
344 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Kunimitsu / Google Chell / Lars / Glados" "src/mainboard/google/lars src/mainboard/google/chell src/mainboard/google/glados src/mainboard/intel/kunimitsu" "chell\|lars\|kunimitsu"
345 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Purism SKL" "src/mainboard/purism/librem_skl" "librem13v2\|librem_skl"
346 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Skylake / Kabylake" "src/soc/intel/skylake" "skylake\|sky.lake\|kabylake\|kaby.lake"
347
348 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Glkrvp / Google Octopus / Bip / Yorp" "src/mainboard/google/octopus src/mainboard/intel/glkrvp" "octopus\|glkrvp|\bip\|yorp"
349
350 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Cyan / Intel Strago" "src/mainboard/google/cyan src/mainboard/intel/strago" "cyan\|strago"
351 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Braswell" "src/soc/intel/braswell" "braswell"
352
353 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Kevin / Gru / Bob / Scarlet / Nefario" "src/mainboard/google/gru" "kevin\|gru[^b]"
354 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Rockchip rk3399" "src/soc/rockchip/rk3399" "rk3399"
355
356 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Reef / Pyro / Sand / Snappy / Nasher" "src/mainboard/google/reef" "reef\|pyro\|sand[ :]\|snappy\|nasher"
357 #get_log_dedupe "Intel apollolake_rvp leafhill minnow3" "src/mainboard/intel/apollolake_rvp src/mainboard/intel/leafhill src/mainboard/intel/minnow3" "apollolake_rvp\|leafhill\|minnow3"
358 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Siemens mc_apl1" "src/mainboard/siemens/mc_apl1" "mc_apl1"
359 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Apollolake/ Geminilake" "src/soc/intel/apollolake" "apollolake\|apollo.lake\|geminilake\|gemini.lake\|apl\|glk"
360
361 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Zoombini / Intel cannonlake_rvp" "src/mainboard/google/zoombini src/mainboard/intel/cannonlake_rvp" "zoombini\|cannonlake_rvp"
362 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel CannonLake" "src/soc/intel/cannonlake src/mainboard/intel/cannonlake_rvp" "cannonlake"
363
364 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Kuki" "src/mainboard/google/kukui" "kukui"
365 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "mediatek/mt8183" "src/soc/mediatek/mt8183" "mt8183"
366
367 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Cheza" "src/mainboard/google/cheza" "cheza"
368 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Qualcomm sdm845" "src/soc/qualcomm/sdm845" "sdm845"
369
370 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Prodrive Hermes / Google Sarien / Intel coffeelake_rvp" "src/mainboard/intel/coffeelake_rvp src/mainboard/google/sarien src/mainboard/prodrive/hermes"
371 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Coffeelake" "soc/intel/coffeelake"
372
373 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Cavium" "src/soc/cavium src/mainboard/cavium src/mainboard/opencellular/elgon "
374 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Scaleway Tagada" "src/mainboard/scaleway/tagada" "tagada"
375
376 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Galileo" "src/mainboard/intel/galileo" "galileo"
377 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Quark" "src/soc/intel/quark" "quark"
378
379 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Baytrail" "src/soc/intel/baytrail" "baytrail"
380 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Gale / Qualcomm QX ipq40xx" "src/mainboard/google/gale src/soc/qualcomm/ipq40xx" "gale\|ipq40"
381 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Rotor / Marvell Mvmap2315" "src/soc/marvell/mvmap2315 src/mainboard/google/rotor" "marvell\|mvmap\|rotor"
382
383 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Gigabyte ga-g41m-es2l" "src/mainboard/gigabyte/ga-g41m-es2l" "es2l"
384 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel x4x northbridge / LGA775" "src/northbridge/intel/x4x src/cpu/intel/socket_LGA775" "x4x\|lga775"
385
386 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Haswell / Broadwell" "src/northbridge/haswell" "haswell"
387 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Lynxpoint" "src/southbridge/intel/lynxpoint" "lynxpoint"
388
389 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Sandybridge / Ivybridge" "src/southbridge/intel/bd82x6x src/southbridge/intel/fsp_bd82x6x src/northbridge/intel/sandybridge src/northbridge/intel/fsp_sandybridge src/cpu/intel/fsp_model_206ax src/cpu/intel/model_206ax" "sandybridge\|ivybridge\|bd82x6x"
390
391 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Herbrine" "src/mainboard/google/herobrine" "herobrine"
392 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Qualcomm SC7280" "src/soc/qualcomm/sc2780" "sc2780"
393
394 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Corsola" "src/mainboard/google/corsola" "corsola"
395 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Mediatek MT8186" "src/soc/mediatek/mt8186" "mt8186"
396
397 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Common" "src/soc/intel/common src/southbridge/intel/common src/northbridge/intel/common" ""
398 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Amd Common" "src/soc/amd/common src/southbridge/amd/common" ""
399
400 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Nvidia" "src/southbridge/nvidia" ""
401 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Via" "src/northbridge/via src/southbridge/via" ""
402 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Broadcom" "src/southbridge/broadcom" ""
403 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Qualcomm" "src/soc/qualcomm" ""
404 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Mediatek" "src/soc/mediatek" ""
405
406 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel vendorcode / FSP" "src/drivers/intel/fsp* src/vendorcode/intel" ""
407 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "AMD vendorcode / AGESA / PI" "src/vendorcode/amd" "agesa\|binarypi"
408 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google vendorcode" "src/vendorcode/google"
409 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Cavium vendorcode" "src/vendorcode/cavium"
410
411 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Security" "src/drivers/i2c/tpm src/security" "tpm"
412 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Vboot" "src/vboot" "vboot"
413
414
415 ### GENERAL AREAS FOR RELEASE ###
416 # shellcheck disable=SC2013
417 {
418
419 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "X86 intel" \
420 "src/cpu/intel src/soc/intel src/northbridge/intel \
421 src/southbridge/intel src/include/intel src/drivers/intel"
422
423 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "X86 AMD" \
424 "src/cpu/amd src/northbridge/amd src/southbridge/amd src/include/amd src/soc/amd" \
425 "agesa\|binarypi\|binary.pi"
426
427 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "X86 common" \
428 "src/arch/x86 src/cpu/x86 src/include/x86 src/include/pc80"
429
430 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "ARM" \
431 "$(for codedir in $(grscip-shell system . . grep.ep -rl "_ARM" --include=Kconfig | \scip-shell system . . grep.
432 grep -v 'src/mainboard\|payloads/\|drivers/\|vendorcode/\|console' ); \
433 do dirname "$codedir"; done | grep -v '^src$')"
434
435 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "RISC-V" \
436 "$(for codedir in $(grscip-shell system . . grep.ep -rl "_RISCV" --include=Kconfig | grscip-shell system . . grep.ep -v 'payloads/\|drivers/\|vendorcode/\|console' ); do dirnascip-shell system . . dirname.me "$codedir"; done | grscip-shell system . . grep.ep -v '^src$')" \
437 "riscv\|risc-v\|lowrisc\|sifive"
438 }
439
440 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Google Mainboards" "src/mainboard/google"
441 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Intel Mainboards" "src/mainboard/intel"
442 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "AMD Mainboards" "src/mainboard/amd"
443 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Mainboards" "src/mainboard/"
444
445 # Next, print all the rest of the specific areas
446 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "ACPI" "src/acpi/"
447 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Console" "src/console src/include/console"
448 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "SuperIO" "src/superio src/include/superio"
449 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "EC" "src/ec"
450 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Drivers" "src/drivers"
451 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Devices" "src/device src/include/device"
452
453 # 5th, print the generic areas - This goes late so that the specific
454 # area changes will catch any commits in these areas first.
455 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Toolchain" "util/crossgcc"
456 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "cbfstool" "util/cbfstool"
457 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Lint tools" "util/lint"
458 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Lib" "src/lib"
459 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Commonlib" "src/commonlib"
460 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Include" "src/include"
461 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Utilities" "util"
462 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Payloads" "payloads"
463 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Vendorcode" "src/vendorcode"
464
465 # Then look at areas that are usually outside the mainboards and architectures
466 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Build system" \
467 "Makefile Makefile.mk toolchain.mk src/Kconfig src/cpu/Makefile.mk"
468
469 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Submodules" "3rdparty util/nvidia/cbootimage"
470
471 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "Maintainers" "MAINTAINERS" ""
472
473 # Finally, get anything that was missed above
474 get_log_dedupescip-shell shell coreboot 25.09+dfsg-1 get_log_dedupe(). "MISC" "."
475
476 # Replace VENDOR_DEVICE from stdin with their nice names on stdout
477 real_mainboard_namesscip-shell shell coreboot 25.09+dfsg-1 real_mainboard_names().() {
478 local tree_version=$1 # "old" or "new"
479 local git_version_var=${tree_version^^}_GIT_VERSION
480 local git_version=${!git_version_var}
481 local line
482 local file
483 local vendor
484
485 while read -r line; do
486 file="$(gitscip-shell system . . git. grep -l "^[[:space:]]*config\>[[:space:]]*\<BOARD_${line}\$" "${git_version}" -- src/mainboard/\*/\*/Kconfig.name | sedscip-shell system . . sed. "s,^${git_version}:,,")"
487 if [scip-shell system . . `[`. -z "$file" ]; then
488 echoscip-shell system . . echo. "This shouldn't happen: couldn't find Kconfig for $line"
489 exit 1
490 fi
491 vendor="$(gitscip-shell system . . git. grep \" "${git_version}" -- "$(echoscip-shell system . . echo. "${file}" | cutscip-shell system . . cut. -d/ -f1-3,5)" | cutscip-shell system . . cut. -d\" -f2)"
492 gitscip-shell system . . git. grep -h -A1 "^[[:space:]]*config\>[[:space:]]*\<BOARD_${line}\$" "${git_version}" -- "${file}" | grepscip-shell system . . grep. \" |cutscip-shell system . . cut. -d\" -f2 |sedscip-shell system . . sed. "s,^,${vendor} ,"
493 done
494 }
495
496 # Show areas that have been added or removed
497 show_diffscip-shell shell coreboot 25.09+dfsg-1 show_diff(). "mainboards" "$mainboard_list_old" "$mainboard_list_new" real_mainboard_names
498 show_diffscip-shell shell coreboot 25.09+dfsg-1 show_diff(). "processors" "$cpu_list_old" "$cpu_list_new"
499 show_diffscip-shell shell coreboot 25.09+dfsg-1 show_diff(). "socs" "$soc_list_old" "$soc_list_new"
500 show_diffscip-shell shell coreboot 25.09+dfsg-1 show_diff(). "northbridges" "$northbridge_list_old" "$northbridge_list_new"
501 show_diffscip-shell shell coreboot 25.09+dfsg-1 show_diff(). "southbridges" "$southbridge_list_old" "$southbridge_list_new"
502 show_diffscip-shell shell coreboot 25.09+dfsg-1 show_diff(). "sios" "$sio_list_old" "$sio_list_new"
503
504 # Log submodules
505 printfscip-shell system . . printf. "Submodules\n----------\n" >> "$LOGFILE"
506 for module in $(gitscip-shell system . . git. submodule --quiet foreach pwd); do
507 name=$(basenamescip-shell system . . basename. "$module")
508 module="$(realpathscip-shell system . . realpath. "${module}")"
509 workingdir="$(realpathscip-shell system . . realpath. "${PWD}")"
510 # shellcheck disable=SC2001
511 path=${module#"$workingdir"}
512 old_version=$(echoscip-shell system . . echo. "${name^^}_OLD_VERSION" | sedscip-shell system . . sed. 's/-/_/g')
513 new_version=$(echoscip-shell system . . echo. "${name^^}_NEW_VERSION" | sedscip-shell system . . sed. 's/-/_/g')
514 get_log_submodulescip-shell shell coreboot 25.09+dfsg-1 get_log_submodule(). "${!old_version}" "${!new_version}" "${path}"
515 done
516
517 printfscip-shell system . . printf. "\nrepo statistics\n-------------------\n" >> "$LOGFILE"
518 before_names="$(mktempscip-shell system . . mktemp. "OLDNAMES.XXXX")"
519 after_names="$(mktempscip-shell system . . mktemp. "NEWNAMES.XXXX")"
520 NEW_AUTHORS=$(gitscip-shell system . . git. log --pretty=%an "${OLD_GIT_VERSION}" 2>/dev/nullscip-shell filesystem . . `/dev/null`. | sortscip-shell system . . sort. | \
521 uniq > "$before_names" && \
522 git log --pretty=%an "${NEW_GIT_VERSION}" 2>/dev/null | \
523 sort | uniq > "$after_names" && \
524 grep -Fxv -c -f "$before_names" "$after_names")
525 NEW_AUTHOR_LIST=$( grepscip-shell system . . grep. -Fxv -f "$before_names" "$after_names")
526 rmscip-shell system . . rm. -f "$before_names" "$after_names"
527 {
528 printfscip-shell system . . printf. -- "* Total commits: %s\n" "$TOTAL_COMMITS"
529 prscip-shell system . . printf.intscip-shell system . . git.fscip-shell system . . printf. -- "* Total authors: %s\n" \
530 "$(git log "${OLD_GIT_VERSION}..${NEW_GIT_VERSION}" 2>/dev/null | \
531 grep -e '^Author:' | sed 's/.*Author: //' | sed 's/ <.*.>//' | \
532 sort | uniq | wc -l)"
533 pscip-shell system . . printf.rintfscip-shell system . . printf. -- "* New authors: %s\n\nNew Authors:\n%s\n" "$NEW_AUTHORS" \
534 "$NEW_AUTHOR_LIST"
535 } >> "$LOGFILE"
536
537 printfscip-shell system . . printf. "Getting developer list\n"
538 printfscip-shell system . . printf. "\n%-40s: %5s\n" "Developer" "Commits" >> "$LOGFILE"
539 gitscip-shell system . . git. log "${OLD_GIT_VERSION}..${NEW_GIT_VERSION}" 2>/dev/nullscip-shell filesystem . . `/dev/null`. | grepscip-shell system . . grep. '^Author: ' | \
540 sed 's|Author: ||' | sedscip-shell system . . sed. 's|\s<.*||' | sortscip-shell system . . sort. | uniqscip-shell system . . uniq. | \
541 while read -r line; do
542 prscip-shell system . . printf.intscip-shell system . . git.fscip-shell system . . printf. "* %-40s: %5s %5s\n" "$line" \scip-shell filesystem . . `/dev/null`.
543 "$(git log "${OLD_GIT_VERSION}" 2>/dev/null | \
544 grepscip-shell system . . git. -c "^Author: ${line} <")" \
545 "$(git log "${NEW_GIT_VERSION}" 2>/dev/null | \
546 grep -c "^Author: ${line} <")" >> "$LOGFILE";
547 done
548
549 printfscip-shell system . . printf. "\nOld SLOC (%s)\n%s" "$NOW" "$OLD_SLOC" >> "$LOGFILE"
550 printfscip-shell system . . printf. "\nNew SLOC (%s)\n%s" "$NOW" "$NEW_SLOC" >> "$LOGFILE"
551
552 # Add the collected data to the top of the existing logfile for parsing
553 if [scip-shell system . . `[`. -n "$UPDATE_MAIN_LOGFILE" ]; then
554 tmpfile="$(mktempscip-shell system . . mktemp. "LOGFILE.XXXX")"
555 grepscip-shell system . . grep. -Fxv -f "$MAIN_LOGFILE" "$LOGFILE" > "$tmpfile"
556 printfscip-shell system . . printf. "\n\n" >> "$tmpfile"
557 catscip-shell system . . cat. "$MAIN_LOGFILE" >> "$tmpfile"
558 mvscip-shell system . . mv. "$tmpfile" "$MAIN_LOGFILE"
559 rmscip-shell system . . rm. -f "$LOGFILE"
560 fi
561
562 printfscip-shell system . . printf. "Done.\n"