Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
RpiLanPropertyChange: Add ARM64 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
driver1998 committed Jul 14, 2020
1 parent 5ab3b72 commit 4dc59a7
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 4 deletions.
55 changes: 55 additions & 0 deletions drivers/RpiLanPropertyChange/bcm2836/RpiLanPropertyChange.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
;
; RpiLanPropertyChange.inf
;
[Version]
Signature = "$WINDOWS NT$"
Class = SYSTEM
ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318}
Provider = %ProviderString%
DriverVer = 04/27/2020,1.0.0.0000
CatalogFile = RpiLanPropertyChange.cat

[DestinationDirs]
RpiLanPropertyChange_Files = 11 ;System32

[SourceDisksNames]
0 = "Disk"

[SourceDisksFiles]
RpiLanPropertyChange.dll = 0,,

[DefaultInstall.NT]
CopyFiles = RpiLanPropertyChange_Files
AddReg = RpiLanPropertyChange_Reg

[DefaultInstall.NT.Services]
AddService = ,2

[RpiLanPropertyChange_Files]
RpiLanPropertyChange.dll

[RpiLanPropertyChange_Reg]
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , DisplayName , %REG_SZ% , "%ServiceName%"
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , Description , %REG_SZ% , "%ServiceDescription%"
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , ImagePath , %REG_EXPAND_SZ% , "%%systemroot%%\system32\svchost.exe -k netsvcs -p"
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , Type , %REG_DWORD% , 0x0020
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , Start , %REG_DWORD% , 0x0002
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , ErrorControl , %REG_DWORD% , 0x0001
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , ObjectName , %REG_SZ% , "LocalSystem"
HKLM, System\ControlSet001\Services\RpiLanPropertyChange , RequiredPrivileges , %REG_APPEND_MULTI_SZ% , "SeTcbPrivilege"
HKLM, System\ControlSet001\Services\RpiLanPropertyChange\Parameters , ServiceDll , %REG_EXPAND_SZ% , "%%SystemRoot%%\System32\RpiLanPropertyChange.dll"
HKLM, System\ControlSet001\Services\RpiLanPropertyChange\Parameters , ServiceDllUnloadOnStop, %REG_DWORD% , 0x0001
HKLM, Software\Microsoft\Windows NT\CurrentVersion\Svchost , netsvcs , %REG_APPEND_MULTI_SZ% , "RpiLanPropertyChange"

[Strings]
ProviderString = "MS-IOT"
MfgName="Microsoft"
ServiceName="Raspberry Pi Lan MAC Updater Service"
ServiceDescription="Update Lan MAC address according to registry setting"

REG_SZ = 0x00000000
REG_MULTI_SZ = 0x00010000
REG_APPEND_MULTI_SZ = 0x00010008
REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001
REG_BINARY = 0x00000001
99 changes: 95 additions & 4 deletions drivers/RpiLanPropertyChange/bcm2836/RpiLanPropertyChange.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="PropertySheets">
Expand Down Expand Up @@ -39,6 +47,13 @@
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
Expand All @@ -48,26 +63,50 @@
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
<Import Project="$(SolutionDir)\..\bsp.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
<Import Project="$(SolutionDir)\..\bsp.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
<Import Project="$(SolutionDir)\..\bsp.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
<Import Project="$(SolutionDir)\..\bsp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
<LinkIncremental>true</LinkIncremental>
<CustomBuildBeforeTargets />
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
<LinkIncremental>false</LinkIncremental>
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
<ClCompile>
Expand All @@ -77,6 +116,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;RPILANPROPERTYCHANGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -86,8 +126,32 @@
<SetChecksum>true</SetChecksum>
</Link>
<PostBuildEvent>
<Command>copy /y "$(ProjectDir)RpiLanPropertyChange.inf" "$(OutDir)"</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;RPILANPROPERTYCHANGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>service.def</ModuleDefinitionFile>
<AdditionalDependencies>onecore.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SetChecksum>true</SetChecksum>
</Link>
<PostBuildEvent>
<Command>copy /y "$(ProjectDir)RpiLanPropertyChange.inf" "$(OutDir)"</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>
Expand All @@ -104,6 +168,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;RPILANPROPERTYCHANGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -115,8 +180,32 @@
<SetChecksum>true</SetChecksum>
</Link>
<PostBuildEvent>
<Command>
</Command>
<Command>copy /y "$(ProjectDir)RpiLanPropertyChange.inf" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;RPILANPROPERTYCHANGE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>service.def</ModuleDefinitionFile>
<AdditionalDependencies>onecore.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SetChecksum>true</SetChecksum>
</Link>
<PostBuildEvent>
<Command>copy /y "$(ProjectDir)RpiLanPropertyChange.inf" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
Expand All @@ -133,6 +222,8 @@
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|arm'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 4dc59a7

Please sign in to comment.