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 <<EOF
+Usage: cros-board [options]
+
+Build for the board listed in \${BOARD} (current: ${BOARD}).
+Normally only builds a dev image.
+
+Options:
+ -t Build test packages & image
+ --autotest Build & install autotest packages.
+ --factory Build factory packages & image.
+ --nousepkg Force build from source.
+
+ --clean ?
+
+ -Y Write image to ${ARG_DEV} w/out prompting.
+ -y <dev> Write image to <dev> 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
--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
${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}