Difference between revisions of "User:GNUtoo"
From coreboot
(→getting rid of the vbios of the x60) |
(→Script2: compare the io access that were too fast) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
* I've an alix.1C | * I've an alix.1C | ||
− | == getting rid of the vbios of the x60 == | + | == scripts to help getting rid of the vbios of the x60 == |
+ | === Script 1: generate the io access for the coreboot driver === | ||
* follow "Case study: new laptop (not complete, sorry)" in https://docs.google.com/document/d/1g8FMob25VZYxbWri2iFB8YiSL8gwF9vKJH3HGxr0xQU/edit?pli=1 | * follow "Case study: new laptop (not complete, sorry)" in https://docs.google.com/document/d/1g8FMob25VZYxbWri2iFB8YiSL8gwF9vKJH3HGxr0xQU/edit?pli=1 | ||
+ | * pacman -S plan9port | ||
+ | * cp /opt/plan9/bin/ssam ./ | ||
+ | * replace the following line in ./ssam: | ||
+ | #!/usr/local/plan9/bin/rc | ||
+ | by the following line: | ||
+ | #!/opt/plan9/bin/rc | ||
+ | * create the ssamfix file with: | ||
,s/\[ *[0-9]+\..[0-9]+\]//g | ,s/\[ *[0-9]+\..[0-9]+\]//g | ||
,s/^ *//g | ,s/^ *//g | ||
Line 18: | Line 26: | ||
,s/...UDELAY *([0-9]+)/\1/g | ,s/...UDELAY *([0-9]+)/\1/g | ||
,s/^([RW]) ([0-9]+) (.*):0x([0-9a-f]+)(.*)/{\1, \2, "", \3, 0x\4, \5},/g | ,s/^([RW]) ([0-9]+) (.*):0x([0-9a-f]+)(.*)/{\1, \2, "", \3, 0x\4, \5},/g | ||
+ | * run the following commands: | ||
+ | . /etc/profile.d/plan9.sh | ||
+ | cat dmesg| ./ssam -f ssamfix > foo.c | ||
− | cat | + | === Script2: compare the io access that were too fast === |
+ | * Replace {V,0,}, with {V,7,}, in src/mainboard/vendor/device/i915io.c | ||
+ | * cat /dev/ttyUSB0 > accesses.txt | ||
+ | * Use that script against accesses.txt to find the guilty accesses: | ||
+ | #!/usr/bin/env python2 | ||
+ | import sys,re | ||
+ | |||
+ | def main(args): | ||
+ | try: | ||
+ | f = open(args[1],'ro') | ||
+ | except: | ||
+ | print args[0], " <file>" | ||
+ | |||
+ | for line in f: | ||
+ | if re.match("0x[0-9]*: Got .*, expect .*",line): | ||
+ | line = line.replace('\r\n','').replace(", expect ",':').replace(": Got ",':') | ||
+ | split = line.split(':') | ||
+ | #print split | ||
+ | if split[1] != split[2]: | ||
+ | print line | ||
+ | if __name__ == '__main__': | ||
+ | main(sys.argv) |
Revision as of 16:53, 28 February 2013
- I did the port to the M4A785T-M
- I've an x60
- I've an alix.1C
scripts to help getting rid of the vbios of the x60
Script 1: generate the io access for the coreboot driver
- follow "Case study: new laptop (not complete, sorry)" in https://docs.google.com/document/d/1g8FMob25VZYxbWri2iFB8YiSL8gwF9vKJH3HGxr0xQU/edit?pli=1
- pacman -S plan9port
- cp /opt/plan9/bin/ssam ./
- replace the following line in ./ssam:
#!/usr/local/plan9/bin/rc
by the following line:
#!/opt/plan9/bin/rc
- create the ssamfix file with:
,s/\[ *[0-9]+\..[0-9]+\]//g ,s/^ *//g y/^[RWU]/s/^/M /g ,s/\nU/ ;;;UDELAY/g ,|uniq -c ,s/^ *//g ,s/(^[0-9]+) ([MRW])/\2 \1/g ,s/"/\\"/g ,s/^M ([0-9]+) *(\[.*)/{M, \1, "\2"},/g ,s/^M ([0-9]+) *(.*)/{M, \1, "\2"},/g ,s/: */:/g ,s/...UDELAY *([0-9]+)/\1/g ,s/^([RW]) ([0-9]+) (.*):0x([0-9a-f]+)(.*)/{\1, \2, "", \3, 0x\4, \5},/g
- run the following commands:
. /etc/profile.d/plan9.sh cat dmesg| ./ssam -f ssamfix > foo.c
Script2: compare the io access that were too fast
- Replace {V,0,}, with {V,7,}, in src/mainboard/vendor/device/i915io.c
- cat /dev/ttyUSB0 > accesses.txt
- Use that script against accesses.txt to find the guilty accesses:
#!/usr/bin/env python2 import sys,re def main(args): try: f = open(args[1],'ro') except: print args[0], " <file>" for line in f: if re.match("0x[0-9]*: Got .*, expect .*",line): line = line.replace('\r\n',).replace(", expect ",':').replace(": Got ",':') split = line.split(':') #print split if split[1] != split[2]: print line if __name__ == '__main__': main(sys.argv)