> On Jul 15, 2015, at 2:55 AM, Laszlo Ersek <ler...@redhat.com> wrote:
>
> On 07/14/15 23:49, Andrew Fish wrote:
>>
>>> On Jul 14, 2015, at 2:21 PM, Laszlo Ersek <ler...@redhat.com
>>> <mailto:ler...@redhat.com>
>>> <mailto:ler...@redhat.com <mailto:ler...@redhat.com>>> wrote:
>>>
>>> On 07/14/15 20:31, S.Vieira wrote:
>>>> Hi everyone.
>>>>
>>>> It's possible to do upload of two drives just in ONE .efi
>>>>
>>>> I am wanting to do upload of the AtaAtapiPassThruDxe and AtaBusDxe
>>>> only in
>>>> ONE file.
>>>
>>> I think it should be possible to install any number of driver binding
>>> protocol instances in a single driver module, on the image handle.
>>> However, you'd have to merge the two drivers into one in C source code,
>>> and then build the resultant driver.
>>>
>>
>> You could also convert one of the drivers to a NULL library (change the
>> INF file), and add that new NULL library to the DSC statement for the
>> other driver.
>
> Independently of the thread starter question -- I've never quite gotten
> a clear image of NULL libraries. How do they work?
>
It is not really that complicated. It is just a way to force the build system
to call the libraries constructor/destructor.
If you add a NULL library to the LibraryClasses section of a DSC that that
library gets linked against all drivers. This is not common, but it is useful
for a library that produces compiler intrinsics.
If you list a NULL library in the <LibraryClasses> of a component section in
the DSC then that library gets added. A good example of this is it is a way to
add optional shell commands. The library constructor will call another library
function to register shell commands.
Normally you just get the libraries the driver/application depends on (listed
in the INF, mapped in the DSC), and the libraries the libraries depend on, etc.
Examples:
https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg/ShellPkg.dsc
<https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg/ShellPkg.dsc>
[LibraryClasses.ARM]
#
# It is not possible to prevent the ARM compiler for generic intrinsic
functions.
# This library provides the instrinsic functions generate by a given compiler.
# [LibraryClasses.ARM] and NULL mean link this library into all ARM images.
#
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
[Components]
...
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
!ifndef $(NO_SHELL_PROFILES)
NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
!ifdef $(INCLUDE_DP)
NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf
!endif #$(INCLUDE_DP)
!endif #$(NO_SHELL_PROFILES)
}
Thanks,
Andrew Fish
> Thanks
> Laszlo
>
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel