flashrom -L output did not contain a list of programmers nor were all programmers listed. Fix it. (Well, mostly. Some programmers have no devices listed. And formatting on 80 column screens is totally broken for the flash chip list.) Wiki output is unchanged, and will need separate fixups.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
New output from flashrom -L follows:
flashrom v0.9.2-r1196 on Linux 2.6.22.19-0.2-default (i686), built with libpci 2.2.6, LLVM Clang 2.8 (trunk 108130), little endian flashrom is free software, get the source code at http://www.flashrom.org
Supported flash chips (total: 261):
Vendor Device Tested Known Size/KB: Type: OK Broken
(P = PROBE, R = READ, E = ERASE, W = WRITE)
AMD Am29F010A/B P R E W 128 Parallel AMD Am29F002(N)BB 256 Parallel AMD Am29F002(N)BT 256 Parallel AMD Am29F016D 2048 Parallel AMD Am29F040B 512 Parallel AMD Am29F080B 1024 Parallel AMD Am29LV040B P R E W 512 Parallel AMD Am29LV081B 1024 Parallel AMIC A25L05PT 64 SPI AMIC A25L05PU 64 SPI AMIC A25L10PT 128 SPI AMIC A25L10PU 128 SPI AMIC A25L20PT 256 SPI AMIC A25L20PU 256 SPI AMIC A25L40PT P R W 512 SPI AMIC A25L40PU P R W 512 SPI AMIC A25L80P P R E W 1024 SPI AMIC A25L16PT 2048 SPI AMIC A25L16PU P R W 2048 SPI AMIC A25L512 64 SPI AMIC A25L010 128 SPI AMIC A25L020 256 SPI AMIC A25L040 512 SPI AMIC A25L080 1024 SPI AMIC A25L016 2048 SPI AMIC A25L032 4096 SPI AMIC A25LQ032 4096 SPI AMIC A29002B 256 Parallel AMIC A29002T P R W 256 Parallel AMIC A29040B 512 Parallel AMIC A49LF040A P R E W 512 LPC Atmel AT25DF021 256 SPI Atmel AT25DF041A 512 SPI Atmel AT25DF081 1024 SPI Atmel AT25DF081A 1024 SPI Atmel AT25DF161 2048 SPI Atmel AT25DF321 P R E W 4096 SPI Atmel AT25DF321A 4096 SPI Atmel AT25DF641 8192 SPI Atmel AT25DQ161 2048 SPI Atmel AT25F512B 64 SPI Atmel AT25FS010 128 SPI Atmel AT25FS040 512 SPI Atmel AT26DF041 512 SPI Atmel AT26DF081A P R 1024 SPI Atmel AT26DF161 2048 SPI Atmel AT26DF161A 2048 SPI Atmel AT26F004 512 SPI Atmel AT29C512 64 Parallel Atmel AT29C010A P R E W 128 Parallel Atmel AT29C020 256 Parallel Atmel AT29C040A 512 Parallel Atmel AT45CS1282 R 16896 SPI Atmel AT45DB011D R 128 SPI Atmel AT45DB021D R 256 SPI Atmel AT45DB041D R 512 SPI Atmel AT45DB081D R 1024 SPI Atmel AT45DB161D R 2048 SPI Atmel AT45DB321C R 4224 SPI Atmel AT45DB321D R 4096 SPI Atmel AT45DB642D R 8192 SPI Atmel AT49BV512 64 Parallel Atmel AT49F020 P R E W 256 Parallel Atmel AT49F002(N) 256 Parallel Atmel AT49F002(N)T P R W 256 Parallel Bright BM29F040 P R 512 Parallel EMST F49B002UA 256 Parallel EMST F25L008A 1024 SPI Eon EN25B05 64 SPI Eon EN25B05T 64 SPI Eon EN25B10 128 SPI Eon EN25B10T 128 SPI Eon EN25B20 256 SPI Eon EN25B20T 256 SPI Eon EN25B40 512 SPI Eon EN25B40T 512 SPI Eon EN25B80 1024 SPI Eon EN25B80T 1024 SPI Eon EN25B16 2048 SPI Eon EN25B16T 2048 SPI Eon EN25B32 4096 SPI Eon EN25B32T 4096 SPI Eon EN25B64 8192 SPI Eon EN25B64T 8192 SPI Eon EN25D16 2048 SPI Eon EN25F05 64 SPI Eon EN25F10 128 SPI Eon EN25F20 256 SPI Eon EN25F40 P 512 SPI Eon EN25F80 P R E W 1024 SPI Eon EN25F16 2048 SPI Eon EN25F32 4096 SPI Eon EN29F010 P R E W 128 Parallel Eon EN29F002(A)(N)B P R W 256 Parallel Eon EN29F002(A)(N)T P R W 256 Parallel Fujitsu MBM29F004BC 512 Parallel Fujitsu MBM29F004TC 512 Parallel Fujitsu MBM29F400BC W 512 Parallel Fujitsu MBM29F400TC 512 Parallel Hyundai HY29F002T P R E W 256 Parallel Hyundai HY29F002B 256 Parallel Hyundai HY29F040A 512 Parallel Intel 28F001BN/BX-B 128 Parallel Intel 28F001BN/BX-T 128 Parallel Intel 28F002BC/BL/BV/BX-T P R E W 256 Parallel Intel 28F008S3/S5/SC 512 Parallel Intel 28F004B5/BE/BV/BX-B 512 Parallel Intel 28F004B5/BE/BV/BX-T 512 Parallel Intel 28F400BV/BX/CE/CV-B 512 Parallel Intel 28F400BV/BX/CE/CV-T 512 Parallel Intel 82802AB P R 512 FWH Intel 82802AC P R 1024 FWH Macronix MX25L512 64 SPI Macronix MX25L1005 128 SPI Macronix MX25L2005 256 SPI Macronix MX25L4005 P R W 512 SPI Macronix MX25L8005 P R E W 1024 SPI Macronix MX25L1605 P R W 2048 SPI Macronix MX25L1635D 2048 SPI Macronix MX25L1635E 2048 SPI Macronix MX25L3205 P R W 4096 SPI Macronix MX25L3235D 4096 SPI Macronix MX25L6405 P 8192 SPI Macronix MX25L12805 16384 SPI Macronix MX29F001B 128 Parallel Macronix MX29F001T 128 Parallel Macronix MX29F002B 256 Parallel Macronix MX29F002T P R W 256 Parallel Macronix MX29F040 512 Parallel Macronix MX29LV040 512 Parallel MoselVitelic V29C51000B 64 Parallel MoselVitelic V29C51000T 64 Parallel MoselVitelic V29C51400B 512 Parallel MoselVitelic V29C51400T 512 Parallel MoselVitelic V29LC51000 64 Parallel MoselVitelic V29LC51001 128 Parallel MoselVitelic V29LC51002 256 Parallel Numonyx M25PE10 128 SPI Numonyx M25PE20 256 SPI Numonyx M25PE40 512 SPI Numonyx M25PE80 P R E W 1024 SPI Numonyx M25PE16 2048 SPI PMC Pm25LV010 128 SPI PMC Pm25LV016B 2048 SPI PMC Pm25LV020 256 SPI PMC Pm25LV040 512 SPI PMC Pm25LV080B 1024 SPI PMC Pm25LV512 64 SPI PMC Pm29F002T P R E W 256 Parallel PMC Pm29F002B 256 Parallel PMC Pm39LV010 P R E W 128 Parallel PMC Pm39LV020 256 Parallel PMC Pm39LV040 512 Parallel PMC Pm49FL002 P R E W 256 LPC,FWH PMC Pm49FL004 P R E W 512 LPC,FWH Sanyo LF25FW203A 2048 SPI Sharp LHF00L04 1024 FWH Spansion S25FL008A P R E W 1024 SPI Spansion S25FL016A P R W 2048 SPI SST SST25VF016B P R E W 2048 SPI SST SST25VF032B P R E W 4096 SPI SST SST25VF064C P R E W 8192 SPI SST SST25VF040.REMS P R 512 SPI SST SST25VF040B 512 SPI SST SST25LF040A.RES P 512 SPI SST SST25VF040B.REMS P R 512 SPI SST SST25VF080B P R E W 1024 SPI SST SST28SF040A 512 Parallel SST SST29EE010 P R W 128 Parallel SST SST29LE010 128 Parallel SST SST29EE020A P R E W 256 Parallel SST SST29LE020 P R E W 256 Parallel SST SST39SF512 64 Parallel SST SST39SF010A P R W 128 Parallel SST SST39SF020A P R E W 256 Parallel SST SST39SF040 P R E W 512 Parallel SST SST39VF512 P R E W 64 Parallel SST SST39VF010 P R E W 128 Parallel SST SST39VF020 256 Parallel SST SST39VF040 512 Parallel SST SST39VF080 1024 Parallel SST SST49LF002A/B P R E W 256 FWH SST SST49LF003A/B P R 384 FWH SST SST49LF004A/B P R E W 512 FWH SST SST49LF004C 512 FWH SST SST49LF008A P R E W 1024 FWH SST SST49LF008C 1024 FWH SST SST49LF016C P R W 2048 FWH SST SST49LF020 P R E W 256 LPC SST SST49LF020A P R E W 256 LPC SST SST49LF040 P R E W 512 LPC SST SST49LF040B P R E W 512 LPC SST SST49LF080A P R E W 1024 LPC SST SST49LF160C P R E W 2048 LPC ST M25P05-A 64 SPI ST M25P05.RES 64 SPI ST M25P10-A P R E W 128 SPI ST M25P10.RES 128 SPI ST M25P20 256 SPI ST M25P40 P R W 512 SPI ST M25P40-old 512 SPI ST M25P80 P R W 1024 SPI ST M25P16 P R W 2048 SPI ST M25P32 P R W 4096 SPI ST M25P64 8192 SPI ST M25P128 16384 SPI ST M25PX32 P R E W 4096 SPI ST M25PX64 P R E W 8192 SPI ST M29F002B 256 Parallel ST M29F002T/NT 256 Parallel ST M29F040B 512 Parallel ST M29F400BB W 512 Parallel ST M29F400BT 512 Parallel ST M29W010B 128 Parallel ST M29W040B 512 Parallel ST M29W512B P R E W 64 Parallel ST M50FLW040A 512 LPC,FWH ST M50FLW040B 512 LPC,FWH ST M50FLW080A P R E W 1024 LPC,FWH ST M50FLW080B 1024 LPC,FWH ST M50FW002 256 FWH ST M50FW016 2048 FWH ST M50FW040 P R 512 FWH ST M50FW080 P R 1024 FWH ST M50LPW116 2048 LPC SyncMOS/MoselVitelic {F,S,V}29C51001B 128 Parallel SyncMOS/MoselVitelic {F,S,V}29C51001T 128 Parallel SyncMOS/MoselVitelic {F,S,V}29C51002B 256 Parallel SyncMOS/MoselVitelic {F,S,V}29C51002T P R E W 256 Parallel SyncMOS/MoselVitelic {F,S,V}29C51004B 512 Parallel SyncMOS/MoselVitelic {F,S,V}29C51004T 512 Parallel SyncMOS/MoselVitelic {S,V}29C31004B 512 Parallel SyncMOS/MoselVitelic {S,V}29C31004T 512 Parallel TI TMS29F002RB 256 Parallel TI TMS29F002RT 256 Parallel Winbond W25Q80 P R E W 1024 SPI Winbond W25Q16 2048 SPI Winbond W25Q32 P R E W 4096 SPI Winbond W25Q64 P R W 8192 SPI Winbond W25x10 128 SPI Winbond W25x20 256 SPI Winbond W25x40 P R E W 512 SPI Winbond W25x80 P R E W 1024 SPI Winbond W25x16 P R E W 2048 SPI Winbond W25x32 P 4096 SPI Winbond W25x64 8192 SPI Winbond W29C010(M)/W29C011A/W29EE011/W29EE012 P R W 128 Parallel Winbond W29C020(C)/W29C022 P R E W 256 Parallel Winbond W29C040/P 512 Parallel Winbond W29C010(M)/W29C011A/W29EE011/W29EE012 P R E W 128 Parallel Winbond W39V040A P R W 512 LPC Winbond W39V040(F)B P R E W 512 LPC Winbond W39V040(F)C 512 LPC Winbond W39V040FA P R E W 512 FWH Winbond W39V080A 1024 LPC Winbond W49F002U/N P R E W 256 Parallel Winbond W49F020 P 256 Parallel Winbond W49V002A P R E W 256 LPC Winbond W49V002FA P R W 256 FWH Winbond W39V080FA P R E W 1024 FWH Winbond W39V080FA (dual mode) 512 FWH
Supported programmers: internal, dummy, nic3com, nicrealtek, nicsmc1211, nicnatsemi, gfxnvidia, drkaiser, satasii, atahpt, it87spi, ft2232_spi, serprog, buspirate_spi, dediprog, rayer_spi, nicintel_spi
Supported devices for the internal programmer:
Supported chipsets (total: 152):
Vendor: Chipset: PCI IDs:
ALi M1533 10b9:1533 AMD AMD-768 1022:7440 AMD AMD8111 1022:7468 AMD CS5530(A) 1078:0100 AMD CS5536 1022:2080 AMD CS5536 1022:2090 AMD Elan SC520 1022:3000 AMD SB600 1002:438d AMD SB700/SB710/SB750 1002:439d AMD SC1100 100b:0510 (untested) ATI SB400 1002:4377 Broadcom OSB4 1166:0200 Broadcom HT-1000 1166:0205 Intel 3400 Desktop 8086:3b00 (untested) Intel 3400 Mobile 8086:3b01 (untested) Intel P55 8086:3b02 (untested) Intel PM55 8086:3b03 (untested) Intel H55 8086:3b06 (untested) Intel QM57 8086:3b07 Intel H57 8086:3b08 (untested) Intel HM55 8086:3b09 (untested) Intel Q57 8086:3b0a (untested) Intel HM57 8086:3b0b (untested) Intel 3400 Mobile SFF 8086:3b0d (untested) Intel B55 8086:3b0e (untested) Intel QS57 8086:3b0f (untested) Intel 3400 8086:3b12 (untested) Intel 3420 8086:3b14 (untested) Intel 3450 8086:3b16 (untested) Intel B55 8086:3b1e (untested) Intel 440MX 8086:7198 Intel 6300ESB 8086:25a1 Intel 631xESB/632xESB/3100 8086:2670 Intel EP80579 8086:5031 Intel ICH0 8086:2420 Intel ICH10 8086:3a18 Intel ICH10D 8086:3a1a Intel ICH10DO 8086:3a14 Intel ICH10R 8086:3a16 Intel ICH2 8086:2440 Intel ICH2-M 8086:244c Intel ICH3-M 8086:248c Intel ICH3-S 8086:2480 Intel ICH4/ICH4-L 8086:24c0 Intel ICH4-M 8086:24cc Intel ICH5/ICH5R 8086:24d0 Intel ICH6/ICH6R 8086:2640 Intel ICH6-M 8086:2641 Intel ICH7DH 8086:27b0 Intel ICH7/ICH7R 8086:27b8 Intel ICH7M 8086:27b9 Intel ICH7MDH 8086:27bd Intel NM10 8086:27bc Intel ICH 8086:2410 Intel ICH8DH 8086:2812 Intel ICH8DO 8086:2814 Intel ICH8/ICH8R 8086:2810 Intel ICH8M 8086:2815 Intel ICH8M-E 8086:2811 Intel ICH9 8086:2918 Intel ICH9DH 8086:2912 Intel ICH9DO 8086:2914 Intel ICH9M 8086:2919 Intel ICH9M-E 8086:2917 Intel ICH9R 8086:2916 Intel ICH9 Engineering Sample 8086:2910 Intel MPIIX 8086:1234 (untested) Intel PIIX3 8086:7000 Intel PIIX4/4E/4M 8086:7110 Intel PIIX 8086:122e Intel Poulsbo 8086:8119 NVIDIA nForce4/MCP4 10de:0030 NVIDIA CK804 10de:0050 NVIDIA CK804 10de:0051 NVIDIA NForce2 10de:0060 NVIDIA NForce3 10de:00e0 NVIDIA CK804 10de:00d3 NVIDIA MCP51 10de:0260 (untested) NVIDIA MCP51 10de:0261 (untested) NVIDIA MCP51 10de:0262 (untested) NVIDIA MCP51 10de:0263 (untested) NVIDIA MCP55 10de:0360 NVIDIA MCP55 10de:0362 NVIDIA MCP55 10de:0363 NVIDIA MCP55 10de:0364 NVIDIA MCP55 10de:0365 NVIDIA MCP55 10de:0366 NVIDIA MCP55 10de:0367 NVIDIA MCP61 10de:03e0 (untested) NVIDIA MCP61 10de:03e1 (untested) NVIDIA MCP61 10de:03e2 (untested) NVIDIA MCP61 10de:03e3 (untested) NVIDIA MCP65 10de:0440 (untested) NVIDIA MCP65 10de:0441 (untested) NVIDIA MCP65 10de:0442 (untested) NVIDIA MCP65 10de:0443 (untested) NVIDIA MCP67 10de:0548 NVIDIA MCP78S 10de:075c (untested) NVIDIA MCP78S 10de:075d (untested) NVIDIA MCP73 10de:07d7 (untested) NVIDIA MCP79 10de:0aac (untested) NVIDIA MCP79 10de:0aad (untested) NVIDIA MCP79 10de:0aae (untested) NVIDIA MCP79 10de:0aaf (untested) SiS 85C496+497 1039:0496 (untested) SiS 501/5101/5501 1039:0406 (untested) SiS 5511 1039:5511 (untested) SiS 5596 1039:5596 (untested) SiS 5571 1039:5571 (untested) SiS 5591/5592 1039:5591 (untested) SiS 5597/5598/5581/5120 1039:5597 (untested) SiS 530 1039:0530 (untested) SiS 600 1039:5600 (untested) SiS 620 1039:0620 (untested) SiS 540 1039:0540 (untested) SiS 630 1039:0630 (untested) SiS 635 1039:0635 (untested) SiS 640 1039:0640 (untested) SiS 645 1039:0645 (untested) SiS 645DX 1039:0646 (untested) SiS 648 1039:0648 (untested) SiS 650 1039:0650 (untested) SiS 651 1039:0651 (untested) SiS 655 1039:0655 (untested) SiS 661 1039:0661 SiS 730 1039:0730 (untested) SiS 733 1039:0733 (untested) SiS 735 1039:0735 SiS 740 1039:0740 (untested) SiS 741 1039:0741 SiS 745 1039:0745 SiS 746 1039:0746 (untested) SiS 748 1039:0748 (untested) SiS 755 1039:0755 (untested) VIA VT82C585VPX 1106:0585 (untested) VIA VT82C595 1106:0595 (untested) VIA VT82C597 1106:0597 (untested) VIA VT82C69x 1106:0691 (untested) VIA VT8601/VT8601A 1106:0601 (untested) VIA VT8601T 1106:8601 (untested) VIA CX700 1106:8324 VIA VT8231 1106:8231 (untested) VIA VT8233 1106:3074 (untested) VIA VT8233A 1106:3147 VIA VT8235 1106:3177 VIA VT8237 1106:3227 VIA VT8237A 1106:3337 VIA VT8237S 1106:3372 VIA VX800 1106:8353 VIA VT82C596 1106:0596 VIA VT82C586A/B 1106:0586 VIA VT82C686A/B 1106:0686 (untested)
Known boards (good: 259, bad: 18):
Vendor: Board: Status: Required option:
A-Trend ATC-6220 OK abit AN-M2 OK (autodetected) abit AX8 OK abit BM6 OK (autodetected) abit Fatal1ty F-I90HD OK abit IC7 OK (autodetected) abit IP35 OK (autodetected) abit IP35 Pro OK (autodetected) abit IS-10 BAD abit KN8 Ultra OK (autodetected) abit NF-M2 nView OK (autodetected) abit NF7-S OK (autodetected) abit VA6 OK (autodetected) abit VT6X4 OK -m abit:vt6x4 Acorp 6A815EPD OK (autodetected) Advantech PCM-5820 OK agami Aruma OK -m AGAMI:ARUMA Albatron PM266A Pro OK (autodetected) AOpen vKM400Am-S OK Artec Group DBE61 OK -m artecgroup:dbe61 Artec Group DBE62 OK -m artecgroup:dbe62 ASI MB-5BLMP OK ASRock 775i65G OK (autodetected) ASRock 939A785GMH/128M OK ASRock A330GC OK ASRock A770CrossFire OK ASRock ALiveNF6G-DVI OK ASRock K7S41 OK (autodetected) ASRock K7VT4A+ BAD ASRock K8S8X OK ASRock M3A790GXH/128M OK ASRock P4i65GV OK (autodetected) ASUS A7N8X Deluxe OK ASUS A7N8X-E Deluxe OK ASUS A7V133 OK ASUS A7V333 OK (autodetected) ASUS A7V400-MX OK ASUS A7V600-X OK (autodetected) ASUS A7V8X OK (autodetected) ASUS A7V8X-MX OK ASUS A7V8X-MX SE OK (autodetected) ASUS A7V8X-X OK (autodetected) ASUS A8Jm OK (autodetected) ASUS A8N OK (autodetected) ASUS A8N-E OK ASUS A8N-LA (Nagami-GL8E) OK (autodetected) ASUS A8N-SLI OK ASUS A8N-SLI Premium OK ASUS A8N-VM CSM OK (autodetected) ASUS A8NE-FM/S OK ASUS A8V Deluxe OK ASUS A8V-E Deluxe OK ASUS A8V-E SE OK ASUS K8V OK ASUS K8V SE Deluxe OK ASUS K8V-X SE OK ASUS M2A-MX OK ASUS M2A-VM OK ASUS M2N32-SLI Deluxe OK ASUS M2N-E OK ASUS M2N-SLI Deluxe OK ASUS M2NBP-VM CSM OK (autodetected) ASUS M2NPV-VM OK ASUS M2V OK ASUS M2V-MX OK (autodetected) ASUS M3A76-CM OK ASUS M3A78-EM OK ASUS M4A785TD-M EVO OK ASUS M4A79T Deluxe OK ASUS M4A87TD/USB3 OK ASUS MEW-AM BAD ASUS MEW-VM BAD ASUS P2B OK ASUS P2B-D OK ASUS P2B-DS OK ASUS P2B-F OK ASUS P2B-N OK (autodetected) ASUS P2E-M OK ASUS P2L97-S OK ASUS P3B-F BAD ASUS P4B266 OK (autodetected) ASUS P4B266-LM OK (autodetected) ASUS P4B533-E OK (autodetected) ASUS P4C800-E Deluxe OK (autodetected) ASUS P4P800 OK (autodetected) ASUS P4P800-E Deluxe OK (autodetected) ASUS P4SC-E OK (autodetected) ASUS P4SD-LA OK (autodetected) ASUS P4S800-MX OK (autodetected) ASUS P5A OK -m asus:p5a ASUS P5B OK ASUS P5B-Deluxe OK ASUS P5BV-M BAD ASUS P5GC-MX/1333 OK ASUS P5GDC Deluxe OK (autodetected) ASUS P5KC OK ASUS P5L-MX OK ASUS P5GD1 Pro OK (autodetected) ASUS P5ND2-SLI Deluxe OK (autodetected) ASUS P5PE-VM OK (autodetected) ASUS P6T SE OK ASUS P6T Deluxe OK ASUS P6T Deluxe V2 OK ASUS Z8NA-D6C OK BCOM WinNET100 OK Biostar M6TBA BAD Biostar M7NCD Pro OK Biostar P4M80-M4 OK Biostar TA780G M2+ OK Boser HS-6637 BAD Congatec conga-X852 OK Dell OptiPlex GX1 OK (autodetected) Dell PowerEdge 1850 OK (autodetected) DFI 855GME-MGF BAD DFI Blood-Iron P35 T2RL OK Elitegroup GeForce6100SM-M OK Elitegroup K7S5A OK Elitegroup K7S6A OK Elitegroup K7VTA3 OK (autodetected) Elitegroup P6IWP-Fe OK Elitegroup P6VAP-A+ OK Elitegroup RS485M-M OK Emerson ATCA-7360 OK EPoX EP-8K5A2 OK (autodetected) EPoX EP-8RDA3+ OK (autodetected) EPoX EP-BX3 OK -m epox:ep-bx3 FIC VA-502 BAD Foxconn A6VMX OK Fujitsu-Siemens ESPRIMO P5915 OK GIGABYTE GA-2761GXDK OK GIGABYTE GA-6BXC OK GIGABYTE GA-6BXDU OK GIGABYTE GA-6IEM OK (autodetected) GIGABYTE GA-6ZMA OK GIGABYTE GA-MA785GMT-UD2H OK GIGABYTE GA-770TA-UD3 OK GIGABYTE GA-7DXR OK GIGABYTE GA-7VT600 OK GIGABYTE GA-7ZM OK (autodetected) GIGABYTE GA-8IRML OK (autodetected) GIGABYTE GA-8PE667 Ultra 2 OK (autodetected) GIGABYTE GA-965P-DS4 OK GIGABYTE GA-EP35-DS3L OK GIGABYTE GA-EX58-UD4P OK GIGABYTE GA-K8N-SLI OK (autodetected) GIGABYTE GA-K8N51GMF-9 OK (autodetected) GIGABYTE GA-M57SLI-S4 OK GIGABYTE GA-M61P-S3 OK GIGABYTE GA-MA69VM-S2 OK GIGABYTE GA-MA74GM-S2H (rev. 3.0) OK GIGABYTE GA-MA770T-UD3P OK GIGABYTE GA-MA78G-DS3H OK GIGABYTE GA-MA78GM-S2H OK GIGABYTE GA-MA78GPM-DS2H OK GIGABYTE GA-MA790FX-DQ6 OK GIGABYTE GA-MA790GP-DS4H OK HP ProLiant DL145 G3 OK -m hp:dl145_g3 HP ProLiant DL165 G6 OK -m hp:dl165_g6 HP Puffer2-UL8E OK (autodetected) HP Vectra VL400 OK (autodetected) HP Vectra VL420 SFF OK (autodetected) HP xw9400 OK (autodetected) IBASE MB899 OK -m ibase:mb899 IBM x3455 OK (autodetected) IEI PICOe-9452 OK Intel D201GLY OK (autodetected) Intel EP80759 OK Intel Foxhollow OK Intel Greencity OK Intel SE440BX-2 BAD (autodetected) IWILL DK8-HTX OK -m iwill:dk8_htx Jetway J7F4K1G5D-PB OK Kontron 986LCD-M OK -m kontron:986lcd-m Lex CV700A OK Mitac 6513WU OK (autodetected) MSI MS-6153 OK MSI MS-6156 OK MSI MS-6163 (MS-6163 Pro) OK (autodetected) MSI MS-6178 BAD MSI MS-6330 (K7T Turbo) OK MSI MS-6561 (745 Ultra) OK (autodetected) MSI MS-6570 (K7N2) OK MSI MS-6577 (Xenon) OK (autodetected) MSI MS-6590 (KT4 Ultra) OK (autodetected) MSI MS-6702E (K8T Neo2-F) OK (autodetected) MSI MS-6712 (KT4V) OK (autodetected) MSI MS-6787 (P4MAM-V/P4MAM-L) OK -m msi:ms6787 MSI MS-7005 (651M-L) OK (autodetected) MSI MS-7025 (K8N Neo2 Platinum) OK (autodetected) MSI MS-7046 OK (autodetected) MSI MS-7061 (KM4M-V/KM4AM-V) OK (autodetected) MSI MS-7065 OK MSI MS-7135 (K8N Neo3) OK -m msi:k8n-neo3 MSI MS-7168 (Orion) OK MSI MS-7207 (K8NGM2-L) OK (autodetected) MSI MS-7211 (PM8M3-V) OK MSI MS-7236 (945PL Neo3) OK MSI MS-7253 (K9VGM-V) OK MSI MS-7255 (P4M890M) OK MSI MS-7260, (K9N Neo) BAD MSI MS-7312 (K9MM-V) OK MSI MS-7345 (P35 Neo2-FIR) OK MSI MS-7368 (K9AG Neo2-Digital) OK MSI MS-7376 (K9A2 Platinum) OK MSI MS-7642 (890GXM-G65) OK NEC PowerMate 2000 OK Nokia IP530 OK (autodetected) PC Engines Alix.1c OK PC Engines Alix.2c2 OK PC Engines Alix.2c3 OK PC Engines Alix.3c3 OK PC Engines Alix.3d3 OK PC Engines WRAP.2E OK Portwell PEB-4700VLA OK RCA RM4100 OK Samsung Polaris 32 OK (autodetected) Shuttle AK31 OK -m shuttle:ak31 Shuttle AK38N OK (autodetected) Shuttle AV11V30 OK Shuttle FD37 OK Shuttle FN25 OK (autodetected) Shuttle X50/X50(B) OK Soyo SY-5VD BAD Soyo SY-6BA+ III OK Soyo SY-7VCA OK (autodetected) Sun Blade x6250 OK Sun Fire x4150 BAD Sun Fire x4200 BAD Sun Fire x4540 BAD Sun Fire x4600 BAD Supermicro H8QC8 OK Supermicro X8DTT-F OK T-Online S-100 OK Tekram P6Pro-A5 OK (autodetected) Termtek TK-3370 (Rev:2.5B) OK (autodetected) Thomson IP1000 OK TriGem Lomita OK Tyan S5375-1U (Tempest i5100X) OK Tyan S1846 (Tsunami ATX) OK Tyan S2466 (Tiger MPX) OK Tyan S2498 (Tomcat K7M) OK (autodetected) Tyan S2881 (Thunder K8SR) OK Tyan S2882 (Thunder K8S Pro) OK Tyan S2882-D (Thunder K8SD Pro) OK Tyan S2891 (Thunder K8SRE) OK Tyan S2892 (Thunder K8SE) OK Tyan S2895 (Thunder K8WE) OK Tyan S2915 (Thunder n6650W) OK Tyan S2915-E (Thunder n6650W) OK Tyan S2933 (Thunder n3600S) OK Tyan S3095 (Tomcat i945GM) OK Tyan S3992 (Thunder h2000M) OK Tyan S5180 (Toledo i965R) OK Tyan S5191 (Toledo i3000R) OK Tyan S5197 (Toledo i3010W) OK Tyan S5211 (Toledo i3210W) OK Tyan S5211-1U (Toledo i3200R) OK Tyan S5220 (Toledo q35T) OK Tyan S5375 (Tempest i5100X) OK Tyan S5376 (Tempest i5100W) OK Tyan S5377 (Tempest i5100T) OK Tyan S5382 (Tempest i5000PW) OK Tyan S5397 (Tempest i5400PW) OK VIA EPIA M/MII/... OK (autodetected) VIA EPIA SP OK VIA EPIA-CN OK VIA EPIA EK OK (autodetected) VIA EPIA-EX15000G OK VIA EPIA-LN OK VIA EPIA-M700 OK VIA EPIA-N/NL OK (autodetected) VIA EPIA-NX15000G OK VIA NAB74X0 OK VIA pc2500e OK VIA PC3500G OK VIA VB700X OK ZOTAC ZBOX HD-ID11 OK
Known laptops (good: 2, bad: 7):
Vendor: Board: Status: Required option:
Acer Aspire 1520 OK Acer Aspire One BAD ASUS Eee PC 701 4G BAD Dell Latitude CPi A366XT BAD HP/Compaq nx9005 BAD HP/Compaq nx9010 BAD IBM/Lenovo Thinkpad T40p BAD IBM/Lenovo 240 BAD Lenovo 3000 V100 TF05Cxx OK
Supported devices for the dummy programmer:
Supported devices for the nic3com programmer: PCI devices: 3COM 3C90xB: PCI 10/100 Mbps; shared 10BASE-T/100BASE-TX [10b7:9055] 3COM 3C90xB: PCI 10/100 Mbps; shared 10BASE-T/100BASE-T4 [10b7:9001] (untested) 3COM 3C90xB: PCI 10BASE-T (TPO) [10b7:9004] 3COM 3C90xB: PCI 10BASE-T/10BASE2/AUI (COMBO) [10b7:9005] (untested) 3COM 3C90xB: PCI 10BASE-T/10BASE2 (TPC) [10b7:9006] (untested) 3COM 3C90xB: PCI 10BASE-FL [10b7:900a] (untested) 3COM 3C90xB: PCI 10BASE-FX [10b7:905a] (untested) 3COM 3C905B: Cyclone 10/100/BNC [10b7:9058] 3COM 3C905C: EtherLink 10/100 PCI (TX) [10b7:9200] 3COM 3C980C: EtherLink Server 10/100 PCI (TX) [10b7:9805] (untested)
Supported devices for the nicrealtek programmer: PCI devices: Realtek RTL8139/8139C/8139C+ [10ec:8139]
Supported devices for the nicsmc1211 programmer: PCI devices: SMC2 1211TX [1113:1211]
Supported devices for the nicnatsemi programmer: PCI devices: National Semiconductor DP83815/DP83816 [100b:20] (untested) National Semiconductor DP83820 [100b:22] (untested)
Supported devices for the gfxnvidia programmer: PCI devices: NVIDIA Mutara V08 [NV2] [10de:10] (untested) NVIDIA RIVA 128 [10de:18] (untested) NVIDIA RIVA TNT [10de:20] (untested) NVIDIA RIVA TNT2/TNT2 Pro [10de:28] (untested) NVIDIA RIVA TNT2 Ultra [10de:29] (untested) NVIDIA Vanta/Vanta LT [10de:2c] (untested) NVIDIA RIVA TNT2 Model 64/Model 64 Pro [10de:2d] NVIDIA Aladdin TNT2 [10de:a0] (untested) NVIDIA GeForce 256 [10de:100] (untested) NVIDIA GeForce DDR [10de:101] (untested) NVIDIA Quadro [10de:103] (untested) NVIDIA GeForce2 MX [10de:110] (untested) NVIDIA GeForce2 MX [10de:111] (untested) NVIDIA GeForce2 GO [10de:112] (untested) NVIDIA Quadro2 MXR [10de:113] (untested) NVIDIA GeForce2 GTS/Pro [10de:150] (untested) NVIDIA GeForce2 GTS [10de:151] (untested) NVIDIA GeForce2 Ultra [10de:152] (untested) NVIDIA Quadro2 Pro [10de:153] (untested) NVIDIA GeForce 3 nFX [10de:200] (untested) NVIDIA GeForce 3 nFX [10de:201] (untested) NVIDIA GeForce 3 nFX Ultra [10de:202] (untested) NVIDIA Quadro 3 DDC [10de:203] (untested)
Supported devices for the drkaiser programmer: PCI devices: Dr. Kaiser PC-Waechter (Actel FPGA) [1803:5057]
Supported devices for the satasii programmer: PCI devices: Silicon Image PCI0680 Ultra ATA-133 Host Ctrl [1095:680] Silicon Image SiI 3112 [SATALink/SATARaid] SATA Ctrl [1095:3112] Silicon Image SiI 3114 [SATALink/SATARaid] SATA Ctrl [1095:3114] Silicon Image SiI 3124 PCI-X SATA Ctrl [1095:3124] Silicon Image SiI 3132 SATA Raid II Ctrl [1095:3132] Silicon Image SiI 3512 [SATALink/SATARaid] SATA Ctrl [1095:3512]
Supported devices for the atahpt programmer: PCI devices: Highpoint HPT366/368/370/370A/372/372N [1103:04] (untested) Highpoint HPT372A/372N [1103:05] (untested) Highpoint HPT302/302N [1103:06] (untested)
Supported devices for the ft2232_spi programmer: USB devices: FTDI FT2232H [0403:6010] FTDI FT4232H [0403:6011] Amontec JTAGkey [0403:cff8]
Supported devices for the serprog programmer:
Supported devices for the buspirate_spi programmer:
Supported devices for the dediprog programmer:
Supported devices for the rayer_spi programmer:
Supported devices for the nicintel_spi programmer: PCI devices: Intel 82571EB Gigabit Ethernet Controller [8086:105e] Intel 82541PI Gigabit Ethernet Controller [8086:107c] Intel 82572EI Gigabit Ethernet Controller [8086:10b9]
Patch: Index: flashrom-list_supported_programmers/flash.h =================================================================== --- flashrom-list_supported_programmers/flash.h (Revision 1196) +++ flashrom-list_supported_programmers/flash.h (Arbeitskopie) @@ -200,6 +200,7 @@ char *strcat_realloc(char *dest, const char *src); void print_version(void); void print_banner(void); +void list_programmers_linebreak(int startcol, int cols, int paren); int selfcheck(void); int doit(struct flashchip *flash, int force, char *filename, int read_it, int write_it, int erase_it, int verify_it);
Index: flashrom-list_supported_programmers/pcidev.c =================================================================== --- flashrom-list_supported_programmers/pcidev.c (Revision 1196) +++ flashrom-list_supported_programmers/pcidev.c (Arbeitskopie) @@ -132,6 +132,7 @@ { int i;
+ msg_pinfo("PCI devices:\n"); for (i = 0; devs[i].vendor_name != NULL; i++) { msg_pinfo("%s %s [%02x:%02x]%s\n", devs[i].vendor_name, devs[i].device_name, devs[i].vendor_id, Index: flashrom-list_supported_programmers/cli_classic.c =================================================================== --- flashrom-list_supported_programmers/cli_classic.c (Revision 1196) +++ flashrom-list_supported_programmers/cli_classic.c (Arbeitskopie) @@ -33,11 +33,6 @@
static void cli_classic_usage(const char *name) { - const char *pname; - int pnamelen; - int remaining = 0; - enum programmer p; - printf("Usage: flashrom [-n] [-V] [-f] [-h|-R|-L|" #if CONFIG_PRINT_WIKI == 1 "-z|" @@ -83,32 +78,9 @@ "in wiki syntax\n" #endif " -p | --programmer <name>[:<param>] specify the programmer " - "device"); + "device\n");
- for (p = 0; p < PROGRAMMER_INVALID; p++) { - pname = programmer_table[p].name; - pnamelen = strlen(pname); - if (remaining - pnamelen - 2 < 0) { - printf("\n "); - remaining = 43; - } else { - printf(" "); - remaining--; - } - if (p == 0) { - printf("("); - remaining--; - } - printf("%s", pname); - remaining -= pnamelen; - if (p < PROGRAMMER_INVALID - 1) { - printf(","); - remaining--; - } else { - printf(")\n"); - } - } - + list_programmers_linebreak(37, 80, 1); printf("\nYou can specify one of -h, -R, -L, " #if CONFIG_PRINT_WIKI == 1 "-z, " Index: flashrom-list_supported_programmers/atahpt.c =================================================================== --- flashrom-list_supported_programmers/atahpt.c (Revision 1196) +++ flashrom-list_supported_programmers/atahpt.c (Arbeitskopie) @@ -30,7 +30,7 @@
#define PCI_VENDOR_ID_HPT 0x1103
-struct pcidev_status ata_hpt[] = { +const struct pcidev_status ata_hpt[] = { {0x1103, 0x0004, NT, "Highpoint", "HPT366/368/370/370A/372/372N"}, {0x1103, 0x0005, NT, "Highpoint", "HPT372A/372N"}, {0x1103, 0x0006, NT, "Highpoint", "HPT302/302N"}, Index: flashrom-list_supported_programmers/ft2232_spi.c =================================================================== --- flashrom-list_supported_programmers/ft2232_spi.c (Revision 1196) +++ flashrom-list_supported_programmers/ft2232_spi.c (Arbeitskopie) @@ -346,6 +346,7 @@ { int i;
+ msg_pinfo("USB devices:\n"); for (i = 0; devs[i].vendor_name != NULL; i++) { msg_pinfo("%s %s [%04x:%04x]%s\n", devs[i].vendor_name, devs[i].device_name, devs[i].vendor_id, Index: flashrom-list_supported_programmers/flashrom.c =================================================================== --- flashrom-list_supported_programmers/flashrom.c (Revision 1196) +++ flashrom-list_supported_programmers/flashrom.c (Arbeitskopie) @@ -1332,6 +1332,46 @@ msg_ginfo("\n"); }
+void list_programmers_linebreak(int startcol, int cols, int paren) +{ + const char *pname; + int pnamelen; + int remaining = 0; + int firstline = 1; + enum programmer p; + + for (p = 0; p < PROGRAMMER_INVALID; p++) { + pname = programmer_table[p].name; + pnamelen = strlen(pname); + if (remaining - pnamelen - 2 < 0) { + if (firstline) + firstline = 0; + else + printf("\n"); + for (int i = 0; i < startcol; i++) + printf(" "); + remaining = cols - startcol; + } else { + printf(" "); + remaining--; + } + if (paren && (p == 0)) { + printf("("); + remaining--; + } + printf("%s", pname); + remaining -= pnamelen; + if (p < PROGRAMMER_INVALID - 1) { + printf(","); + remaining--; + } else { + if (paren) + printf(")"); + printf("\n"); + } + } +} + void print_sysinfo(void) { #if HAVE_UTSNAME == 1 Index: flashrom-list_supported_programmers/print.c =================================================================== --- flashrom-list_supported_programmers/print.c (Revision 1196) +++ flashrom-list_supported_programmers/print.c (Arbeitskopie) @@ -223,50 +223,90 @@
void print_supported(void) { - print_supported_chips(); + print_supported_chips(); + + printf("\nSupported programmers:\n"); + list_programmers_linebreak(0, 80, 0); #if CONFIG_INTERNAL == 1 - print_supported_chipsets(); - print_supported_boards_helper(boards_known, "boards"); - print_supported_boards_helper(laptops_known, "laptops"); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_INTERNAL].name); + print_supported_chipsets(); + print_supported_boards_helper(boards_known, "boards"); + print_supported_boards_helper(laptops_known, "laptops"); #endif -#if CONFIG_NIC3COM+CONFIG_NICREALTEK+CONFIG_NICNATSEMI+CONFIG_GFXNVIDIA+CONFIG_DRKAISER+CONFIG_SATASII+CONFIG_ATAHPT >= 1 - printf("\nSupported PCI devices flashrom can use " - "as programmer:\n\n"); +#if CONFIG_DUMMY == 1 + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_DUMMY].name); + /* FIXME */ #endif #if CONFIG_NIC3COM == 1 - print_supported_pcidevs(nics_3com); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_NIC3COM].name); + print_supported_pcidevs(nics_3com); #endif #if CONFIG_NICREALTEK == 1 - print_supported_pcidevs(nics_realtek); - print_supported_pcidevs(nics_realteksmc1211); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_NICREALTEK].name); + print_supported_pcidevs(nics_realtek); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_NICREALTEK2].name); + print_supported_pcidevs(nics_realteksmc1211); #endif #if CONFIG_NICNATSEMI == 1 - print_supported_pcidevs(nics_natsemi); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_NICNATSEMI].name); + print_supported_pcidevs(nics_natsemi); #endif #if CONFIG_GFXNVIDIA == 1 - print_supported_pcidevs(gfx_nvidia); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_GFXNVIDIA].name); + print_supported_pcidevs(gfx_nvidia); #endif #if CONFIG_DRKAISER == 1 - print_supported_pcidevs(drkaiser_pcidev); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_DRKAISER].name); + print_supported_pcidevs(drkaiser_pcidev); #endif #if CONFIG_SATASII == 1 - print_supported_pcidevs(satas_sii); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_SATASII].name); + print_supported_pcidevs(satas_sii); #endif #if CONFIG_ATAHPT == 1 - print_supported_pcidevs(ata_hpt); + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_ATAHPT].name); + print_supported_pcidevs(ata_hpt); #endif -#if CONFIG_NICINTEL_SPI == 1 - print_supported_pcidevs(nics_intel_spi); +#if CONFIG_FT2232_SPI == 1 + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_FT2232_SPI].name); + print_supported_usbdevs(devs_ft2232spi); #endif - -#if CONFIG_FT2232_SPI+CONFIG_DEDIPROG >= 1 - printf("\nSupported USB devices flashrom can use " - "as programmer:\n\n"); +#if CONFIG_SERPROG == 1 + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_SERPROG].name); + /* FIXME */ #endif - -#if CONFIG_FT2232_SPI == 1 - print_supported_usbdevs(devs_ft2232spi); +#if CONFIG_BUSPIRATE_SPI == 1 + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_BUSPIRATE_SPI].name); + /* FIXME */ #endif +#if CONFIG_DEDIPROG == 1 + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_DEDIPROG].name); + /* FIXME */ +#endif +#if CONFIG_RAYER_SPI == 1 + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_RAYER_SPI].name); + /* FIXME */ +#endif +#if CONFIG_NICINTEL_SPI == 1 + printf("\nSupported devices for the %s programmer:\n", + programmer_table[PROGRAMMER_NICINTEL_SPI].name); + print_supported_pcidevs(nics_intel_spi); +#endif }
#if CONFIG_INTERNAL == 1
On Wed, Oct 06, 2010 at 02:00:35PM +0200, Carl-Daniel Hailfinger wrote:
flashrom -L output did not contain a list of programmers nor were all programmers listed. Fix it. (Well, mostly. Some programmers have no devices listed. And formatting on 80 column screens is totally broken for the flash chip list.) Wiki output is unchanged, and will need separate fixups.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Uwe Hermann uwe@hermann-uwe.de
But:
flashrom.c:1351: error: ‘for’ loop initial declarations are only allowed in C99 mode flashrom.c:1351: note: use option -std=c99 or -std=gnu99 to compile your code make: *** [flashrom.o] Error 1
I think this is the culprit:
for (int i = 0; i < startcol; i++) printf(" ");
Moving the "int i;" to the top of the function should fix it.
However, I also think we should change the printing after 0.9.3 to fit into 80 chars/line again. Names like "W29C010(M)/W29C011A/W29EE011/W29EE012" make it very hard though, we should shorten them.
Uwe.
2010/10/7 Uwe Hermann uwe@hermann-uwe.de
On Wed, Oct 06, 2010 at 02:00:35PM +0200, Carl-Daniel Hailfinger wrote:
flashrom -L output did not contain a list of programmers nor were all programmers listed. Fix it. (Well, mostly. Some programmers have no devices listed. And formatting on 80 column screens is totally broken for the flash chip list.) Wiki output is unchanged, and will need separate fixups.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net
Acked-by: Uwe Hermann uwe@hermann-uwe.de
But:
flashrom.c:1351: error: ‘for’ loop initial declarations are only allowed in C99 mode flashrom.c:1351: note: use option -std=c99 or -std=gnu99 to compile your code make: *** [flashrom.o] Error 1
I think this is the culprit:
for (int i = 0; i < startcol; i++) printf(" ");
Moving the "int i;" to the top of the function should fix it.
I think this is a better fix than this:
Index: Makefile =================================================================== --- Makefile (revision 1196) +++ Makefile (working copy) @@ -26,7 +26,7 @@ DIFF = diff PREFIX ?= /usr/local MANDIR ?= $(PREFIX)/share/man -CFLAGS ?= -Os -Wall -Wshadow +CFLAGS ?= -Os -Wall -Wshadow -std=c99 EXPORTDIR ?= .
WARNERROR ?= yes
The above, with the patch in question applied, results in this error:
cc1: warnings being treated as errors flashrom.c: In function ‘doit’: flashrom.c:1596: error: implicit declaration of function ‘fileno’ make: *** [flashrom.o] Error 1
However, I also think we should change the printing after 0.9.3 to fit into 80 chars/line again. Names like "W29C010(M)/W29C011A/W29EE011/W29EE012" make it very hard though, we should shorten them.
Uwe.
http://hermann-uwe.de | http://sigrok.org http://randomprojects.org | http://unmaintained-free-software.org
flashrom mailing list flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom
On 07.10.2010 00:25, Idwer Vollering wrote:
2010/10/7 Uwe Hermann uwe@hermann-uwe.de
flashrom.c:1351: error: ‘for’ loop initial declarations are only allowed in C99 mode flashrom.c:1351: note: use option -std=c99 or -std=gnu99 to compile your code make: *** [flashrom.o] Error 1
I think this is the culprit:
for (int i = 0; i < startcol; i++) printf(" ");
Moving the "int i;" to the top of the function should fix it.
I think this is a better fix than this:
Index: Makefile
--- Makefile (revision 1196) +++ Makefile (working copy) @@ -26,7 +26,7 @@ DIFF = diff PREFIX ?= /usr/local MANDIR ?= $(PREFIX)/share/man -CFLAGS ?= -Os -Wall -Wshadow +CFLAGS ?= -Os -Wall -Wshadow -std=c99 EXPORTDIR ?= .
WARNERROR ?= yes
The above, with the patch in question applied, results in this error:
cc1: warnings being treated as errors flashrom.c: In function ‘doit’: flashrom.c:1596: error: implicit declaration of function ‘fileno’
Mh yes, once you switch the mode from gnu99 to c99, you get all sorts of pretty explosions. The following patch allows compilation with -std=c99 on my Linux box with gcc and clang, but I fear it will cause all sorts of funnies on other operating systems, and especially break on Windows.
This patch is for testing on non-Linux architectures, and _not_ for immediate merge.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-c99_clean/hwaccess.h =================================================================== --- flashrom-c99_clean/hwaccess.h (revision 1199) +++ flashrom-c99_clean/hwaccess.h (working copy) @@ -256,37 +256,37 @@
static inline void outb(uint8_t value, uint16_t port) { - asm volatile ("outb %b0,%w1": :"a" (value), "Nd" (port)); + __asm__ volatile ("outb %b0,%w1": :"a" (value), "Nd" (port)); }
static inline uint8_t inb(uint16_t port) { uint8_t value; - asm volatile ("inb %w1,%0":"=a" (value):"Nd" (port)); + __asm__ volatile ("inb %w1,%0":"=a" (value):"Nd" (port)); return value; }
static inline void outw(uint16_t value, uint16_t port) { - asm volatile ("outw %w0,%w1": :"a" (value), "Nd" (port)); + __asm__ volatile ("outw %w0,%w1": :"a" (value), "Nd" (port)); }
static inline uint16_t inw(uint16_t port) { uint16_t value; - asm volatile ("inw %w1,%0":"=a" (value):"Nd" (port)); + __asm__ volatile ("inw %w1,%0":"=a" (value):"Nd" (port)); return value; }
static inline void outl(uint32_t value, uint16_t port) { - asm volatile ("outl %0,%w1": :"a" (value), "Nd" (port)); + __asm__ volatile ("outl %0,%w1": :"a" (value), "Nd" (port)); }
static inline uint32_t inl(uint16_t port) { uint32_t value; - asm volatile ("inl %1,%0":"=a" (value):"Nd" (port)); + __asm__ volatile ("inl %1,%0":"=a" (value):"Nd" (port)); return value; } #endif Index: flashrom-c99_clean/serprog.c =================================================================== --- flashrom-c99_clean/serprog.c (revision 1199) +++ flashrom-c99_clean/serprog.c (working copy) @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <stdio.h> #include <stdlib.h> #include <unistd.h> Index: flashrom-c99_clean/Makefile =================================================================== --- flashrom-c99_clean/Makefile (revision 1199) +++ flashrom-c99_clean/Makefile (working copy) @@ -26,7 +26,7 @@ DIFF = diff PREFIX ?= /usr/local MANDIR ?= $(PREFIX)/share/man -CFLAGS ?= -Os -Wall -Wshadow +CFLAGS ?= -Os -Wall -Wshadow -std=c99 EXPORTDIR ?= .
WARNERROR ?= yes Index: flashrom-c99_clean/dummyflasher.c =================================================================== --- flashrom-c99_clean/dummyflasher.c (revision 1199) +++ flashrom-c99_clean/dummyflasher.c (working copy) @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <string.h> #include <stdlib.h> #include <ctype.h> Index: flashrom-c99_clean/cli_classic.c =================================================================== --- flashrom-c99_clean/cli_classic.c (revision 1199) +++ flashrom-c99_clean/cli_classic.c (working copy) @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <stdio.h> #include <fcntl.h> #include <sys/stat.h> Index: flashrom-c99_clean/dmi.c =================================================================== --- flashrom-c99_clean/dmi.c (revision 1199) +++ flashrom-c99_clean/dmi.c (working copy) @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <string.h> +#include <strings.h> #include <stdio.h> #include <stdlib.h>
Index: flashrom-c99_clean/layout.c =================================================================== --- flashrom-c99_clean/layout.c (revision 1199) +++ flashrom-c99_clean/layout.c (working copy) @@ -18,9 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <ctype.h> #include "flash.h" #include "programmer.h" Index: flashrom-c99_clean/cbtable.c =================================================================== --- flashrom-c99_clean/cbtable.c (revision 1199) +++ flashrom-c99_clean/cbtable.c (working copy) @@ -22,6 +22,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <unistd.h> #include <stdio.h> #include <stdlib.h> Index: flashrom-c99_clean/dediprog.c =================================================================== --- flashrom-c99_clean/dediprog.c (revision 1199) +++ flashrom-c99_clean/dediprog.c (working copy) @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <string.h> #include <usb.h> #include "flash.h" Index: flashrom-c99_clean/buspirate_spi.c =================================================================== --- flashrom-c99_clean/buspirate_spi.c (revision 1199) +++ flashrom-c99_clean/buspirate_spi.c (working copy) @@ -17,8 +17,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <stdio.h> #include <string.h> +#include <strings.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> Index: flashrom-c99_clean/serial.c =================================================================== --- flashrom-c99_clean/serial.c (revision 1199) +++ flashrom-c99_clean/serial.c (working copy) @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _BSD_SOURCE + #include <stdio.h> #include <stdlib.h> #include <unistd.h> Index: flashrom-c99_clean/physmap.c =================================================================== --- flashrom-c99_clean/physmap.c (revision 1199) +++ flashrom-c99_clean/physmap.c (working copy) @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <unistd.h> #include <stdio.h> #include <stdlib.h> Index: flashrom-c99_clean/spi.c =================================================================== --- flashrom-c99_clean/spi.c (revision 1199) +++ flashrom-c99_clean/spi.c (working copy) @@ -22,7 +22,7 @@ * Contains the generic SPI framework */
-#include <string.h> +#include <strings.h> #include "flash.h" #include "flashchips.h" #include "chipdrivers.h" Index: flashrom-c99_clean/ft2232_spi.c =================================================================== --- flashrom-c99_clean/ft2232_spi.c (revision 1199) +++ flashrom-c99_clean/ft2232_spi.c (working copy) @@ -20,8 +20,11 @@
#if CONFIG_FT2232_SPI == 1
+#define _XOPEN_SOURCE 500 + #include <stdio.h> #include <string.h> +#include <strings.h> #include <stdlib.h> #include <ctype.h> #include "flash.h" Index: flashrom-c99_clean/chipset_enable.c =================================================================== --- flashrom-c99_clean/chipset_enable.c (revision 1199) +++ flashrom-c99_clean/chipset_enable.c (working copy) @@ -26,6 +26,7 @@ */
#define _LARGEFILE64_SOURCE +#define _XOPEN_SOURCE 500
#include <stdlib.h> #include <string.h> Index: flashrom-c99_clean/flashrom.c =================================================================== --- flashrom-c99_clean/flashrom.c (revision 1199) +++ flashrom-c99_clean/flashrom.c (working copy) @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#define _XOPEN_SOURCE 500 + #include <stdio.h> #include <sys/types.h> #ifndef __LIBPAYLOAD__ Index: flashrom-c99_clean/udelay.c =================================================================== --- flashrom-c99_clean/udelay.c (revision 1199) +++ flashrom-c99_clean/udelay.c (working copy) @@ -21,6 +21,8 @@
#ifndef __LIBPAYLOAD__
+#define _XOPEN_SOURCE 500 + #include <unistd.h> #include <sys/time.h> #include <stdlib.h> @@ -35,7 +37,7 @@ unsigned long i; for (i = 0; i < usecs * micro; i++) { /* Make sure the compiler doesn't optimize the loop away. */ - asm volatile ("" : : "rm" (i) ); + __asm__ volatile ("" : : "rm" (i) ); } }
Index: flashrom-c99_clean/board_enable.c =================================================================== --- flashrom-c99_clean/board_enable.c (revision 1199) +++ flashrom-c99_clean/board_enable.c (working copy) @@ -24,7 +24,7 @@ * Contains the board specific flash enables. */
-#include <string.h> +#include <strings.h> #include "flash.h" #include "programmer.h"
On Thu, Oct 07, 2010 at 02:52:43AM +0200, Carl-Daniel Hailfinger wrote:
The above, with the patch in question applied, results in this error:
cc1: warnings being treated as errors flashrom.c: In function ‘doit’: flashrom.c:1596: error: implicit declaration of function ‘fileno’
Mh yes, once you switch the mode from gnu99 to c99, you get all sorts of pretty explosions.
Guess so, too.
The following patch allows compilation with -std=c99 on my Linux box with gcc and clang, but I fear it will cause all sorts of funnies on other operating systems, and especially break on Windows.
This patch is for testing on non-Linux architectures, and _not_ for immediate merge.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Uwe Hermann uwe@hermann-uwe.de
I think it's probably OK to merge it anyway (after 0.9.3), but without the addition of -std=c99 in the Makefile. Also volatile -> __volatile__ maybe too, while we're at it.
Uwe.
i looked into this again (mainly from a linux perspective), here is what i have found out:
following functions are not in c99: - strdup (posix, all over the place, easily replaceable) - getpagesize (alternatives: http://en.wikipedia.org/wiki/Page_(computer_memory)#Determining_the_page_siz... - strcasecmp, strncasecmp (posix) - popen/pclose (posix, will be gone with internal dmi decoder) - usleep (posix, and even there deprecated!) - gethostbyname et al (posix, serprog only) also, struct hostent->h_addr should be h_addr_list[0] - fileno (posix, used in flashrom.c)
the termios flag CRTSCTS is not specified in c or posix (bsd, used in serial.c's sp_openserport)
and then there is the __asm__ __volatile__ thingy.
not too bad imho. it gets worse with -pedantic of course... - unnamed unions (which became part of c11) - empty struct initializers ({}, mostly fixed by using {0} although gcc and clang continue to warn if there are substructs. this would lead to things like {{{{{0}}}}} in some cases and that's just not worth it.) - 0-sized arrays (coreboot_tables.h, wtf?) - lots of: pointer of type ‘void *’ used in arithmetic (mmio functions/macros)
i have fixed the h_addr and __asm__ __volatile__ problem and also replaced all empty struct initializers with {0} as this is the standard 0/NULL initializer (as discussed in the -p internal:mainboard= thread IIRC) in my tested_stuff branch.
Am 26.08.2012 02:35 schrieb Stefan Tauner:
i looked into this again (mainly from a linux perspective),
Thanks a lot, I had forgotten that the patch was acked.
here is what i have found out:
following functions are not in c99:
- strdup (posix, all over the place, easily replaceable)
- getpagesize (alternatives:
http://en.wikipedia.org/wiki/Page_(computer_memory)#Determining_the_page_siz...
- strcasecmp, strncasecmp (posix)
- popen/pclose (posix, will be gone with internal dmi decoder)
- usleep (posix, and even there deprecated!)
- gethostbyname et al (posix, serprog only) also, struct hostent->h_addr should be h_addr_list[0]
- fileno (posix, used in flashrom.c)
the termios flag CRTSCTS is not specified in c or posix (bsd, used in serial.c's sp_openserport)
and then there is the __asm__ __volatile__ thingy.
not too bad imho. it gets worse with -pedantic of course...
- unnamed unions (which became part of c11)
- empty struct initializers ({}, mostly fixed by using {0} although gcc and clang continue to warn if there are substructs. this would lead to things like {{{{{0}}}}} in some cases and that's just not worth it.)
- 0-sized arrays (coreboot_tables.h, wtf?)
- lots of: pointer of type ‘void *’ used in arithmetic (mmio functions/macros)
i have fixed the h_addr and __asm__ __volatile__ problem and also replaced all empty struct initializers with {0} as this is the standard 0/NULL initializer (as discussed in the -p internal:mainboard= thread IIRC) in my tested_stuff branch.
Excellent, thank you! Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Can you please commit that very soon?
Regards, Carl-Daniel
This patch just fixes a limited number of bits not conforming to c99 by using - __asm__ instead of just asm - {0} instead of {} for struct initialization - h_addr_list[0] instead of h_addr to access the host address in struct hostent - #include <strings.h> where needed (for ffs and strcasecmp)
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net --- atahpt.c | 2 +- board_enable.c | 3 ++- buspirate_spi.c | 1 + cbtable.c | 1 + chipset_enable.c | 2 +- dmi.c | 1 + drkaiser.c | 5 +++-- flashchips.c | 2 +- flashrom.c | 2 +- ft2232_spi.c | 4 +++- gfxnvidia.c | 2 +- hwaccess.c | 2 +- hwaccess.h | 13 ++++++------- internal.c | 1 + it87spi.c | 2 +- nic3com.c | 2 +- nicintel.c | 2 +- nicintel_spi.c | 2 +- nicnatsemi.c | 3 ++- nicrealtek.c | 3 ++- ogp_spi.c | 4 +++- pony_spi.c | 1 + print.c | 4 ++-- rayer_spi.c | 1 + satamv.c | 2 +- satasii.c | 2 +- serprog.c | 3 ++- udelay.c | 2 +- 28 files changed, 44 insertions(+), 30 deletions(-)
diff --git a/atahpt.c b/atahpt.c index f410fe4..8ec0f3f 100644 --- a/atahpt.c +++ b/atahpt.c @@ -38,7 +38,7 @@ const struct pcidev_status ata_hpt[] = { {0x1103, 0x0005, NT, "Highpoint", "HPT372A/372N"}, {0x1103, 0x0006, NT, "Highpoint", "HPT302/302N"},
- {}, + {0}, };
static void atahpt_chip_writeb(const struct flashctx *flash, uint8_t val, diff --git a/board_enable.c b/board_enable.c index df772b8..cee9ec5 100644 --- a/board_enable.c +++ b/board_enable.c @@ -24,6 +24,7 @@ * Contains the board specific flash enables. */
+#include <strings.h> #include <string.h> #include <stdlib.h> #include "flash.h" @@ -292,7 +293,7 @@ static uint8_t w836xx_deviceid_hwmon(uint16_t sio_port)
void probe_superio_winbond(void) { - struct superio s = {}; + struct superio s = {0}; uint16_t winbond_ports[] = {WINBOND_SUPERIO_PORT1, WINBOND_SUPERIO_PORT2, 0}; uint16_t *i = winbond_ports; uint8_t model; diff --git a/buspirate_spi.c b/buspirate_spi.c index d00277e..054b4ff 100644 --- a/buspirate_spi.c +++ b/buspirate_spi.c @@ -18,6 +18,7 @@ */
#include <stdio.h> +#include <strings.h> #include <string.h> #include <stdlib.h> #include <ctype.h> diff --git a/cbtable.c b/cbtable.c index bd83ea5..b859e68 100644 --- a/cbtable.c +++ b/cbtable.c @@ -25,6 +25,7 @@ #include <unistd.h> #include <stdio.h> #include <ctype.h> +#include <strings.h> #include <string.h> #include "flash.h" #include "programmer.h" diff --git a/chipset_enable.c b/chipset_enable.c index 995d2c5..03cb67e 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -1466,7 +1466,7 @@ const struct penable chipset_enables[] = { {0x8086, 0x8c5e, NT, "Intel", "Lynx Point", enable_flash_pch8}, {0x8086, 0x8c5f, NT, "Intel", "Lynx Point", enable_flash_pch8}, #endif - {}, + {0}, };
int chipset_flash_enable(void) diff --git a/dmi.c b/dmi.c index 2c2551d..dfc78e9 100644 --- a/dmi.c +++ b/dmi.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <strings.h> #include <string.h> #include <stdio.h> #include <stdlib.h> diff --git a/drkaiser.c b/drkaiser.c index 259530a..8c9f560 100644 --- a/drkaiser.c +++ b/drkaiser.c @@ -35,7 +35,8 @@
const struct pcidev_status drkaiser_pcidev[] = { {0x1803, 0x5057, OK, "Dr. Kaiser", "PC-Waechter (Actel FPGA)"}, - {}, + + {0}, };
static uint8_t *drkaiser_bar; @@ -61,7 +62,7 @@ static int drkaiser_shutdown(void *data) /* Flash write is disabled automatically by PCI restore. */ pci_cleanup(pacc); return 0; -}; +}
int drkaiser_init(void) { diff --git a/flashchips.c b/flashchips.c index f658b4c..8fe50bd 100644 --- a/flashchips.c +++ b/flashchips.c @@ -9496,7 +9496,7 @@ const struct flashchip flashchips[] = { .unlock = spi_disable_blockprotect, /* is this safe? */ .read = spi_chip_read, /* FIXME: some vendor extensions define this */ - .voltage = {}, + .voltage = {0}, /* Everything below will be set by the probing function. */ .write = NULL, .total_size = 0, diff --git a/flashrom.c b/flashrom.c index 44a3eba..f6185d0 100644 --- a/flashrom.c +++ b/flashrom.c @@ -263,7 +263,7 @@ const struct programmer_entry programmer_table[] = { }, #endif
- {}, /* This entry corresponds to PROGRAMMER_INVALID. */ + {0}, /* This entry corresponds to PROGRAMMER_INVALID. */ };
#define SHUTDOWN_MAXFN 32 diff --git a/ft2232_spi.c b/ft2232_spi.c index d599a8a..edea1e6 100644 --- a/ft2232_spi.c +++ b/ft2232_spi.c @@ -21,6 +21,7 @@ #if CONFIG_FT2232_SPI == 1
#include <stdio.h> +#include <strings.h> #include <string.h> #include <stdlib.h> #include <ctype.h> @@ -61,7 +62,8 @@ const struct usbdev_status devs_ft2232spi[] = { {OLIMEX_VID, OLIMEX_ARM_TINY_PID, OK, "Olimex", "ARM-USB-TINY"}, {OLIMEX_VID, OLIMEX_ARM_OCD_H_PID, NT, "Olimex", "ARM-USB-OCD-H"}, {OLIMEX_VID, OLIMEX_ARM_TINY_H_PID, NT, "Olimex", "ARM-USB-TINY-H"}, - {}, + + {0}, };
diff --git a/gfxnvidia.c b/gfxnvidia.c index 782d692..7bdbda8 100644 --- a/gfxnvidia.c +++ b/gfxnvidia.c @@ -59,7 +59,7 @@ const struct pcidev_status gfx_nvidia[] = { {0x10de, 0x0202, NT, "NVIDIA", "GeForce 3 nFX Ultra" }, {0x10de, 0x0203, NT, "NVIDIA", "Quadro 3 DDC" },
- {}, + {0}, };
static void gfxnvidia_chip_writeb(const struct flashctx *flash, uint8_t val, diff --git a/hwaccess.c b/hwaccess.c index c18a110..e1195de 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -97,7 +97,7 @@ static inline void sync_primitive(void) * Such reordering and/or merging would break device accesses which * depend on the exact access order. */ - asm("eieio" : : : "memory"); + ___asm___ volatile ("eieio" : : : "memory"); }
/* PCI port I/O is not yet implemented on PowerPC. */ diff --git a/hwaccess.h b/hwaccess.h index 12496bb..dc52118 100644 --- a/hwaccess.h +++ b/hwaccess.h @@ -174,7 +174,6 @@ cpu_to_be(64)
/* for iopl and outb under Solaris */ #if defined (__sun) && (defined(__i386) || defined(__amd64)) -#include <strings.h> #include <sys/sysi86.h> #include <sys/psw.h> #include <asm/sunddi.h> @@ -263,37 +262,37 @@ cpu_to_be(64)
static inline void outb(uint8_t value, uint16_t port) { - asm volatile ("outb %b0,%w1": :"a" (value), "Nd" (port)); + __asm__ volatile ("outb %b0,%w1": :"a" (value), "Nd" (port)); }
static inline uint8_t inb(uint16_t port) { uint8_t value; - asm volatile ("inb %w1,%0":"=a" (value):"Nd" (port)); + __asm__ volatile ("inb %w1,%0":"=a" (value):"Nd" (port)); return value; }
static inline void outw(uint16_t value, uint16_t port) { - asm volatile ("outw %w0,%w1": :"a" (value), "Nd" (port)); + __asm__ volatile ("outw %w0,%w1": :"a" (value), "Nd" (port)); }
static inline uint16_t inw(uint16_t port) { uint16_t value; - asm volatile ("inw %w1,%0":"=a" (value):"Nd" (port)); + __asm__ volatile ("inw %w1,%0":"=a" (value):"Nd" (port)); return value; }
static inline void outl(uint32_t value, uint16_t port) { - asm volatile ("outl %0,%w1": :"a" (value), "Nd" (port)); + __asm__ volatile ("outl %0,%w1": :"a" (value), "Nd" (port)); }
static inline uint32_t inl(uint16_t port) { uint32_t value; - asm volatile ("inl %1,%0":"=a" (value):"Nd" (port)); + __asm__ volatile ("inl %1,%0":"=a" (value):"Nd" (port)); return value; } #endif diff --git a/internal.c b/internal.c index f3ccbde..7b6cff2 100644 --- a/internal.c +++ b/internal.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <strings.h> #include <string.h> #include <stdlib.h> #include "flash.h" diff --git a/it87spi.c b/it87spi.c index fb2f794..a35ddc0 100644 --- a/it87spi.c +++ b/it87spi.c @@ -74,7 +74,7 @@ uint16_t probe_id_ite(uint16_t port)
void probe_superio_ite(void) { - struct superio s = {}; + struct superio s = {0}; uint16_t ite_ports[] = {ITE_SUPERIO_PORT1, ITE_SUPERIO_PORT2, 0}; uint16_t *i = ite_ports;
diff --git a/nic3com.c b/nic3com.c index f4fb6fe..c7fc800 100644 --- a/nic3com.c +++ b/nic3com.c @@ -53,7 +53,7 @@ const struct pcidev_status nics_3com[] = { /* 3C980C */ {0x10b7, 0x9805, NT, "3COM", "3C980C: EtherLink Server 10/100 PCI (TX)" },
- {}, + {0}, };
static void nic3com_chip_writeb(const struct flashctx *flash, uint8_t val, diff --git a/nicintel.c b/nicintel.c index 1c6d409..4399377 100644 --- a/nicintel.c +++ b/nicintel.c @@ -31,7 +31,7 @@ const struct pcidev_status nics_intel[] = { {PCI_VENDOR_ID_INTEL, 0x1209, NT, "Intel", "8255xER/82551IT Fast Ethernet Controller"}, {PCI_VENDOR_ID_INTEL, 0x1229, OK, "Intel", "82557/8/9/0/1 Ethernet Pro 100"},
- {}, + {0}, };
/* Arbitrary limit, taken from the datasheet I just had lying around. diff --git a/nicintel_spi.c b/nicintel_spi.c index d422b18..24d5732 100644 --- a/nicintel_spi.c +++ b/nicintel_spi.c @@ -73,7 +73,7 @@ const struct pcidev_status nics_intel_spi[] = { {PCI_VENDOR_ID_INTEL, 0x107c, OK, "Intel", "82541PI Gigabit Ethernet Controller"}, {PCI_VENDOR_ID_INTEL, 0x10b9, OK, "Intel", "82572EI Gigabit Ethernet Controller"},
- {}, + {0}, };
static void nicintel_request_spibus(void) diff --git a/nicnatsemi.c b/nicnatsemi.c index 7cdd2fe..fcfc613 100644 --- a/nicnatsemi.c +++ b/nicnatsemi.c @@ -33,7 +33,8 @@ const struct pcidev_status nics_natsemi[] = { {0x100b, 0x0020, NT, "National Semiconductor", "DP83815/DP83816"}, {0x100b, 0x0022, NT, "National Semiconductor", "DP83820"}, - {}, + + {0}, };
static void nicnatsemi_chip_writeb(const struct flashctx *flash, uint8_t val, diff --git a/nicrealtek.c b/nicrealtek.c index afc3d0f..08ff219 100644 --- a/nicrealtek.c +++ b/nicrealtek.c @@ -34,7 +34,8 @@ const struct pcidev_status nics_realtek[] = { {0x10ec, 0x8139, OK, "Realtek", "RTL8139/8139C/8139C+"}, {0x1113, 0x1211, OK, "SMC2", "1211TX"}, /* RTL8139 clone */ - {}, + + {0}, };
static void nicrealtek_chip_writeb(const struct flashctx *flash, uint8_t val, diff --git a/ogp_spi.c b/ogp_spi.c index 13091b4..7aee72b 100644 --- a/ogp_spi.c +++ b/ogp_spi.c @@ -18,6 +18,7 @@ */
#include <stdlib.h> +#include <strings.h> #include <string.h> #include "flash.h" #include "programmer.h" @@ -48,7 +49,8 @@ static uint32_t ogp_reg_sck;
const struct pcidev_status ogp_spi[] = { {PCI_VENDOR_ID_OGP, 0x0000, OK, "Open Graphics Project", "Development Board OGD1"}, - {}, + + {0}, };
static void ogp_request_spibus(void) diff --git a/pony_spi.c b/pony_spi.c index 6ce467e..fb90a33 100644 --- a/pony_spi.c +++ b/pony_spi.c @@ -22,6 +22,7 @@ */
#include <stdlib.h> +#include <strings.h> #include <string.h>
#include "flash.h" diff --git a/print.c b/print.c index b4990ec..f0cd753 100644 --- a/print.c +++ b/print.c @@ -1033,7 +1033,7 @@ const struct board_info boards_known[] = { B("ZOTAC", "ZBOX HD-ID11", OK, NULL, NULL), #endif
- {}, + {0}, };
/* Please keep this list alphabetically ordered by vendor/board. */ @@ -1059,6 +1059,6 @@ const struct board_info laptops_known[] = { B("Lenovo", "3000 V100 TF05Cxx", OK, "http://www5.pc.ibm.com/europe/products.nsf/products?openagent&brand=Leno...", NULL), #endif
- {}, + {0}, }; #endif diff --git a/rayer_spi.c b/rayer_spi.c index 8e48e6e..b312610 100644 --- a/rayer_spi.c +++ b/rayer_spi.c @@ -31,6 +31,7 @@ #if defined(__i386__) || defined(__x86_64__)
#include <stdlib.h> +#include <strings.h> #include <string.h> #include "flash.h" #include "programmer.h" diff --git a/satamv.c b/satamv.c index afcabaf..27ad699 100644 --- a/satamv.c +++ b/satamv.c @@ -33,7 +33,7 @@ const struct pcidev_status satas_mv[] = { /* 88SX6041 and 88SX6042 are the same according to the datasheet. */ {0x11ab, 0x7042, OK, "Marvell", "88SX7042 PCI-e 4-port SATA-II"},
- {}, + {0}, };
#define NVRAM_PARAM 0x1045c diff --git a/satasii.c b/satasii.c index e210e10..bc95645 100644 --- a/satasii.c +++ b/satasii.c @@ -38,7 +38,7 @@ const struct pcidev_status satas_sii[] = { {0x1095, 0x3132, OK, "Silicon Image", "SiI 3132 SATA Raid II Ctrl"}, {0x1095, 0x3512, OK, "Silicon Image", "SiI 3512 [SATALink/SATARaid] SATA Ctrl"},
- {}, + {0}, };
static void satasii_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr); diff --git a/serprog.c b/serprog.c index e418c3e..dd86fd3 100644 --- a/serprog.c +++ b/serprog.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include <strings.h> #include <string.h> #include <ctype.h> #include <fcntl.h> @@ -125,7 +126,7 @@ static int sp_opensocket(char *ip, unsigned int port) } sp.si.sin_family = AF_INET; sp.si.sin_port = htons(port); - (void)memcpy(&sp.si.sin_addr, hostPtr->h_addr, hostPtr->h_length); + (void)memcpy(&sp.si.sin_addr, hostPtr->h_addr_list[0], hostPtr->h_length); if (connect(sock, &sp.s, sizeof(sp.si)) < 0) { close(sock); msg_perr("Error: serprog cannot connect: %s\n", strerror(errno)); diff --git a/udelay.c b/udelay.c index 5faa004..9f5e562 100644 --- a/udelay.c +++ b/udelay.c @@ -35,7 +35,7 @@ __attribute__ ((noinline)) void myusec_delay(int usecs) unsigned long i; for (i = 0; i < usecs * micro; i++) { /* Make sure the compiler doesn't optimize the loop away. */ - asm volatile ("" : : "rm" (i) ); + __asm__ volatile ("" : : "rm" (i) ); } }
On 07.10.2010 00:12, Uwe Hermann wrote:
On Wed, Oct 06, 2010 at 02:00:35PM +0200, Carl-Daniel Hailfinger wrote:
flashrom -L output did not contain a list of programmers nor were all programmers listed. Fix it. (Well, mostly. Some programmers have no devices listed. And formatting on 80 column screens is totally broken for the flash chip list.) Wiki output is unchanged, and will need separate fixups.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Uwe Hermann uwe@hermann-uwe.de
But:
flashrom.c:1351: error: ‘for’ loop initial declarations are only allowed in C99 mode flashrom.c:1351: note: use option -std=c99 or -std=gnu99 to compile your code make: *** [flashrom.o] Error 1
Ah right. Changed because requiring C99 mode causes complaints all over the map in other files.
Thanks for the review, committed in r1199.
I think this is the culprit:
for (int i = 0; i < startcol; i++) printf(" ");
Moving the "int i;" to the top of the function should fix it.
However, I also think we should change the printing after 0.9.3 to fit into 80 chars/line again. Names like "W29C010(M)/W29C011A/W29EE011/W29EE012" make it very hard though, we should shorten them.
One option is to split up such long names into multiple lines, perhaps at the / boundary.
Regards, Carl-Daniel