Skip to content

Commit 25470b8

Browse files
committed
Project update.
1 parent b04ce29 commit 25470b8

File tree

4 files changed

+43
-40
lines changed

4 files changed

+43
-40
lines changed

Boot Shim.sln

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27130.2027
5-
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BootShim", "contrib\msvc\uefi-simple.vcxproj", "{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}"
7-
ProjectSection(ProjectDependencies) = postProject
8-
{3135D563-9596-4584-9ED6-616ADEC52974} = {3135D563-9596-4584-9ED6-616ADEC52974}
9-
EndProjectSection
10-
EndProject
11-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnu-efi", "contrib\msvc\gnu-efi.vcxproj", "{3135D563-9596-4584-9ED6-616ADEC52974}"
12-
EndProject
13-
Global
14-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15-
Debug|arm = Debug|arm
16-
Release|arm = Release|arm
17-
EndGlobalSection
18-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}.Debug|arm.ActiveCfg = Debug|ARM
20-
{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}.Debug|arm.Build.0 = Debug|ARM
21-
{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}.Release|arm.ActiveCfg = Release|ARM
22-
{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}.Release|arm.Build.0 = Release|ARM
23-
{3135D563-9596-4584-9ED6-616ADEC52974}.Debug|arm.ActiveCfg = Debug|ARM
24-
{3135D563-9596-4584-9ED6-616ADEC52974}.Debug|arm.Build.0 = Debug|ARM
25-
{3135D563-9596-4584-9ED6-616ADEC52974}.Release|arm.ActiveCfg = Release|ARM
26-
{3135D563-9596-4584-9ED6-616ADEC52974}.Release|arm.Build.0 = Release|ARM
27-
EndGlobalSection
28-
GlobalSection(SolutionProperties) = preSolution
29-
HideSolutionNode = FALSE
30-
EndGlobalSection
31-
GlobalSection(ExtensibilityGlobals) = postSolution
32-
SolutionGuid = {376E6530-5878-4CF4-AFB7-123F799056A2}
33-
EndGlobalSection
34-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27130.2027
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BootShim", "contrib\msvc\uefi-simple.vcxproj", "{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}"
7+
ProjectSection(ProjectDependencies) = postProject
8+
{3135D563-9596-4584-9ED6-616ADEC52974} = {3135D563-9596-4584-9ED6-616ADEC52974}
9+
EndProjectSection
10+
EndProject
11+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnu-efi", "contrib\msvc\gnu-efi.vcxproj", "{3135D563-9596-4584-9ED6-616ADEC52974}"
12+
EndProject
13+
Global
14+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15+
Debug|arm = Debug|arm
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}.Debug|arm.ActiveCfg = Debug|ARM
19+
{DFA0BA98-D0BA-4176-9A34-B5BA6355B1DE}.Debug|arm.Build.0 = Debug|ARM
20+
{3135D563-9596-4584-9ED6-616ADEC52974}.Debug|arm.ActiveCfg = Debug|ARM
21+
{3135D563-9596-4584-9ED6-616ADEC52974}.Debug|arm.Build.0 = Debug|ARM
22+
EndGlobalSection
23+
GlobalSection(SolutionProperties) = preSolution
24+
HideSolutionNode = FALSE
25+
EndGlobalSection
26+
GlobalSection(ExtensibilityGlobals) = postSolution
27+
SolutionGuid = {376E6530-5878-4CF4-AFB7-123F799056A2}
28+
EndGlobalSection
29+
EndGlobal

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Or, if using a UI client (such as TortoiseGit) by selecting _Submodule Update_ i
2525

2626
## Compilation and testing
2727

28-
Only Visual Studio is supported in this branch.
28+
Only Visual Studio is supported in this branch. Do not use `Release` mode, it won't work.
29+
30+
I used a well-known certificate from Windows Kits to sign the binary. You can replace with yours.
2931

3032
## Visual Studio 2017 and ARM support
3133

@@ -38,8 +40,14 @@ the default _Workloads_ screen:
3840

3941
## ELF requirements
4042

41-
Only single `LOAD` section in ELF64 files will be recognized, it must has physical address
42-
and virtual address matched (EFI identity mapping), memory size and file size must match.
43-
Additionaly, entry point and physical address must match.
43+
- There must be a LOAD section has p_paddr and p_vaddr matches program entry point address (e_entry).
44+
- LOAD section must have p_paddr equals to p_vaddr (identity mapping requirements).
45+
- LOAD section must reside in device's memory region. That means p_paddr must larger or equal (not likely) to
46+
device's memory base, and p_addr + p_memsz must not go out of device's memory region.
47+
- LOAD section must have p_memsz equals to p_filesz.
48+
- Only first LOAD section that meets these requirements will be loaded into memory.
49+
- e_machine must be EM_ARM.
50+
- e_type must be ET_EXEC.
51+
- Has name of emmc_appsboot.mbn in a firmware-recognized partition (it will try all partitions and use the first one available)
4452

4553
Little Kernel (aboot) signed variants meet these requirements.

src/ARM/ProcessorSupport.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ArmDeInitialize
2929
dsb
3030
isb
3131

32-
; Invalidates I-Cache
32+
; Invalidate I-Cache
3333
mcr p15, 0, R0, c7, c5, 0 ; Invalidate entire instruction cache
3434
dsb
3535
isb

src/EFIApp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
339339
/* Jump to LOAD section entry point and never returns */
340340
Print(L"\nJump to address 0x%x\n", lk_elf32_phdr->p_paddr);
341341

342-
#if _DEBUG
342+
#if _DEBUG_INSPECT_
343343
gBS->Stall(SECONDS_TO_MICROSECONDS(5));
344344
#endif
345345
JumpToAddress(ImageHandle, lk_elf32_phdr->p_paddr);

0 commit comments

Comments
 (0)