summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/haveged
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2019-06-06 16:09:14 +0200
committerKhem Raj <raj.khem@gmail.com>2019-06-15 16:45:33 -0700
commit2ab13510874809a4d44cf07ae82a408c08607a41 (patch)
tree32dabbbfac025e621ea95da678cbbcf97f268a31 /meta-oe/recipes-extended/haveged
parent9fca96ad91ea8ece70d7bace68d04e0542ca7d0e (diff)
downloadmeta-openembedded-2ab13510874809a4d44cf07ae82a408c08607a41.tar.gz
haveged: fix CPU cache size detection
Fix ENOMEM error in case the kernel reports cache size of -1. This lead to the following error when starting haveged: haveged starting up haveged: Couldn't initialize HAVEGE rng 5 Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/haveged')
-rw-r--r--meta-oe/recipes-extended/haveged/haveged/fix-cpu-cache-size-detection.patch20
-rw-r--r--meta-oe/recipes-extended/haveged/haveged_1.9.4.bb1
2 files changed, 21 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/haveged/haveged/fix-cpu-cache-size-detection.patch b/meta-oe/recipes-extended/haveged/haveged/fix-cpu-cache-size-detection.patch
new file mode 100644
index 000000000..5b68f1966
--- /dev/null
+++ b/meta-oe/recipes-extended/haveged/haveged/fix-cpu-cache-size-detection.patch
@@ -0,0 +1,20 @@
1Some ARM cpus does not report the cache size or say it is -1
2
3https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866306
4
5Upstream-status: Pending
6
7Index: haveged-1.9.2/src/havegetune.c
8===================================================================
9--- haveged-1.9.2.orig/src/havegetune.c
10+++ haveged-1.9.2/src/havegetune.c
11@@ -795,6 +795,9 @@ static int vfs_configInfoCache(
12 ctype = vfs_configFile(pAnchor, path, vfs_configType);
13 strcpy(path+plen, "size");
14 size = vfs_configFile(pAnchor, path, vfs_configInt);
15+ if (size == -1) {
16+ size = ctype == 'I' ? GENERIC_ICACHE : GENERIC_DCACHE;
17+ }
18 cfg_cacheAdd(pAnchor, SRC_VFS_INDEX, pArgs[1], level, ctype, size);
19 }
20 }
diff --git a/meta-oe/recipes-extended/haveged/haveged_1.9.4.bb b/meta-oe/recipes-extended/haveged/haveged_1.9.4.bb
index 32aab59f1..d0e1a29dd 100644
--- a/meta-oe/recipes-extended/haveged/haveged_1.9.4.bb
+++ b/meta-oe/recipes-extended/haveged/haveged_1.9.4.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
9SRCREV = "faa40ff345af194d3253f5fb030403e3c9831c36" 9SRCREV = "faa40ff345af194d3253f5fb030403e3c9831c36"
10SRC_URI = "git://github.com/jirka-h/haveged.git \ 10SRC_URI = "git://github.com/jirka-h/haveged.git \
11 file://haveged-init.d-Makefile.am-add-missing-dependency.patch \ 11 file://haveged-init.d-Makefile.am-add-missing-dependency.patch \
12 file://fix-cpu-cache-size-detection.patch \
12" 13"
13S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
14 15