Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] grub-efi-native: workaround for fedora 29
@ 2018-12-19  7:42 kai.kang
  2018-12-19  7:42 ` [PATCH 1/1] " kai.kang
  0 siblings, 1 reply; 4+ messages in thread
From: kai.kang @ 2018-12-19  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Steps:
1 docker pull fedora 29 image
2 run image with mount /tmp with tmpfs
$ docker run -it --mount type=tmpfs,destination=/tmp fedora:29 /bin/bash

3 check inode of /dev/null
$ stat -c %i /dev/null
6

and then create files under /tmp and make the biggest inode of files is 5.
$ stat -c %i `ls -t /tmp/* | head -1`
5

3 prepare and run
$ bitbake grub-efi-native -c configure

The following changes since commit fef47bd915f6a3960e512b5aba8b461b77a9ea78:

  linux-yocto-4.14: Drop bbappend (2018-12-18 16:20:10 +0000)

are available in the Git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/grub-efi-native-fedora29
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/grub-efi-native-fedora29

Kai Kang (1):
  grub-efi-native: workaround for fedora 29

 ...workaround-for-as-from-binutils-2.31.patch | 37 +++++++++++++++++++
 meta/recipes-bsp/grub/grub-efi_2.02.bb        |  2 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch

--
2.19.0.rc2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] grub-efi-native: workaround for fedora 29
  2018-12-19  7:42 [PATCH 0/1] grub-efi-native: workaround for fedora 29 kai.kang
@ 2018-12-19  7:42 ` kai.kang
  2018-12-19 10:43   ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: kai.kang @ 2018-12-19  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

grub-efi-native fails to run do_configure on Fedora 29 host:

| checking for options to compile assembly...
| Assembler messages:
| Fatal error: The input and output files must be distinct

because the host 'as' in binutils-3.31 breaks if using two filesystems.
See:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=2a50366

Work-around this issue by forcing the configure time assembler check to
use a temp file in the src dir.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 ...workaround-for-as-from-binutils-2.31.patch | 37 +++++++++++++++++++
 meta/recipes-bsp/grub/grub-efi_2.02.bb        |  2 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch

diff --git a/meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch b/meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch
new file mode 100644
index 0000000000..b01f17cf1a
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch
@@ -0,0 +1,37 @@
+When /dev and $srcdir are not in a same file system, it may trigger a flaw of
+binutils 2.31 and cause grub-efi-native configure error:
+
+| checking for options to compile assembly...
+| Assembler messages:
+| Fatal error: The input and output files must be distinct
+
+Replace /dev/null with a temporary file during assemble check to avoid such
+failure.
+
+Upstream-Status: Inappropriate [native]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/configure.ac b/configure.ac
+index 44a67a7..6eb28fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -696,8 +696,9 @@ if test x"$test_program" = x ; then
+   grub_cv_cc_target_asm_compile=
+ else
+   found=no
++  tmpfile="$(mktemp $srcdir/asm-tests/XXXXXX)"
+   for arg in "" "-no-integrated-as"; do
+-    cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S"
++    cmdline="$TARGET_CC -c -o $tmpfile $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S"
+     echo "Running $cmdline" >&AS_MESSAGE_LOG_FD
+     if $cmdline >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+       grub_cv_cc_target_asm_compile="$arg"
+@@ -705,6 +706,7 @@ else
+       break
+     fi
+   done
++  rm -f $tmpfile
+   if test x"$found" = xno ; then
+     AC_MSG_ERROR([could not compile assembly])
+   fi
diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index 14fce97ff0..fc91864421 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -9,6 +9,8 @@ SRC_URI += " \
            file://cfg \
           "
 
+SRC_URI_append_class-native = " file://workaround-for-as-from-binutils-2.31.patch"
+
 S = "${WORKDIR}/grub-${PV}"
 
 # Determine the target arch for the grub modules
-- 
2.19.0.rc2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] grub-efi-native: workaround for fedora 29
  2018-12-19  7:42 ` [PATCH 1/1] " kai.kang
@ 2018-12-19 10:43   ` Burton, Ross
  2018-12-20  1:14     ` Kang Kai
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2018-12-19 10:43 UTC (permalink / raw)
  To: Kang Kai; +Cc: OE-core

On Wed, 19 Dec 2018 at 07:43, <kai.kang@windriver.com> wrote:
> +Upstream-Status: Inappropriate [native]

If we're going to mark this as inappropriate then please make it clear
in the patch that its a workaround for a specific binutils and when
that stops being used we can remove it.  However isn't this a problem
when building grub on F29, even outside of Yocto?  If so then it's not
inappropriate, it's an upstream bug and they should have the fix.

Ross


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] grub-efi-native: workaround for fedora 29
  2018-12-19 10:43   ` Burton, Ross
@ 2018-12-20  1:14     ` Kang Kai
  0 siblings, 0 replies; 4+ messages in thread
From: Kang Kai @ 2018-12-20  1:14 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 2018/12/19 下午6:43, Burton, Ross wrote:
> On Wed, 19 Dec 2018 at 07:43, <kai.kang@windriver.com> wrote:
>> +Upstream-Status: Inappropriate [native]
> If we're going to mark this as inappropriate then please make it clear
> in the patch that its a workaround for a specific binutils and when
> that stops being used we can remove it.

binutils version has been addressed in the patch. I'll update with 
workaround info.


> However isn't this a problem
> when building grub on F29, even outside of Yocto?  If so then it's not
> inappropriate, it's an upstream bug and they should have the fix.


It is native build related, so grub is not affected that no grub-native 
is provided. I have created a defect on RedHat bugzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=1660279


Regards,
Kai


>
> Ross
>

-- 
Kai Kang



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-20  1:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-19  7:42 [PATCH 0/1] grub-efi-native: workaround for fedora 29 kai.kang
2018-12-19  7:42 ` [PATCH 1/1] " kai.kang
2018-12-19 10:43   ` Burton, Ross
2018-12-20  1:14     ` Kang Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox