Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scarthgap] Migrate to use Linux kernel v6.11.0 in linux-fslc #1939

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions recipes-kernel/cryptodev/cryptodev-module_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

# Fix build for Linux 6.7-rc1: https://github.com/cryptodev-linux/cryptodev-linux/commit/5e7121e45ff283d30097da381fd7e97c4bb61364
# Since Linux 6.7-rc1, no ahash algorithms set a nonzero alignmask,
# and therefore `crypto_ahash_alignmask` has been removed.
#
# See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f8660c82b79af595b056f6b9f4f227edeb88574
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c626910f3f1bbce6ad18bc613d895d2a089ed95e

SRC_URI += " \
file://fix-build-for-Linux-6.7-rc1.patch \
"
37 changes: 37 additions & 0 deletions recipes-kernel/cryptodev/files/fix-build-for-Linux-6.7-rc1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 5e7121e45ff283d30097da381fd7e97c4bb61364 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <[email protected]>
Date: Sun, 10 Dec 2023 13:57:55 +0000
Subject: [PATCH] Fix build for Linux 6.7-rc1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since Linux 6.7-rc1, no ahash algorithms set a nonzero alignmask,
and therefore `crypto_ahash_alignmask` has been removed.

See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f8660c82b79af595b056f6b9f4f227edeb88574
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c626910f3f1bbce6ad18bc613d895d2a089ed95e

Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/5e7121e45ff283d30097da381fd7e97c4bb61364]

Signed-off-by: Joan Bruguera Micó <[email protected]>
---
cryptlib.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/cryptlib.c b/cryptlib.c
index 4d739e5..0e59d4c 100644
--- a/cryptlib.c
+++ b/cryptlib.c
@@ -381,7 +381,11 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name,
}

hdata->digestsize = crypto_ahash_digestsize(hdata->async.s);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0))
hdata->alignmask = crypto_ahash_alignmask(hdata->async.s);
+#else
+ hdata->alignmask = 0;
+#endif

init_completion(&hdata->async.result.completion);

Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ require linux-imx.inc

SRC_URI = "git://github.com/Freescale/linux-fslc.git;branch=${KBRANCH};protocol=https"

DEPENDS += " \
coreutils-native \
"

# PV is defined in the base in linux-imx.inc file and uses the LINUX_VERSION definition
# required by kernel-yocto.bbclass.
#
# LINUX_VERSION define should match to the kernel version referenced by SRC_URI and
# should be updated once patchlevel is merged.
LINUX_VERSION = "6.6.50"
LINUX_VERSION = "6.11.0"

KBRANCH = "6.6.x+fslc"
SRCREV = "2473dfed9007471b503efe1f7de74d63eaf4c699"
KBRANCH = "6.11.x+fslc"
SRCREV = "98f7e32f20d28ec452afb208f9cffc08448a2652"

KBUILD_DEFCONFIG:mx5-generic-bsp = "imx_v6_v7_defconfig"
KBUILD_DEFCONFIG:mx6-generic-bsp = "imx_v6_v7_defconfig"
Expand Down