{"id":2469,"date":"2014-01-27T18:55:33","date_gmt":"2014-01-27T09:55:33","guid":{"rendered":"http:\/\/www.pinewell.jp\/wordpress\/?p=2469"},"modified":"2014-01-27T18:55:33","modified_gmt":"2014-01-27T09:55:33","slug":"edid%e3%81%aeoverride%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.pinewell.jp\/wordpress\/?p=2469","title":{"rendered":"EDID\u306eoverride\u3002"},"content":{"rendered":"<p>T221\u3084CDU2150A\u3092\u3088\u308a\u5feb\u9069\u306b\u4f7f\u3046\u306b\u3042\u305f\u308a\u306b\u554f\u984c\u3068\u306a\u308bEDID\u3002<br \/>\n\u67d0\u30aa\u30fc\u30af\u30b7\u30e7\u30f3\u306bEDID\u306eoverride\u3059\u308b\u5ef6\u9577\u30b1\u30fc\u30d6\u30eb\u3001ROM\u304c\u51fa\u54c1\u3055\u308c\u3066\u3044\u308b\u306e\u3060\u304c\u3044\u304b\u3093\u305b\u3093\u5b89\u304f\u306a\u3044\u3002<br \/>\nT221\u8cfc\u5165\u6642\u306boverride\u30b1\u30fc\u30d6\u30eb\u3001ROMx3\u500b\u306f\u8cfc\u5165\u3057\u305f\u306e\u3060\u304c\u3002<br \/>\n\u5b9f\u969b\u306e\u3068\u3053\u308d\u3001\u3069\u308c\u304c\u81ea\u5206\u306e\u74b0\u5883\u306b\u4e00\u756a\u9069\u3057\u3066\u3044\u308b\u304b\u53d6\u3063\u66ff\u3048\u5f15\u3063\u66ff\u3048\u3057\u305f\u3044\u306e\u3067\u30b3\u30b9\u30d1\u304c\u60aa\u3044\u3002<\/p>\n<p>\u5c11\u3057\u8abf\u3079\u3066\u307f\u308b\u3068EDID\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u308bEEPROM\u306fI2C\u3067\u901a\u4fe1\u3001\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u3092\u3057\u3066\u3044\u308b\u305d\u3046\u3060\u3002<br \/>\n\u30d1\u30bd\u30b3\u30f3\u3067\u306e\u66f8\u304d\u8fbc\u307f\u306f\u30d1\u30e9\u30ec\u30eb\u30dd\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf2\u500b\u3068\u62b5\u6297\u3044\u304f\u3064\u304b\u3067\u81ea\u4f5c\u3067\u304d\u308b\u3088\u3046\u3060\u3002<br \/>\n\u30d1\u30e9\u30ec\u30eb\u30dd\u30fc\u30c8\u304c\u3042\u308bPC\u304c\u65e2\u306b\u7121\u3044\u306e\u3067\u30ac\u30ec\u30fc\u30b8\u306b\u7a4d\u3093\u3067\u3042\u3063\u305f\u53e4\u3044\u30ce\u30fc\u30c8PC\u3092\u5fa9\u6d3b\u3055\u305b\u3088\u3046\u3068\u601d\u3063\u305f\u304c\u3001<br \/>\n\u30b3\u30f3\u30c7\u30f3\u30b5\u304c\u30a4\u30ab\u30ec\u3066\u3044\u308b\u306e\u304b\u3001OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d\u306b\u7a81\u7136\u96fb\u6e90\u304c\u843d\u308b\u3002\u3053\u308c\u306f\u4f7f\u3048\u306a\u3044\u3068\u5224\u65ad\u3002<\/p>\n<p>\u3055\u3089\u306b\u8abf\u3079\u308b\u3002<br \/>\nI2C\u3068\u3044\u3048\u3070\u30a6\u30c1\u306b\u306farduino\u3082RaspberryPi\u3082\u3042\u308b\u305e\u3001\u3082\u3057\u304b\u3057\u3066\u66f8\u304d\u63db\u3048\u3067\u304d\u308b\u306e\u3067\u306f\uff1f<br \/>\n\u3068\u3001\u601d\u3063\u3066\u3057\u307e\u3063\u305f\u3002<br \/>\narduino I2C EEPROM \u3067\u691c\u7d22\u3059\u308b\u3068\u65e5\u672c\u8a9e\u30da\u30fc\u30b8\u3067\u78ba\u304b\u306b\u3042\u308b\u3002\u3053\u3046\u306a\u308b\u3068\u8a66\u3057\u3066\u307f\u306a\u3044\u3068\u6c17\u304c\u6e08\u307e\u306a\u3044\u3002<br \/>\narduino\u3067\u8aad\u307f\u51fa\u3057\u6210\u529f\u3002\u66f8\u304d\u8fbc\u307f\u306f\u306a\u305c\u304b\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3002<br \/>\nraspberrypi I2C EEPROM \u3067\u82f1\u8a9e\u306e\u30da\u30fc\u30b8\u3092\u767a\u898b\u3002<br \/>\n\u3053\u3061\u3089\u3067\u3082\u8aad\u307f\u51fa\u3057\u306f\u6210\u529f\u3002<br \/>\n\u306a\u305c\u66f8\u304d\u8fbc\u307f\u304c\u3067\u304d\u306a\u3044\u306e\u304b\uff1f\u4f7f\u7528\u3057\u3066\u3044\u308bEEPROM\u306b\u30d7\u30ed\u30c6\u30af\u30c8\u3067\u3082\u304b\u304b\u3063\u3066\u3044\u308b\u306e\u3060\u308d\u3046\u3001\u3068\u52dd\u624b\u306b\u5224\u65ad\u3002<\/p>\n<p>\u307e\u3041\u3001\u8aad\u3081\u308b\u306e\u306a\u3089\u66f8\u304d\u8fbc\u307f\u3082\u306a\u3093\u3068\u304b\u3059\u308c\u3070\u3046\u307e\u304f\u3086\u304f\u306e\u3060\u308d\u3046\u3068\u3001\u90e8\u6750\u3092\u767a\u6ce8\u3002<br \/>\n\u67d0\u30b5\u30a4\u30c8\u306b\u3066 Microchip\u306e24LC01B\/P\u30021\u500b28\u5186!\u300220\u500b\u8cfc\u5165\u30028pin\u306eIC\u30bd\u30b1\u30c3\u30c8\u308210\u500b\u3002<\/p>\n<p>\u3053\u308c\u3001\u3055\u3089\u3063\u3068\u66f8\u3044\u3066\u3044\u308b\u3051\u3069EEPROM\u306e\u9078\u5b9a\u306b\u3064\u3044\u3066\u3082\u3044\u308d\u3044\u308d\u8abf\u3079\u305f\u3002\u6050\u3089\u304f\u3053\u308c\u3067\u5927\u4e08\u592b\u3060\u308d\u3046\u2026\u306e\u898b\u5207\u308a\u767a\u8eca\u3002<br \/>\n\u3067\u3001\u672c\u65e5\u5230\u7740\u3002\u3046\u307e\u304f\u884c\u3063\u305f\u306e\u3067\u624b\u9806\u3092\u307e\u3068\u3081\u308b\u3002<\/p>\n<p>\u53d6\u308a\u6562\u3048\u305a\u30c6\u30b9\u30c8\u306a\u306e\u3067EEPROM\u306b\u66f8\u304d\u8fbc\u3080\u305f\u3081\u306e\u30c7\u30fc\u30bf\u306fExtron Electronics\u304c\u7121\u511f\u3067\u914d\u5e03\u3057\u3066\u3044\u308b\uff08\u767b\u9332\u304c\u5fc5\u8981\uff09<br \/>\nEDID Manager\u3092Windows8.1\u6a5f\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3002\u3044\u308d\u3044\u308d\u306a\u30bd\u30d5\u30c8\u3092\u8a66\u3057\u305f\u304c\u3001<br \/>\n(\u7de8\u96c6\u3053\u305d\u3067\u304d\u306a\u3044\u304c)\u3053\u308c\u304c\u4e00\u756a\u4f7f\u3044\u3084\u3059\u3044\u3002<br \/>\n\u3061\u306a\u307f\u306b\u73fe\u5728T221\u306b\u306f3840x2400x34Hz\u306eEDID\u4e57\u3063\u53d6\u308aoverride\u30b1\u30fc\u30d6\u30eb\u3067\u7e4b\u3044\u3067\u3044\u308b\u306e\u3067\u3001\u3053\u306eROM\u30c7\u30fc\u30bf\u3092\u76f4\u63a5<br \/>\n\u8aad\u3093\u3067\u3082\u540c\u3058\u30c7\u30fc\u30bf\u3068\u306a\u308b\u3002\u3046\u307e\u304f\u3044\u3063\u305f\u306e\u304b\u3069\u3046\u304b\u306f\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u306e\u30b3\u30d4\u30fc\u3092\u4f5c\u308c\u3070\u78ba\u8a8d\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>raspi\u3068EEPROM\u306e\u63a5\u7d9a\u306f\u3053\u3046\u3002<br \/>\n<a href=\"http:\/\/www.pinewell.jp\/wordpress\/wp-content\/uploads\/2014\/01\/raspi-eeprom-2-2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.pinewell.jp\/wordpress\/wp-content\/uploads\/2014\/01\/raspi-eeprom-2-300x208.png\" alt=\"raspi-eeprom\" width=\"300\" height=\"208\" class=\"alignleft size-medium wp-image-2471\" \/><\/a><br \/>\nSCL\u3068SDA\u3092\u7e4b\u304e1k\u03a9\u3067\u30d7\u30eb\u30a2\u30c3\u30d7\u3002\u96fb\u6e90\u306f3.3V\u3002<br \/>\nraspi\u3067\u306eEEPROM\u8aad\u307f\u66f8\u304d\u30bd\u30d5\u30c8\u306f\u4ee5\u4e0b\u3088\u308a\u3002<br \/>\n<a href=\"https:\/\/github.com\/dgallot\/i2c-tools\/tree\/master\/eepromer\/\">https:\/\/github.com\/dgallot\/i2c-tools\/tree\/master\/eepromer\/<\/a><br \/>\neeprom.c\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001EEPROM\u306e\u30b5\u30a4\u30ba\u306b\u3042\u308f\u305b\u3066\u9069\u5b9c\u7de8\u96c6\u3002<br \/>\n24LC01\u306a\u3089 DEFAULT_NUM_PAGES \u3092 8,BYTES_PER_PAGE \u3092128,MAX_BYTES \u30928 \u306b\u5909\u66f4\u3002<br \/>\nraspi\u3067\u306ei2c\u30c7\u30d0\u30a4\u30b9\u306e\u6709\u52b9\u5316\u306f\u691c\u7d22\u3059\u308c\u3070\u3067\u3066\u304f\u308b\u3002<br \/>\n<a href=\"http:\/\/www.gallot.be\/?p=180\">http:\/\/www.gallot.be\/?p=180<\/a> \u3053\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u305f\u304c\u3001\u30ef\u30b7\u306e\u74b0\u5883\u3067\u306f \/dev\/i2c-1 \u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u3002<\/p>\n<pre class=\"lang:sh decode:true \" >#i2cdetect -y -a 1\n     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  \n00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  \n10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  \n20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  \n30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  \n40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  \n50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --  \n60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  \n70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  <\/pre>\n<p>\u306750~\u306bEEPROM\u304c\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308b\u3068\u8a00\u3046\u3053\u3068\u3060\u3068\u601d\u3046\u3002<\/p>\n<p>\u8aad\u307f\u51fa\u3057\u3002-p 2\u306f1\u30da\u30fc\u30b8128bytex2\u3067256byte\u5206\u3002 -f \u3067 \u8aad\u307f\u51fa\u3057\u5148\u30d5\u30a1\u30a4\u30eb\u540d\u3002<\/p>\n<pre class=\"lang:sh decode:true \" ># .\/eeprom -p 2 -f EDID.bin\nbase-address of eeproms       : 0x50\nnumber of pages to read       : 2 (0x50 .. 0x51)\nfile opened for writing       : EDID.bin\n            on filedescriptor : 3\ni2c-devicenode is             : \/dev\/i2c-1\n            on filedescriptor : 4\nRead 8 bytes from eeprom at 0x50, offset 00000000\n---\u5272\u611b---<\/pre>\n<p>\u66f8\u304d\u8fbc\u307f\u3002<\/p>\n<pre class=\"lang:sh decode:true \" >#.\/eeprom -w -p 2 -f EDID.bin \nbase-address of eeproms       : 0x50\nnumber of pages to read       : 2 (0x50 .. 0x51)\nfile opened for reading       : EDID_CDU2150A_256byte.bin\n            on filedescriptor : 3\ni2c-devicenode is             : \/dev\/i2c-1\n            on filedescriptor : 4\n\n**WARNING**\n -      You have chosen to WRITE to this eeprom.\n        Make sure that this tiny chip is *NOT* vital to the\n        operation of your computer as you can easily corrupt\n        the configuration memory of your SDRAM-memory-module,\n        your IBM ThinkPad or whatnot...! Fixing these errors can be\n        a time-consuming and very costly process!\n\nThings to consider:\n -      You can have more than one i2c-bus, check in \/proc\/bus\/i2c\n        and specify the correct one with -d\n        right now you have chosen to use '\/dev\/i2c-1'\n -      A eeprom can occupy several i2c-addresses (one per page)\n        so please make sure that there is no vital eeprom in your computer\n        sitting at addresses between 0x50 and 0x51\nEnter 'yes' to continue:yes\nWrote 8 bytes to eeprom at 0x50, offset 00000000\n...... acked \nWrote 8 bytes to eeprom at 0x50, offset 00000008\n...... acked \n\u5272\u611b<\/pre>\n<p>\u66f8\u304d\u8fbc\u307e\u308c\u305f\u30c7\u30fc\u30bf\u306f\u304d\u3061\u3093\u3068\u8aad\u307f\u51fa\u3057\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3057\u3066\u5b9f\u969b\u306boverride\u30b1\u30fc\u30d6\u30eb\u306b\u4ed8\u3051\u3066\u307f\u308b\u3002<br \/>\n\u30c9\u30ad\u30c9\u30ad\u3057\u306a\u304c\u3089T221\u63a5\u7d9aPC\u306e\u96fb\u6e90\u3092\u3044\u308c\u308b\u3068\u3042\u3063\u3055\u308a\u6620\u308b\u3002\u6210\u529f\u3002<br \/>\nEEPROM\u3082\u624b\u306b\u5165\u3063\u305f\u3057\u30c7\u30fc\u30bf\u306e\u66f8\u304d\u8fbc\u307f\u3082\u78ba\u8a8d\u3067\u304d\u305f\u306e\u3067\u3042\u3068\u306fDVI\u30b1\u30fc\u30d6\u30eb\u3092<br \/>\n\u30cf\u30fc\u30c9\u30aa\u30d5\u3067\u8cb7\u3063\u3066\u6765\u3066ROM\u3092\u4e57\u3063\u3051\u308c\u3070EDID\u4e57\u3063\u53d6\u308a\u30b1\u30fc\u30d6\u30eb\u306e\u51fa\u6765\u4e0a\u304c\u308a\u3001\u3068\u3002<\/p>\n<p>EDID\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\u3082\u3081\u3093\u3069\u3046\u305d\u3046\u3060\u304c&#8230;..<\/p>\n<p>github\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u3057\u3001\u591a\u5206\u5927\u4e08\u592b\u3060\u3068\u601d\u3046\u306e\u3067\u4ee5\u4e0b eeprom.c \u306e\u5168\u30bd\u30fc\u30b9\u3002<\/p>\n<pre class=\"lang:c decode:true \" >\/*\nThis program is hereby placed into the public domain.\nOf course the program is provided without warranty of any kind.\n\nDownloaded from http:\/\/www.lm-sensors.org\/browser\/i2c-tools\/trunk\/eepromer\/eeprom.c\n\n*\/\n#include &lt;sys\/ioctl.h&gt;\n#include &lt;errno.h&gt;\n#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;unistd.h&gt;\n#include &lt;fcntl.h&gt;\n#include &lt;string.h&gt;\n#include &lt;time.h&gt;\n#include &lt;linux\/i2c-dev.h&gt;\n\n\/*\n  this program can read 24C16 (and probably smaller ones, too)\n  I wrote it as a quick and dirty hack because my satellite receiver\n  hung again... so I had to reprogram the eeprom where is stores it's\n  settings.\n *\/\n\n#define DEFAULT_I2C_BUS      \"\/dev\/i2c-0\"\n#define DEFAULT_EEPROM_ADDR  0x50         \/* the 24C16 sits on i2c address 0x50 *\/\n#define DEFAULT_NUM_PAGES    8            \/* we default to a 24C16 eeprom which has 8 pages *\/\n#define BYTES_PER_PAGE       256          \/* one eeprom page is 256 byte *\/\n#define MAX_BYTES            16            \/* max number of bytes to write in one chunk *\/\n       \/* ... note: 24C02 and 24C01 only allow 8 bytes to be written in one chunk.   *\n        *  if you are going to write 24C04,8,16 you can change this to 16            *\/\n\n\/* write len bytes (stored in buf) to eeprom at address addr, page-offset offset *\/\n\/* if len=0 (buf may be NULL in this case) you can reposition the eeprom's read-pointer *\/\n\/* return 0 on success, -1 on failure *\/\nint eeprom_write(int fd,\n\t\t unsigned int addr,\n\t\t unsigned int offset,\n\t\t unsigned char *buf,\n\t\t unsigned char len\n){\n\tstruct i2c_rdwr_ioctl_data msg_rdwr;\n\tstruct i2c_msg             i2cmsg;\n\tint i;\n\tchar _buf[MAX_BYTES + 1];\n\n\tif(len&gt;MAX_BYTES){\n\t    fprintf(stderr,\"I can only write MAX_BYTES bytes at a time!\\n\");\n\t    return -1;\n\t}\n\n\tif(len+offset &gt;256){\n\t    fprintf(stderr,\"Sorry, len(%d)+offset(%d) &gt; 256 (page boundary)\\n\",\n\t\t\tlen,offset);\n\t    return -1;\n\t}\n\n\t_buf[0]=offset;    \/* _buf[0] is the offset into the eeprom page! *\/\n\tfor(i=0;i&lt;len;i++) \/* copy buf[0..n] -&gt; _buf[1..n+1] *\/\n\t    _buf[1+i]=buf[i];\n\n\tmsg_rdwr.msgs = &amp;i2cmsg;\n\tmsg_rdwr.nmsgs = 1;\n\n\ti2cmsg.addr  = addr;\n\ti2cmsg.flags = 0;\n\ti2cmsg.len   = 1+len;\n\ti2cmsg.buf   = _buf;\n\n\tif((i=ioctl(fd,I2C_RDWR,&amp;msg_rdwr))&lt;0){\n\t    if ( len &gt; 0 ) {\n\t      perror(\"ioctl()\");\n\t      fprintf(stderr,\"ioctl returned %d\\n\",i);\n            }\n\t    return -1;\n\t}\n\n\tif(len&gt;0)\n\t    fprintf(stderr,\"Wrote %d bytes to eeprom at 0x%02x, offset %08x\\n\",\n\t\t    len,addr,offset);\n\treturn 0;\n}\n\n\/* read len bytes stored in eeprom at address addr, offset offset in array buf *\/\n\/* return -1 on error, 0 on success *\/\nint eeprom_read(int fd,\n\t\t unsigned int addr,\n\t\t unsigned int offset,\n\t\t unsigned char *buf,\n\t\t unsigned char len\n){\n\tstruct i2c_rdwr_ioctl_data msg_rdwr;\n\tstruct i2c_msg             i2cmsg;\n\tint i;\n\n\tif(len&gt;MAX_BYTES){\n\t    fprintf(stderr,\"I can only write MAX_BYTES bytes at a time!\\n\");\n\t    return -1;\n\t}\n\n\tif(eeprom_write(fd,addr,offset,NULL,0)&lt;0)\n\t    return -1;\n\n\tmsg_rdwr.msgs = &amp;i2cmsg;\n\tmsg_rdwr.nmsgs = 1;\n\n\ti2cmsg.addr  = addr;\n\ti2cmsg.flags = I2C_M_RD;\n\ti2cmsg.len   = len;\n\ti2cmsg.buf   = buf;\n\n\tif((i=ioctl(fd,I2C_RDWR,&amp;msg_rdwr))&lt;0){\n\t    perror(\"ioctl()\");\n\t    fprintf(stderr,\"ioctl returned %d\\n\",i);\n\t    return -1;\n\t}\n\n\tfprintf(stderr,\"Read %d bytes from eeprom at 0x%02x, offset %08x\\n\",\n\t\tlen,addr,offset);\n\n\treturn 0;\n}\n\n\n\nint main(int argc, char **argv){\n    int i,j;\n\n    \/* filedescriptor and name of device *\/\n    int d; \n    char *dn=DEFAULT_I2C_BUS;\n\n    \/* filedescriptor and name of data file *\/\n    int f=-1;\n    char *fn=NULL;\n\n    unsigned int addr=DEFAULT_EEPROM_ADDR;\n    int rwmode=0;\n    int pages=DEFAULT_NUM_PAGES;\n\n    int force=0; \/* suppress warning on write! *\/\n    int wait = 0;\n    int acked = 0;\n    \n    while((i=getopt(argc,argv,\"d:a:p:wyf:h\"))&gt;=0){\n\tswitch(i){\n\tcase 'h':\n\t    fprintf(stderr,\"%s [-d dev] [-a adr] [-p pgs] [-w] [-y] [-f file]\\n\",argv[0]);\n\t    fprintf(stderr,\"\\tdev: device, e.g. \/dev\/i2c-0    (def)\\n\");\n\t    fprintf(stderr,\"\\tadr: base address of eeprom, eg 0xA0 (def)\\n\");\n\t    fprintf(stderr,\"\\tpgs: number of pages to read, eg 8 (def)\\n\");\n\t    fprintf(stderr,\"\\t-w : write to eeprom (default is reading!)\\n\");\n\t    fprintf(stderr,\"\\t-y : suppress warning when writing (default is to warn!)\\n\");\n\t    fprintf(stderr,\"\\t-f file: copy eeprom contents to\/from file\\n\");\n\t    fprintf(stderr,\"\\t         (default for read is test only; for write is all zeros)\\n\");\n\t    fprintf(stderr,\"Note on pages\/addresses:\\n\");\n\t    fprintf(stderr,\"\\teeproms with more than 256 byte appear as if they\\n\");\n\t    fprintf(stderr,\"\\twere several eeproms with consecutive addresses on the bus\\n\");\n\t    fprintf(stderr,\"\\tso we might as well address several separate eeproms with\\n\");\n\t    fprintf(stderr,\"\\tincreasing addresses....\\n\\n\");\n\t    exit(1);\n\t    break;\n\tcase 'd':\n\t    dn=optarg;\n\t    break;\n\tcase 'a':\n\t    if(sscanf(optarg,\"0x%x\",&amp;addr)!=1){\n\t\tfprintf(stderr,\"Cannot parse '%s' as addrs., example: 0xa0\\n\",\n\t\t\toptarg);\n\t\texit(1);\n\t    }\n\t    break;\n\tcase 'p':\n\t    if(sscanf(optarg,\"%d\",&amp;pages)!=1){\n\t\tfprintf(stderr,\"Cannot parse '%s' as number of pages, example: 8\\n\",\n\t\t\toptarg);\n\t\texit(1);\n\t    }\n\t    break;\n\tcase 'w':\n\t    rwmode++;\n\t    break;\n\tcase 'f':\n\t    fn=optarg;\n\t    break;\n\tcase 'y':\n\t    force++;\n\t    break;\n\t}\n\n    }\n   \n    fprintf(stderr,\"base-address of eeproms       : 0x%02x\\n\",addr);\n    fprintf(stderr,\"number of pages to read       : %d (0x%02x .. 0x%02x)\\n\",\n\t\t    pages,addr,addr+pages-1);\n\n    if(fn){\n\tif(!rwmode) \/* if we are reading, *WRITE* to file *\/\n\t    f=open(fn,O_WRONLY|O_CREAT,0666);\n\telse \/* if we are writing to eeprom, *READ* from file *\/\n\t    f=open(fn,O_RDONLY);\n\tif(f&lt;0){\n\t    fprintf(stderr,\"Could not open data-file %s for reading or writing\\n\",fn);\n\t    perror(fn);\n\t    exit(1);\n\t}\n\tfprintf(stderr,\"file opened for %7s       : %s\\n\",rwmode?\"reading\":\"writing\",fn);\n\tfprintf(stderr,\"            on filedescriptor : %d\\n\",f);\n    }\n\n    if((d=open(dn,O_RDWR))&lt;0){\n\tfprintf(stderr,\"Could not open i2c at %s\\n\",dn);\n\tperror(dn);\n\texit(1);\n    }\n\n    fprintf(stderr,\"i2c-devicenode is             : %s\\n\",dn);\n    fprintf(stderr,\"            on filedescriptor : %d\\n\\n\",d);\n\n    \/***\n     *** I'm not the one to blame of you screw your computer!\n     ***\/\n    if(rwmode &amp;&amp; ! force){\n\tunsigned char warnbuf[4];\n\tfprintf(stderr,\"**WARNING**\\n\");\n\tfprintf(stderr,\" - \\tYou have chosen to WRITE to this eeprom.\\n\");\n\tfprintf(stderr,\"\\tMake sure that this tiny chip is *NOT* vital to the\\n\");\n\tfprintf(stderr,\"\\toperation of your computer as you can easily corrupt\\n\");\n\tfprintf(stderr,\"\\tthe configuration memory of your SDRAM-memory-module,\\n\");\n\tfprintf(stderr,\"\\tyour IBM ThinkPad or whatnot...! Fixing these errors can be\\n\");\n\tfprintf(stderr,\"\\ta time-consuming and very costly process!\\n\\n\");\n\tfprintf(stderr,\"Things to consider:\\n\");\n\tfprintf(stderr,\" - \\tYou can have more than one i2c-bus, check in \/proc\/bus\/i2c\\n\");\n\tfprintf(stderr,\"\\tand specify the correct one with -d\\n\");\n\tfprintf(stderr,\"\\tright now you have chosen to use '%s'\\n\",dn);\n\tfprintf(stderr,\" - \\tA eeprom can occupy several i2c-addresses (one per page)\\n\");\n\tfprintf(stderr,\"\\tso please make sure that there is no vital eeprom in your computer\\n\");\n\tfprintf(stderr,\"\\tsitting at addresses between 0x%02x and 0x%02x\\n\",addr,addr+pages-1);\n\n\tfprintf(stderr,\"Enter 'yes' to continue:\");\n\tfflush(stderr);\n\tif(!fgets(warnbuf,sizeof(warnbuf),stdin)){\n\t    fprintf(stderr,\"\\nCould not read confirmation from stdin!\\n\");\n\t    exit(1);\n\t}\n\tif(strncmp(warnbuf,\"yes\",3)){\n\t    fprintf(stderr,\"\\n** ABORTING WRITE! **, you did not answer 'yes'\\n\");\n\t    exit(1);\n\t}\n    }\n\n    for(i=0;i&lt;pages;i++){\n\tunsigned char buf[BYTES_PER_PAGE];\n\n\tif(rwmode){\n\n\t    if(f&gt;=0){\n\t\tj=read(f,buf,sizeof(buf));\n\t\tif(j&lt;0){\n\t\t    fprintf(stderr,\"Cannot read from file '%s'\\n\",fn);\n\t\t    perror(fn);\n\t\t    exit(1);\n\t\t}\n\t\tif(j!=sizeof(buf)){\n\t\t    fprintf(stderr,\"File '%s' is too small, padding eeprom with zeroes\\n\",fn);\n\t\t    while(j&lt;sizeof(buf))\n\t\t\tbuf[j++]=0;\n\t\t}\n\t    } else {\n\t\tfor(j=0;j&lt;sizeof(buf);j++)\n\t\t    buf[j]=0;\n\t    }\n            for(j=0;j&lt;(BYTES_PER_PAGE\/MAX_BYTES);j++) {\n\t\tif(eeprom_write(d,addr+i,j*MAX_BYTES,buf+(j*MAX_BYTES),MAX_BYTES)&lt;0)\n\t\t    exit(1);\n                fprintf(stderr,\".\");\n                for ( wait = 0; wait &lt; 10; wait ++ ) {\n                  acked = eeprom_write(d,addr+i,j*MAX_BYTES,NULL,0);\n                  if ( acked == 0 )\n                    break;\n                  fprintf(stderr,\".\");\n                  usleep( 100 );\n                }\n                if ( acked != 0 ) {\n                  fprintf(stderr,\"Ack of write operation timedout\");\n                  exit ( 1 );\n                }\n                fprintf(stderr,\" acked \\n\");\n            }\n\t} else {\n            for(j=0;j&lt;(BYTES_PER_PAGE\/MAX_BYTES);j++)\n\t\tif(eeprom_read(d,addr+i,j*MAX_BYTES,buf+(j*MAX_BYTES),MAX_BYTES)&lt;0)\n\t\t    exit(1);\n\t}\n\n\n\tif(!rwmode &amp;&amp; f&gt;=0){\n\t    j=write(f,buf,sizeof(buf));\n\t    if(j!=sizeof(buf)){\n\t\tfprintf(stderr,\"Cannot write to file '%s'\\n\",fn);\n\t\tperror(fn);\n\t\texit(1);\n\t    }\n\t}\n\n    }\n\n    if(f&gt;=0)\n\tclose(f);\n\n    close(d);\n\n    exit(0);\n\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>T221\u3084CDU2150A\u3092\u3088\u308a\u5feb\u9069\u306b\u4f7f\u3046\u306b\u3042\u305f\u308a\u306b\u554f\u984c\u3068\u306a\u308bEDID\u3002 \u67d0\u30aa\u30fc\u30af\u30b7\u30e7\u30f3\u306bEDID\u306eoverride\u3059\u308b\u5ef6\u9577\u30b1\u30fc\u30d6\u30eb\u3001ROM\u304c\u51fa\u54c1\u3055\u308c\u3066\u3044\u308b\u306e\u3060\u304c\u3044\u304b\u3093\u305b\u3093\u5b89\u304f\u306a\u3044\u3002 T221\u8cfc\u5165\u6642\u306boverride\u30b1\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,6],"tags":[],"class_list":["post-2469","post","type-post","status-publish","format-standard","hentry","category-2","category-6"],"views":5527,"_links":{"self":[{"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2469"}],"version-history":[{"count":0,"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2469\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pinewell.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}