Message ID | 20170816173935.2361-1-andrewpilloud@igneoussystems.com |
---|---|
State | Rejected |
Headers | show |
Hello, On Wed, 16 Aug 2017 10:39:35 -0700, Andrew Pilloud wrote: > /usr/lib/grub may contain binaries for the grub bootloader. These > ELF binaries may be for other platforms. > > Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com> I've built both grub and grub2, and I don't get anything installed in /usr/lib/grub. Could you give more details on how you get binaries installed in /usr/lib/grub ? Thanks! Thomas
On 08/16/2017 02:27 PM, Thomas Petazzoni wrote: > Hello, > > On Wed, 16 Aug 2017 10:39:35 -0700, Andrew Pilloud wrote: >> /usr/lib/grub may contain binaries for the grub bootloader. These >> ELF binaries may be for other platforms. >> >> Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com> > I've built both grub and grub2, and I don't get anything installed > in /usr/lib/grub. Could you give more details on how you get binaries > installed in /usr/lib/grub ? > > Thanks! > > Thomas The grub2 package that ships with buildroot does not install the grub2 tools or modules in the target. I have a version of the grub2 package that does install the tools and modules in the target in my EXTERNAL tree. (I could submit a patch to make that an option on the grub2 package that ships with buildroot.) As best as I can tell, there is no way for a package to request specific files or folders be exempt from this check. There also doesn't appear to be a way to disable the test. Suggestions? Andrew
Hello, On Wed, 16 Aug 2017 14:42:04 -0700, Andrew Pilloud wrote: > The grub2 package that ships with buildroot does not install the grub2 > tools or modules in the target. I have a version of the grub2 package > that does install the tools and modules in the target in my EXTERNAL > tree. OK. Why would the grub2 tools be built for a different architecture than the target architecture ? I do understand that grub2 modules can be built 32-bit, while the target is 64-bit. But the grub2 tools ? > (I could submit a patch to make that an option on the grub2 > package that ships with buildroot.) As best as I can tell, there is no > way for a package to request specific files or folders be exempt from > this check. There also doesn't appear to be a way to disable the test. For your information, Erico Nunes has submitted a patch series on grub2, which includes adding a grub2-tools package, that allows installing the grub2 tools to the target. See: Subject: [Buildroot] [PATCH v2 2/8] grub2-tools: new package Date: Wed, 26 Apr 2017 23:39:47 +0200 in the mailing list archives. It hasn't been merged yet, as some comments were made, but it's definitely something we want to merge ultimately. Regarding the ability for a package to specify some folders to be excluded from the architecture check, we indeed did not implement such a thing because there was no real need so far. What you're bringing is really the first package-specific exclusion, so I think we would still prefer to handle it in check-bin-arch for now rather than adding a more involved mechanism. However, I'm not a big fan of adding such a exclusion in check-bin-arch if there is no package in Buildroot that installs stuff in /usr/lib/grub that makes the exclusion needed. Could you work with Erico Nunes, and get your grub2 patches upstream? Adding the exclusion to check-bin-arch would then of course be part of such a patch series, and would be accepted with no problem. Thanks! Thomas
diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch index b822cdd60d..2bb9d0a6b9 100755 --- a/support/scripts/check-bin-arch +++ b/support/scripts/check-bin-arch @@ -36,6 +36,12 @@ while read f; do continue fi + # Skip files in /usr/lib/grub, grub legitimately installs ELF + # binaries that are not for the target architecture + if [[ "${f}" =~ ^/usr/lib/grub/.* ]]; then + continue + fi + # Get architecture using readelf. We pipe through 'head -1' so # that when the file is a static library (.a), we only take # into account the architecture of the first object file.
/usr/lib/grub may contain binaries for the grub bootloader. These ELF binaries may be for other platforms. Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com> --- support/scripts/check-bin-arch | 6 ++++++ 1 file changed, 6 insertions(+)