* [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64)
@ 2021-04-20 9:35 Mikhail B. WproxyM
2021-04-26 20:56 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Mikhail B. WproxyM @ 2021-04-20 9:35 UTC (permalink / raw)
To: buildroot
We are using binutils-2.35.2+ (later then 2.29.1), grub-2.04,
cross-compiling on recent buildroot under i386/i686 and getting error:
> lib/i386/relocator64.S:66: Error: unknown pseudo-op: `.code64'
So, the working patch is attached. Please add it to buildroot.
Sources:
1) https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41982 (Jul 2020)
2)
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2018-January/051723.html
--
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210420/a08994a2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0150-grub-core-build-fixes-for-i386.patch
Type: text/x-patch
Size: 1722 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210420/a08994a2/attachment.bin>
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64) 2021-04-20 9:35 [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64) Mikhail B. WproxyM @ 2021-04-26 20:56 ` Thomas Petazzoni 2021-04-28 8:07 ` Mikhail B. WproxyM 0 siblings, 1 reply; 6+ messages in thread From: Thomas Petazzoni @ 2021-04-26 20:56 UTC (permalink / raw) To: buildroot Hello Mikhail, On Tue, 20 Apr 2021 12:35:16 +0300 "Mikhail B. WproxyM" <w.proxy.m@gmail.com> wrote: > We are using binutils-2.35.2+ (later then 2.29.1), grub-2.04, > cross-compiling on recent buildroot under i386/i686 and getting error: > > > lib/i386/relocator64.S:66: Error: unknown pseudo-op: `.code64' > > So, the working patch is attached. Please add it to buildroot. Do you have some details on the conditions to reproduce this issue? Indeed, I just tried to build grub2, with the following configuration: BR2_x86_core2=y BR2_TOOLCHAIN_EXTERNAL=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_I386_EFI=y So it's using a i686 target system, with a toolchain that uses binutils 2.34 (i.e later than the 2.29 you're pointing). And it builds fine, including relocator64.S, which gets built as part of the build process. Note: I am building *from* an x86-64 system. But how can that matter, as relocator64.S is built using the cross-compiler? Also, why isn't this patch in upstream Grub ? Thanks a lot for the additional details you could provide. Best regards, Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64) 2021-04-26 20:56 ` Thomas Petazzoni @ 2021-04-28 8:07 ` Mikhail B. WproxyM 2021-04-28 11:44 ` Thomas Petazzoni 0 siblings, 1 reply; 6+ messages in thread From: Mikhail B. WproxyM @ 2021-04-28 8:07 UTC (permalink / raw) To: buildroot Hello, Thomas. I have the build error, when building *from i686* to i686. You do not have the build error, when building *from x86-64* to i686. Looks like it is the reason. Grub2 developers do not run build tests under i386/i686. Even you do not run build tests under i686. P.S.: Common build platform for most developers is x86-64, so I am not surprised. It is too simple to lose compatibility by using too many levels of assumptions, facades and abstractions. -- Best regards -- Best regards, Mikhail B. ??, 26 ???. 2021 ?. ? 23:56, Thomas Petazzoni <thomas.petazzoni@bootlin.com>: > > Hello Mikhail, > > On Tue, 20 Apr 2021 12:35:16 +0300 > "Mikhail B. WproxyM" <w.proxy.m@gmail.com> wrote: > > > We are using binutils-2.35.2+ (later then 2.29.1), grub-2.04, > > cross-compiling on recent buildroot under i386/i686 and getting error: > > > > > lib/i386/relocator64.S:66: Error: unknown pseudo-op: `.code64' > > > > So, the working patch is attached. Please add it to buildroot. > > Do you have some details on the conditions to reproduce this issue? > Indeed, I just tried to build grub2, with the following configuration: > > BR2_x86_core2=y > BR2_TOOLCHAIN_EXTERNAL=y > BR2_INIT_NONE=y > BR2_SYSTEM_BIN_SH_NONE=y > # BR2_PACKAGE_BUSYBOX is not set > # BR2_TARGET_ROOTFS_TAR is not set > BR2_TARGET_GRUB2=y > BR2_TARGET_GRUB2_I386_EFI=y > > So it's using a i686 target system, with a toolchain that uses binutils > 2.34 (i.e later than the 2.29 you're pointing). And it builds fine, > including relocator64.S, which gets built as part of the build process. > > Note: I am building *from* an x86-64 system. But how can that matter, > as relocator64.S is built using the cross-compiler? > > Also, why isn't this patch in upstream Grub ? > > Thanks a lot for the additional details you could provide. > > Best regards, > > Thomas > -- > Thomas Petazzoni, co-owner and CEO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64) 2021-04-28 8:07 ` Mikhail B. WproxyM @ 2021-04-28 11:44 ` Thomas Petazzoni 2021-04-28 13:23 ` Mikhail B. WproxyM 0 siblings, 1 reply; 6+ messages in thread From: Thomas Petazzoni @ 2021-04-28 11:44 UTC (permalink / raw) To: buildroot Hello Mikhail, On Wed, 28 Apr 2021 11:07:13 +0300 "Mikhail B. WproxyM" <w.proxy.m@gmail.com> wrote: > I have the build error, when building *from i686* to i686. > > You do not have the build error, when building *from x86-64* to i686. > Looks like it is the reason. > > Grub2 developers do not run build tests under i386/i686. Even you do > not run build tests under i686. I was worried the issue would be related from the difference of the build machine architecture. In theory it shouldn't matter, as the file being built is built with the cross-compiler, but it seems like there is an actual difference. What about having this patch submitted to upstream Grub ? Best regards, Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64) 2021-04-28 11:44 ` Thomas Petazzoni @ 2021-04-28 13:23 ` Mikhail B. WproxyM 2021-05-13 7:19 ` Mikhail B. WproxyM 0 siblings, 1 reply; 6+ messages in thread From: Mikhail B. WproxyM @ 2021-04-28 13:23 UTC (permalink / raw) To: buildroot >What about having this patch submitted to upstream Grub ? Idea is nice, but I am not sure that it will work. The patch was already ignored some time before by grub2 developers, because it is not included in upstream. I will try. -- Best regards, Mikhail B. ??, 28 ???. 2021 ?. ? 14:44, Thomas Petazzoni <thomas.petazzoni@bootlin.com>: > > Hello Mikhail, > > On Wed, 28 Apr 2021 11:07:13 +0300 > "Mikhail B. WproxyM" <w.proxy.m@gmail.com> wrote: > > > I have the build error, when building *from i686* to i686. > > > > You do not have the build error, when building *from x86-64* to i686. > > Looks like it is the reason. > > > > Grub2 developers do not run build tests under i386/i686. Even you do > > not run build tests under i686. > > I was worried the issue would be related from the difference of the > build machine architecture. In theory it shouldn't matter, as the file > being built is built with the cross-compiler, but it seems like there > is an actual difference. > > What about having this patch submitted to upstream Grub ? > > Best regards, > > Thomas > -- > Thomas Petazzoni, co-owner and CEO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64) 2021-04-28 13:23 ` Mikhail B. WproxyM @ 2021-05-13 7:19 ` Mikhail B. WproxyM 0 siblings, 0 replies; 6+ messages in thread From: Mikhail B. WproxyM @ 2021-05-13 7:19 UTC (permalink / raw) To: buildroot As expected, they do not want to include fix patch, because "The GRUB 2.04 release is a few years old." -- Best regards, Mikhail B. ??, 28 ???. 2021 ?. ? 16:23, Mikhail B. WproxyM <w.proxy.m@gmail.com>: > >What about having this patch submitted to upstream Grub ? > > Idea is nice, but I am not sure that it will work. > The patch was already ignored some time before by grub2 developers, > because it is not included in upstream. I will try. > > -- > Best regards, Mikhail B. > > ??, 28 ???. 2021 ?. ? 14:44, Thomas Petazzoni < > thomas.petazzoni at bootlin.com>: > > > > Hello Mikhail, > > > > On Wed, 28 Apr 2021 11:07:13 +0300 > > "Mikhail B. WproxyM" <w.proxy.m@gmail.com> wrote: > > > > > I have the build error, when building *from i686* to i686. > > > > > > You do not have the build error, when building *from x86-64* to i686. > > > Looks like it is the reason. > > > > > > Grub2 developers do not run build tests under i386/i686. Even you do > > > not run build tests under i686. > > > > I was worried the issue would be related from the difference of the > > build machine architecture. In theory it shouldn't matter, as the file > > being built is built with the cross-compiler, but it seems like there > > is an actual difference. > > > > What about having this patch submitted to upstream Grub ? > > > > Best regards, > > > > Thomas > > -- > > Thomas Petazzoni, co-owner and CEO, Bootlin > > Embedded Linux and Kernel engineering > > https://bootlin.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210513/0e749c49/attachment.html> ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-13 7:19 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-04-20 9:35 [Buildroot] boot/grub2: grub-core-build-fixes-for-i386 (grub-2.04 + binutils-2.35.2 + pseudo-op .code64) Mikhail B. WproxyM 2021-04-26 20:56 ` Thomas Petazzoni 2021-04-28 8:07 ` Mikhail B. WproxyM 2021-04-28 11:44 ` Thomas Petazzoni 2021-04-28 13:23 ` Mikhail B. WproxyM 2021-05-13 7:19 ` Mikhail B. WproxyM
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox