OLD | NEW |
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 # Clean up symlinks so they work on a running target rooted at "/". | 415 # Clean up symlinks so they work on a running target rooted at "/". |
416 # Here development packages are rooted at /usr/local. However, do not | 416 # Here development packages are rooted at /usr/local. However, do not |
417 # create /usr/local or /var on host (already exist on target). | 417 # create /usr/local or /var on host (already exist on target). |
418 setup_symlinks_on_root "/usr/local" "/var" | 418 setup_symlinks_on_root "/usr/local" "/var" |
419 | 419 |
420 # Cleanup loop devices. | 420 # Cleanup loop devices. |
421 cleanup | 421 cleanup |
422 | 422 |
423 # Create the GPT-formatted image | 423 # Create the GPT-formatted image |
424 ${SCRIPTS_DIR}/build_gpt.sh \ | 424 ${SCRIPTS_DIR}/build_gpt.sh \ |
425 --arch=${ARCH} --board=${FLAGS_board} --board_root=${BOARD_ROOT} \ | 425 --arch=${ARCH} --board=${FLAGS_board} "${OUTPUT_DIR}" "${OUTPUT_IMG}" |
426 "${OUTPUT_DIR}" "${OUTPUT_IMG}" | |
427 | 426 |
428 # Clean up temporary files. | 427 # Clean up temporary files. |
429 rm -f "${ROOT_FS_IMG}" "${STATEFUL_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \ | 428 rm -f "${ROOT_FS_IMG}" "${STATEFUL_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \ |
430 "${ESP_IMG}" | 429 "${ESP_IMG}" |
431 rmdir "${ROOT_FS_DIR}" "${STATEFUL_DIR}" "${ESP_DIR}" | 430 rmdir "${ROOT_FS_DIR}" "${STATEFUL_DIR}" "${ESP_DIR}" |
432 | 431 |
433 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" | 432 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" |
434 echo "Done. Image created in ${OUTPUT_DIR}" | 433 echo "Done. Image created in ${OUTPUT_DIR}" |
435 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 434 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
436 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" | 435 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" |
437 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 436 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
438 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 437 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
439 echo "from the scripts directory where you entered the chroot." | 438 echo "from the scripts directory where you entered the chroot." |
440 | 439 |
441 trap - EXIT | 440 trap - EXIT |
OLD | NEW |