The exercise of porting Undi EDK Intel(R) PRO/1000 Network Driver to ARM
EDK2 was looking interesting.
I had a quick try to get an idea of the effort. What I did:
1) Unpacked the archive under ArmPlatformPkg\Drivers\GigUndi
2) Create ArmPlatformPkg\Drivers\GigUndi\GigUndi.inf (see attachment)
3) Add ArmPlatformPkg\Drivers\GigUndi\GigUndi.inf to
ArmPlatformPkg\ArmPlatformPkg.dsc
4) Try to build
5) Fix the build by:
a. Commenting the old #include
b. Adding the EDK2 #include instead
c. Others...
6) Go back to step 4) until I had a link error
7) Add the missing libraries
I stopped at the step 6 after few iterations. At some point I had to add
Base.h and I was not able to duplicate your error.
My suggestions are:
- Clean your build and retry to make sure there is no old files
- Start again your porting process following my steps
From: Shivamurthy Shastri [mailto:shiva.linuxwo...@gmail.com]
Sent: 20 November 2013 10:14
To: Andrew Fish
Cc: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Compiling EDK1 driver in EDK2
Hi Andrew,
On Tue, Nov 19, 2013 at 8:23 PM, Andrew Fish <af...@apple.com> wrote:
On Nov 19, 2013, at 6:15 AM, Shivamurthy Shastri
<shiva.linuxwo...@gmail.com> wrote:
Hi,
I downloaded UEFI network driver for Intel PCIE card from
<http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=EDK>
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=EDK file is
gig_pcie_src_4109.zip
I tried to compile this for ARM platform. It appears that this code only
compile with EDK1. I tried to compile this with EDK2 by changing INF file
(gig_82575_edk1.inf). But, I got many compilation issues.
This project is an example of compiling the old EDK Shell, with GCC for ARM.
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Gcc-shell
This project is obsolete, since the EDK II shell supports ARM, and GCC now,
but it is an example for you to look at.
Thank you for sharing this example. I tried in same way but, my problem is
not solved.
INF file I have changed is as follows:
You need to Modify the .DSC file to support the compatibility package, not
the INF file. If you modify the INF file you need to port the driver to
EDKII.
I modified DSC file to support compatibility package. My DSC file is now
looks like below:
[Defines]
...........
[LibraryClasses.common]
............ It has other ARM and platform related libraries.
[Libraries]
#
# Libraries common to PEI and DXE
#
EdkCompatibilityPkg/Foundation/Efi/Guid/EfiGuidLib.inf
EdkCompatibilityPkg/Foundation/Framework/Guid/EdkFrameworkGuidLib.inf
EdkCompatibilityPkg/Foundation/Guid/EdkGuidLib.inf
EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib_Edk2.inf
EdkCompatibilityPkg/Foundation/Library/CustomizedDecompress/CustomizedDecomp
ress.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/Hob/HobLib.inf
#
# PEI libraries
#
EdkCompatibilityPkg/Foundation/Framework/Ppi/EdkFrameworkPpiLib.inf
EdkCompatibilityPkg/Foundation/Ppi/EdkPpiLib.inf
EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf
EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.inf
#
# DXE libraries
#
EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/ArchProtocolLib.inf
EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
EdkCompatibilityPkg/Foundation/Framework/Protocol/EdkFrameworkProtocolLib.in
f
EdkCompatibilityPkg/Foundation/Protocol/EdkProtocolLib.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf
EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLi
b.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Graphics.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/EfiIfrSupportLib
.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiEfiIfrSu
pportLib.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/Print/PrintLib.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/EfiScriptLib/EfiScriptLib.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/EfiUiLib/EfiUiLib.inf
#
# Print/Graphics Library consume SetupBrowser Print Protocol
#
EdkCompatibilityPkg/Foundation/Library/Dxe/PrintLite/PrintLib.inf
EdkCompatibilityPkg/Foundation/Library/Dxe/GraphicsLite/Graphics.inf
[LibraryClasses.ARM]
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
[BuildOptions]
GCC:*_*_ARM_ARCHCC_FLAGS == -march=armv7-a -mno-unaligned-access
-mthumb -mthumb-interwork -fno-stack-protector -I$(PLATFORM_SOURCE)/Include
-DEFIARM
-DEFI_SPECIFICATION_VERSION=0x00020000
GCC:*_*_ARM_ARCHASM_FLAGS == -march=armv7-a -mthumb-interwork
-I$(PLATFORM_SOURCE)/Include
GCC:*_*_ARM_CC_FLAGS = -Os -mword-relocations -mfpu=vfp -ffixed-r8
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
[Components.common]
..................
.................
...............
EdkCompatibilityPkg/GigUndi/gig_82575_edk1.inf {
<BuildOptions>
GCC:*_*_ARM_CC_FLAGS = -DEFIARM
-DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_SPECIFICATION_VERSION=0x00009000
-DTIANO_RELEASE_VERSION=0x00080006 -DEFI_DEBUG
-DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
-DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
GCC:*_*_ARM_VFRPP_FLAGS = -DEFIARM
-DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_SPECIFICATION_VERSION=0x00009000
-DTIANO_RELEASE_VERSION=0x00080006 -DEFI_DEBUG
-DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
-DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
GCC:*_*_ARM_APP_FLAGS = -DEFIARM
-DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_SPECIFICATION_VERSION=0x00009000
-DTIANO_RELEASE_VERSION=0x00080006 -DEFI_DEBUG
-DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
-DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
GCC:*_*_ARM_PP_FLAGS = -DEFIARM
-DEFI_SPECIFICATION_VERSION=0x00020000 -DPI_SPECIFICATION_VERSION=0x00009000
-DTIANO_RELEASE_VERSION=0x00080006 -DEFI_DEBUG
-DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
-DSTRING_DEFINES_FILE=\"$(BASE_NAME)StrDefs.h\"
}
Thanks,
Andrew Fish
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = GigUndi
FILE_GUID = feaa2e2b-53ac-4d5e-ae10-1efd5da4a2ba
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = InitializeGigUNDIDriver
[Sources.common]
.......... all source files
[Packages]
EdkCompatibilityPkg/EdkCompatibilityPkg.dec
MdePkg/MdePkg.dec
[LibraryClasses]
EfiDriverLib
PrintLib
UefiEfiIfrSupportLib
[Protocols]
[Depex]
I got error :
.........GigUndi/gig_82575_edk1/DEBUG/AutoGen.h:16:18 fatal error: Base.h:
No such file or directory
compilation terminated.
.................
--
Thanks and Regards,
Shiva.
----------------------------------------------------------------------------
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311
<http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________>
&iu=/4140/ostg.clktrk_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
----------------------------------------------------------------------------
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311
<http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> &iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
--
Thanks and Regards,
Shiva.
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = GigUndi
FILE_GUID = 6987936E-ED34-44db-AE97-1FA5E4ED2116
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = InitializeGigUNDIDriver
[Sources]
inventorystrings.uni
inventory.vfr
BRAND.H
clp.h
clp.c
ComponentName.c
Decode.c
DriverConfiguration.c
DriverDiagnostics.c
e1000.h
e1000.c
e1000_80003es2lan.h
e1000_80003es2lan.c
e1000_82571.h
e1000_82571.c
e1000_82575.h
e1000_82575.c
e1000_api.h
e1000_api.c
e1000_defines.h
e1000_hw.h
e1000_ich8lan.h
e1000_ich8lan.c
e1000_mac.h
e1000_mac.c
e1000_manage.h
e1000_manage.c
e1000_nvm.h
e1000_nvm.c
e1000_osdep.h
e1000_osdep.c
e1000_phy.h
e1000_phy.c
e1000_regs.h
FirmwareManagement.h
FirmwareManagement.c
hii.h
hii.c
ieee_define.h
INIT.C
NVDataStruc.h
startstop.h
startstop.c
vlan.h
vlan.c
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]
[Depex]
TRUE
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel