Commit 9f4cd0e5 authored by's avatar

No commit message

No commit message
parent 2fe6eea2
......@@ -41,16 +41,31 @@ and put them in binary files in /lib/firmware/nouveau/
For Kepler, prefix the file names with "nvXX_", XX being the chipset id (so, nve4_fuc409c, for example).
#! /bin/sh
# insert correct register in next line
grep XX41a1c4 mydump.txt \
| awk '{print $6}' | grep -oP '(?<=0x).*' | \
python -c \
import struct; import sys; fd = open(\"fucXXXX\", \"wb\");
for line in sys.stdin:
fd.write(struct.pack(\"@I\", int(line.rstrip(), 16)))
import struct, sys, re
# substitute the correct value for XX
registers = {
'XX41a1c4': 'fuc41ad',
'XX4091c4': 'fuc409d',
'XX41a184': 'fuc41ac',
'XX409184': 'fuc409c',
firmwares = dict((register, open(registers[register], 'wb')) for register in registers)
for line in open(sys.argv[1]):
line = line.split()
if len(line) < 5:
for register in registers:
if not re.match(r'0x%s' % register, line[4]):
if not line[5].startswith('0x'):
firmwares[register].write(struct.pack('@I', int(line[5][2:], 16)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment