Can't load cryptodev-module from Yocto build - embedded-linux

I am trying install cryptodev-module from my Yocto build. I build cryptodev-module with this command:
bitbake cryptodev-module
after that I've got rpm packages and installed them:
cryptodev-module-1.11-r0.rpm
cryptodev-module-dbg-1.11-r0.rpm
cryptodev-module-dev-1.11-r0.rpm
kernel-module-cryptodev-4.19.78-1.11-r0.rpm
But then I tried to load cryptodev-module modprobe -f cryptodev-module I got error:
modprobe: ERROR: could not insert 'cryptodev': Exec format error
modinfo output cryptodev-module:
modinfo cryptodev
filename: /lib/modules/4.19.78/extra/cryptodev.ko
license: GPL
description: CryptoDev driver
author: Nikos Mavrogiannopoulos <nmav#gnutls.org>
depends:
name: cryptodev
vermagic: 4.19.78 preempt mod_unload ARMv7 p2v8
parm: cryptodev_verbosity:0: normal, 1: verbose, 2: debug (int)
Another driver that I can load:
modinfo 8188eu
filename: /lib/modules/4.19.78/extra/8188eu.ko
version: v5.3.9_28540.20180627
author: Realtek Semiconductor Corp.
description: Realtek Wireless Lan Driver
license: GPL
depends: cfg80211
name: 8188eu
vermagic: 4.19.78 preempt mod_unload ARMv7 thumb2 p2v8

To solve this problem you need set ARM_INSTRUCTION_SET = "thumb" in your local.conf

Related

How to compile linux-kernel-module using clang

I want to build my Linux kernel module (character driver) using clang with the following Makefile
My-Makefile:
System
Ubuntu: 22.04 LTS
kernel: 5.15.0-41-generic
clang version: 14
I tried using the command:
make CC=clang-14 HOSTCC=clang-14
Error:
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'

Unable to install Linux kernel on Ubuntu 20.04

I'm new to the kernel community and I'm learning how to compile and install the Linux kernel, but I'm unable to install it. I'm running a 6 core Ryzen 5 and Ubuntu 20.04 LTS, and I'm using gcc for my compiler. My current kernel version is 5.11.0-38-generic and I'm trying to compile and install version 5.14.14. I'm using Greg Kroah Heartman's Linux Kernel in a nutshell as a guide. First I download the most recent mainline kernel from kernel.org. Then, I run make menuconfig to generate a .config for my system. Next, I run make -j12 to compile the kernel, which runs fine and doesn't return any errors. I've been running into trouble with installing it. After running make install I get the following error output:
arch/x86/Makefile:148: CONFIG_X86_X32 enabled but no binutils support
sh ./arch/x86/boot/install.sh \
5.14.14 arch/x86/boot/bzImage \
System.map "/boot"
*** Missing file: arch/x86/boot/bzImage
*** You need to run "make" before "make install".
make[1]: *** [arch/x86/boot/Makefile:161: install] Error 1
make: *** [arch/x86/Makefile:280: install] Error 2
install.sh is telling me that there is no bzImage file in my arch directory. I checked and indeed the file is missing. I tried looking up "missing bzImage file" but couldn't find anything helpful. Why isn't make generating a big zImage file?
I tried Justin Iurman's recommendation in the above comment and it worked for installing the kernel. I needed to run make bzImage before make. I had to edit one line in the config file before make bzImage was successful. However, sudo make install gave some strange output:
arch/x86/Makefile:148: CONFIG_X86_X32 enabled but no binutils support
sh ./arch/x86/boot/install.sh \
5.14.14 arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.14.14 /boot/vmlinuz-5.14.14
run-parts: executing /etc/kernel/postinst.d/dkms 5.14.14 /boot/vmlinuz-5.14.14
* dkms: running auto installation service for kernel 5.14.14 Error! Your kernel headers for kernel 5.14.14 cannot be found.
Please install the linux-headers-5.14.14 package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 5.14.14 cannot be found.
Please install the linux-headers-5.14.14 package,
or use the --kernelsourcedir option to tell DKMS where it's located
[ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.14.14 /boot/vmlinuz-5.14.14
update-initramfs: Generating /boot/initrd.img-5.14.14
W: missing /lib/modules/5.14.14
W: Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/5.14.14: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
cat: /var/tmp/mkinitramfs_lEKSEC/lib/modules/5.14.14/modules.builtin: No such file or directory
depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_lEKSEC/lib/modules/5.14.14: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_lEKSEC/lib/modules/5.14.14: No such file or directory
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.14.14 /boot/vmlinuz-5.14.14
run-parts: executing /etc/kernel/postinst.d/update-notifier 5.14.14 /boot/vmlinuz-5.14.14
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.14.14 /boot/vmlinuz-5.14.14
I: /boot/initrd.img.old is now a symlink to initrd.img-5.11.0-38-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.14.14
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.14.14 /boot/vmlinuz-5.14.14
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.14.14
Found initrd image: /boot/initrd.img-5.14.14
Found linux image: /boot/vmlinuz-5.11.0-38-generic
Found initrd image: /boot/initrd.img-5.11.0-38-generic
Found linux image: /boot/vmlinuz-5.11.0-37-generic
Found initrd image: /boot/initrd.img-5.11.0-37-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
It seems that although I was able to install the kernel, it didn't boot properly, but since my question was on installing the kernel, I'll mark this question closed.

VAGRANT ERROR Command: ["hostonlyif", "create"]

I am using MacOSbigsur, Macbook Pro, M1 Chip,
I installed Virtual box the latest version 6.1.26r145957, use this command for confirmation (VBoxManage --version).
I installed Vagrant 2.2.18, use this command for confirmation (Vagrant --version).
I clone the repo from https://box.scotch.io/, and then type on terminal "vagrant up"
Following an error occurs, I try many solutions available on the internet but not fixed. I uninstall both software and re-install did not work for me, permission is ok from system preference.
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open
/dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component
HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
Possible Solution: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
when I run this command its shows the following errors
Loading VBoxDrv.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxDrv
Loading VBoxUSB.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxUSB
Loading VBoxNetFlt.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxNetFlt
Loading VBoxNetAdp.kext
Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Error: Failed to load org.virtualbox.kext.VBoxNetAdp
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetAdp
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetAdp : Incompatible
architecture: Binary is for x86_64, but needed arch arm64e
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxNetFlt
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxNetFlt : Incompatible
architecture: Binary is for x86_64, but needed arch arm64e
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxUSB
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxUSB : Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Executing: /usr/bin/kmutil unload -b org.virtualbox.kext.VBoxDrv
Error occurred unloading extensions: Missing extension with identifier org.virtualbox.kext.VBoxDrv : Incompatible architecture: Binary is for x86_64, but needed arch arm64e
Fatal error: VirtualBox
I had a similar error.
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
Was able resolve simply by going to security settings and adding allow from Oracle.
For me this occurred after updating Mac OS, Oracle VB and Vagrant. Currently on Mac Os Monterey 12.3.1

Makefile:605 in caffe make

When I make caffe makefile with command make all -j4, there is an error on line 605 of makeprofile, Im not sure is there anything wrong or not, I didn't edit this line. It seem to be a wrong version of cuda? or for other reason...
error message:
NVCC src/caffe/layers/swish_layer.cu
NVCC src/caffe/layers/cudnn_lrn_layer.cu
NVCC src/caffe/layers/im2col_layer.cu
nvcc fatal : Option '--generate-code arch=-gencode', missing code
NVCC src/caffe/layers/dropout_layer.cu
nvcc fatal : Option '--generate-code arch=-gencode', missing code
nvcc fatal : Option '--generate-code arch=-gencode', missing code
Makefile:605: recipe for target '.build_release/cuda/src/caffe/layers/swish_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/swish_layer.o] Error 1
Makefile:605: recipe for target '.build_release/cuda/src/caffe/layers/cudnn_lrn_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/cudnn_lrn_layer.o] Error 1
nvcc fatal : Option '--generate-code arch=-gencode', missing code
Makefile:605: recipe for target '.build_release/cuda/src/caffe/layers/im2col_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/im2col_layer.o] Error 1
environment:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
CUDA Version 10.0.130
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

Error exit status 127 on installation of KDE desktop on ubuntu 14.04 LTS

I tried to install KDE desktop on ubuntu 14.04 LTS.
At the end of installation, I got this error:
Processing triggers for install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 3: $: command not found
dpkg: error processing package install-info (--unpack):
subprocess installed post-installation script returned error exit status 127
Processing triggers for fontconfig (2.11.0-0ubuntu4.2) ...
Errors were encountered while processing:
install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)
In other window message appear:
Processing triggers for fontconfig (2.11.0-0ubuntu4.2) ...
Errors were encountered while processing:
install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)
My linux version is:
cat /proc/version
Linux version 3.16.0-77-generic (buildd#lgw01-09)
(gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) )
#99~14.04.1-Ubuntu SMP Tue Jun 28 19:17:10 UTC 2016
Here some data about the machine:
ar-it07201
description: Space-saving Computer
product: OptiPlex 9020 (OptiPlex 9020)
vendor: Dell Inc.
version: 01
serial: CRMVN22
width: 64 bits
An cpu procesor:
*-cpu
description: CPU
product: Intel(R) Core(TM) i7-4770 CPU # 3.40GHz
vendor: Intel Corp.
physical id: 3a
bus info: cpu#0
version: Intel(R) Core(TM) i7-4770 CPU # 3.40GHz
slot: SOCKET 0
size: 3888MHz
capacity: 3888MHz
width: 64 bits
clock: 100MHz
capabilities: x86-64
....
*-memory
description: System Memory
physical id: 3e
slot: System board or motherboard
size: 16GiB

Resources