1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

(More thoroughly) fix the problem with the EGREP lines that was reported

on -current by Ben Kaduk <minimarmot@gmail.com>.

Add a hack of my own to allow the user to supply the paths to the INF and
SYS files on the command line.
This commit is contained in:
Doug Barton 2005-07-23 18:47:18 +00:00
parent f92c1adc15
commit a2412a091e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148350
2 changed files with 45 additions and 26 deletions

View File

@ -40,6 +40,7 @@
NDIS driver distribution
.Sh SYNOPSIS
.Nm
.Op Ar /path/to/INF /path/to/SYS
.Sh DESCRIPTION
The
.Nm
@ -57,13 +58,16 @@ compatibility module.
The
.Nm
script is interactive and contains its own help section.
The script will prompt the user for the
Unless the paths to both files are supplied on the command line,
the script will prompt the user for the
.Pa .INF
and
.Pa .SYS
files (and any firmware or other external files) needed to generate the
files needed to generate the
.Fx
driver module.
The script will also prompt for
any firmware or other external files needed.
.Sh SEE ALSO
.Xr ld 1 ,
.Xr objcopy 1 ,

View File

@ -187,16 +187,20 @@ return
infconv () {
header
echo " INF file validation"
echo ""
echo ""
echo " A .INF file is most often provided as an ASCII file, however"
echo " files with multilanguage support are provided in Unicode format."
echo " Please type in the path to your .INF file now."
echo ""
echo -n " > "
read INFPATH
if [ -z "$INFPATH" ]; then
echo ""
echo ""
echo " A .INF file is most often provided as an ASCII file, however"
echo " files with multilanguage support are provided in Unicode format."
echo " Please type in the path to your .INF file now."
echo ""
echo -n " > "
read INFPATH
fi
if [ ${INFPATH} ] && [ -e ${INFPATH} ]; then
INFTYPE=`${EGREP} -i -c "^Signature|^.S.i.g.n.a.t.u.r.e" ${INFPATH}`
INFTYPE=`${EGREP} -i -c "Signature|.S.i.g.n.a.t.u.r.e" ${INFPATH}`
if [ ${INFTYPE} -le 0 ]; then
echo ""
echo " I don't recognize this file format. It may not be a valid .INF file."
@ -207,7 +211,7 @@ if [ ${INFPATH} ] && [ -e ${INFPATH} ]; then
return
fi
INFTYPE=`${EGREP} -i -c "^Class.*=.*Net" ${INFPATH}`
INFTYPE=`${EGREP} -i -c "Class.*=.*Net" ${INFPATH}`
if [ ${INFTYPE} -gt 0 ]; then
echo ""
echo " This .INF file appears to be ASCII."
@ -217,7 +221,7 @@ if [ ${INFPATH} ] && [ -e ${INFPATH} ]; then
return
fi
INFTYPE=`${EGREP} -i -c "^.C.l.a.s.s.*=.*N.e.t" ${INFPATH}`
INFTYPE=`${EGREP} -i -c ".C.l.a.s.s.*=.*N.e.t" ${INFPATH}`
if [ ${INFTYPE} -gt 0 ]; then
echo ""
echo " This .INF file appears to be Unicode."
@ -259,19 +263,23 @@ return
sysconv() {
header
echo " Driver file validation"
echo ""
echo ""
echo " Now you need to specify the name of the Windows(r) driver .SYS"
echo " file for your device. Note that if you are running FreeBSD/amd64,"
echo " then you must provide a driver that has been compiled for the"
echo " 64-bit Windows(r) platform. If a 64-bit driver is not available"
echo " for your device, you must install FreeBSD/i386 and use the"
echo " 32-bit driver instead."
echo ""
echo " Please type in the path to the Windows(r) driver .SYS file now."
echo ""
echo -n " > "
read SYSPATH
if [ ! -r "$SYSPATH" ]; then
echo ""
echo ""
echo " Now you need to specify the name of the Windows(r) driver .SYS"
echo " file for your device. Note that if you are running FreeBSD/amd64,"
echo " then you must provide a driver that has been compiled for the"
echo " 64-bit Windows(r) platform. If a 64-bit driver is not available"
echo " for your device, you must install FreeBSD/i386 and use the"
echo " 32-bit driver instead."
echo ""
echo " Please type in the path to the Windows(r) driver .SYS file now."
echo ""
echo -n " > "
read SYSPATH
fi
if [ ${SYSPATH} ] && [ -e ${SYSPATH} ]; then
SYSTYPE=`${FILE} ${SYSPATH}`
@ -510,6 +518,13 @@ SYSPATH=""
SYSBASE=""
FRMBASE=""
if [ -r "$1" -a -r "$2" ]; then
# Looks like the user supplied .INF and .SYS files on the command line
INFPATH=$1
SYSPATH=$2
convert_driver && exit 0
fi
while : ; do
mainmenu
case ${KEYPRESS} in