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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 # Mark the image as a developer image (input to chromeos_startup). | 248 # Mark the image as a developer image (input to chromeos_startup). |
249 sudo mkdir -p "$root_fs_dir/root" | 249 sudo mkdir -p "$root_fs_dir/root" |
250 sudo touch "$root_fs_dir/root/$file_to_touch" | 250 sudo touch "$root_fs_dir/root/$file_to_touch" |
251 | 251 |
252 if [ "$image_type" == "dev" ]; then | 252 if [ "$image_type" == "dev" ]; then |
253 # Additional changes to developer image. | 253 # Additional changes to developer image. |
254 | 254 |
255 # The ldd tool is a useful shell script but lives in glibc; just copy it. | 255 # The ldd tool is a useful shell script but lives in glibc; just copy it. |
256 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" | 256 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" |
257 | 257 |
258 # TODO: Temporarily create fake xterm symlink until we do proper xinitrc | |
259 local aterm="$root_fs_dir/usr/local/bin/aterm" | |
260 if [[ -f "${aterm}" ]]; then | |
261 sudo chmod 0755 "$aterm" | |
262 sudo ln -s aterm "${root_fs_dir}/usr/local/bin/xterm" | |
263 fi | |
264 | |
265 # If vim is installed, then a vi symlink would probably help. | 258 # If vim is installed, then a vi symlink would probably help. |
266 if [[ -x "${root_fs_dir}/usr/local/bin/vim" ]]; then | 259 if [[ -x "${root_fs_dir}/usr/local/bin/vim" ]]; then |
267 sudo ln -sf vim "${root_fs_dir}/usr/local/bin/vi" | 260 sudo ln -sf vim "${root_fs_dir}/usr/local/bin/vi" |
268 fi | 261 fi |
269 | 262 |
270 # Check that the image has been correctly created. Only do it if not | 263 # Check that the image has been correctly created. Only do it if not |
271 # building a factory install image, as the INSTALL_MASK for it will | 264 # building a factory install image, as the INSTALL_MASK for it will |
272 # make test_image fail. | 265 # make test_image fail. |
273 if [[ $FLAGS_factory_install -eq ${FLAGS_FALSE} ]] ; then | 266 if [[ $FLAGS_factory_install -eq ${FLAGS_FALSE} ]] ; then |
274 "${SCRIPTS_DIR}/test_image" \ | 267 "${SCRIPTS_DIR}/test_image" \ |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 echo "Recovery image created as $PRISTINE_IMAGE_NAME" | 561 echo "Recovery image created as $PRISTINE_IMAGE_NAME" |
569 fi | 562 fi |
570 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then | 563 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then |
571 echo "Developer image created as $DEVELOPER_IMAGE_NAME" | 564 echo "Developer image created as $DEVELOPER_IMAGE_NAME" |
572 fi | 565 fi |
573 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 566 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
574 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 567 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
575 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 568 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
576 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 569 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
577 echo "from the scripts directory where you entered the chroot." | 570 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |