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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 # Re-run ldconfig to fix /etc/ldconfig.so.cache. | 342 # Re-run ldconfig to fix /etc/ldconfig.so.cache. |
343 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" | 343 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" |
344 | 344 |
345 # Mark the image as a developer image (input to chromeos_startup). | 345 # Mark the image as a developer image (input to chromeos_startup). |
346 sudo mkdir -p "${ROOT_FS_DIR}/root" | 346 sudo mkdir -p "${ROOT_FS_DIR}/root" |
347 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" | 347 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" |
348 | 348 |
349 # Additional changes to developer image. | 349 # Additional changes to developer image. |
350 | 350 |
351 # Leave core files for developers to inspect. | 351 # Leave core files for developers to inspect. |
352 sudo touch "${ROOT_FS_DIR}/etc/leave_core" | 352 sudo touch "${ROOT_FS_DIR}/root/.leave_core" |
353 | 353 |
354 # The ldd tool is a useful shell script but lives in glibc; just copy it. | 354 # The ldd tool is a useful shell script but lives in glibc; just copy it. |
355 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" | 355 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" |
356 | 356 |
357 # If vim is installed, then a vi symlink would probably help. | 357 # If vim is installed, then a vi symlink would probably help. |
358 if [[ -x "${ROOT_FS_DIR}/usr/local/bin/vim" ]]; then | 358 if [[ -x "${ROOT_FS_DIR}/usr/local/bin/vim" ]]; then |
359 sudo ln -sf vim "${ROOT_FS_DIR}/usr/local/bin/vi" | 359 sudo ln -sf vim "${ROOT_FS_DIR}/usr/local/bin/vi" |
360 fi | 360 fi |
361 | 361 |
362 # If pygtk is installed in stateful-dev, then install a path. | 362 # If pygtk is installed in stateful-dev, then install a path. |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 672 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
673 fi | 673 fi |
674 | 674 |
675 print_time_elapsed | 675 print_time_elapsed |
676 | 676 |
677 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 677 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
678 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 678 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
679 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 679 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
680 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR}" | 680 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR}" |
681 echo "from the scripts directory where you entered the chroot." | 681 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |