summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2010-06-16 12:51:26 -0700
committerRandall Spangler <rspangler@chromium.org>2010-06-16 12:51:26 -0700
commitbd529f05ddc29dd3e08258d0b1007518c2d1a6b2 (patch)
treee41bc2e47b104dc5604bb47deea4636f1d788fbc /utility
parent2a0155663e0213d5b7492c433f8a4edece4db838 (diff)
downloadvboot-bd529f05ddc29dd3e08258d0b1007518c2d1a6b2.tar.gz
Move old vkernel code out of vboot_firmware.
It will go away entirely once the build has moved to vboot_kernel. Review URL: http://codereview.chromium.org/2866006
Diffstat (limited to 'utility')
-rw-r--r--utility/Makefile6
-rw-r--r--utility/load_kernel_test.c7
-rw-r--r--utility/load_kernel_test_old.c (renamed from utility/load_kernel2_test.c)16
3 files changed, 18 insertions, 11 deletions
diff --git a/utility/Makefile b/utility/Makefile
index eca60560..9fa7aacc 100644
--- a/utility/Makefile
+++ b/utility/Makefile
@@ -15,6 +15,8 @@ CFLAGS += -MMD -MF $@.d
LIBS = $(BUILD)/misclibs/file_keys.o \
$(BUILD)/misclibs/signature_digest.o \
$(BUILD)/vkernel/kernel_image.o \
+ $(BUILD)/vkernel/kernel_image_fw.o \
+ $(BUILD)/vkernel/load_kernel_fw.o \
$(HOSTLIB) \
$(FWLIB)
@@ -26,7 +28,7 @@ TARGET_NAMES = dumpRSAPublicKey \
gbb_utility \
kernel_utility \
load_kernel_test \
- load_kernel2_test \
+ load_kernel_test_old \
sign_image \
signature_digest_utility \
vbutil_firmware \
@@ -49,7 +51,7 @@ ${BUILD_ROOT}/gbb_utility: gbb_utility.cc
${BUILD_ROOT}/load_kernel_test: load_kernel_test.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
-${BUILD_ROOT}/load_kernel2_test: load_kernel2_test.c $(LIBS)
+${BUILD_ROOT}/load_kernel_test_old: load_kernel_test_old.c $(LIBS)
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) -lcrypto
${BUILD_ROOT}/kernel_utility: kernel_utility.cc $(LIBS)
diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c
index 32c02c9a..ebeeb43a 100644
--- a/utility/load_kernel_test.c
+++ b/utility/load_kernel_test.c
@@ -18,6 +18,7 @@
#include "host_common.h"
#include "rollback_index.h"
#include "utility.h"
+#include "vboot_kernel.h"
/* ANSI Color coding sequences. */
#define COL_GREEN "\e[1;32m"
@@ -123,8 +124,10 @@ int main(int argc, char* argv[]) {
return 1;
}
- /* TODO: Option for boot mode */
- lkp.boot_flags = 0;
+ /* TODO: Option for boot mode - developer, recovery */
+ /* Need to skip the address check, since we're putting it somewhere on the
+ * heap instead of its actual target address in the firmware. */
+ lkp.boot_flags = BOOT_FLAG_SKIP_ADDR_CHECK;
/* Call LoadKernel() */
rv = LoadKernel(&lkp);
diff --git a/utility/load_kernel2_test.c b/utility/load_kernel_test_old.c
index 3d50211b..84ba4ca3 100644
--- a/utility/load_kernel2_test.c
+++ b/utility/load_kernel_test_old.c
@@ -18,7 +18,11 @@
#include "host_common.h"
#include "rollback_index.h"
#include "utility.h"
-#include "vboot_kernel.h"
+
+int LoadKernelOld(LoadKernelParams* params);
+/* Attempts to load the kernel from the current device.
+ *
+ * Returns LOAD_KERNEL_SUCCESS if successful, error code on failure. */
/* ANSI Color coding sequences. */
#define COL_GREEN "\e[1;32m"
@@ -124,14 +128,12 @@ int main(int argc, char* argv[]) {
return 1;
}
- /* TODO: Option for boot mode - developer, recovery */
- /* Need to skip the address check, since we're putting it somewhere on the
- * heap instead of its actual target address in the firmware. */
- lkp.boot_flags = BOOT_FLAG_SKIP_ADDR_CHECK;
+ /* TODO: Option for boot mode */
+ lkp.boot_flags = 0;
/* Call LoadKernel() */
- rv = LoadKernel2(&lkp);
- printf("LoadKernel() returned %d\n", rv);
+ rv = LoadKernelOld(&lkp);
+ printf("LoadKernelOld() returned %d\n", rv);
if (LOAD_KERNEL_SUCCESS == rv) {
printf("Partition number: %" PRIu64 "\n", lkp.partition_number);