summaryrefslogtreecommitdiffstats
path: root/resources/utilities/ich9deblob/src/ich9gen.c
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-12-28 20:38:52 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-12-28 20:38:52 (EST)
commit4e68aa6b0b359d1ded3afed3e361b86fe2e6b67a (patch)
tree4cfa4d0497dfbd132fcf507d1a184da77320c1c2 /resources/utilities/ich9deblob/src/ich9gen.c
parentcfc094637130f9a05673f82f3a45dfbd917c6ed8 (diff)
downloadlibreboot-4e68aa6b0b359d1ded3afed3e361b86fe2e6b67a.zip
libreboot-4e68aa6b0b359d1ded3afed3e361b86fe2e6b67a.tar.gz
libreboot-4e68aa6b0b359d1ded3afed3e361b86fe2e6b67a.tar.bz2
ich9gen: when changing Gbe mac address, spit out new mkgbe.c
Diffstat (limited to 'resources/utilities/ich9deblob/src/ich9gen.c')
-rw-r--r--resources/utilities/ich9deblob/src/ich9gen.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/resources/utilities/ich9deblob/src/ich9gen.c b/resources/utilities/ich9deblob/src/ich9gen.c
index 81fd182..7ae4980 100644
--- a/resources/utilities/ich9deblob/src/ich9gen.c
+++ b/resources/utilities/ich9deblob/src/ich9gen.c
@@ -87,6 +87,19 @@ int main(int argc, char *argv[])
memcpy(&gbeStruct8k.main.macAddress, &customMacAddress, 6); /* Update MAC address in main Gbe */
gbeStruct8k.main.checkSum = gbeGetChecksumFrom4kStruct(gbeStruct8k.main, GBECHECKSUMTOTAL); /* Fix the checksum */
memcpy(&gbeStruct8k.backup, &gbeStruct8k.main, GBEREGIONSIZE_4K); /* Copy to the backup */
+
+ /* Generate ich9gen data (C code for Gbe region): */
+
+ /* mkgbe.h */
+ if (notCreatedHFileForGbeCFile("mkgbe.h", "mkgbe.c")) {
+ return 1;
+ } /* and now mkgbe.c */
+ if (notCreatedCFileFromGbeStruct4k(gbeStruct8k.backup, "mkgbe.c", "mkgbe.h")) {
+ return 1;
+ }
+
+ printf("The modified gbe regions has also been dumped as src files: mkgbe.c, mkgbe.h\n");
+ printf("To use these in ich9gen, place them in src/ich9gen/ and re-build ich9gen.\n\n");
}
}