Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From 08644db02d43478f802755903212f5ee506af73b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
|
||||
Date: Sat, 6 Sep 2025 20:36:38 +0000
|
||||
Subject: [PATCH] Fix build for Linux 6.18-rc1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's no longer required to use nth_page() when iterating pages within a
|
||||
single scatterlist entry.
|
||||
|
||||
Note I believe this code path in `sg_advance` is currently unreachable:
|
||||
It is only called from `get_userbuf_srtp`, passing in a scatterlist
|
||||
copied from one created by `__get_userbuf`, which only generates
|
||||
entries such that `sg->offset + sg->length <= PAGE_SIZE`.
|
||||
On the other hand, this code path in `sg_advance` requires that
|
||||
`sg->offset + sg->length > sg->offset + consumed >= PAGE_SIZE`.
|
||||
|
||||
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8f03eb5f0f91fddc9bb8563c7e82bd7d3ba1dd0
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce00897b94bc5c62fab962625efcf1ab824d3688
|
||||
|
||||
Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
|
||||
|
||||
Upstream: https://github.com/cryptodev-linux/cryptodev-linux/commit/08644db02d43478f802755903212f5ee506af73b
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
util.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/util.c b/util.c
|
||||
index 9eba4836..d4267816 100644
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <crypto/scatterwalk.h>
|
||||
#include <linux/scatterlist.h>
|
||||
+#include <linux/version.h>
|
||||
#include "util.h"
|
||||
|
||||
/* These were taken from Maxim Levitsky's patch to lkml.
|
||||
@@ -44,8 +45,12 @@ struct scatterlist *sg_advance(struct scatterlist *sg, int consumed)
|
||||
sg->length -= consumed;
|
||||
|
||||
if (sg->offset >= PAGE_SIZE) {
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 18, 0))
|
||||
+ struct page *page = sg_page(sg) + (sg->offset / PAGE_SIZE);
|
||||
+#else
|
||||
struct page *page =
|
||||
nth_page(sg_page(sg), sg->offset / PAGE_SIZE);
|
||||
+#endif
|
||||
sg_set_page(sg, page, sg->length, sg->offset % PAGE_SIZE);
|
||||
}
|
||||
|
||||
14
package/cryptodev-linux/Config.in
Normal file
14
package/cryptodev-linux/Config.in
Normal file
@@ -0,0 +1,14 @@
|
||||
config BR2_PACKAGE_CRYPTODEV_LINUX
|
||||
bool "cryptodev-linux"
|
||||
depends on !BR2_microblaze
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
Cryptodev-linux is a device that allows access to Linux kernel
|
||||
cryptographic drivers; thus allowing userspace applications
|
||||
to take advantage of hardware accelerators.
|
||||
|
||||
http://cryptodev-linux.org/index.html
|
||||
|
||||
comment "cryptodev-linux needs a Linux kernel to be built"
|
||||
depends on !BR2_microblaze
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
3
package/cryptodev-linux/cryptodev-linux.hash
Normal file
3
package/cryptodev-linux/cryptodev-linux.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 67223d5bee4749028e78e87372cee3bca79d9a20f7b6cb915aa080c59d2a2d98 cryptodev-linux-1.14.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
30
package/cryptodev-linux/cryptodev-linux.mk
Normal file
30
package/cryptodev-linux/cryptodev-linux.mk
Normal file
@@ -0,0 +1,30 @@
|
||||
################################################################################
|
||||
#
|
||||
# cryptodev-linux
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CRYPTODEV_LINUX_VERSION = 1.14
|
||||
CRYPTODEV_LINUX_SITE = $(call github,cryptodev-linux,cryptodev-linux,cryptodev-linux-$(CRYPTODEV_LINUX_VERSION))
|
||||
CRYPTODEV_LINUX_INSTALL_STAGING = YES
|
||||
CRYPTODEV_LINUX_LICENSE = GPL-2.0+
|
||||
CRYPTODEV_LINUX_LICENSE_FILES = COPYING
|
||||
CRYPTODEV_LINUX_CPE_ID_VENDOR = cryptodev-linux
|
||||
|
||||
define CRYPTODEV_LINUX_MODULE_GEN_VERSION_H
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) version.h
|
||||
endef
|
||||
CRYPTODEV_LINUX_PRE_BUILD_HOOKS += CRYPTODEV_LINUX_MODULE_GEN_VERSION_H
|
||||
|
||||
define CRYPTODEV_LINUX_INSTALL_STAGING_CMDS
|
||||
$(INSTALL) -D -m 644 $(@D)/crypto/cryptodev.h \
|
||||
$(STAGING_DIR)/usr/include/crypto/cryptodev.h
|
||||
endef
|
||||
|
||||
define CRYPTODEV_LINUX_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_USER_API_AEAD)
|
||||
endef
|
||||
|
||||
$(eval $(kernel-module))
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user