public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Question: module compilation failure with less number of files
@ 2021-01-28 12:17 Abhishek Shah
  2021-01-28 18:16 ` Abhishek Shah
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Shah @ 2021-01-28 12:17 UTC (permalink / raw)
  To: devel; +Cc: Vladimir Olovyannikov


[-- Attachment #1.1: Type: text/plain, Size: 2159 bytes --]

Hi All,

I am trying to compile some ACPI tables, and I observed that
if I specify less minimal tables/asl as Sources for ACPI tables module INF
file
(resulting in less size of overall module), compilation fails with below
error:

build.py...
 : error F003: Output file for RAW section could not be found for
Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

To reproduce this issue,
1) Apply below patch (just keeping Fadt.c here as example;
Other ways: just keep ASL file after removing some objects to reduce file
size; or keep combination of .c and .asl files - **as long as these files
are small**):
--------------------------------------------------------------------------------
diff --git a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
index f140febc4a..1a489a0a8a 100644
--- a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
+++ b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
@@ -16,13 +16,8 @@
   VERSION_STRING                 = 1.0

 [Sources]
-  Dsdt.asl
-  Dbg2.aslc
-  Spcr.aslc
   Fadt.aslc
-  Gtdt.aslc
   Madt.aslc
-  AcpiSsdtRootPci.asl          # Juno R1 specific

 [Packages]
   ArmPkg/ArmPkg.dec
--------------------------------------------------------------------------------

2) Now compile the module:
export PACKAGES_PATH=`pwd`/edk2-platforms/
--------------------------------------------------------------------------------
build   -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc -m
Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

Processing meta-data .
Architecture(s)  = AARCH64
Build target     = DEBUG
Toolchain        = GCC5

Active Platform          =
/projects/uefi/edk2-platforms/Platform/ARM/JunoPkg/ArmJuno.dsc
Active Module            =
/projects/uefi/edk2-platforms/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
...

build.py...
 : error F003: Output file for RAW section could not be found for
Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

- Failed -
Build end time: 17:44:14, Jan.28 2021
Build total time: 00:00:04
--------------------------------------------------------------------------------

Can anyone help understand this behavior?

Regards,
Abhishek

[-- Attachment #1.2: Type: text/html, Size: 2701 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4181 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Question: module compilation failure with less number of files
  2021-01-28 12:17 Question: module compilation failure with less number of files Abhishek Shah
@ 2021-01-28 18:16 ` Abhishek Shah
  2021-01-28 18:29   ` [edk2-devel] " Michael D Kinney
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Shah @ 2021-01-28 18:16 UTC (permalink / raw)
  To: devel; +Cc: Vladimir Olovyannikov


[-- Attachment #1.1: Type: text/plain, Size: 2933 bytes --]

I got an answer based on the other question I had posted.
I think "Rule" provided for given inf (using RuleOverride) forces certain
files to be present:

[Rule.Common.USER_DEFINED.ACPITABLE]
  FILE FREEFORM = $(NAMED_GUID) {
    RAW ACPI               |.acpi
    RAW ASL                |.aml
  }

So, in this case, for given inf module, if either of .acpi or .aml file is
not generated,
then below kind of error shows up:

: error F003: Output file for RAW section could not be found for
Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

Regards,
Abhishek

On Thu, Jan 28, 2021 at 5:47 PM Abhishek Shah <abhishek.shah@broadcom.com>
wrote:

> Hi All,
>
> I am trying to compile some ACPI tables, and I observed that
> if I specify less minimal tables/asl as Sources for ACPI tables module INF
> file
> (resulting in less size of overall module), compilation fails with below
> error:
>
> build.py...
>  : error F003: Output file for RAW section could not be found for
> Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
>
> To reproduce this issue,
> 1) Apply below patch (just keeping Fadt.c here as example;
> Other ways: just keep ASL file after removing some objects to reduce file
> size; or keep combination of .c and .asl files - **as long as these files
> are small**):
>
> --------------------------------------------------------------------------------
> diff --git a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
> b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
> index f140febc4a..1a489a0a8a 100644
> --- a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
> +++ b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
> @@ -16,13 +16,8 @@
>    VERSION_STRING                 = 1.0
>
>  [Sources]
> -  Dsdt.asl
> -  Dbg2.aslc
> -  Spcr.aslc
>    Fadt.aslc
> -  Gtdt.aslc
>    Madt.aslc
> -  AcpiSsdtRootPci.asl          # Juno R1 specific
>
>  [Packages]
>    ArmPkg/ArmPkg.dec
>
> --------------------------------------------------------------------------------
>
> 2) Now compile the module:
> export PACKAGES_PATH=`pwd`/edk2-platforms/
>
> --------------------------------------------------------------------------------
> build   -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc -m
> Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
>
> Processing meta-data .
> Architecture(s)  = AARCH64
> Build target     = DEBUG
> Toolchain        = GCC5
>
> Active Platform          =
> /projects/uefi/edk2-platforms/Platform/ARM/JunoPkg/ArmJuno.dsc
> Active Module            =
> /projects/uefi/edk2-platforms/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
> ...
>
> build.py...
>  : error F003: Output file for RAW section could not be found for
> Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
>
> - Failed -
> Build end time: 17:44:14, Jan.28 2021
> Build total time: 00:00:04
>
> --------------------------------------------------------------------------------
>
> Can anyone help understand this behavior?
>
> Regards,
> Abhishek
>

[-- Attachment #1.2: Type: text/html, Size: 3808 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] Question: module compilation failure with less number of files
  2021-01-28 18:16 ` Abhishek Shah
@ 2021-01-28 18:29   ` Michael D Kinney
  2021-01-28 18:40     ` Abhishek Shah
  0 siblings, 1 reply; 4+ messages in thread
From: Michael D Kinney @ 2021-01-28 18:29 UTC (permalink / raw)
  To: devel@edk2.groups.io, abhishek.shah@broadcom.com,
	Kinney, Michael D
  Cc: Vladimir Olovyannikov

[-- Attachment #1: Type: text/plain, Size: 3515 bytes --]

The rules do support an “Optional” keyword.  Does this rule format work before and after your INF change?

[Rule.Common.USER_DEFINED.ACPITABLE]
  FILE FREEFORM = $(NAMED_GUID) {
    RAW ACPI Optional               |.acpi
    RAW ASL Optional                |.aml
  }

Mike

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abhishek Shah via groups.io
Sent: Thursday, January 28, 2021 10:17 AM
To: devel@edk2.groups.io
Cc: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Subject: Re: [edk2-devel] Question: module compilation failure with less number of files

I got an answer based on the other question I had posted.
I think "Rule" provided for given inf (using RuleOverride) forces certain files to be present:

[Rule.Common.USER_DEFINED.ACPITABLE]
  FILE FREEFORM = $(NAMED_GUID) {
    RAW ACPI               |.acpi
    RAW ASL                |.aml
  }

So, in this case, for given inf module, if either of .acpi or .aml file is not generated,
then below kind of error shows up:

: error F003: Output file for RAW section could not be found for Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

Regards,
Abhishek

On Thu, Jan 28, 2021 at 5:47 PM Abhishek Shah <abhishek.shah@broadcom.com<mailto:abhishek.shah@broadcom.com>> wrote:
Hi All,

I am trying to compile some ACPI tables, and I observed that
if I specify less minimal tables/asl as Sources for ACPI tables module INF file
(resulting in less size of overall module), compilation fails with below error:

build.py...
 : error F003: Output file for RAW section could not be found for Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

To reproduce this issue,
1) Apply below patch (just keeping Fadt.c here as example;
Other ways: just keep ASL file after removing some objects to reduce file size; or keep combination of .c and .asl files - **as long as these files are small**):
--------------------------------------------------------------------------------
diff --git a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
index f140febc4a..1a489a0a8a 100644
--- a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
+++ b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
@@ -16,13 +16,8 @@
   VERSION_STRING                 = 1.0

 [Sources]
-  Dsdt.asl
-  Dbg2.aslc
-  Spcr.aslc
   Fadt.aslc
-  Gtdt.aslc
   Madt.aslc
-  AcpiSsdtRootPci.asl          # Juno R1 specific

 [Packages]
   ArmPkg/ArmPkg.dec
--------------------------------------------------------------------------------

2) Now compile the module:
export PACKAGES_PATH=`pwd`/edk2-platforms/
--------------------------------------------------------------------------------
build   -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc -m Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

Processing meta-data .
Architecture(s)  = AARCH64
Build target     = DEBUG
Toolchain        = GCC5

Active Platform          = /projects/uefi/edk2-platforms/Platform/ARM/JunoPkg/ArmJuno.dsc
Active Module            = /projects/uefi/edk2-platforms/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
...

build.py...
 : error F003: Output file for RAW section could not be found for Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf

- Failed -
Build end time: 17:44:14, Jan.28 2021
Build total time: 00:00:04
--------------------------------------------------------------------------------

Can anyone help understand this behavior?

Regards,
Abhishek


[-- Attachment #2: Type: text/html, Size: 46716 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] Question: module compilation failure with less number of files
  2021-01-28 18:29   ` [edk2-devel] " Michael D Kinney
@ 2021-01-28 18:40     ` Abhishek Shah
  0 siblings, 0 replies; 4+ messages in thread
From: Abhishek Shah @ 2021-01-28 18:40 UTC (permalink / raw)
  To: Michael D Kinney, devel

[-- Attachment #1: Type: text/plain, Size: 112 bytes --]

Yes, given rule format with “Optional” keyword works before and after my INF change.

Regards,
Abhishek

[-- Attachment #2: Type: text/html, Size: 132 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-28 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-28 12:17 Question: module compilation failure with less number of files Abhishek Shah
2021-01-28 18:16 ` Abhishek Shah
2021-01-28 18:29   ` [edk2-devel] " Michael D Kinney
2021-01-28 18:40     ` Abhishek Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox