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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 # Mark the image as a developer image (input to chromeos_startup). | 215 # Mark the image as a developer image (input to chromeos_startup). |
216 sudo mkdir -p "$root_fs_dir/root" | 216 sudo mkdir -p "$root_fs_dir/root" |
217 sudo touch "$root_fs_dir/root/.dev_mode" | 217 sudo touch "$root_fs_dir/root/.dev_mode" |
218 | 218 |
219 # Additional changes to developer image. | 219 # Additional changes to developer image. |
220 | 220 |
221 # The ldd tool is a useful shell script but lives in glibc; just copy it. | 221 # The ldd tool is a useful shell script but lives in glibc; just copy it. |
222 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" | 222 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" |
223 | 223 |
| 224 # TODO: Temporarily create fake xterm symlink until we do proper xinitrc |
| 225 local aterm="$root_fs_dir/usr/local/bin/aterm" |
| 226 if [[ -f "${aterm}" ]]; then |
| 227 sudo chmod 0755 "$aterm" |
| 228 sudo ln -s aterm "${root_fs_dir}/usr/local/bin/xterm" |
| 229 fi |
| 230 |
224 # If vim is installed, then a vi symlink would probably help. | 231 # If vim is installed, then a vi symlink would probably help. |
225 if [[ -x "${ROOT_FS_DIR}/usr/local/bin/vim" ]]; then | 232 if [[ -x "${root_fs_dir}/usr/local/bin/vim" ]]; then |
226 sudo ln -sf vim "${ROOT_FS_DIR}/usr/local/bin/vi" | 233 sudo ln -sf vim "${root_fs_dir}/usr/local/bin/vi" |
227 fi | 234 fi |
228 | 235 |
229 # Check that the image has been correctly created. Only do it if not | 236 # Check that the image has been correctly created. Only do it if not |
230 # building a factory install image, as the INSTALL_MASK for it will | 237 # building a factory install image, as the INSTALL_MASK for it will |
231 # make test_image fail. | 238 # make test_image fail. |
232 if [[ $FLAGS_factory_install -eq ${FLAGS_FALSE} ]] ; then | 239 if [[ $FLAGS_factory_install -eq ${FLAGS_FALSE} ]] ; then |
233 "${SCRIPTS_DIR}/test_image" \ | 240 "${SCRIPTS_DIR}/test_image" \ |
234 --root="$root_fs_dir" \ | 241 --root="$root_fs_dir" \ |
235 --target="$ARCH" | 242 --target="$ARCH" |
236 fi | 243 fi |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 echo "Done. Image created in ${OUTPUT_DIR}" | 480 echo "Done. Image created in ${OUTPUT_DIR}" |
474 echo "Chromium OS image created as $PRISTINE_IMAGE_NAME" | 481 echo "Chromium OS image created as $PRISTINE_IMAGE_NAME" |
475 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then | 482 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then |
476 echo "Developer image created as $DEVELOPER_IMAGE_NAME" | 483 echo "Developer image created as $DEVELOPER_IMAGE_NAME" |
477 fi | 484 fi |
478 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 485 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
479 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 486 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
480 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 487 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
481 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 488 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
482 echo "from the scripts directory where you entered the chroot." | 489 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |