* [PATCH]: Add EFI conditional
@ 2013-01-26 19:42 Francesco Lavra
2013-01-27 15:20 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 3+ messages in thread
From: Francesco Lavra @ 2013-01-26 19:42 UTC (permalink / raw)
To: grub-devel
This patch adds the automake conditional COND_efi, which is true for
every configuration using the EFI platform. This conditional is used in
grub-core/Makefile.am to remove some duplicated entries in
KERNEL_HEADER_FILES.
As the EFI platform is expected to be used in more architectures (work
is in progress to port GRUB to ARM using EFI), this patch will allow
not to have even more duplicated code in the future.
2013-01-26 Francesco Lavra <francescolavra.fl@gmail.com>
* configure.ac (COND_efi): New condition.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add EFI files under
COND_efi and remove duplicated entries.
=== modified file 'configure.ac'
--- configure.ac 2013-01-12 13:30:37 +0000
+++ configure.ac 2013-01-26 19:33:43 +0000
@@ -1132,6 +1132,7 @@
#
AM_CONDITIONAL([COND_emu], [test x$platform = xemu])
+AM_CONDITIONAL([COND_efi], [test x$platform = xefi])
AM_CONDITIONAL([COND_i386_pc], [test x$target_cpu = xi386 -a x$platform = xpc])
AM_CONDITIONAL([COND_i386_efi], [test x$target_cpu = xi386 -a x$platform = xefi])
AM_CONDITIONAL([COND_ia64_efi], [test x$target_cpu = xia64 -a x$platform = xefi])
=== modified file 'grub-core/Makefile.am'
--- grub-core/Makefile.am 2012-10-12 13:04:02 +0000
+++ grub-core/Makefile.am 2013-01-26 19:38:28 +0000
@@ -102,8 +102,6 @@
endif
if COND_i386_efi
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
endif
@@ -132,17 +130,10 @@
endif
if COND_x86_64_efi
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
endif
-if COND_ia64_efi
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
-endif
-
if COND_mips
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/kernel.h
endif
@@ -225,6 +216,11 @@
endif
endif
+if COND_efi
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
+endif
+
symlist.h: $(top_builddir)/config.h $(KERNEL_HEADER_FILES)
@list='$^'; \
for p in $$list; do \
--
Francesco Lavra
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]: Add EFI conditional
2013-01-26 19:42 [PATCH]: Add EFI conditional Francesco Lavra
@ 2013-01-27 15:20 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-27 16:41 ` Francesco Lavra
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-01-27 15:20 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
On 26.01.2013 20:42, Francesco Lavra wrote:
> This patch adds the automake conditional COND_efi, which is true for
> every configuration using the EFI platform. This conditional is used in
> grub-core/Makefile.am to remove some duplicated entries in
> KERNEL_HEADER_FILES.
> As the EFI platform is expected to be used in more architectures (work
> is in progress to port GRUB to ARM using EFI), this patch will allow
> not to have even more duplicated code in the future.
>
ARM U-Boot port should be a priority, not EFI flavours.
And this patch just moves the problem around. Rather than having to keep
different clauses in Makefile.am in sync you have to keep gentpl.py and
configure.ac in sync. Doesn't seem to be worth it.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]: Add EFI conditional
2013-01-27 15:20 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-01-27 16:41 ` Francesco Lavra
0 siblings, 0 replies; 3+ messages in thread
From: Francesco Lavra @ 2013-01-27 16:41 UTC (permalink / raw)
To: grub-devel
Hi,
On 01/27/2013 04:20 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 26.01.2013 20:42, Francesco Lavra wrote:
>
>> This patch adds the automake conditional COND_efi, which is true for
>> every configuration using the EFI platform. This conditional is used in
>> grub-core/Makefile.am to remove some duplicated entries in
>> KERNEL_HEADER_FILES.
>> As the EFI platform is expected to be used in more architectures (work
>> is in progress to port GRUB to ARM using EFI), this patch will allow
>> not to have even more duplicated code in the future.
>>
>
> ARM U-Boot port should be a priority, not EFI flavours.
> And this patch just moves the problem around. Rather than having to keep
> different clauses in Makefile.am in sync you have to keep gentpl.py and
> configure.ac in sync. Doesn't seem to be worth it.
Well, this patch adds to configure.ac what is already there in gentpl.py
(the "efi" group). Group definitions are already used throughout
Makefile.core.def to conditionally enable modules and source files, and
any new configuration using EFI would already need to be added to the
efi group.
In our specific case, if a configuration belongs to a efi group, this
enables compilation in the kernel of, among others, disk/efi/efidisk.c
and kern/efi/efi.c, which define the global symbols exported by the
kernel headers. It just seems easier and more intuitive to add the
respective header files in Makefile.am under the same logical condition
which enables source file compilation in Makefile.core.def.
This patch would avoid having to re-declare the kernel header files for
any new configurations using EFI, and wouldn't require any additional
boilerplate elsewhere.
Anyway, if you don't feel like it's worth the trouble, no problem for
me, I won't insist any further :)
Regards,
Francesco
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-27 16:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-26 19:42 [PATCH]: Add EFI conditional Francesco Lavra
2013-01-27 15:20 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-27 16:41 ` Francesco Lavra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.