diff mbox series

[1/1] configs/mx51evk: bump bsp components to fix build

Message ID 20240524190137.10761-1-ju.o@free.fr
State Superseded
Headers show
Series [1/1] configs/mx51evk: bump bsp components to fix build | expand

Commit Message

Julien Olivain May 24, 2024, 7:01 p.m. UTC
Since commit dc0f721 "package/gcc: switch to 13.x as default",
mx51evk_defconfig is failing to build in Kernel (see [1]),
with output:

    drivers/ata/libahci.c: In function 'ahci_led_store':
    ././include/linux/compiler_types.h:315:45: error: call to '__compiletime_assert_328' declared with attribute error: BUILD_BUG_ON failed: sizeof(_s) > sizeof(long)
      315 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
          |                                             ^

This commit fixes the issue by bumping the bsp components:
- u-boot to v2024.04
- kernel to v6.6.31

The Kernel DTS name is updated to reflect upstream reorganization.

The kernel commit fixing the build failure is [2], first included in
v6.2. There is many other gcc-13 fixes.

While bumping components, this commit also enables
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y, add the relevant archive hash files,
and removes the defconfig entry in ".checkpackageignore".

Fixes: [1]

[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/6918688967
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f07788079f515ca4a681c5f595bdad19cfbd7b1d

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Note: I did not tested the generated image on an actual board
(I don't have access to it).
---
 .checkpackageignore                                |  1 -
 .../patches/linux-headers/linux-headers.hash       |  1 +
 board/freescale/imx51evk/patches/linux/linux.hash  |  2 ++
 board/freescale/imx51evk/patches/uboot/uboot.hash  |  2 ++
 configs/mx51evk_defconfig                          | 14 +++++++++-----
 5 files changed, 14 insertions(+), 6 deletions(-)
 create mode 120000 board/freescale/imx51evk/patches/linux-headers/linux-headers.hash
 create mode 100644 board/freescale/imx51evk/patches/linux/linux.hash
 create mode 100644 board/freescale/imx51evk/patches/uboot/uboot.hash

Comments

Peter Korsgaard May 24, 2024, 9:12 p.m. UTC | #1
>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:

 > Since commit dc0f721 "package/gcc: switch to 13.x as default",
 > mx51evk_defconfig is failing to build in Kernel (see [1]),
 > with output:

 >     drivers/ata/libahci.c: In function 'ahci_led_store':
 >     ././include/linux/compiler_types.h:315:45: error: call to '__compiletime_assert_328' declared with attribute error: BUILD_BUG_ON failed: sizeof(_s) > sizeof(long)
 >       315 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
 >           |                                             ^

 > This commit fixes the issue by bumping the bsp components:
 > - u-boot to v2024.04
 > - kernel to v6.6.31

 > The Kernel DTS name is updated to reflect upstream reorganization.

 > The kernel commit fixing the build failure is [2], first included in
 > v6.2. There is many other gcc-13 fixes.

 > While bumping components, this commit also enables
 > BR2_DOWNLOAD_FORCE_CHECK_HASHES=y, add the relevant archive hash files,
 > and removes the defconfig entry in ".checkpackageignore".

 > Fixes: [1]

 > [1] https://gitlab.com/buildroot.org/buildroot/-/jobs/6918688967
 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f07788079f515ca4a681c5f595bdad19cfbd7b1d

 > Signed-off-by: Julien Olivain <ju.o@free.fr>
 > ---
 > Note: I did not tested the generated image on an actual board
 > (I don't have access to it).

Then maybe it would be safer to just bump to 5.10.217 (the gcc13 issue
has been backported as of 5.10.184)?

You don't mention why you are bumping U-Boot, maybe it is to fix the
compatibility issue with python-setuptools v69 (E.G. see commit
2e349be94a87db05d07d37bd44a923581bca43f3)?
Julien Olivain May 26, 2024, 4:39 p.m. UTC | #2
Hi Peter,

On 24/05/2024 23:12, Peter Korsgaard wrote:
>>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:
> 
>  > Since commit dc0f721 "package/gcc: switch to 13.x as default",
>  > mx51evk_defconfig is failing to build in Kernel (see [1]),
>  > with output:
> 
>  >     drivers/ata/libahci.c: In function 'ahci_led_store':
>  >     ././include/linux/compiler_types.h:315:45: error: call to 
> '__compiletime_assert_328' declared with attribute error: BUILD_BUG_ON 
> failed: sizeof(_s) > sizeof(long)
>  >       315 |         _compiletime_assert(condition, msg, 
> __compiletime_assert_, __COUNTER__)
>  >           |                                             ^
> 
>  > This commit fixes the issue by bumping the bsp components:
>  > - u-boot to v2024.04
>  > - kernel to v6.6.31
> 
>  > The Kernel DTS name is updated to reflect upstream reorganization.
> 
>  > The kernel commit fixing the build failure is [2], first included in
>  > v6.2. There is many other gcc-13 fixes.
> 
>  > While bumping components, this commit also enables
>  > BR2_DOWNLOAD_FORCE_CHECK_HASHES=y, add the relevant archive hash 
> files,
>  > and removes the defconfig entry in ".checkpackageignore".
> 
>  > Fixes: [1]
> 
>  > [1] https://gitlab.com/buildroot.org/buildroot/-/jobs/6918688967
>  > [2] 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f07788079f515ca4a681c5f595bdad19cfbd7b1d
> 
>  > Signed-off-by: Julien Olivain <ju.o@free.fr>
>  > ---
>  > Note: I did not tested the generated image on an actual board
>  > (I don't have access to it).
> 
> Then maybe it would be safer to just bump to 5.10.217 (the gcc13 issue
> has been backported as of 5.10.184)?

I'll send an updated patch bumping only the Kernel to v5.10.218.

> 
> You don't mention why you are bumping U-Boot, maybe it is to fix the
> compatibility issue with python-setuptools v69 (E.G. see commit
> 2e349be94a87db05d07d37bd44a923581bca43f3)?

The only reason for updating u-boot was to have refreshed version
alongside the Kernel. The old one was still building fine (since
it is not using Pylibfdt).

> 
> --
> Bye, Peter Korsgaard

If I manage to get my hands on an i.MX51 EVK, I'll send another
patch bumping major versions later.

Best regards,

Julien.
diff mbox series

Patch

diff --git a/.checkpackageignore b/.checkpackageignore
index ebf320c3c59..e2f84ce5287 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -236,7 +236,6 @@  configs/microchip_sama7g5ek_mmc_defconfig lib_defconfig.ForceCheckHash
 configs/microchip_sama7g5ek_mmc_dev_defconfig lib_defconfig.ForceCheckHash
 configs/minnowboard_max_defconfig lib_defconfig.ForceCheckHash
 configs/mx25pdk_defconfig lib_defconfig.ForceCheckHash
-configs/mx51evk_defconfig lib_defconfig.ForceCheckHash
 configs/mx53loco_defconfig lib_defconfig.ForceCheckHash
 configs/mx6cubox_defconfig lib_defconfig.ForceCheckHash
 configs/mx6sx_udoo_neo_defconfig lib_defconfig.ForceCheckHash
diff --git a/board/freescale/imx51evk/patches/linux-headers/linux-headers.hash b/board/freescale/imx51evk/patches/linux-headers/linux-headers.hash
new file mode 120000
index 00000000000..5808d92afe8
--- /dev/null
+++ b/board/freescale/imx51evk/patches/linux-headers/linux-headers.hash
@@ -0,0 +1 @@ 
+../linux/linux.hash
\ No newline at end of file
diff --git a/board/freescale/imx51evk/patches/linux/linux.hash b/board/freescale/imx51evk/patches/linux/linux.hash
new file mode 100644
index 00000000000..d7a0d04236d
--- /dev/null
+++ b/board/freescale/imx51evk/patches/linux/linux.hash
@@ -0,0 +1,2 @@ 
+# From: https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
+sha256  d6ecff966f8c95ec4cb3bb303904f757b7de6a6bcfef0d0771cb852158e61c20  linux-6.6.31.tar.xz
diff --git a/board/freescale/imx51evk/patches/uboot/uboot.hash b/board/freescale/imx51evk/patches/uboot/uboot.hash
new file mode 100644
index 00000000000..75de6acf93b
--- /dev/null
+++ b/board/freescale/imx51evk/patches/uboot/uboot.hash
@@ -0,0 +1,2 @@ 
+# Locally computed:
+sha256  18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a  u-boot-2024.04.tar.bz2
diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig
index a4bebdec976..474824e67fc 100644
--- a/configs/mx51evk_defconfig
+++ b/configs/mx51evk_defconfig
@@ -2,8 +2,12 @@ 
 BR2_arm=y
 BR2_cortex_a8=y
 
-# Linux headers same as kernel, a 5.10 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+# Global patches directory and hash check
+BR2_GLOBAL_PATCH_DIR="board/freescale/imx51evk/patches"
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
+
+# Linux headers same as kernel, a 6.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
 
 # System
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
@@ -22,14 +26,14 @@  BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="mx51evk"
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.01"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.04"
 BR2_TARGET_UBOOT_FORMAT_IMX=y
 
 # Kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.9"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31"
 BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx51-babbage"
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="nxp/imx/imx51-babbage"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y