aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-12-29 01:38:52 +0000
committerFrancis Rowe <info@gluglug.org.uk>2014-12-29 01:38:52 +0000
commit4e68aa6b0b359d1ded3afed3e361b86fe2e6b67a (patch)
tree4cfa4d0497dfbd132fcf507d1a184da77320c1c2
parentcfc094637130f9a05673f82f3a45dfbd917c6ed8 (diff)
downloadlibrebootfr-4e68aa6b0b359d1ded3afed3e361b86fe2e6b67a.tar.gz
librebootfr-4e68aa6b0b359d1ded3afed3e361b86fe2e6b67a.zip
ich9gen: when changing Gbe mac address, spit out new mkgbe.c
-rw-r--r--resources/utilities/ich9deblob/src/ich9deblob.c3
-rw-r--r--resources/utilities/ich9deblob/src/ich9gen.c13
2 files changed, 13 insertions, 3 deletions
diff --git a/resources/utilities/ich9deblob/src/ich9deblob.c b/resources/utilities/ich9deblob/src/ich9deblob.c
index b7bbf886..1c9ea1e8 100644
--- a/resources/utilities/ich9deblob/src/ich9deblob.c
+++ b/resources/utilities/ich9deblob/src/ich9deblob.c
@@ -227,7 +227,6 @@ int main(int argc, char *argv[])
* Generate ich9gen data (C code that will recreate the deblobbed descriptor+gbe from scratch)
* ------------------------------------------------------------------
*/
-
/* Code for generating the Gbe struct */
/* mkgbe.h */
if (notCreatedHFileForGbeCFile("mkgbe.h", "mkgbe.c")) {
@@ -236,7 +235,6 @@ int main(int argc, char *argv[])
if (notCreatedCFileFromGbeStruct4k(deblobbedGbeStruct8k.backup, "mkgbe.c", "mkgbe.h")) {
return 1;
}
-
/* Code for generating the Descriptor struct */
/* mkdescriptor.h */
if (notCreatedHFileForDescriptorCFile("mkdescriptor.h", "mkdescriptor.c")) {
@@ -245,7 +243,6 @@ int main(int argc, char *argv[])
if (notCreatedCFileFromDescriptorStruct(deblobbedDescriptorStruct, "mkdescriptor.c", "mkdescriptor.h")) {
return 1;
}
-
printf("The modified descriptor and gbe regions have also been dumped as src files: mkgbe.c, mkgbe.h, mkdescriptor.c, mkdescriptor.h\n");
printf("To use these in ich9gen, place them in src/ich9gen/ and re-build ich9gen.\n\n");
diff --git a/resources/utilities/ich9deblob/src/ich9gen.c b/resources/utilities/ich9deblob/src/ich9gen.c
index 81fd1821..7ae4980a 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");
}
}