tuxsavvy / agere_fw_utils (public) (License: Dual BSD 3-clause and GPLv2) (since 2021-02-07) (hash sha1)
Personal fork of https://repo.or.cz/agere_fw_utils.git
List of commits:
Subject Hash Author Date (UTC)
Read AP fw ident better from hfwget d64e1b5b51dc1210ed25530ae2f85eadd3f18f95 David Kilroy 2008-10-27 20:55:03
Allow dump_fw to build against wl_lkm_722 for h2 and h25 fw. bc458b38b8a200f47f3119e406920334334512a8 David Kilroy 2008-10-26 21:35:13
Write compatibility info from dump_fw. Update README 8295b468312cd3475c06645e92ef4884c2a3dbcc David Kilroy 2008-10-26 14:46:55
Further refactorring. Also pass through splint and indent. 29e550703e7ef9b083b22d11c3bb470ff54b6ab0 David Kilroy 2008-10-26 14:44:25
Convert primary plugdata properly 933f77d11ca6645df705c4b71c471aa670fccaf3 David Kilroy 2008-10-26 14:39:28
Convert AirPort firmware version 1f31f74c58179b099005ae939eff9bb467317b5b David Kilroy 2008-10-26 14:37:57
Mach-O parsing from Dan Williams 525f9168679392920da51d2487cc5fdba3c68e2c David Kilroy 2008-10-26 14:34:59
Check if we are in wl_lkm tree and build appropriately 4af298b374a1dea172b57acbd080773912d22087 David Kilroy 2008-10-26 14:30:33
Use C99 types 11362c209f9ec7369931b9a25a407c21476c48e4 David Kilroy 2008-10-26 14:30:03
hfwget refactorring posted as hfwget2 April 2008 9b77acdf3330592acda5261d282c579cc1497637 David Kilroy 2008-10-26 14:27:32
dump_fw and hfwget posted Sep 2007 77d205076542510222c6e8359bb2647b0d4e0873 David Kilroy 2008-10-26 14:22:02
Add hfwget.c from hermesap-0.2 9239c21487b524cf0f87b4ffa4828793713fbecd David Kilroy 2008-10-26 14:20:38
dump_fw posted June 2007 617a0ae960430d0d93a533ac5dffc7b9c07a777a David Kilroy 2008-10-26 14:19:45
Commit d64e1b5b51dc1210ed25530ae2f85eadd3f18f95 - Read AP fw ident better from hfwget
Author: David Kilroy
Author date (UTC): 2008-10-27 20:55
Committer name: David Kilroy
Committer date (UTC): 2008-10-27 20:55
Parent(s): bc458b38b8a200f47f3119e406920334334512a8
Signing key:
Tree: 23ad613cd1d8a476d10f0acc3e1b7ba7140da247
File Lines added Lines deleted
hfwget.c 10 5
File hfwget.c changed (mode: 100644) (index 9b9f2fc..b00e747)
... ... static const struct {
265 265 { 22, "Intermediate firmware" }, { 22, "Intermediate firmware" },
266 266 { 31, "Station firmware" }, { 31, "Station firmware" },
267 267 { 32, "AP firmware" }, { 32, "AP firmware" },
268 { 0x14B, "AP firmware" },
268 269
269 270 /* Driver type */ /* Driver type */
270 271 { 41, "Windows 9x/NT Miniport NDIS 3.1" }, { 41, "Windows 9x/NT Miniport NDIS 3.1" },
 
... ... static const struct {
289 290 { 81, "WaveLAN/IEEE AP" }, { 81, "WaveLAN/IEEE AP" },
290 291 { 83, "WaveLAN/IEEE Ethernet Converter" }, { 83, "WaveLAN/IEEE Ethernet Converter" },
291 292 { 87, "USB Boot Loader" }, { 87, "USB Boot Loader" },
293 { 0xFF, "Unknown" }
292 294 }; };
293 295
294 296 /* Checking endianess at runtime because performance isn't an issue, /* Checking endianess at runtime because performance isn't an issue,
 
... ... static void copy_fw_data(struct fwtable *firmware,
710 712 printf("Segment: %d File offs: 0x%08x Target mem: 0x%08x " printf("Segment: %d File offs: 0x%08x Target mem: 0x%08x "
711 713 "Length 0x%04x%s\n", "Length 0x%04x%s\n",
712 714 i, i,
713 (void *)block.w - data,
715 (void *)(&block.w[i]) - data,
714 716 firmware->segarray[i].offset, firmware->segarray[i].offset,
715 717 firmware->segarray[i].size, firmware->segarray[i].size,
716 718 (firmware->segarray[i].size == 0) ? " (ignored)" : ""); (firmware->segarray[i].size == 0) ? " (ignored)" : "");
 
... ... static void print_fw_ident(const struct fwtable *firmware)
784 786 { {
785 787 size_t i; size_t i;
786 788
787 if (firmware->ident->code == 0xFD20u)
789 if ((firmware->ident->code == 0xFD20u) || /* FW_IDENTITY */
790 (firmware->ident->code == 0x014Bu)) /* AP_IDENTITY */
788 791 { {
789 792 for (i = 0; i < ARRAY_SIZE(compat_table); i++) for (i = 0; i < ARRAY_SIZE(compat_table); i++)
790 793 { {
791 794 if (compat_table[i].id == firmware->ident->comp_id) if (compat_table[i].id == firmware->ident->comp_id)
792 795 break; break;
793 796 } }
797 if (i == ARRAY_SIZE(compat_table))
798 i--;
794 799
795 800 printf("Firmware identity: %s, Variant %d Version %d.%2d\n", printf("Firmware identity: %s, Variant %d Version %d.%2d\n",
796 801 compat_table[i].comp_string, compat_table[i].comp_string,
 
... ... static int dump_fw(const char *basename, char hexchar,
1068 1073 filename = malloc(strlen(basename) + 12); filename = malloc(strlen(basename) + 12);
1069 1074 strcpy(filename, basename); strcpy(filename, basename);
1070 1075 strcat(filename, strcat(filename,
1071 (firmware.ident->comp_id == 32) ? "_ap_fw.bin" : "_sta_fw.bin");
1076 (firmware.ident->comp_id == 31) ? "_sta_fw.bin" : "_ap_fw.bin");
1072 1077
1073 1078 printf("Dumping to %s...\n", filename); printf("Dumping to %s...\n", filename);
1074 1079 if ((output = fopen(filename, "wb")) == NULL) if ((output = fopen(filename, "wb")) == NULL)
 
... ... struct fw_layout* detect_fw_layout(const void *data, size_t flen)
1115 1120 /* restrict search area */ /* restrict search area */
1116 1121 layout->max_offset = (size_t) (be32_to_host(fw_section->offset) + layout->max_offset = (size_t) (be32_to_host(fw_section->offset) +
1117 1122 be32_to_host(fw_section->size)); be32_to_host(fw_section->size));
1118 layout->mac = mac;
1123 layout->mac = mac;
1119 1124 } }
1120 1125 else if (macho == -1) else if (macho == -1)
1121 1126 { {
 
... ... struct fw_layout* detect_fw_layout(const void *data, size_t flen)
1133 1138
1134 1139 layout->addr_delta = (ptrdiff_t) pe_imagebase(data); layout->addr_delta = (ptrdiff_t) pe_imagebase(data);
1135 1140 layout->max_offset = flen; layout->max_offset = flen;
1136 layout->mac = mac;
1141 layout->mac = mac;
1137 1142 } }
1138 1143 else if (memcmp(data, "Joy!", 4) == 0) else if (memcmp(data, "Joy!", 4) == 0)
1139 1144 { {
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/tuxsavvy/agere_fw_utils

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/tuxsavvy/agere_fw_utils

Clone this repository using git:
git clone git://git.rocketgit.com/user/tuxsavvy/agere_fw_utils

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main