Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

VS2017/WDK10 - can STAMPINF be turned off?

Richard_JenkinsRichard_Jenkins Member Posts: 29
I've just started using WDK10 with Visual Studio 2017 running under Windows 7. (SDK 10.0.17134.12 and WDK 10.0.17134.1)

There appears to be no way of turning off the automatic STAMPINF operation.

I have 14 drivers (projects) in my "solution" and the final INF file I produce will be used by all 14, so I don't want individual INF files. To get round this, I've just copied this same INF into each project. It appears that when the target is Windows 10 that lots of INF content checking for invalid fields takes place.

Also for Windows 10 targets the Signability test fails when there is more than one driver in the INF file. For all SYS files other than the one it's dealing with, it complains that it can't find them despite all being in the same output folder with the INFs. I would expect a second build pass to locate them.

Is there a way of turning off the STAMPINF operation for Windows 10 targets?

Richard.

Comments

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,433
    I think you are referring to inverif as stampinf doesn't really do syntax validation on an INF. Errors reported by infverif should be fixed even if the tool is only running on a win10 target.

    d

    -----Original Message-----
    From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> On Behalf Of xxxxx@compuserve.com
    Sent: Friday, August 31, 2018 7:44 AM
    To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    Subject: [ntdev] VS2017/WDK10 - can STAMPINF be turned off?

    I've just started using WDK10 with Visual Studio 2017 running under Windows 7. (SDK 10.0.17134.12 and WDK 10.0.17134.1)

    There appears to be no way of turning off the automatic STAMPINF operation.

    I have 14 drivers (projects) in my "solution" and the final INF file I produce will be used by all 14, so I don't want individual INF files. To get round this, I've just copied this same INF into each project. It appears that when the target is Windows 10 that lots of INF content checking for invalid fields takes place.

    Also for Windows 10 targets the Signability test fails when there is more than one driver in the INF file. For all SYS files other than the one it's dealing with, it complains that it can't find them despite all being in the same output folder with the INFs. I would expect a second build pass to locate them.

    Is there a way of turning off the STAMPINF operation for Windows 10 targets?

    Richard.

    ---
    NTDEV is sponsored by OSR

    Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/showlists.cfm?list=ntdev&amp;data=02|01|[email protected]|93fc06fb37544ff9bde208d60f5042a4|72f988bf86f141af91ab2d7cd011db47|1|0|636713234717380122&amp;sdata=OZQnC/hP5ONchM+JVUgireUlrOMDqAw+/7EMi1iE7fg=&amp;reserved=0&gt;

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at <https://na01.safelinks.protection.outlook.com/?url=http://www.osr.com/seminars&amp;data=02|01|[email protected]|93fc06fb37544ff9bde208d60f5042a4|72f988bf86f141af91ab2d7cd011db47|1|0|636713234717380122&amp;sdata=I86vRAfM8zJCs0KN17Wbx+63cF42gBFyBCQKZ04obkc=&amp;reserved=0&gt;

    To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/page.cfm?name=ListServer&amp;data=02|01|[email protected]|93fc06fb37544ff9bde208d60f5042a4|72f988bf86f141af91ab2d7cd011db47|1|0|636713234717380122&amp;sdata=p8457ouJQ0Yvg6kjO4C4s5r1orT34m3TIFLjmdL/22k=&amp;reserved=0&gt;
    d
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 12,966
    xxxxx@compuserve.com wrote:
    > I've just started using WDK10 with Visual Studio 2017 running under Windows 7. (SDK 10.0.17134.12 and WDK 10.0.17134.1)
    >
    > There appears to be no way of turning off the automatic STAMPINF operation.
    >
    > I have 14 drivers (projects) in my "solution" and the final INF file I produce will be used by all 14, so I don't want individual INF files. To get round this, I've just copied this same INF into each project. It appears that when the target is Windows 10 that lots of INF content checking for invalid fields takes place.
    >
    > Also for Windows 10 targets the Signability test fails when there is more than one driver in the INF file. For all SYS files other than the one it's dealing with, it complains that it can't find them despite all being in the same output folder with the INFs. I would expect a second build pass to locate them.
    >
    > Is there a way of turning off the STAMPINF operation for Windows 10 targets?

    Basically, you can't use the automatic packaging when you have a
    multi-project INF like that.  I like putting 32-bit and 64-bit drivers
    in the same INF, and even there I had to disable the <FilesToPackage>
    process, although that was a lot easier than the case you're describing.

    I suspect you will need to create a separate vcxproj that just does the
    INF file.  You may need to edit the vcxproj files by hand to achieve
    this, so you can add <Copy> targets to copy the built drivers into your
    intermediate directory, then add <ItemGroup> </ItemGroup> to trigger the INF process.

    Alternatively, you can create a batch file that does the msbuilds, and
    then constructs the driver package by hand, copying the pieces into place.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Richard_JenkinsRichard_Jenkins Member Posts: 29
    The last time I had to do this was with VS2013 when I prepared a 32-bit INF and a 64-bit INF containing info for all 14 drivers. I had a batch file for each OS which:

    1. Copied the 32-bit INF file and 64-bit INF file to "Unsigned32bit" and "Unsigned64bit" folders
    2. Ran STAMPINF on these two INFs using "-a x86" and "-a amd64" respectively.
    3. Copied the appropriate SYS files from where they were built to these "Unsigned" folders.
    4. Copied the SYS and stamped INF files again to "Signed32bit" and Signed64bit" folders
    5. For each driver in these folders, I ran SIGNTOOL.
    6. For each folder I ran INF2CAT, and then SIGNTOOL on the cat.
    7. The two "Signed" folders now contain the deliverable output.

    It's a little bit different from the above as each OS has its own subfolder. The final output folder structure was:

    V63Signed\Win7\x32
    V63Signed\Win7\x64
    V63Signed\Win8\x32
    V63Signed\Win8\x64
    V63Signed\Win8.1\x32
    V63Signed\Win8.1\x64

    Had hoped I could dispense with the BAT files for Visual Studio 2017 but I suppose this method is clearer. Hoping that I don't run into any Attestation signing (which is new to me) problems later.

    Richard.
  • glaureglaure Member Posts: 8

    You can exclude the inf file from the build. This worked for me.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA