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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 local usb_disk="${FLAGS_usb_disk}" | 320 local usb_disk="${FLAGS_usb_disk}" |
321 local bootloader_to="$(mount | grep ${ESP_FS_DIR} | cut -f1 -d' ')" | 321 local bootloader_to="$(mount | grep ${ESP_FS_DIR} | cut -f1 -d' ')" |
322 if [[ "${ARCH}" == "arm" ]]; then | 322 if [[ "${ARCH}" == "arm" ]]; then |
323 # TODO(wad) mmcblk1p3 is hardcoded for arm for now! | 323 # TODO(wad) mmcblk1p3 is hardcoded for arm for now! |
324 usb_disk="/dev/mmcblk1p3" | 324 usb_disk="/dev/mmcblk1p3" |
325 kernel_part="--kernel_cmdline='" | 325 kernel_part="--kernel_cmdline='" |
326 kernel_part="${kernel_part}\ | 326 kernel_part="${kernel_part}\ |
327 $(cat ${OUTPUT_DIR}/boot.config | tr -s '\n' ' ')" | 327 $(cat ${OUTPUT_DIR}/boot.config | tr -s '\n' ' ')" |
328 kernel_part="${kernel_part} ${FLAGS_arm_extra_bootargs}'" | 328 kernel_part="${kernel_part} ${FLAGS_arm_extra_bootargs}'" |
329 local kpart_offset="--kernel_partition_offset=${koffset}" | 329 local kpart_offset="--kernel_partition_offset=${koffset}" |
330 local kpart_size="--kernel_partition_sectors=$(partsize ${image_name} 2)" | 330 local kpart_size="\ |
| 331 --kernel_partition_sectors=$(partsize ${OUTPUT_DIR}/${image_name} 2)" |
331 kernel_part="${kernel_part} ${kpart_size} ${kpart_offset}" | 332 kernel_part="${kernel_part} ${kpart_size} ${kpart_offset}" |
332 bootloader_to="${OUTPUT_DIR}/arm.mbr" | 333 bootloader_to="${OUTPUT_DIR}/arm.mbr" |
333 fi | 334 fi |
334 | 335 |
335 # Update partition 12 / legacy bootloaders and arm. | 336 # Update partition 12 / legacy bootloaders and arm. |
336 ${SCRIPTS_DIR}/update_bootloaders.sh \ | 337 ${SCRIPTS_DIR}/update_bootloaders.sh \ |
337 --arch=${ARCH} \ | 338 --arch=${ARCH} \ |
338 --to="${bootloader_to}" \ | 339 --to="${bootloader_to}" \ |
339 --from="${OUTPUT_DIR}"/boot \ | 340 --from="${OUTPUT_DIR}"/boot \ |
340 --vmlinuz="${OUTPUT_DIR}"/boot/vmlinuz \ | 341 --vmlinuz="${OUTPUT_DIR}"/boot/vmlinuz \ |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 678 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
678 fi | 679 fi |
679 | 680 |
680 print_time_elapsed | 681 print_time_elapsed |
681 | 682 |
682 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 683 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
683 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 684 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
684 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 685 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
685 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 686 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
686 echo "from the scripts directory where you entered the chroot." | 687 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |