summaryrefslogtreecommitdiff
path: root/host/linktest
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2010-06-10 09:59:04 -0700
committerRandall Spangler <rspangler@chromium.org>2010-06-10 09:59:04 -0700
commitd183644564ec27c106a3eb1931f565fae167a058 (patch)
tree195f2d44c8800b797189e6e0b9245541848f896b /host/linktest
parent59204c57d0a4889e3cace81b3361ea06f7b3fb45 (diff)
downloadvboot-d183644564ec27c106a3eb1931f565fae167a058.tar.gz
Major refactoring of structures, with unit tests. This matches the doc I sent out earlier.
Firmware-side code for LoadKernel() is in place now. LoadFirmware() replacement coming soon. The new functions are implemented in parallel to the existing ones (i.e., everything that used to work still does). Review URL: http://codereview.chromium.org/2745007
Diffstat (limited to 'host/linktest')
-rw-r--r--host/linktest/main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/host/linktest/main.c b/host/linktest/main.c
new file mode 100644
index 00000000..91fc5aff
--- /dev/null
+++ b/host/linktest/main.c
@@ -0,0 +1,28 @@
+#include <stdio.h>
+
+#include "host_common.h"
+
+int main(void)
+{
+ /* host_key.h */
+ PrivateKeyRead(0, 0);
+ PrivateKeyFree(0);
+ PublicKeyInit(0, 0, 0);
+ PublicKeyAlloc(0, 0, 0);
+ PublicKeyCopy(0, 0);
+ PublicKeyRead(0, 0, 0);
+
+ /* host_signature.h */
+ SignatureInit(0, 0, 0, 0);
+ SignatureAlloc(0, 0);
+ SignatureCopy(0, 0);
+ CalculateChecksum(0, 0);
+ CalculateSignature(0, 0, 0);
+
+ /* host_common.h */
+ CreateKeyBlock(0, 0, 0);
+ CreateFirmwarePreamble(0, 0, 0, 0);
+ CreateKernelPreamble(0, 0, 0, 0, 0, 0);
+
+ return 0;
+}