Index: src/scripts/image_to_usb.sh |
diff --git a/src/scripts/image_to_usb.sh b/src/scripts/image_to_usb.sh |
index d0cc1ebfc8999fd47f84867b84a978544023e012..c674e2f8fdc777cfa5f3e7bb7d9a984c0a062fda 100755 |
--- a/src/scripts/image_to_usb.sh |
+++ b/src/scripts/image_to_usb.sh |
@@ -19,6 +19,8 @@ DEFINE_string to "" "$DEFAULT_TO_HELP" |
DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" "y" |
DEFINE_boolean install_autotest $FLAGS_FALSE \ |
"Whether to install autotest to the stateful partition." |
+DEFINE_boolean copy_kernel $FLAGS_FALSE \ |
+ "Copy the kernel to the fourth partition." |
# Parse command line |
FLAGS "$@" || exit 1 |
@@ -159,6 +161,15 @@ then |
trap - EXIT |
+ if [ $FLAGS_copy_kernel -eq $FLAGS_TRUE ] |
+ then |
+ echo "Copying Kernel..." |
+ "${SCRIPTS_DIR}"/kernel_fetcher.sh \ |
+ --from "${FLAGS_from}" \ |
+ --to "${FLAGS_to}" \ |
+ --offset "$(( ($PART_SIZE * 3) + 512 ))" |
+ fi |
+ |
echo "Copying MBR..." |
sudo "${SCRIPTS_DIR}"/file_copy.py \ |
if="${FLAGS_from}/mbr.image" of="$FLAGS_to" |