[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB

From: Patrick Steinhardt
Subject: Re: [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB
Date: Sun, 15 Mar 2020 15:01:05 +0100

On Fri, Mar 13, 2020 at 02:59:46PM +0100, Daniel Kiper wrote:
> Patrick, please make Argon2 functionality enabled/disabled by the
> ./configure. By default it have to be disabled. Additionally, please add
> to the grub-dev.texi an explanation what is the impact of enabling Argon2.

Is there any obvious way to conditionally build modules and libs into
the kernel based on a feature flag? The only way I see it to be doable
is by re-using groups as known by, so that I may do the

# Makefile.util.def

    library = {
      name = libgrubkern.a;
      cflags = '$(CFLAGS_GNULIB)';
      cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json';
      argon2_cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json 

      common = util/misc.c;
      common = grub-core/kern/command.c;
      common = grub-core/kern/device.c;

      argon2 = grub-core/lib/argon2/argon2.c;
      argon2 = grub-core/lib/argon2/core.c;
      argon2 = grub-core/lib/argon2/ref.c;
      argon2 = grub-core/lib/argon2/blake2/blake2b.c;

# grub-core/Makefile.core.def

    module = {
      name = argon2;
      common = lib/argon2/argon2.c;
      common = lib/argon2/core.c;
      common = lib/argon2/ref.c;
      common = lib/argon2/blake2/blake2b.c;
      enable = argon2;

    module = {
      name = luks2;
      common = disk/luks2.c;
      common = lib/gnulib/base64.c;
      cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
      cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json';
      argon2_cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) 
-I$(srcdir)/lib/json -I$(srcdir)/lib/argon2';

I don't think that is currently able to act based on configure
options, but only decides by build platforms. Please let me know I'm
missing the bigger picture here, and if there's any module that already
does that kind of stuff that'd be a great help.


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]