(fully) parsing the -L output of a current flashrom binary will be a pain. we do line funky line breaks nowadays. it is also just wrong. anyway, please see the attached version that works at least for those chips that are not broken up into multiple lines.
The revised version ran but did not detect the chip.
you can get rid of the hardway method entirely without a big hit in functionality IMHO. if flashrom can not detect the flash chip itself it is very unlikely to succeed. the exception are some boards with SPI flashes and intel chipset where the manufacturer decided to disable the most useful ID commands (thinkpad X60, T60 etc.). as you seem to need it, i guess the t500 is affected by this too? can you please post the verbose output of flashrom on that machine? flashrom -p internal:laptop=... -VV
To clarify, you want me to run flashrom -p internal:laptop=force_I_want_a_brick -VV ?
Thanks,
Robert