From: "PierreGondois" <pierre.gondois@arm.com>
To: "Feng, Bob C" <bob.c.feng@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>,
Sami Mujawar <Sami.Mujawar@arm.com>, nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Build ASL files before C files
Date: Wed, 18 Dec 2019 10:43:23 +0000 [thread overview]
Message-ID: <AM6PR08MB3112B449D027BE74449D6B548B530@AM6PR08MB3112.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D161583C23@SHSMSX104.ccr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 4439 bytes --]
Hello Bob,
Please find my answers inline.
I created a Bugzilla ticket here: https://bugzilla.tianocore.org/show_bug.cgi?id=2425
I have started to look at the implementation,
Regards,
Pierre
From: Feng, Bob C <bob.c.feng@intel.com>
Sent: 17 December 2019 11:42
To: Pierre Gondois <Pierre.Gondois@arm.com>; devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>
Subject: RE: [edk2-devel] [PATCH v1 1/1] BaseTools: Build ASL files before C files
Hi Pierre,
I add comments inline
Thanks,
Bob
From: PierreGondois [mailto:pierre.gondois@arm.com]
Sent: Monday, December 16, 2019 8:34 AM
To: Feng, Bob C <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Build ASL files before C files
Hello Bob,
> I think if we can describe the dependency between source files in INF file. For example,
> [Sources.IA32]
> asl_source.asl
> c_source.c | asl_source.asl
This looks good to me! Would it be possible to have multiple dependencies on one file (1), or would it be limited to one file only (2)?
Maybe having multiple dependencies like in (1) would make it easier to read:
[Bob] I think we need to support multiple files, but we need to use other character as separator.
[Pierre]
I agree. I suggest to use a colon ':' as in Makefiles. We can aslo use '<' or '>' depending on the interpretation. I don't really mind.
It is currently possible to add options when adding a source file in the ‘[Source]’ section: Famliy | TagName | CommandCode | FeatureFlagExpress
Maybe the additional dependencies should be at the end, such as:
FileName | Famliy | TagName | CommandCode | FeatureFlagExpress : dependency_1 : dependency_2 : dependency_3
Example (1):
[Sources.IA32]
asl_source_1.asl
asl_source_2.asl
c_source.c | asl_source_1.asl | asl_source_2.asl
Example (2):
[Sources.IA32]
asl_source_1.asl
asl_source_2.asl | asl_source_1.asl
c_source.c | asl_source_2
> The build tool will generate the dependency that says c_source.c depend on the output of asl_source.asl in Makefile?
> What do you think?
Would there be a rule in the Makefile on c_source.c or on c_source.obj? And how can we describe a dependency on the output of asl_source.asl?
What I thought was that the resulting Makefile dependencies would look like this:
(a) c_source.obj: asl_source.aml
The dependencies between the source files would be converted to Makefile dependencies between their corresponding output format (cf edk2/BaseTools/Conf/build_rule.template).
E.g.: a dependency on a '.dts' file would be converted to a dependency on a '.dtb' file.
Dependencies on file extensions without output format would trigger an error.
E.g.: no dependency on '.h' would be allowed.
The issue with what I am suggesting is that in my case, I am compiling a '.asl' file into a '.hex' file using the iASL compiler with the '-tc' option. This '.hex' file is included in a '.c' file. This means that the dependency is actually between the output of the compiled '.asl' file (so the '.hex' file), and the '.c' file.
I.e.: the 'true' dependency is
(b) c_source.c: asl_source.hex
However, making edk2 know that the asl_source.asl will produce asl_source.hex will lead to modification to the Conf/build_rule.txt, wich is not a good idea neither I believe.
Having (a) instead of (b) should be simpler to obtain, even though less correct.
I don't know what you think about what format should have/
* the target of the Makefile rule (c_source.c or c_source.obj?)
* the prerequisites of the Makefile rule (asl_source.?)
I think we may modify the build rule of .asl file to have the build tool always generate both *.aml and *.hex files for asl type source file. And in Makefile we just use c_source.obj: asl_source.aml format. What do you think?
[Pierre]
* About modifying the build rule for ‘.asl’ files in order to generate a ‘.hex’ by default:
The ‘.hex’ file is exactly what I want to generate, so I am totally ok with it. It might just be pollution for other people who don’t need it.
* About having a Makefile rule looking like: “c_source.obj: asl_source.aml”:
I am also ok with it.
> Would you submit a BZ to track this issue?
Yes, I will do it at the beginning of the week.
Please tell me what do you think,
Regards,
Pierre
[-- Attachment #2: Type: text/html, Size: 20694 bytes --]
next prev parent reply other threads:[~2019-12-18 10:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 13:50 [PATCH v1 1/1] BaseTools: Build ASL files before C files PierreGondois
2019-10-30 13:52 ` [edk2-devel] " PierreGondois
2019-10-31 0:41 ` Liming Gao
2019-10-31 11:12 ` PierreGondois
2019-11-04 7:49 ` Bob Feng
2019-11-04 10:32 ` PierreGondois
2019-11-12 13:33 ` PierreGondois
2019-11-13 1:15 ` Liming Gao
2019-11-13 1:40 ` Bob Feng
2019-11-15 16:27 ` PierreGondois
2019-12-04 17:32 ` PierreGondois
2019-12-11 11:23 ` PierreGondois
2019-12-12 9:14 ` Bob Feng
2019-12-16 0:33 ` PierreGondois
2019-12-17 11:41 ` Bob Feng
2019-12-18 10:43 ` PierreGondois [this message]
2019-12-18 17:50 ` Ard Biesheuvel
2019-12-19 11:18 ` PierreGondois
2019-12-19 16:58 ` Ard Biesheuvel
2019-12-19 18:15 ` Sami Mujawar
2019-12-23 16:09 ` Ard Biesheuvel
2019-12-24 16:47 ` PierreGondois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM6PR08MB3112B449D027BE74449D6B548B530@AM6PR08MB3112.eurprd08.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox