This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # Simple Intel x520 EEPROM patcher | |
| # Modifies the EEPROM to unlock the card for non-intel branded SFP modules. | |
| # | |
| # Copyright 2020,2021,2022 Andreas Thienemann <andreas@bawue.net> | |
| # | |
| # Licensed under the GPLv3 | |
| # | |
| # Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chip "nct6793-isa-0290" | |
| label in0 "CPUVCORE" | |
| compute in0 @*2, @/2 | |
| label in1 "VIN0" | |
| label in2 "AVCC" | |
| label in3 "3VCC" | |
| label in4 "VIN1" | |
| label in5 "VIN2" | |
| label in6 "VIN3" | |
| label in7 "3VSB" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| urlencode() { | |
| # urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C | |
| local length="${#1}" | |
| for (( i = 0; i < length; i++ )); do | |
| local c="${1:$i:1}" | |
| case $c in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # vim: ft=sh:ts=4:sw=4:autoindent:expandtab: | |
| # Author: Avishai Ish-Shalom <avishai@fewbytes.com> | |
| # We need to specify GNU sed for OS X, BSDs, etc. | |
| if [[ "$(uname -s)" == "Darwin" ]]; then | |
| SED=gsed | |
| else | |
| SED=sed | |
| fi |