Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 14971] New: Kernel 3.10.108 fail to build in Buildroot 2022.08-rc1
Date: Thu, 18 Aug 2022 22:29:55 +0000	[thread overview]
Message-ID: <bug-14971-163@https.bugs.busybox.net/> (raw)

https://bugs.busybox.net/show_bug.cgi?id=14971

            Bug ID: 14971
           Summary: Kernel 3.10.108 fail to build in Buildroot 2022.08-rc1
           Product: buildroot
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: ju.o@free.fr
                CC: buildroot@uclibc.org, yann.morin.1998@free.fr
  Target Milestone: ---

Hi,

During a linux-backports update, it was found that kernel v3.10.108 was failing
to compile in buildroot 2022.08-rc1. See:
https://lists.buildroot.org/pipermail/buildroot/2022-August/649507.html

As reported by Yann, this was likely introduced by:
https://git.buildroot.org/buildroot/commit/?id=9b41b54be07711c10ad13ce157be272ed1cf402e

The issue can be reproduced with:

    make qemu_aarch64_virt_defconfig
    utils/config \
      --set-str LINUX_KERNEL_CUSTOM_VERSION_VALUE 3.10.108 \
      -e PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10 \
      -d PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15
    make olddefconfig
    make linux

After some analysis, it appears that in 3.10.108, bison does not generate the
declaration 'YYLTYPE yylloc', which is also removed by the Buildroot commit
9b41b54b.  We end up with no declaration at all.  Those declaration are emitted
with the dtc-parser.y contains the '%locations' directive.

In the kernel, dtc was updated to v1.5.1-22-gc40aeb60b47a in:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0cec114e36606412908a35695a5db944cec2e3db

This commit is included in kernel v5.6.

This dtc update include the dtc commit:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=7150286225476345bd6e7312331e3baf4d621c32

which adds the '%locations' directive.

I'm able to workaround the failure by adding in linux/linux.mk:

define LINUX_ADD_DTC_LOCATIONS
  if test -e $(@D)/scripts/dtc/dtc-parser.y && \
      ! grep -Eq '^%locations$$' $(@D)/scripts/dtc/dtc-parser.y ; then \
    $(SED) '/^%{$$/i %locations' $(@D)/scripts/dtc/dtc-parser.y; \
  fi
endef
LINUX_POST_PATCH_HOOKS += LINUX_ADD_DTC_LOCATIONS

and add REGENERATE_PARSERS=1 into LINUX_MAKE_FLAGS. This basically adds the
missing directive, if not found.

Before sending a patch, I created this bug to log my findings and collect few
comments, if this is a good approach.  Any suggestions?

Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-08-18 22:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 22:29 bugzilla [this message]
2023-01-04 13:10 ` [Buildroot] [Bug 14971] Kernel 3.10.108 fail to build in Buildroot 2022.08-rc1 bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-14971-163@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@uclibc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox