3

This is in my Makefile.core.def: ... ... module = { name = mymod; common = net/mymod.c; }; ... ...

When I tried to build I get: mv syminfo.lst.new syminfo.lst cat syminfo.lst | sort | gawk -f /build/boot_project/src/grub/grub2/grub-core/genmoddep.awk > moddep.lst || (rm -f moddep.lst; exit 1) grub_efi_get_variable in mymod is not defined make[5]: *** [moddep.lst] Error 1

mymod.c has "#include <grub/efi/efi.h>" and tries to use "grub_efi_get_variable" function.  I see that in syminfo.lst
> more syminfo.lst
...
undefined mymod grub_efi_get_variable
...

Can someone shed a light on the error and how to fix?

Thanks,

P.S I edited Makefile.core.def and Makefile.core.am in /build/boot_project/src/grub/grub2/grub-core/ to include my module and ran autogen.sh in /build/boot_project/src/grub/ to regenerate Makefile.in, then I ran dmake in /build/boot_project/src/grub/

user2719735
  • 97
  • 2
  • 10
  • 1
    What platform are you building for, and how are you configuring it? – unixsmurf Oct 29 '14 at 09:29
  • I am using Solaris running on x86 system. I modified the grub2.core.def and grub2.core.am and build. I didn't run any additional configuration. – user2719735 Oct 29 '14 at 18:04
  • Are these the actual filenames? I don't even get any hits on google for those. How do you build it without any configuration? Where does the source code come from? Can you please edit the question and add the actual commands you run? – unixsmurf Oct 29 '14 at 18:34
  • Yes these are the actual filenames, the source is from the grub source tree (older tree). The newest source can be found at http://git.savannah.gnu.org/gitweb/?p=grub.git;a=tree;f=grub-core;h=306a4d835a84affe1abba14f1510af1316926daa;hb=HEAD. I added more info to my question. – user2719735 Oct 29 '14 at 18:42
  • That is _very_ old source code. Is there any reason you cannot use modern code? But given that, my guess would be that you are not building for EFI platform. Try running configure with --with-platform=efi. – unixsmurf Oct 29 '14 at 18:46
  • If you are not re-running configure, how does your module even end up being compiled? – unixsmurf Oct 30 '14 at 09:34
  • Configuration was ran with --with-platform=efi. Anyhow, I noticed Makefile.core.am has all platform enabled for module mymod. So I edited Makefile.core.def to: module = { name = mymod; common = net/mymod.c; enable = efi}; After re-running autogen.sh, only platform with efi were added to Makefile.core.am and the build works. – user2719735 Oct 31 '14 at 18:01

1 Answers1

1

Configuration was ran with --with-platform=efi. Anyhow, I noticed Makefile.core.am has all platform enabled for module mymod. So I edited Makefile.core.def to: module = { name = mymod; common = net/mymod.c; enable = efi}; After re-running autogen.sh, only platform with efi were added to Makefile.core.am and the build works.

user2719735
  • 97
  • 2
  • 10