#!/bin/bash # ## First git-svn clone the original repository # git svn clone svn://flashrom.org/flashrom -s svn2git --prefix=origin/ # # cd svn2git # ## Since we want to merge the commits from coreboot v1 as well, we need to fetch those first... # git remote add flashrom-cbv1 git@github.com:stefanct/flashrom-cbv1.git # git fetch flashrom-cbv1 # ## Let's work on a mirror of this... # cd .. # cp -a svn2git svn2git-work # cd svn2git-work # ## rebase the second commit of the v2 tree (i.e. w/o the initial commit) onto a suitable commit of the v1 tree. ## suitable means that there are no conflicts... which isnt obvious if you look closer at the commits involved. ## However, there is even a better alternative available with git-replace. If that's not available this will ## rebase the current branch but leave all tags behind ## git rebase --committer-date-is-author-date --onto flashrom-cbv1/master^ f6989122bd3acc2c86fb2dd236db2c4ff126396a ## git replace allows to change the parent of a commit under the feed of a commit. ## The following replaces the root of the current branch with the last commit of the coreboot v1 master branch. # git replace $(git rev-list --max-parents=0 HEAD) flashrom-cbv1/master # ## convert the git-svn "tag branches" into real git tags. ## Declare the svn_authors array as further below then execute the following snippet #for otag in `git branch -r | grep "origin/tags/"`; do #export GIT_COMMITTER_DATE=$(git log --date=iso --format='%cI' $otag^..$otag) #committer_name=$(git log --format='%an' $otag^..$otag) #export GIT_COMMITTER_NAME=${svn_authors[$committer_name]} #export GIT_COMMITTER_EMAIL=${svn_authors[${committer_name}_email]} #ver=$(echo $otag | sed -e 's/flashrom-//;s?origin/tags/??') #git tag -f -a -m"flashrom version $ver" $ver refs/remotes/$otag^ #done # ## reset pointer to newest rewritten commit if you used the rebase above only ## git reset --hard 0.9.9 ## run this script as follows (absolute path is mandatory if not in PATH): # tmpvar="$() (.*>)/\1\n\n\2\n\3\n/') elif [ "$flashrom_rev" = "r1125" ]; then input=$(echo "$input" | sed -e 's/rev. /rev /') elif [ "$flashrom_rev" = "r1317" ]; then input=$(echo "$input" | sed -e '/some parts are/d;/the rest is/d;') elif [ "$flashrom_rev" = "r1702" ]; then input=$(echo "$input" | sed -e '/Most parts are also/d;') fi # use current email addresses everywhere, remove "trivial" markers, create true sign-offs from free-form text input=$(echo "$input" | sed -re ' s/stefan.tauner@student.tuwien.ac.at/stefan.tauner@alumni.tuwien.ac.at/; s/(, )?(Scott Tsai,? )?scott.tsai arima.com.tw/Scott Tsai /; s/ ?\(trivial[^\)]*\)\.?//i; 1 s/, trivial\.//; s/Creator: Yinghai Lu /Signed-off-by: Yinghai Lu /; s/^(both )?(by|from):? (.*[ \t]<.+>\.?$)/Signed-off-by: \3/i; ') # coreboot revision coreboot2_rev=$(echo "$input" | sed -nre "s/${coreboot2_rev_grep}/r\1/p") if [ -n "$coreboot2_rev" ]; then input=$(echo "$input" | sed -re "N; /${coreboot2_rev_grep}\n/d") # get rid of cb v2 line fi # get paragraph containing all sign-offs, acks and normal text between/above that signoff_block_tmp=$(echo "$input" | cat -n | grep -oPz "(......\t[^\n]+\n)*(......\t((${signoff_grep})|(${ack_grep}))\n)+") if [ -n "$signoff_block_tmp" ]; then signoff_block_head=$(echo "$signoff_block_tmp" | head -n1 | cut -f1) signoff_block_tail=$(echo "$signoff_block_tmp" | grep -a -E "^..+$" | tail -n1 | cut -f1) # if the signoff_block starts with the first line then we would lose the subject below... if [ -z "$signoff_block_head" ] || [ "$signoff_block_head" -eq 1 ]; then input=$(echo "$input" | sed -re '2 s/(.*)/\n\1/') signoff_block_head=3 signoff_block_tail=$((signoff_block_tail + 1)) fi signoff_block=$(echo "$input" | sed -ne "$signoff_block_head,$signoff_block_tail p") #input=$(echo "$input" | pcregrep -v -M -F -- "$signoff_block") input=$(echo "$input" | sed -e "$signoff_block_head,$signoff_block_tail d") signoffs=$(echo "$signoff_block" | sed -nre "s/${signoff_grep}/\2/ip;") fi output="$input" # typos and other mistakes output=$(echo "$output" | sed -re "s/rmove/remove/i; s/flasrom/flashrom/i; s/declaretion/declaration/i; s/sougthbridge/southbridge/i; s/consolidatation/consolidation/i; s/tye/type/i; s/ dmi / DMI /i; s/mods for the PCM 9574. //; s/Assignirq/Assigning/; s/fro Oliver/from Oliver/; s/eithe /either /i; s/ ca handle/ can handle/i; s/v\.s\. /vs. /; 1 s/^[ \t]*flashrom: //i; 1 s/\[LinuxBIOS\] //i; 1 s/\[FLASHROM\] //i; s/More i955pm stuff.//; s/flashchips.c over what's currently in flashrom HEAD\./flashchips.c./; s/[\.,]? ?\(?Closes:? #[0-9][0-9]?[0-9]?\)?//i; s/Maybe we this accelerates/Maybe this accelerates/; s/resovle/resolve/i; s/ ?Thank you[!\.]?//i; /apply patch from Giampiero Giancipoli :/d; s#https://openbios.org/roundup/linuxbios/issue.*- ##; s/^(both )?(by|from) (.*[ \t]<.+>)/Signed-off-by: \3/i; s/\*\*\* empty log message \*\*\*/Add dedicated chip erase function for SST49LF040./; s#Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30.*##; s/Fix for nehemiah//; s/Quickfix/Quick fix/; s/Chip's IDs/chip's IDs/; s/other fixes for gx2 ram init. //; s/support for sharplfg00l04 -- not working yet./Add preliminary (non-working) support for Sharp LHF00L04./; s/Tested on my home Shuttle SB51G box./Add support for Winbond W49V002FA.\n\n&/; s/new flash part/Add support for Winbond W49V002A/; # Remove anything below --- or -- /^---?/,/^\s*$/d; /^tested and$/d; 1 s/^issue:? [0-9][0-9]?[0-9]?,? *//i; /Apply patch from Giampiero Giancipoli :/d; s/Ward writes/Mark SST SST49LF160C as fully supported./i; s/redo ts5300 auto.c//i; s/Revert r466 because it introduced a bug:/Revert r466 because of inverted logic.\n/; s/(Convert chips to block_erasers:)/Block eraser conversions and support for Eon EN25B series.\n\n\1/; s#See also http://www.openbios.org/pipermail/linuxbios/2007-January/018042.html.##; ") # multi-line mistakes output=$(echo "$output" | perl -0777 -pe ' s/(SST49LF00\[2,3,4\] should use)\n/$1 /; s/Creator: Yinghai Lu \n//; s/(This)\n(will detect any improper erase.)/$1 $2./; s/(S29C31004T)\nflash chips to flashrom./$1./; s/(Please update to this)\n/$1 /; s/(I have no idea what i was trying to show off when I used the while loop rather)\n/$1 /; s/update dumpmmcr.c utility\nanother flash chip that doesn'\''t clog the serial line/Make SST49lf040 not clog the serial line too./; ') # add subject summing up commit logs that list a number of changes without a subject output=$(echo "$output" | sed -re '1 N; s/^([-\*].*\n[-\*])/Multiple unrelated changes.\n\n\1/') # skip any empty lines again possibly added above output=$(echo "$output" | sed '/./,$!d') # filter out full stops in common abbreviations in the first line to make the following feasible without breaking such lines output=$(echo "$output" | sed -re ':a; 1 s/ (vs|etc)\. / \1 /g;1 s/Dr\. /Dr /g; ta') # if there is no full stop (". ") in the first line, merge it with the second one, if it is not empty - unless the last character is a colon. output=$(echo "$output" | sed -re ':start ;N ; s/^(([^\.]|(\.[^ ]))+)[ \t]*([^:\.])\n(.+)/\1\4 \5/; t start; :loop n ; b loop') # remove useless references to flashrom output=$(echo "$output" | sed -re '1 s/ (to|in) flashrom([\.:]?)/\2/;') # put a full stop at the end of the first line if there is none, a colon, semicolon or a comma and the next line is # empty or starts an itemization... if [ "$(echo "$output" | wc -l)" -gt 1 ]; then # a typical other delimter output=$(echo "$output" | sed -re '1 N; s/^(([^\.]|(\.[^ ]))+)[ \t]*[,:;!][ \t]*\n([ \t]*[\*\-]?.*)$/\1.\n\n\4/') # no full stop output=$(echo "$output" | sed -re '1 N; s/^(([^\.]|(\.[^ ]))+)[ \t]*\n([ \t]*[\*\-]?.*)$/\1.\n\n\4/') else # or does not exist at all - in that case we skip the N command) # a typical other delimter output=$(echo "$output" | sed -re '1 s/^(([^\.]|(\.[^ ]))+)[ \t]*[,:;!][ \t]*$/\1.\n/') # no full stop output=$(echo "$output" | sed -re '1 s/^(([^\.]|(\.[^ ]))+)[ \t]*$/\1.\n/') fi # break first line after first fullstop (series) if it isnt output=$(echo "$output" | sed -re '1 s/^((([^\.])|(\.[^ \.]))+\.)[ \t]+(.+)$/ahc9Jie\1\n\n\5/') if [ "$coreboot1_rev" = "r582" ]; then output="Add support for ST M29F400BT - part 1" elif [ "$coreboot1_rev" = "r589" ]; then output="Add support for ST M29F400BT - part 2" elif [ "$coreboot1_rev" = "r780" ]; then output="Add support for CS5530" elif [ "$coreboot1_rev" = "r893" ]; then output="Fix another volatile declaration" elif [ "$flashrom_rev" = "r2" ]; then output="Removed spd_dump.c, it has nothing to do with flashing flash parts" elif [ "$flashrom_rev" = "r7" ]; then output="Use standard product ID exit method for w49f002u" elif [ "$flashrom_rev" = "r41" ]; then output="Add support for ST M29F040B. Signed-off-by: Leon Woestenberg " elif [ "$flashrom_rev" = "r58" ]; then output="Add support for SST39SF040, SST39SF010A and W39V040B." elif [ "$flashrom_rev" = "r89" ]; then output="Add support for LinuxBIOS tables independent from its source tree." elif [ "$flashrom_rev" = "r90" ]; then output="Note in makefile messages that zlib may be needed for libpci. $output" elif [ "$flashrom_rev" = "r106" ]; then output="Enable flashing on IWILL DK8-HTX. Set the right GPIO pins on the Super I/O to disable write protection. " elif [ "$flashrom_rev" = "r123" ]; then output="Add various ST flash chips. $output" elif [ "$flashrom_rev" = "r134" ]; then output="Add a dedicated license. $output" elif [ "$flashrom_rev" = "r146" ]; then output="Add spi.c forgotten in r145." elif [ "$flashrom_rev" = "r147" ]; then output="Convert the existing it8716f_* functions to generic_spi_* functions." elif [ "$flashrom_rev" = "r158" ]; then output="Add support for Intel 440MX and Fujitsu MBM29F400TC. Detection and reading works, writing is not tested." elif [ "$flashrom_rev" = "r165" ]; then output="Rename SPI erase functions to include opcode. $output" elif [ "$flashrom_rev" = "r166" ]; then output="Add support for various ST M25P* chips. $output" elif [ "$flashrom_rev" = "r170" ]; then output="Refine various vendor ID annotations. $output" elif [ "$flashrom_rev" = "r178" ]; then output="Rename LinuxBIOS to coreboot" elif [ "$flashrom_rev" = "r181" ]; then output="Further abstract SPI functions to allow chips bigger than 512 kB behind IT8716Fs. $output" elif [ "$flashrom_rev" = "r192" ]; then output="Write enable flash chips attached to CS3 of CS5536 chipsets (AMD Geode) $output" elif [ "$flashrom_rev" = "r196" ]; then output="Fix compilation with custom CFLAGS. $output" elif [ "$flashrom_rev" = "r217" ]; then output="82802ab: touch only blocks that need updating. $output" elif [ "$flashrom_rev" = "r219" ]; then output="Separate ST M50FLW support from generic JEDEC code. $output" elif [ "$flashrom_rev" = "r235" ]; then output="Add support for the JEDEC RES. $output" output=$(echo "$output" | sed -re 's/, which was/./') elif [ "$flashrom_rev" = "r238" ]; then output="IT8716F: Enable writes if decoding of any SPI addresses is enabled." elif [ "$flashrom_rev" = "r331" ]; then output="Mark Winbond W39V040FA (512 KB) as fully supported. Tested by Martin Stecklum (both write and erase). The tests were done on an MSI MS-7065 board, so that's supported now too." elif [ "$flashrom_rev" = "r340" ]; then output="Mark ST M25P16 as fully tested. This has been confirmed by Stéphan Guilloux." elif [ "$flashrom_rev" = "r346" ]; then output="ichspi: use spi_nbyte_read() instead of running the opcode directly. $output" elif [ "$flashrom_rev" = "r348" ]; then output="Try RES even if RDID fails. $output" elif [ "$flashrom_rev" = "r352" ]; then output="Do not indicate known-bad functions as untested. $output" elif [ "$flashrom_rev" = "r367" ]; then output="Various ichspi.c refinements. $output" elif [ "$flashrom_rev" = "r382" ]; then output="Use designated initializers for the board enable table. $output" reflow=no elif [ "$flashrom_rev" = "r419" ]; then output=$(echo "$output" | tail -n+2) output="Reduce use of volatile variables During the conversion of flash chip accesses to helper functions, I spotted assignments to volatile variables which were neither placed inside the mmapped ROM area nor were they counters. $output" reflow=no elif [ "$flashrom_rev" = "r422" ]; then output="Improve readability of Atmel AT45 comments. $output" elif [ "$flashrom_rev" = "r445" ]; then output="Handle DragonFly BSD definitions in flash.h. $output" elif [ "$flashrom_rev" = "r452" ]; then output="Allow compilation on Solaris. $output" elif [ "$flashrom_rev" = "r470" ]; then output="Document uncertainty regarding ASD chips. $output" elif [ "$flashrom_rev" = "r473" ]; then output="Don't assume flash is accessible via MMIO for chips with no read function. $output" elif [ "$flashrom_rev" = "r482" ]; then output="board_enable: split vendor name and board name into two fields. This will allow generation of supported boards for wiki output to be split to distinct columns." elif [ "$flashrom_rev" = "r484" ]; then output="Refine handling of spi_write_enable() failures to fix chip erases on ichspi. $output" elif [ "$flashrom_rev" = "r492" ]; then output="Handle (un)locking of SST FWH chips. $output" elif [ "$flashrom_rev" = "r493" ]; then output="Abstract mapping/unmapping of flash regions. $output" elif [ "$flashrom_rev" = "r494" ]; then output="Check probing results for flash contents. $output" elif [ "$flashrom_rev" = "r497" ]; then output="Unify write_39sf020() and write_49f002() functions. $output" elif [ "$flashrom_rev" = "r510" ]; then output=$(echo "$output" | sed -re '1 s/3COM: //') output="nic3com: allow selection of a particular PCI device to use as programmer. $output" elif [ "$flashrom_rev" = "r511" ]; then output="Unify usage of iopl-like code by introducing get_io_perms(). $output" elif [ "$flashrom_rev" = "r514" ]; then output="Additionally to WREN also handle WRSR failures gracefully for ICHSPI. $output" elif [ "$flashrom_rev" = "r519" ]; then output="Introduce a type \"chipaddr\" to abstract the offsets within flash regions. $output" elif [ "$flashrom_rev" = "r552" ]; then output="Change \"Texas Instruments\" to \"TI\" in the flash chip table. It currently even breaks -L output. We could of course fix that, but we already use short/abbreviated names for other vendors (AMD, ST, SST, PMC) anyway. " elif [ "$flashrom_rev" = "r567" ]; then output=$(echo "$output" | tail -n+3) output="Mark 3COM \"3C905B: Cyclone 10/100/BNC\" as fully tested. $output" elif [ "$flashrom_rev" = "r573" ]; then output="Enable debug output of protection register access on SST49LF* chips." elif [ "$flashrom_rev" = "r574" ]; then output="Specify the exact bus type for a number of flash chips. $output" elif [ "$flashrom_rev" = "r575" ]; then output="Refine write_lockbits_49lfxxxc() to use struct flashchip." elif [ "$flashrom_rev" = "r578" ]; then output="Add programmer-specific delay functions. $output" elif [ "$flashrom_rev" = "r592" ]; then output="Add or refine support for a number of EON flash chips. $output" elif [ "$flashrom_rev" = "r594" ]; then output="Split flashchips.h from flash.h. $output" elif [ "$flashrom_rev" = "r596" ]; then output=$(echo "$output" | tail -n+2) output="Support reads of arbitrary range. $output" elif [ "$flashrom_rev" = "r607" ]; then output="Allow to print an auto-generated hardware support list in MediaWiki markup. $output" elif [ "$flashrom_rev" = "r618" ]; then output="Note how the GIGABYTE GA-7ZM can be flashed. $output" elif [ "$flashrom_rev" = "r662" ]; then output=$(echo "$output" | tail -n+3) output="Add support for ST M25P05/M25P10 chips that only respond to RES and not RDID. $output" elif [ "$flashrom_rev" = "r673" ]; then output="Replace remaining explicit erases in SPI programmer drivers with auto-erases. $output" elif [ "$flashrom_rev" = "r678" ]; then output="Add fallback functions for programmer shutdown and memory mapping and fix FT2232 and IT87. $output" elif [ "$flashrom_rev" = "r680" ]; then output="Add a new field for the names of programmers and use it to match against user input. $output" elif [ "$flashrom_rev" = "r683" ]; then output=$(echo "$output" | tail -n+3) output="Use MSR abstraction in all board enables. This was forgotten in flashrom svn r677 where some handcrafted MSR accesses were still found in board-specific code." elif [ "$flashrom_rev" = "r693" ]; then output="Change programmer options separator from = to :. $output" elif [ "$flashrom_rev" = "r694" ]; then output="Adept layout handling to new programmer infrastructure and fix off-by-one error. $output" elif [ "$flashrom_rev" = "r696" ]; then output="Add support for ICH9 engineering sample. $output" elif [ "$flashrom_rev" = "r703" ]; then output="Refine bad board list. $output" elif [ "$flashrom_rev" = "r704" ]; then output="Add the possibility to set the release name directly as makefile parameter. $output" elif [ "$flashrom_rev" = "r717" ]; then output=$(echo "$output" | tail -n+5) output="Unify some probe functions that basically correspond to probe_jedec(). $output" reflow=no elif [ "$flashrom_rev" = "r719" ]; then output=$(echo "$output" | tail -n+3) output="Store block sizes and corresponding erase functions in struct flashchip. $output" reflow=no elif [ "$flashrom_rev" = "r722" ]; then output="Fix some of the issues reported by LLVM/clang's scan-build " elif [ "$flashrom_rev" = "r723" ]; then output="Fix all remaining issues reported by LLVM/clang's scan-build " elif [ "$flashrom_rev" = "r753" ]; then output="ichspi: remove obnoxious debug message. $output" elif [ "$flashrom_rev" = "r755" ]; then output=$(echo "$output" | tail -n+3) output="Add infrastructure to check the maximum supported flash size of chipsets and mainboards $output" elif [ "$flashrom_rev" = "r757" ]; then output="Retry correct range in write_page_write_jedec(). $output" elif [ "$flashrom_rev" = "r762" ]; then output="Retrieve linker flags for libftdi with pkg-config. $output" elif [ "$flashrom_rev" = "r766" ]; then output="Refactor main loop in preparation of libflashrom. $output" reflow="no" elif [ "$flashrom_rev" = "r767" ]; then output="Add support for generic RDID and REMS matching of unknown chips. $output" elif [ "$flashrom_rev" = "r769" ]; then output="ft2232_spi: add some error handling. $output" elif [ "$flashrom_rev" = "r772" ]; then output=$(echo "$output" | tail -n+3) output="Cleanly validate ICH SPI preopcodes. $output" elif [ "$flashrom_rev" = "r783" ]; then output="Refine support for the JEDEC Software Data Protection. $output" elif [ "$flashrom_rev" = "r799" ]; then output=$(echo "$output" | tail -n+3) output="Split hardware access, OS abstraction and chip drivers out of flash.h. $output" elif [ "$flashrom_rev" = "r805" ]; then output="Skip all delays in probe_jedec() if probe_delay is 0. $output" elif [ "$flashrom_rev" = "r807" ]; then output="jedec: warn if toggle bit is stuck for too long and allow for delays between tries. $output" elif [ "$flashrom_rev" = "r828" ]; then output="Generify jedec functions by introducing an address mask. $output" elif [ "$flashrom_rev" = "r829" ]; then output="Move generic programmer function into newly introduced programmer.c. $output" elif [ "$flashrom_rev" = "r830" ]; then output="Move OS-dependent serial code from buspirate_spi.c to serial.c. While at it, also rename a few functions to make it obvious that they are generic and not specific to the Bus Pirate. " elif [ "$flashrom_rev" = "r834" ]; then output="Allow one to disable programmer debug messages at compile time. $output" elif [ "$flashrom_rev" = "r841" ]; then output="Change msg_* macros to C99 variadic macros. $output" elif [ "$flashrom_rev" = "r858" ]; then output="Refine selection of the default programmer. $output" elif [ "$flashrom_rev" = "r864" ]; then output="Do sanity checks of block erasers at startup and continue check on errors. $output" elif [ "$flashrom_rev" = "r877" ]; then output="Convert various SST chips to use block_erasers. $output" elif [ "$flashrom_rev" = "r894" ]; then output="Rewrite substantial parts of the ICH SPI support. $output" elif [ "$flashrom_rev" = "r898" ]; then output=$(echo "$output" | sed -re '/Split internal.c into internal.c and hwaccess.c./d') output="Split internal.c into internal.c and hwaccess.c. $output" elif [ "$flashrom_rev" = "r899" ]; then output="Ignore RES (1 byte) if chip replied to REMS (2 bytes). $output" elif [ "$flashrom_rev" = "r904" ]; then output="Allow the registration of functions to be called at programmer shutdown. $output" elif [ "$flashrom_rev" = "r917" ]; then output="Convert the remaining references to *_49fl00x. Now the only remaining and used function in pm49fl00x.c is unlock_49fl00x. Also: - Add missing unlock to AMIC A49LF040A. - Add lock_49fl00x function. " elif [ "$flashrom_rev" = "r937" ]; then output="Add FEATURE_REGISTERMAP to some more chips and change the use of various probing functions. $output" reflow=no elif [ "$flashrom_rev" = "r941" ]; then output="Clean up sharplhf00l04.c after JEDEC refactorings. - remove some copied functions (from 82802ab.c) and use the 82802ab equivalents - fix missing prototypes to *_82802ab functions " reflow=no elif [ "$flashrom_rev" = "r942" ]; then output="Clean up sst28sf040.c after JEDEC refactorings. $output" reflow=no elif [ "$flashrom_rev" = "r943" ]; then output="Further cleanup after JEDEC refactorings. $output" reflow=no elif [ "$flashrom_rev" = "r948" ]; then output="Various JEDEC refactorings touching 82802ab.c, sharplhf00l04.c and stm50flw0x0x.c. $output" reflow=no elif [ "$flashrom_rev" = "r954" ]; then output="Rebased Board Enable Patch: Factor out Via Apollo GPO setting. The board enable for the VT6X4 committed in r950 actually depended on this commit. " elif [ "$flashrom_rev" = "r960" ]; then output="Fix some problems introduced in commit r948 brought up by carldani. The Intel 28F001BX-T/B chips don't have block locks or mention of registers; chip is old. The Intel 28F004S5 mentions block locks which require a remapping registers." elif [ "$flashrom_rev" = "r968" ]; then output=$(echo "$output" | sed -re 's/i386/i386./') output="Refine compile-time checks for libpci. $output" elif [ "$flashrom_rev" = "r971" ]; then output="Check 82802AB probing results for flash contents too. $output" elif [ "$flashrom_rev" = "r990" ]; then output="Refine and fix the delay loop calculation. $output" elif [ "$flashrom_rev" = "r994" ]; then output="Add support for Winbond W25Q80, W25Q16 and W25Q32. I tested read/write/probe with W25Q80." elif [ "$flashrom_rev" = "r997" ]; then output="Convert various prints to use msg_p* and msg_g* respectively. $output" reflow=no elif [ "$flashrom_rev" = "r999" ]; then output="Write MSRs in a platform and compiler-independent form. $output" elif [ "$flashrom_rev" = "r1005" ]; then output="Introduce a generic SPI read function: spi_write_chunked(). $output" elif [ "$flashrom_rev" = "r1007" ]; then output="Disable probing for one variant of MCP55 to enable Tyan S2915. $output" elif [ "$flashrom_rev" = "r1008" ]; then output="Print found PCI IDs during chipset detection. $output" elif [ "$flashrom_rev" = "r1016" ]; then output="ichspi: try harder to conform to address restrictions. $output" elif [ "$flashrom_rev" = "r1017" ]; then output="Add support for two-byte RES probes. $output" elif [ "$flashrom_rev" = "r1028" ]; then output="Measure OS timer precision to refine calibration. $output" elif [ "$flashrom_rev" = "r1031" ]; then output="Internal: introduce processor enables and abort if top/bottom alignment is unknown. $output" elif [ "$flashrom_rev" = "r1033" ]; then output="Fix libpci linkage on NetBSD. $output" elif [ "$flashrom_rev" = "r1048" ]; then output="Makefile: detect unsupported configuration options. $output" elif [ "$flashrom_rev" = "r1052" ]; then output="Refine SPI AAI support. $output" elif [ "$flashrom_rev" = "r1069" ]; then output="Disable writes on default for known bad programmers. $output" elif [ "$flashrom_rev" = "r1072" ]; then output="Unify programmer parameter extraction. $output" elif [ "$flashrom_rev" = "r1073" ]; then output="Generify support for ITE IT8705 Super I/O. $output" elif [ "$flashrom_rev" = "r1080" ]; then output="Convert SPI chips to partial write. However, wrap the write functions in a compat layer to allow converting the rest of flashrom later. Tested on Intel NM10 by David Hendricks." elif [ "$flashrom_rev" = "r1081" ]; then output="Use the max_rom_decode infrastructure for wbsio_spi. Use this instead of the open-coding variant that only aborts after it is too late." elif [ "$flashrom_rev" = "r1082" ]; then output="Use generic unlocking infrastructure for SPI chips. Actually check if the unlock worked instead of just assuming it worked." elif [ "$flashrom_rev" = "r1085" ]; then output="Refine SPI bitbanging. $output" elif [ "$flashrom_rev" = "r1087" ]; then output="Use __clang_version__ macro. $output" elif [ "$flashrom_rev" = "r1089" ]; then output="Refine PCI BAR masks handling for drkaiser and gfxnvidia. $output" elif [ "$flashrom_rev" = "r1111" ]; then output=$(echo "$output" | sed -re 's/ / /') output="Convert MMIO accesses of non-internal PCI-based programmers to be endian-agnostic. $output" elif [ "$flashrom_rev" = "r1116" ]; then output="Allow compilation on architectures without direct hardware access primitives. $output" elif [ "$flashrom_rev" = "r1118" ]; then output="Add support for various AMIC A25L* chips. $output" elif [ "$flashrom_rev" = "r1119" ]; then output="Add support for the Amontec JTAGkey2. $output" elif [ "$flashrom_rev" = "r1120" ]; then output="Speed up Bus Pirate by exploiting the FTDI FIFO. $output" elif [ "$flashrom_rev" = "r1121" ]; then output="Fix bug introduced in AAI code rewrite (r1052). $output" elif [ "$flashrom_rev" = "r1145" ]; then output="Add paranoid checks to sb600spi driver. $output" reflow=no elif [ "$flashrom_rev" = "r1147" ]; then output="Add FEATURE_WRSR_WREN to all Winbond SPI flash chips. $output" elif [ "$flashrom_rev" = "r1148" ]; then output="Add FEATURE_WRSR_WREN to all Eon SPI flash chips. $output" elif [ "$flashrom_rev" = "r1149" ]; then output="Add FEATURE_WRSR_WREN to all AMIC SPI flash chips. $output" elif [ "$flashrom_rev" = "r1150" ]; then output="Add FEATURE_WRSR_WREN to all Macronix SPI flash chips. $output" elif [ "$flashrom_rev" = "r1152" ]; then output="Various status updates. $output" output=$(echo "$output" | sed -re 's/(from )(.*)(http.*)/\1\n\2\n\3/') reflow=no elif [ "$flashrom_rev" = "r1168" ]; then output="Various style/consistency fixes mainly for Winbond chips. $output" elif [ "$flashrom_rev" = "r1173" ]; then output="Detect embedded EC (IMC) in AMD's SBs. $output" elif [ "$flashrom_rev" = "r1178" ]; then output="Handle Bus Pirates already in bit banging mode correctly. $output" elif [ "$flashrom_rev" = "r1180" ]; then output="internal: remove unused variable. $output" elif [ "$flashrom_rev" = "r1182" ]; then output="Add list with DMI chassis types. $output" elif [ "$flashrom_rev" = "r1186" ]; then output="Add details how to build for DOS to README. $output" elif [ "$flashrom_rev" = "r1194" ]; then output="Massive speedups for SST25VF032B and SST25VF064C. $output" elif [ "$flashrom_rev" = "r1198" ]; then output="Rename Direct I/O library to DirectHW. $output" elif [ "$flashrom_rev" = "r1199" ]; then output="Refine -L output to include all programmer modules. $output" elif [ "$flashrom_rev" = "r1201" ]; then output="Fix timing of SPI status register writes (WRSR). $output" elif [ "$flashrom_rev" = "r1202" ]; then output="Refine text of requests to send logs. $output" elif [ "$flashrom_rev" = "r1203" ]; then output="Multiple unrelated changes. $output" reflow="no" elif [ "$flashrom_rev" = "r1206" ]; then output="Move implicit erase out of chip drivers. $output" elif [ "$flashrom_rev" = "r1208" ]; then output="Unify chip write functions. $output" elif [ "$flashrom_rev" = "r1212" ]; then output="Refactor doit(). $output" elif [ "$flashrom_rev" = "r1219" ]; then output="Replace \"\$FLASHROM_PARAM\" with \${FLASHROM_PARAM} in util/flashrom_partial_write_test.sh. $output" elif [ "$flashrom_rev" = "r1225" ]; then output="Fix two memory leaks in doit() and refine get_next_write(). $output" elif [ "$flashrom_rev" = "r1230" ]; then output="Use device-specific vendor ID in ftdi_usb_open() call. $output" elif [ "$flashrom_rev" = "r1231" ]; then output="Add support for the OpenMoko debug boards v2 and v3. $output" elif [ "$flashrom_rev" = "r1240" ]; then output="Avoid printing the chip locks if chip detection was forced. Lock access may involve flash chip registers which will not be mapped if automatic detection failed." elif [ "$flashrom_rev" = "r1247" ]; then output="Mark MX25L3205, W25Q80, W25Q32 and W25Q64 as fully tested " elif [ "$flashrom_rev" = "r1252" ]; then output="Convince compilers to put constant data into the .rodata section. $output" elif [ "$flashrom_rev" = "r1253" ]; then output="Avoid printing mapped addresses for programmers that do not map flash chips. $output" elif [ "$flashrom_rev" = "r1260" ]; then output="Add support for some AMD Am29LV* chips. $output" elif [ "$flashrom_rev" = "r1274" ]; then output="Remove vendorid parameter from pcidev_init(). $output" elif [ "$flashrom_rev" = "r1316" ]; then output="Refine status register and lock printing of Atmel and AMIC SPI chips. $output" elif [ "$flashrom_rev" = "r1318" ]; then output=$(echo "$output" | tail -n+3) output="Eliminate magic numbers indicating maximum column sizes in print.c. $output" elif [ "$flashrom_rev" = "r1349" ]; then output="Flush stdout after each message. $output" elif [ "$flashrom_rev" = "r1353" ]; then output="Move erase verification to generic code. $output" elif [ "$flashrom_rev" = "r1388" ]; then output="Enforce compile-time errors in satamv and atahp for non-x86 targets. $output" elif [ "$flashrom_rev" = "r1552" ]; then output=$(echo "$output" | tail -n+3) output="Always require the --programmer parameter if any flash chip access is requested. $output" elif [ "$flashrom_rev" = "r1649" ]; then output=$(echo "$output" | tail -n+3) output="dedirpog: add a parameter 'spispeed' to set the SPI clock rate. $output" elif [ "$flashrom_rev" = "r1708" ]; then output="Abort on unused programmer parameters. $output" elif [ "$flashrom_rev" = "r1949" ]; then output="sb600spi: rewrite and fix corner case. Specifying spispeed=reserved as programmer parameter resulted in selecting the default SPI speed instead of aborting. Rewrite the logic to be more readable. " elif [ "$flashrom_rev" = "r1952" ]; then output="Shutdown serial port in pony_spi. Implement serial port shutdown both for regular termination and error conditions in pony_spi. " fi # simply just text reflow... case "$flashrom_rev" in "r375" | "r649" | "r1093"| "r1112" | "r1113" | "r1146" | "r1122" | "r1925") reflow="no" ;; "r141") reflow="yes" ;; esac # ensure there is a double line break after the first line output=$(echo "$output" | sed -re '1 N; s/^([^\n]+)\n([^\n]+)$/\1\n\n\2/') # filter single dots in lines and remove trivial trivial notes output=$(echo "$output" | sed -e '/^\.$/d; /^[tT]rivial\.$/d;') # remove double empty lines output=$(echo "$output" | perl -0777 -pe "s/\n\n\n/\n\n/;") subject=$(echo "$output" | head -n1) body=$(echo "$output" | tail -n+3) if echo "$subject" | grep -a -q "ahc9Jie" ; then subject=$(echo "$subject" | sed -re 's/^(ahc9Jie)+//') reflow="yes" fi if echo "$body" | grep -a -q "ahc9Jie" ; then body=$(echo "$body" | sed -re '1 s/^(ahc9Jie)+//') reflow="yes" fi if [ "$reflow" = "yes" ] || [ -z "$reflow" -a "$(echo "$body" | head -n 1 | wc -c)" -gt 85 ]; then # clobbers everything into one paragraph due to a bug(?) #body=$(echo "$body" | perl -0777 -e ' #use Text::Reflow "reflow_file"; #reflow_file("", "", maximum => 80, optimum => 75, frenchspacing => "y", semantic => 5);') # does not know frenchspacing #body=$(echo "$body" | fmt -g 75 -w 80 -) # does not format as well as the tex algorithms used above... but at least it does what one expects body=$(echo "$body" | par E1s0p0w72) fi # Remove full stop at the end of subject (unless there are more than one) subject=$(echo "$subject" | sed -re 's/([^\.])\.$/\1/') # Re-introduce correctly-dotted abbreviations subject=$(echo "$subject" | sed -re ':a; s/ (vs|etc) / \1. /g;s/Dr /Dr. /g; ta') # Use imperative, present tense subject=$(echo "$subject" | sed -re 's/^Fixed /Fix /i;s/^Removed /Remove /i;s/^Added /Add /i;') output="$subject $body" # first letter capitalized in lines 1 and 3 if first word does not end with colon or contains numbers output=$(echo "$output" | sed -re '1,3 s/^(.)([^0123456789 \t:]*([ \t]|$))/\u\1\2/') # Append revision(s) output="$output Corresponding to" if [ -n "$flashrom_rev" ]; then output="$output flashrom svn $flashrom_rev" if [ -n "$coreboot2_rev" ]; then output="$output and coreboot v2 svn $coreboot2_rev" fi elif [ -n "$coreboot1_rev" ]; then output="$output coreboot v1 svn $coreboot1_rev" else echo "Neither cb v1 nor flashrom svn revision. This should never happen." >&2 exit 1 fi output="$output." svn_author=$(echo "${GIT_AUTHOR_NAME}" | sed 's/ *<.*//') if [ -z "$svn_author" ]; then echo "Could not parse svn committer." >&2 exit 1 fi # if there is at least one signed-off-by then set the GIT_AUTHOR_* variables to the first person who has signed-off if [ -n "$signoffs" ]; then export GIT_AUTHOR_NAME GIT_AUTHOR_NAME=$(echo "$signoffs" | head -n1 | sed 's/ <.*//') export GIT_AUTHOR_EMAIL GIT_AUTHOR_EMAIL=$(echo "$signoffs" | head -n1 | sed -nre 's/.*<(.*)>/\1/p') output="$output $signoff_block" # else use the pre-defined list on the top of the file. else export GIT_AUTHOR_NAME=${svn_authors["${svn_author}"]} export GIT_AUTHOR_EMAIL=${svn_authors["${svn_author}_email"]} fi # if the svn import was done with a legit authorfile the committer name should have been set correctly already # and it will not match our list at the top - although in my tests it was then not set at all O_o # anyway... this should work if [ -n "${svn_authors["${svn_author}"]}" ]; then export GIT_COMMITTER_NAME=${svn_authors["${svn_author}"]} export GIT_COMMITTER_EMAIL=${svn_authors["${svn_author}_email"]} fi git commit-tree "$@" -m "$output" #echo "$output"