* [Buildroot] [PATCH 1/1] support/script/check-bin-arch: ignore /usr/lib/grub
@ 2017-08-16 17:39 Andrew Pilloud
2017-08-16 21:27 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Pilloud @ 2017-08-16 17:39 UTC (permalink / raw)
To: buildroot
/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(+)
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.
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] support/script/check-bin-arch: ignore /usr/lib/grub
2017-08-16 17:39 [Buildroot] [PATCH 1/1] support/script/check-bin-arch: ignore /usr/lib/grub Andrew Pilloud
@ 2017-08-16 21:27 ` Thomas Petazzoni
2017-08-16 21:42 ` Andrew Pilloud
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-08-16 21:27 UTC (permalink / raw)
To: buildroot
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] support/script/check-bin-arch: ignore /usr/lib/grub
2017-08-16 21:27 ` Thomas Petazzoni
@ 2017-08-16 21:42 ` Andrew Pilloud
2017-08-16 21:55 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Pilloud @ 2017-08-16 21:42 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] support/script/check-bin-arch: ignore /usr/lib/grub
2017-08-16 21:42 ` Andrew Pilloud
@ 2017-08-16 21:55 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-08-16 21:55 UTC (permalink / raw)
To: buildroot
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-16 21:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 17:39 [Buildroot] [PATCH 1/1] support/script/check-bin-arch: ignore /usr/lib/grub Andrew Pilloud
2017-08-16 21:27 ` Thomas Petazzoni
2017-08-16 21:42 ` Andrew Pilloud
2017-08-16 21:55 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox