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

Side by Side Diff: src/scripts/build_image

Issue 1706014: Add more choices to grub2 menu. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to build a bootable keyfob-based chromeos system image from within 7 # Script to build a bootable keyfob-based chromeos system image from within
8 # a chromiumos setup. This assumes that all needed packages have been built into 8 # a chromiumos setup. This assumes that all needed packages have been built into
9 # the given target's root with binary packages turned on. This script will 9 # the given target's root with binary packages turned on. This script will
10 # build the Chrome OS image using only pre-built binary packages. 10 # build the Chrome OS image using only pre-built binary packages.
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 sudo losetup "${ESP_LOOP_DEV}" "${ESP_IMG}" 375 sudo losetup "${ESP_LOOP_DEV}" "${ESP_IMG}"
376 sudo mount "${ESP_LOOP_DEV}" "${ESP_DIR}" 376 sudo mount "${ESP_LOOP_DEV}" "${ESP_DIR}"
377 sudo mkdir -p "${ESP_DIR}/efi/boot" 377 sudo mkdir -p "${ESP_DIR}/efi/boot"
378 sudo grub-mkimage -p /efi/boot -o "${ESP_DIR}/efi/boot/bootx64.efi" \ 378 sudo grub-mkimage -p /efi/boot -o "${ESP_DIR}/efi/boot/bootx64.efi" \
379 part_gpt fat ext2 normal boot sh chain configfile linux 379 part_gpt fat ext2 normal boot sh chain configfile linux
380 sudo cp "${ROOT_FS_DIR}/boot/vmlinuz" "${ESP_DIR}/efi/boot/vmlinuz" 380 sudo cp "${ROOT_FS_DIR}/boot/vmlinuz" "${ESP_DIR}/efi/boot/vmlinuz"
381 cat <<EOF | sudo dd of="${ESP_DIR}/efi/boot/grub.cfg" 381 cat <<EOF | sudo dd of="${ESP_DIR}/efi/boot/grub.cfg"
382 set timeout=2 382 set timeout=2
383 set default=0 383 set default=0
384 384
385 menuentry "normal" { 385 menuentry "boot from disk" {
386 linux /efi/boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait root=/dev/sda3 ro noresume noswap i915.modeset=1 loglevel=1 386 linux /efi/boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait root=/dev/sda3 ro noresume noswap i915.modeset=1 loglevel=1
387 } 387 }
388 388
389 menuentry "serial debug" { 389 menuentry "boot from disk with serial debug" {
390 linux /efi/boot/vmlinuz earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 i nit=/sbin/init boot=local rootwait root=/dev/sda3 ro noresume noswap i915.modese t=1 loglevel=7 390 linux /efi/boot/vmlinuz earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 i nit=/sbin/init boot=local rootwait root=/dev/sda3 ro noresume noswap i915.modese t=1 loglevel=7
391 } 391 }
392 392
393 menuentry "boot from usb" {
394 linux /efi/boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait root=/dev/sdb3 ro noresume noswap i915.modeset=1 loglevel=1
395 }
396
397 menuentry "boot from usb with serial debug" {
398 linux /efi/boot/vmlinuz earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 i nit=/sbin/init boot=local rootwait root=/dev/sdb3 ro noresume noswap i915.modese t=1 loglevel=7
399 }
400
393 EOF 401 EOF
394 402
395 # Run ldconfig for rootfs's ld.so.cache 403 # Run ldconfig for rootfs's ld.so.cache
396 if [ $FLAGS_statefuldev -eq $FLAGS_TRUE ] ; then 404 if [ $FLAGS_statefuldev -eq $FLAGS_TRUE ] ; then
397 # Re-run ldconfig to fix /etc/ldconfig.so.cache 405 # Re-run ldconfig to fix /etc/ldconfig.so.cache
398 sudo /sbin/ldconfig -r "$ROOT_FS_DIR" 406 sudo /sbin/ldconfig -r "$ROOT_FS_DIR"
399 407
400 #TODO(sosa@chromium.org) - /usr/bin/xterm symlink not created in stateful. 408 #TODO(sosa@chromium.org) - /usr/bin/xterm symlink not created in stateful.
401 sudo ln -sf "/usr/local/bin/aterm" "/usr/bin/xterm" 409 sudo ln -sf "/usr/local/bin/aterm" "/usr/bin/xterm"
402 fi 410 fi
(...skipping 28 matching lines...) Expand all
431 439
432 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" 440 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}"
433 echo "Done. Image created in ${OUTPUT_DIR}" 441 echo "Done. Image created in ${OUTPUT_DIR}"
434 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" 442 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:"
435 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 443 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
436 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" 444 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:"
437 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" 445 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}"
438 echo "from the scripts directory where you entered the chroot." 446 echo "from the scripts directory where you entered the chroot."
439 447
440 trap - EXIT 448 trap - EXIT
OLDNEW
« 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