Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: src/scripts/build_image

Issue 2112013: Start generating a bootable kernel partition as part of build_image (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: respond to feedback Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_image
diff --git a/src/scripts/build_image b/src/scripts/build_image
index fbad19a4d39cfc1455b83fc10cd97d1c84b8f9d2..7ed1137ade9d18ba215a77d37e870017903588a3 100755
--- a/src/scripts/build_image
+++ b/src/scripts/build_image
@@ -380,11 +380,6 @@ sudo INSTALL_MASK="$INSTALL_MASK" emerge-${BOARD} \
--root="$ROOT_FS_DIR" --root-deps=rdeps \
--getbinpkg --usepkg chromeos $EMERGE_JOBS
-# Extract the kernel from the root filesystem for use by the GPT image. Legacy
-# BIOS will use the kernel in the rootfs (via syslinux), Chrome OS BIOS will
-# use the kernel partition.
-sudo cp -f "${ROOT_FS_DIR}/boot/vmlinuz" "${OUTPUT_DIR}/vmlinuz.image"
-
# Create EFI System Partition to boot stock EFI BIOS (but not ChromeOS EFI
# BIOS). We only need this for x86, but it's simpler and safer to keep the disk
# images the same for both x86 and ARM.
@@ -421,6 +416,32 @@ menuentry "local image B" {
EOF
+# Legacy BIOS will use the kernel in the rootfs (via syslinux), as will
+# standard EFI BIOS (via grub, from the EFI System Partition). Chrome OS BIOS
+# will use a separate signed kernel partition, which we'll create now.
+# FIXME: remove serial output, debugging messages
+cat <<'EOF' > "${OUTPUT_DIR}/config.txt"
+earlyprintk=serial,ttyS0,115200
+console=ttyS0,115200
+init=/sbin/init
+add_efi_memmap
+boot=local
+rootwait
+root=/dev/sd%D%P
+ro
+noresume
+noswap
+i915.modeset=1
+loglevel=7
+Hi_Mom
+EOF
+
+# FIXME: This just creates the image. It doesn't sign it.
+sudo create_blob -o "${OUTPUT_DIR}/vmlinuz.image" \
+ "${ROOT_FS_DIR}/boot/vmlinuz" \
+ "${OUTPUT_DIR}/config.txt" \
+ /lib64/bootstub/bootstub.efi
+
# Perform any customizations on the root file system that are needed.
"${SCRIPTS_DIR}/customize_rootfs" \
--root="$ROOT_FS_DIR" \
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698