This is the process for building a clone of DriverSample called MyDriverSample.
MyDriverSample is just a copy of DriverSample with the exception that it has a new guid and new routines names.
Notice that NVDataStruc.h includes Guid/MyDriverSampleHii.h now. This file has to be cloned. Chances are these GUIDs will need to be differed. For now leave them as is.
Edit MdeModulePkg\Include\Guid\MyDriverSampleHii.h and MdeModulePkg\MdeModulePkg.dec find the entries corresponding to the #defines there are three of them. In the .h file they look like below.
Example change in the header file.
// 0xA04A27f4, 0xDF00, 0x4D42, {0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D} #define MY_DRIVER_SAMPLE_FORMSET_GUID { 0x304A27f4, 0xDF00, 0x4D42, {0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D} }
The first number there appears to be part of a GUID for the form. If you notice, the commented out line, which is the original line you can see that I edited the first number to make it unique. A changed to 3. All three duplicated defines need to be changed so the GUID is unique. This number is also used in the .dec file. Here is the lines from that file. You can see how the GUID is changed to correspond to those shown above.
## Include/Guid/MyDriverSampleHii.h gMyDriverSampleFormSetGuid = { 0x304A27f4, 0xDF00, 0x4D42, { 0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D }} gMyDriverSampleInventoryGuid = { 0x33f56470, 0x6141, 0x4621, { 0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8 }} gMyEfiIfrRefreshIdOpGuid = { 0x35E655D9, 0x02A6, 0x46f2, { 0x9E, 0x76, 0xB8, 0xBE, 0x8E, 0x60, 0xAB, 0x22 }} #gMyDriverSampleFormSetGuid = { 0xA04A27f4, 0xDF00, 0x4D42, { 0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D }} #gMyDriverSampleInventoryGuid = { 0xb3f56470, 0x6141, 0x4621, { 0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8 }} #gMyEfiIfrRefreshIdOpGuid = { 0xF5E655D9, 0x02A6, 0x46f2, { 0x9E, 0x76, 0xB8, 0xBE, 0x8E, 0x60, 0xAB, 0x22 }}
Use build cleanall and build all to build the code. Use build all 2> foo.txt and examine foo.txt to see that you don't have any warnings.
Here is how you run the driver.
the image
the image
the image