summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2015-10-27 11:53:58 -0500
committerBobby Bingham <koorogi@koorogi.info>2015-10-27 11:53:58 -0500
commit3edcbc98652d7f5363ea4f7a0495f1ea3ce24b47 (patch)
tree65a2b88059f04cf45155309988820ef028bf8d98
parent21eadc3608b672d62d19224832c64da3ef943b5a (diff)
move securty code to correct position in outputHEADmaster
-rw-r--r--src/saturn-mkboot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/saturn-mkboot.c b/src/saturn-mkboot.c
index 7551059..2ddd0ed 100644
--- a/src/saturn-mkboot.c
+++ b/src/saturn-mkboot.c
@@ -245,15 +245,16 @@ int main(int argc, char **argv)
if (process_args(argc, argv)) return 1;
+ ipsize = load_security_code(ipout);
+ if (ipsize == -1) goto fail;
+ ipout += ipsize;
+
for (int i = 0; i < 8; i++) {
serialize_region_code(ipout, find_symbol(regiondefs, sysid.regions[i]));
ipout += 32;
sysid.bootsize += 32;
}
- ipsize = load_security_code(ipout);
- if (ipsize == -1) goto fail;
- ipout += ipsize;
ipsize = load_ip(ipout, sizeof ipbuf - (ipout - ipbuf));
if (ipsize == -1) goto fail;
sysid.bootsize += ipsize;