mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-04-20 11:29:54 +00:00
arm/ffa-debugfs: drop use of the kernel module
ffa-debugfs kernel module is replaced with arm-ffa-user module Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
This commit is contained in:
committed by
Jon Mason
parent
7a42f5c642
commit
04a7ba3c77
@@ -1,41 +0,0 @@
|
||||
SUMMARY = "FF-A Debugfs Linux kernel module"
|
||||
DESCRIPTION = "This out-of-tree kernel module exposes FF-A operations to user space \
|
||||
used for development purposes"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://arm_ffa_user.c;beginline=1;endline=1;md5=fcab174c20ea2e2bc0be64b493708266"
|
||||
|
||||
SRC_URI = "git://git.gitlab.arm.com/linux-arm/linux-trusted-services.git;branch=main;protocol=https"
|
||||
|
||||
# ffa-debugfs v2.1.0
|
||||
SRCREV = "45eb7c1484ae9bea2bbd0583b86beb55b627073b"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit module
|
||||
|
||||
SRC_URI:append = " \
|
||||
file://0001-build-add-Yocto-support.patch \
|
||||
file://0002-script-loading-the-driver-in-a-generic-way.patch \
|
||||
"
|
||||
|
||||
FILES:${PN} += "${bindir}/load_ffa_debugfs.sh"
|
||||
FILES:${PN}-dev += "${includedir}/arm_ffa_user.h"
|
||||
|
||||
do_install:append() {
|
||||
install -D -p -m 0755 ${B}/load_ffa_debugfs.sh ${D}/${bindir}/load_ffa_debugfs.sh
|
||||
install -m 0644 ${S}/arm_ffa_user.h ${D}/${includedir}/arm_ffa_user.h
|
||||
}
|
||||
|
||||
COMPATIBLE_HOST = "(arm|aarch64).*-linux"
|
||||
|
||||
# Kernel modules currently RDEPEND on the kernel, which is troublesome when you want to put a
|
||||
# kernel module into a initramfs without pulling the kernel into the initramfs, which would be
|
||||
# silly. Until this is a recommends the easiest way to handle this is to remove the dependency
|
||||
# in this recipe.
|
||||
PACKAGESPLITFUNCS:append = " remove_kernel_dependency"
|
||||
python remove_kernel_dependency() {
|
||||
key = "RDEPENDS:kernel-module-arm-ffa-user-" + d.getVar("KERNEL_VERSION")
|
||||
d.delVar(key)
|
||||
}
|
||||
# Conflicts installing arm_ffa_user.h with arm-ffa-user recipe, lets build only one during world builds
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
@@ -1,79 +0,0 @@
|
||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||
Signed-off-by: Arpita S.K <arpita.s.k@arm.com>
|
||||
|
||||
From 8a7bea4e7d08395036ffc2fde57c4fb44315e181 Mon Sep 17 00:00:00 2001
|
||||
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
|
||||
Date: Mon, 25 Oct 2021 13:12:11 +0100
|
||||
Subject: [PATCH 1/2] build: add Yocto support
|
||||
|
||||
This commit allows to build the driver under Yocto
|
||||
|
||||
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
|
||||
---
|
||||
Kbuild | 4 ----
|
||||
Makefile | 40 +++++++++++-----------------------------
|
||||
2 files changed, 11 insertions(+), 33 deletions(-)
|
||||
delete mode 100644 Kbuild
|
||||
|
||||
diff --git a/Kbuild b/Kbuild
|
||||
deleted file mode 100644
|
||||
index 330b019..0000000
|
||||
--- a/Kbuild
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-# SPDX-License-Identifier: GPL-2.0-only
|
||||
-
|
||||
-arm-ffa-user-objs := arm_ffa_user.o
|
||||
-obj-m := arm-ffa-user.o
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 62dbfb1..90dfaef 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,33 +1,15 @@
|
||||
-# SPDX-License-Identifier: GPL-2.0-only
|
||||
+arm-ffa-user-objs := arm_ffa_user.o
|
||||
+obj-m := arm-ffa-user.o
|
||||
|
||||
-ARCH := arm64
|
||||
-CROSS_COMPILE ?= aarch64-linux-gnu-
|
||||
+SRC := $(shell pwd)
|
||||
|
||||
-ROOT ?= $(CURDIR)/..
|
||||
-KDIR ?= $(ROOT)/linux
|
||||
-TARGET_DIR ?= $(ROOT)/shared
|
||||
-BUILD_DIR ?= $(CURDIR)/build
|
||||
-BUILD_DIR_MAKEFILE ?= $(BUILD_DIR)/Makefile
|
||||
+all:
|
||||
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
|
||||
|
||||
-all: module
|
||||
+modules_install:
|
||||
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
|
||||
|
||||
-clean: module-clean
|
||||
-
|
||||
-install: all
|
||||
- cp $(BUILD_DIR)/arm-ffa-user.ko $(TARGET_DIR)/
|
||||
- cp load_module.sh $(TARGET_DIR)/
|
||||
-
|
||||
-module: $(BUILD_DIR_MAKEFILE)
|
||||
- $(MAKE) -C $(KDIR) M=$(BUILD_DIR) src=$(CURDIR) modules \
|
||||
- ARCH=$(ARCH) CROSS_COMPILE="$(CROSS_COMPILE)"
|
||||
-
|
||||
-module-clean:
|
||||
- $(MAKE) -C $(KDIR) M=$(BUILD_DIR) src=$(CURDIR) clean \
|
||||
- ARCH=$(ARCH) CROSS_COMPILE="$(CROSS_COMPILE)"
|
||||
- rm $(BUILD_DIR_MAKEFILE)
|
||||
-
|
||||
-$(BUILD_DIR):
|
||||
- mkdir -p "$@"
|
||||
-
|
||||
-$(BUILD_DIR_MAKEFILE): $(BUILD_DIR)
|
||||
- touch "$@"
|
||||
+clean:
|
||||
+ rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
|
||||
+ rm -f Module.markers Module.symvers modules.order
|
||||
+ rm -rf .tmp_versions Modules.symvers
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||
Signed-off-by: Arpita S.K <arpita.s.k@arm.com>
|
||||
|
||||
From e5d9dfa703a5a57e535b5dab4eda47a9707972d3 Mon Sep 17 00:00:00 2001
|
||||
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
|
||||
Date: Mon, 25 Oct 2021 12:51:37 +0100
|
||||
Subject: [PATCH 2/2] script: loading the driver in a generic way
|
||||
|
||||
Use the kernel module from the modules path.
|
||||
|
||||
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
|
||||
---
|
||||
load_module.sh => load_ffa_debugfs.sh | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
rename load_module.sh => load_ffa_debugfs.sh (50%)
|
||||
mode change 100755 => 100644
|
||||
|
||||
diff --git a/load_module.sh b/load_ffa_debugfs.sh
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
similarity index 50%
|
||||
rename from load_module.sh
|
||||
rename to load_ffa_debugfs.sh
|
||||
index 2137245..4f31ff3
|
||||
--- a/load_module.sh
|
||||
+++ b/load_ffa_debugfs.sh
|
||||
@@ -1,10 +1,14 @@
|
||||
#!/bin/sh
|
||||
+#
|
||||
+# Use:
|
||||
+# load_ffa_debugfs.sh <folder containing sp_uuid_list.txt>
|
||||
+#
|
||||
|
||||
-[ ! -f $(dirname "$0")/sp_uuid_list.txt ] && \
|
||||
+[ ! -f "$1"/sp_uuid_list.txt ] && \
|
||||
{ echo "Error: missing SP UUID list"; exit 1; }
|
||||
|
||||
if ! grep -qs 'arm-ffa-user' /proc/modules; then
|
||||
- insmod $(dirname "$0")/arm-ffa-user.ko uuid_str_list=$(cat $(dirname "$0")/sp_uuid_list.txt)
|
||||
+ insmod /lib/modules/$(uname -r)/extra/arm-ffa-user.ko uuid_str_list=$(cat "$1"/sp_uuid_list.txt)
|
||||
fi
|
||||
|
||||
if ! grep -qs 'debugfs' /proc/mounts; then
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Reference in New Issue
Block a user