Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/scripts/build_image

Issue 1117005: arm: don't truncate the mbr when installing the boot script. bad things happen otherwise (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 "bootm C0008000" > ${MBR_SCRIPT} 372 "bootm C0008000" > ${MBR_SCRIPT}
373 MKIMAGE="${BOARD_ROOT}/u-boot/mkimage" 373 MKIMAGE="${BOARD_ROOT}/u-boot/mkimage"
374 if [[ -f "$MKIMAGE".gz ]]; then 374 if [[ -f "$MKIMAGE".gz ]]; then
375 sudo gunzip "$MKIMAGE".gz 375 sudo gunzip "$MKIMAGE".gz
376 fi 376 fi
377 if [[ -x "$MKIMAGE" ]]; then 377 if [[ -x "$MKIMAGE" ]]; then
378 MBR_SCRIPT_UIMG="${MBR_SCRIPT}.uimg" 378 MBR_SCRIPT_UIMG="${MBR_SCRIPT}.uimg"
379 "$MKIMAGE" -A "${ARCH}" -O linux -T script -a 0 -e 0 -n "COS boot" \ 379 "$MKIMAGE" -A "${ARCH}" -O linux -T script -a 0 -e 0 -n "COS boot" \
380 -d ${MBR_SCRIPT} ${MBR_SCRIPT_UIMG} 380 -d ${MBR_SCRIPT} ${MBR_SCRIPT_UIMG}
381 dd bs=1 count=`stat --printf="%s" ${MBR_SCRIPT_UIMG}` \ 381 dd bs=1 count=`stat --printf="%s" ${MBR_SCRIPT_UIMG}` \
382 if="$MBR_SCRIPT_UIMG" of="$MBR_IMG" 382 if="$MBR_SCRIPT_UIMG" of="$MBR_IMG" conv=notrunc
383 hexdump -v -C "$MBR_IMG" 383 hexdump -v -C "$MBR_IMG"
384 else 384 else
385 echo "Error: u-boot mkimage not found or not executable." 385 echo "Error: u-boot mkimage not found or not executable."
386 fi 386 fi
387 fi 387 fi
388 388
389 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" 389 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}"
390 echo "Done. Image created in ${OUTPUT_DIR}" 390 echo "Done. Image created in ${OUTPUT_DIR}"
391 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:"
392 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"
393 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:"
394 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" 394 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}"
395 echo "from the scripts directory where you entered the chroot." 395 echo "from the scripts directory where you entered the chroot."
396 396
397 trap - EXIT 397 trap - EXIT
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698