From 0372d7d6cd18aaf76785fa1fbe01bdbe81d14c84 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 28 May 2011 07:03:20 -0300 Subject: [PATCH] prod/: moved more configurable items to variables - Makefile: define driver names depending on device role - Makefile: changed title comment to indicate that this Makefile is no longer considered just a convenience hack - atusb: define USB_ID via a variable instead of hard-coding it --- prod/Makefile | 22 ++++++++++++++++++---- prod/atusb | 5 ++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/prod/Makefile b/prod/Makefile index 94729cf..1513996 100644 --- a/prod/Makefile +++ b/prod/Makefile @@ -1,6 +1,20 @@ # -# This Makefile just contains a few convenience commands, for development +# prod/Makefile - Run the production test process (reference/development) # +# Written 2011 by Werner Almesberger +# Copyright 2011 Werner Almesberger +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# + + +ATBEN_DUT=net:ben +ATBEN_REF=usb +ATUSB_DUT=usb +ATUSB_REF=net:ben .PHONY: all ben usb flash @@ -8,13 +22,13 @@ all: ben ben: ben.profile - ./atben usb net:ben + ./atben $(ATBEN_REF) $(ATBEN_DUT) usb: usb.profile - ./atusb net:ben usb + ./atusb $(ATUSB_REF) $(ATUSB_DUT) flash: - ./atusb-flash net:ben usb + ./atusb-flash $(ATUSB_REF) $(ATUSB_DUT) ben.profile: cp ../tools/atrf-path/profile.example $@ diff --git a/prod/atusb b/prod/atusb index 7fdadfa..54913ca 100755 --- a/prod/atusb +++ b/prod/atusb @@ -3,10 +3,13 @@ . ./Common +USB_ID=20b7:1540 + + enumerate() { step "Enumeration" - cmd "usbwait -t 5 20b7:1540 && echo okay" + cmd "usbwait -t 5 $USB_ID && echo okay" expect okay }