Auto-flash AMD/ATI video card firmware: Difference between revisions
From lurkmore wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This page contains a PHP script for auto-flashing an AMD | This page contains a PHP script for auto-flashing an [[AMD]] (ATI) video card's (GPU) firmware using a simple command line through Linux: | ||
< | <pre> | ||
<?php | |||
//created by ugtarmas | |||
//'''if this is useful, donate to LRv8b23mQSZah7bg16n7tjT5RVDnZtMi4Z''' | |||
//you must download atiflash from http://liteshack.com/files/atiflash and put into /usr/local/bin/ dir | |||
//or try your luck here: https://www.google.com/search?q=atiflash+for+linux | |||
//usage: | |||
//php flash.php 035 | |||
//this will flash gpu 0, 3 and 5. | |||
//edit this | |||
$path_to_rom = "/home/user/msi.radeon.7950.TF.3GD5.BE.SILVER.V276-18S.voltage.1050.rom"; | |||
//edit below at your own risk | |||
$gpu_count = $argv[1]; | |||
$gpu_array = str_split($gpu_count); | |||
foreach($gpu_array as $gpu){ | |||
if(is_numeric($gpu)){ | |||
$gpus[] = $gpu; | |||
} | |||
} | |||
$gpu_string = implode(",",$gpus); | |||
$count = count($gpus); | |||
if($count < 1){ exit ("\nyou need to specify the gpus that you want to flash\n\n"); } | |||
if(!file_exists($path_to_rom)){ exit("\nthe file $path_to_rom does not exist\n\n"); } | |||
echo "\nattempting to flash $path_to_rom to gpus $gpu_string:\n\n"; | |||
foreach($gpus as $gpu){ | |||
`atiflash -unlockrom $gpu`; | |||
echo "unlocked rom on gpu $gpu, attempting to flash bios...\n"; | |||
while(true){ | |||
`atiflash -f -p $gpu $path_to_rom > /tmp/flash_$gpu`; | |||
</ | |||
$result = file_get_contents("/tmp/flash_$gpu"); | |||
if(eregi("20000/20000h",$result)) { echo " done flashing gpu $gpu\n"; break;} | |||
echo "|"; | |||
} | |||
} | |||
?></pre> | |||
[[Category:Hardware]][[Category:Software]] | [[Category:Hardware]][[Category:Software]] |
Revision as of 14:31, 2 October 2013
This page contains a PHP script for auto-flashing an AMD (ATI) video card's (GPU) firmware using a simple command line through Linux:
<?php //created by ugtarmas //'''if this is useful, donate to LRv8b23mQSZah7bg16n7tjT5RVDnZtMi4Z''' //you must download atiflash from http://liteshack.com/files/atiflash and put into /usr/local/bin/ dir //or try your luck here: https://www.google.com/search?q=atiflash+for+linux //usage: //php flash.php 035 //this will flash gpu 0, 3 and 5. //edit this $path_to_rom = "/home/user/msi.radeon.7950.TF.3GD5.BE.SILVER.V276-18S.voltage.1050.rom"; //edit below at your own risk $gpu_count = $argv[1]; $gpu_array = str_split($gpu_count); foreach($gpu_array as $gpu){ if(is_numeric($gpu)){ $gpus[] = $gpu; } } $gpu_string = implode(",",$gpus); $count = count($gpus); if($count < 1){ exit ("\nyou need to specify the gpus that you want to flash\n\n"); } if(!file_exists($path_to_rom)){ exit("\nthe file $path_to_rom does not exist\n\n"); } echo "\nattempting to flash $path_to_rom to gpus $gpu_string:\n\n"; foreach($gpus as $gpu){ `atiflash -unlockrom $gpu`; echo "unlocked rom on gpu $gpu, attempting to flash bios...\n"; while(true){ `atiflash -f -p $gpu $path_to_rom > /tmp/flash_$gpu`; $result = file_get_contents("/tmp/flash_$gpu"); if(eregi("20000/20000h",$result)) { echo " done flashing gpu $gpu\n"; break;} echo "|"; } } ?>