| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 for path in bin include lib libexec sbin share; do | 301 for path in bin include lib libexec sbin share; do |
| 302 sudo unlink $DEV_IMAGE_ROOT/usr/$path | 302 sudo unlink $DEV_IMAGE_ROOT/usr/$path |
| 303 sudo ln -s /usr/local/$path $DEV_IMAGE_ROOT/usr/$path | 303 sudo ln -s /usr/local/$path $DEV_IMAGE_ROOT/usr/$path |
| 304 done | 304 done |
| 305 | 305 |
| 306 # Fix exceptions. | 306 # Fix exceptions. |
| 307 sudo unlink "$DEV_IMAGE_ROOT/usr/lib64" | 307 sudo unlink "$DEV_IMAGE_ROOT/usr/lib64" |
| 308 sudo unlink "$DEV_IMAGE_ROOT/usr/local" | 308 sudo unlink "$DEV_IMAGE_ROOT/usr/local" |
| 309 | 309 |
| 310 sudo ln -s "/usr/local/lib" "$DEV_IMAGE_ROOT/usr/lib64" | 310 sudo ln -s "/usr/local/lib" "$DEV_IMAGE_ROOT/usr/lib64" |
| 311 sudo ln -s "/usr/local" "$DEV_IMAGE_ROOT/usr/local" | 311 sudo ln -s "/usr/local" "$DEV_IMAGE_ROOT/usr/local" |
| 312 |
| 313 #TODO(sosa@chromium.org) - /usr/bin/xterm symlink not created in stateful. |
| 314 sudo ln -sf "/usr/local/bin/aterm" "/usr/bin/xterm" |
| 312 fi | 315 fi |
| 313 | 316 |
| 314 # Perform any customizations on the root file system that are needed. | 317 # Perform any customizations on the root file system that are needed. |
| 315 WITH_DEV="" | 318 WITH_DEV="" |
| 316 if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]]; then | 319 if [[ $FLAGS_withdev -eq $FLAGS_TRUE ]]; then |
| 317 WITH_DEV="--withdev" | 320 WITH_DEV="--withdev" |
| 318 fi | 321 fi |
| 319 | 322 |
| 320 #TODO(sosa@chromium.org) - Does it make sense to leave /usr/local bound here? | 323 #TODO(sosa@chromium.org) - Does it make sense to leave /usr/local bound here? |
| 321 "${SCRIPTS_DIR}/customize_rootfs" \ | 324 "${SCRIPTS_DIR}/customize_rootfs" \ |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 388 |
| 386 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" | 389 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" |
| 387 echo "Done. Image created in ${OUTPUT_DIR}" | 390 echo "Done. Image created in ${OUTPUT_DIR}" |
| 388 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 391 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
| 389 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" | 392 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" |
| 390 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 393 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
| 391 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 394 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
| 392 echo "from the scripts directory where you entered the chroot." | 395 echo "from the scripts directory where you entered the chroot." |
| 393 | 396 |
| 394 trap - EXIT | 397 trap - EXIT |
| OLD | NEW |