New: Kernel 3.10.108 fail to build in Buildroot 2022.08-rc1
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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]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 linuxAfter 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
endefLINUX_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!
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14971] Kernel 3.10.108 fail to build in Buildroot 2022.08-rc1
https://bugs.busybox.net/show_bug.cgi?id=14971
Peter Korsgaard <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED--- Comment #1 from Peter Korsgaard <[email protected]> --- Fixed (by yourself) by
https://gitlab.com/buildroot.org/buildroot/-/commit/e75f3962084045cf50f38f0adf8bfaa8da71dfd5,
thanks!
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot