Skip to content

Commit

Permalink
Refactor tool to accept xmls
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Feb 27, 2024
1 parent be3841c commit d37fa80
Show file tree
Hide file tree
Showing 23 changed files with 781 additions and 885 deletions.
6 changes: 6 additions & 0 deletions FirmwareGen/CommandLine/GenerateWindowsFFUOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,11 @@ public string WindowsIndex
{
get; set;
}

[Option('p', "device-profile", HelpText = "Path to the device profile xml containing information on how to build the FFU", Required = true)]
public string DeviceProfile
{
get; set;
}
}
}
50 changes: 40 additions & 10 deletions FirmwareGen/DeviceProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,45 @@ namespace FirmwareGen
{
public class DeviceProfile
{
public virtual string[] SupplementaryBCDCommands { get; set; }
public virtual string[] PlatformIDs { get; set; }
public virtual string FFUFileName { get; set; }
public virtual string DriverDefinitionPath { get; set; }
public virtual ulong DiskTotalSize { get; set; }
public virtual uint DiskSectorSize { get; set; }
public virtual GPTPartition[] PartitionLayout { get; set; }
public virtual SplittingStrategy SplittingStrategy { get; set; }
public virtual ulong CustomSplittingAndroidDesiredSpace { get; set; }
public virtual Guid DiskGuid { get; set; }
public virtual string[] SupplementaryBCDCommands
{
get; set;
}
public virtual string[] PlatformIDs
{
get; set;
}
public virtual string FFUFileName
{
get; set;
}
public virtual string DriverDefinitionPath
{
get; set;
}
public virtual ulong DiskTotalSize
{
get; set;
}
public virtual uint DiskSectorSize
{
get; set;
}
public virtual GPTPartition[] PartitionLayout
{
get; set;
}
public virtual SplittingStrategy SplittingStrategy
{
get; set;
}
public virtual ulong CustomSplittingAndroidDesiredSpace
{
get; set;
}
public virtual Guid DiskGuid
{
get; set;
}
}
}
87 changes: 0 additions & 87 deletions FirmwareGen/DeviceProfiles/EpsilonHalfSplit128GB.cs

This file was deleted.

66 changes: 66 additions & 0 deletions FirmwareGen/DeviceProfiles/EpsilonHalfSplit128GB.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<DeviceProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SupplementaryBCDCommands />
<PlatformIDs>
<string>Microsoft Corporation.Surface.Surface Duo.1930</string>
<string>OEMB1.*.OEMB1 Product.*</string>
<string>OEMEP.*.OEMEP Product.*</string>
</PlatformIDs>
<FFUFileName>OEMEP_128GB_HalfSplit.ffu</FFUFileName>
<DriverDefinitionPath>\definitions\Desktop\ARM64\Internal\epsilon.xml</DriverDefinitionPath>
<DiskTotalSize>111723675648</DiskTotalSize>
<DiskSectorSize>4096</DiskSectorSize>
<PartitionLayout>
<GPTPartition>
<TypeGUID>2c86e742-745e-4fdd-bfd8-b6a7ac638772</TypeGUID>
<UID>3e20174c-e289-a56a-39e7-2740b0043d24</UID>
<FirstLBA>6</FirstLBA>
<LastLBA>7</LastLBA>
<Attributes>0</Attributes>
<Name>ssd</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>6c95e238-e343-4ba8-b489-8681ed22ad0b</TypeGUID>
<UID>3c077ac9-fe70-fb01-9fda-3e03153145ea</UID>
<FirstLBA>8</FirstLBA>
<LastLBA>8199</LastLBA>
<Attributes>0</Attributes>
<Name>persist</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>988a98c9-2910-4123-aaec-1cf6b1bc28f9</TypeGUID>
<UID>b7f39878-935d-ed4b-ead8-48b159a31e04</UID>
<FirstLBA>8200</FirstLBA>
<LastLBA>12295</LastLBA>
<Attributes>0</Attributes>
<Name>metadata</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>91b72d4d-71e0-4cbf-9b8e-236381cff17a</TypeGUID>
<UID>04489c96-ae78-c997-efbf-1bc9909cd1ca</UID>
<FirstLBA>12296</FirstLBA>
<LastLBA>12423</LastLBA>
<Attributes>0</Attributes>
<Name>frp</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>82acc91f-357c-4a68-9c8f-689e1b1a23a1</TypeGUID>
<UID>b2ebcd63-842b-f5ff-bdf6-f630f7148b1f</UID>
<FirstLBA>12424</FirstLBA>
<LastLBA>12679</LastLBA>
<Attributes>0</Attributes>
<Name>misc</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>1b81e7e6-f50d-419b-a739-2aeef8da3335</TypeGUID>
<UID>e24f3f91-ed89-c235-d6b4-afada6edb8b7</UID>
<FirstLBA>12680</FirstLBA>
<LastLBA>12679</LastLBA>
<Attributes>0</Attributes>
<Name>userdata</Name>
</GPTPartition>
</PartitionLayout>
<SplittingStrategy>HalfSplit</SplittingStrategy>
<CustomSplittingAndroidDesiredSpace>4294967296</CustomSplittingAndroidDesiredSpace>
<DiskGuid>efa6243a-085f-e745-f2ce-54d39ef34351</DiskGuid>
</DeviceProfile>
86 changes: 0 additions & 86 deletions FirmwareGen/DeviceProfiles/EpsilonHalfSplit256GB.cs

This file was deleted.

66 changes: 66 additions & 0 deletions FirmwareGen/DeviceProfiles/EpsilonHalfSplit256GB.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<DeviceProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SupplementaryBCDCommands />
<PlatformIDs>
<string>Microsoft Corporation.Surface.Surface Duo.1930</string>
<string>OEMB1.*.OEMB1 Product.*</string>
<string>OEMEP.*.OEMEP Product.*</string>
</PlatformIDs>
<FFUFileName>OEMEP_256GB_HalfSplit.ffu</FFUFileName>
<DriverDefinitionPath>\definitions\Desktop\ARM64\Internal\epsilon.xml</DriverDefinitionPath>
<DiskTotalSize>239651758080</DiskTotalSize>
<DiskSectorSize>4096</DiskSectorSize>
<PartitionLayout>
<GPTPartition>
<TypeGUID>2c86e742-745e-4fdd-bfd8-b6a7ac638772</TypeGUID>
<UID>3e20174c-e289-a56a-39e7-2740b0043d24</UID>
<FirstLBA>6</FirstLBA>
<LastLBA>7</LastLBA>
<Attributes>0</Attributes>
<Name>ssd</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>6c95e238-e343-4ba8-b489-8681ed22ad0b</TypeGUID>
<UID>3c077ac9-fe70-fb01-9fda-3e03153145ea</UID>
<FirstLBA>8</FirstLBA>
<LastLBA>8199</LastLBA>
<Attributes>0</Attributes>
<Name>persist</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>988a98c9-2910-4123-aaec-1cf6b1bc28f9</TypeGUID>
<UID>b7f39878-935d-ed4b-ead8-48b159a31e04</UID>
<FirstLBA>8200</FirstLBA>
<LastLBA>12295</LastLBA>
<Attributes>0</Attributes>
<Name>metadata</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>91b72d4d-71e0-4cbf-9b8e-236381cff17a</TypeGUID>
<UID>04489c96-ae78-c997-efbf-1bc9909cd1ca</UID>
<FirstLBA>12296</FirstLBA>
<LastLBA>12423</LastLBA>
<Attributes>0</Attributes>
<Name>frp</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>82acc91f-357c-4a68-9c8f-689e1b1a23a1</TypeGUID>
<UID>b2ebcd63-842b-f5ff-bdf6-f630f7148b1f</UID>
<FirstLBA>12424</FirstLBA>
<LastLBA>12679</LastLBA>
<Attributes>0</Attributes>
<Name>misc</Name>
</GPTPartition>
<GPTPartition>
<TypeGUID>1b81e7e6-f50d-419b-a739-2aeef8da3335</TypeGUID>
<UID>e24f3f91-ed89-c235-d6b4-afada6edb8b7</UID>
<FirstLBA>12680</FirstLBA>
<LastLBA>12679</LastLBA>
<Attributes>0</Attributes>
<Name>userdata</Name>
</GPTPartition>
</PartitionLayout>
<SplittingStrategy>HalfSplit</SplittingStrategy>
<CustomSplittingAndroidDesiredSpace>4294967296</CustomSplittingAndroidDesiredSpace>
<DiskGuid>efa6243a-085f-e745-f2ce-54d39ef34351</DiskGuid>
</DeviceProfile>
Loading

0 comments on commit d37fa80

Please sign in to comment.