From fb105d3a4c5db0b0bdbfdd609b5ffb1e85a121d0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 7 Feb 2017 12:11:45 -0500 Subject: [PATCH] cros-board: update --- .bin/cros-board | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.bin/cros-board b/.bin/cros-board index 7169438..fc6008f 100755 --- a/.bin/cros-board +++ b/.bin/cros-board @@ -5,15 +5,38 @@ set -e cd "${HOME}/trunk/src/scripts/" -: ${BOARD:=`cat .default_board 2>/dev/null`} +: "${BOARD:="$(cat .default_board 2>/dev/null)"}" if [[ -z ${BOARD} ]] ; then die "missing BOARD" fi IMAGES="${HOME}/trunk/src/build/images/${BOARD}" BUILD="/build/${BOARD}" +usage() { + exec cat < Write image to w/out prompting. + + -p Pretend -- show commands that would be run. + -v Verbose -- send command output to stdout. +EOF +} + ARG_CLEAN=false -ARG_DEV="/dev/sdc" +ARG_DEV="/dev/sdd" ARG_DEV_USER=false ARG_PRETEND=false ARG_NOPKG=false @@ -32,7 +55,7 @@ while [[ $# -ne 0 ]] ; do --nousepkg) ARG_NOPKG=true;; --autotest) ARG_AUTOTEST=true;; --factory) ARG_FACTORY=true;; - -h) exec sed -n '/^while/,/^done/p' "$0";; + -h) usage;; *) echo "unknown opt: $*"; exit 1;; esac shift @@ -106,7 +129,7 @@ ${IMG_TO_USB} ${d}/image_to_vm.sh --board=${BOARD} --from=../build/images/${BOARD}/latest ${d}/image_to_vm.sh --board=${BOARD} --from=../build/images/${BOARD}/latest --test_image ~/chromiumos/src/scripts/bin/cros_start_vm --no_graphics --image_path=\${HOME}/chromiumos/src/build/images/${BOARD}/latest/chromiumos_qemu_image.bin -kvm -m 1024 -vga std -net nic,model=virtio -net user,hostfwd=tcp::9222-:22 -hda ~/chromiumos/src/build/images/${BOARD}/latest/chromiumos_qemu_image.bin +qemu-system-x86_64 -enable-kvm -m 1024 -vga std -net nic,model=virtio -net user,hostfwd=tcp::9222-:22 -hda ~/chromiumos/src/build/images/${BOARD}/latest/chromiumos_qemu_image.bin ### RECOVERY ${d}/mod_image_for_recovery.sh --board=${BOARD} -- 2.39.5