How can I add lua support to grub2, or at least file copy functionality?

0

I am trying to add lua support to grub2 and having a devil of a time finding info on how to do that.

The links provided in the answer to (String manipulation in Grub2) no longer have any lua extensions for grub2 (in fact I think only theme code is there, and very old at that).

I found info for elua but the download link it provided here (http://www.eluaproject.net/doc/v0.9/en_tut_bootpc.html) has no ELF binary.

I have downloaded the latest lua 5.3.3 and built it on Linux, but can't find how to create a grub2 .mod file for lua.

I found a really old grub ISO file that included lua support, but if I try to use the .mod files from it in a newer grub I get "license errors", even if I don't reference those modules.

I would greatly appreciate any references or pointers you may have to help me get this accomplished.

motech man

Posted 2016-06-12T04:37:07.157

Reputation: 51

Answers

0

I found the answer on how to do this:

1) Download the source for the latest version of grub2 from git:

  git clone git://git.sv.gnu.org/grub.git
  cd grub

2) Graft the "grub-extras" source code into the grub2 source tree:

  git clone git://git.sv.gnu.org/grub-extras.git

3) Edit autogen.sh to add grub-extras into the build by adding this:

  export GRUB_CONTRIB=/<absolute pathname to>/grub/grub-extras

4) Now build grub2 as you normally would:

  ./autogen.sh
  ./configure
  make
  make install

-- Thats it!

motech man

Posted 2016-06-12T04:37:07.157

Reputation: 51