kernel-dev | useful kernel modules/patches for tracing/debugging | Code Inspection library
kandi X-RAY | kernel-dev Summary
kandi X-RAY | kernel-dev Summary
set of small and useful kernel modules/patches for tracing/debugging of different stuff and for learning of Linux kernel
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kernel-dev
kernel-dev Key Features
kernel-dev Examples and Code Snippets
Community Discussions
Trending Discussions on kernel-dev
QUESTION
I want to change Kernel configuration.
I have my own layer created and inside my layer I have a _%.bbappend
file which directly targets the recipe linux-ti-staging.bb
(link). This recipe builds my kernel:
ANSWER
Answered 2022-Feb-14 at 12:45Your directory structure should be like this
QUESTION
I'm new to Yocto and I've been trying to setup for developing with devtool
.
I've followed the instructions from from the Yocto Linux Kernel Development Manual, but I've made a change to Step #2, setting MACHINE = stm32mp1
since I'm targeting the STM32MP157D-DK1. However, Step #5 fails, where it asks you to build the SDK using the command bitbake core-image-minimal -c populate_sdk_ext
with the following error:
ANSWER
Answered 2022-Jan-02 at 13:11I've fixed the build issue. It required adding meta-python2
as I did; but instead of IMAGE_INSTALL_append = " python-dev"
, TOOLCHAIN_HOST_TASK_append = " nativesdk-python-core"
is needed instead in local.conf
.
QUESTION
I am trying to compile my kernel module using the Yocto SDK I generated via bitbake
.
The SDK builds without issue, but when I try to run make scripts ARCH=arm64
in the kernel source directory of my target's sysroot, I get an issue regarding a missing header file:
ANSWER
Answered 2021-Nov-06 at 18:35Since scripts/extract-cert.c
is compiled for the host environment, I'd rather try appending TOOLCHAIN_HOST_TASK
variable with " openssl-dev "
.
See this question: TOOLCHAIN_HOST_TASK Vs TOOLCHAIN_TARGET_TASK
QUESTION
I am trying to read out an i2c ambient light sensor BH1750 from C in userspace. I am using a BeagleBone pocket with Linux.
The Datasheet says, that after a measurement operation the result needs to be read with the following i2c sequence: S Adr Rd (A) (Data) A (Data) NA P
.
The issue I ran into: All examples/commands I have found either are only reading 1 byte or are requiring a register address to read more.
The closest I found was the following command: i2c_master_recv()
.
However my interpretation of the documentation is that this command is used in kernel-device-drivers.
How can I issue such a I2C-Read-Sequence from Userspace?
...ANSWER
Answered 2021-Oct-17 at 11:01I was able to solve it using this comment from Ian Abbott:
Assuming the I2C controller has been opened, and the I2C_SLAVE ioctl command has been used to set Adr, The read syscall with a length of 2 will perform the above I2C read transaction. – Ian Abbott Oct 4 at 13:45
Here is a Logicanalyzer-Trace of the resulting I2C communication:
QUESTION
Note: This problem, which I have already solved, is a very different problem from every other similar question on Stack Overflow. I have posted this question and answer in the hopes that it will help someone else experiencing the same issue (or so that, when I have this problem again in 3 years, I'll find this answer).
I am running VirtualBox 6.1.26 on macOS Catalina 10.15.7. I am emulating centOS 7:
...ANSWER
Answered 2021-Aug-24 at 18:34It turned out the problem wasn't that I was using the wrong GCC version (not possible) or that I was missing any installed packages (I wasn't). Instead, it was a consequence of how the VirtualBox Guest Additions "auto-run" works. Something about the way it runs results in a "fresh" environment without devtoolset-8
properly sourced. As a result, it cannot find the installed GCC 8.3.
The solution was simple: When the auto-run prompt appeared, I dismissed it and did not run auto-run. Instead, I opened a fresh Terminal window and changed directories to /run/media/[username]/VBox_GAs_6.1.26
(YMMV on the exact location of the mounted disk), then ran this command:
QUESTION
I'm running this script in AWS Opsworks. It worked before, but now it fails with the error message below the script. The script creates the linux-2 server instance and then immediately runs the script. Some suggest setting pgpcheck=0, but I don't exactly know where to add this. I don't know if that's the solution either.
...ANSWER
Answered 2021-Aug-21 at 15:12Going by the results of search for this issue, it could be temporary. However for the time being you could change disable the GPG check for the repository in /etc/yum.repos.d/pgdg-redhat-all.repo
.
The error indicates GPG verification issue for [pgdg-common]
repo, but this could be for other repos in the pgdg-redhat-all.repo
file. This is usually enabled with gpgcheck=1
.
Changing this to gpgcheck=0
for all occurrences using something like Chef::Util::FileEdit
should work in the meantime.
QUESTION
I built a yocto distro (rocko) for my BBB using kernel linux-ti-staging-4.14 with a custom device tree. Since I need to port an old project from Debian to Yocto, I also needed to enable the UIO features in the kernel, which works fine too.
Now I need to also create an additonal device-tree-overlay for the UIO PRUSS. I use a dts file from here and extended the kernel recipe via bbappend:
...ANSWER
Answered 2021-Aug-02 at 17:20Here is what I found after analyzing Toradex's git projects that can inspire you for a solution:
They have a custom class that handles their device tree files and device tree overlays, here.
The class inherits devicetree
that is an official poky class here.
The devicetree
class tests if a device tree is an overlay or normal and then it compiles all of them.
So, you can basically use devicetree
class in a custom recipe to compile device tree overlays and deploy them manually into your rootfs.
Toradex also has a simple recipe like that here. They have a git project that holds all of their device tree overlays.
That being said, I think Toradex doesn't use the custom recipe, rather they use the custom toradex-devicetree
class which inherits from devicetree
, compiles all device tree overlays from their device tree overlays git project and then deploy them all into the rootfs.
In that custom class, they append to do_deploy of devicetree
class to install the .dtbo
files and add them to overlays.txt
file under the boot partition.
So finally, you can create a bbappend
file for you kernel recipe if you don't have one, and try to follow these steps:
- Inherit from
devicetree
- Add your dts files that are overlays to
SRC_URI
via local files or URL - Add the path for your overlays to
DT_FILES_PATH
of thedevicetree
class - In the kernel recipe, append to
do_deploy
to add them to rootfs.
Now, here is my advice to achieve this step by step:
- Create a custom recipe that uses
devicetree
class with dts overlay example file - Check if it compiles it correctly
- If you understand that, you can then apply the 4 steps above.
QUESTION
I'm trying to set up my environment to use Yocto's generated SDK to compile my out-of-tree module, but for some reason, I'm getting an error.
cp: cannot stat 'arch/arm/kernel/module.lds': No such file or directory
I'm using Poky distribution and meta-raspberrypi which is needed because I'm using the RPI ZeroW board. Apart from this everything works fine. I'm able to compile the entire image and load it on the board.
Here is the line I've added to local.conf
TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc"
as I've found in the documentation.
Also below you can find the whole log from the compilation.
...ANSWER
Answered 2021-Jun-07 at 11:16Missing the module.lds file in the latest kernel. Apply the following source code as a patch in the kernel and build the image.
QUESTION
The part I'm working on is kernel-devsrc
, which is in the recipe recipes-kernel
.
I want to change one of the source .c files in drivers/usb/serial
in kernal-devsrc
. From some of the online materials, I need to:
- Have my own layer
- In the layer, need a recipe with the same name as
recipes-kernel
(and further more,recipes-kernel/linux
) - Add the .bbappend file and patch file.
The problem is: to create a patch file I need to know the 2 git SHAs of before and after the change, but I don't have access to the third party recipes-kernel
, how do I get the SHA??
OR, if that is the wrong way to do this, could you point out the right way to do it? Thanks!
NOTE: This is problem is not like this one: How patching works in yocto, which the author has access to the source code (.c and .h files). I DON"T have access to the source code, the yotco kernel I'm working on is from a public git repo, and I am not able to git commit
to get the SHA, which is necessary to create the patch file.
ANSWER
Answered 2020-Nov-23 at 19:01So, the way I do it is to use Quilt
, follow the steps there then good to go:
https://www.yoctoproject.org/docs/1.8/dev-manual/dev-manual.html#using-a-quilt-workflow
I don't need to know the SHA (though I still don't know why others in my organization end up writing SHAs in the patch files and how did they know the SHAs).
QUESTION
I am using Yocto Warrior release to build linux for Dart-imx8m SOM. Documentation can be found here : https://variwiki.com/index.php?title=DART-MX8M_Yocto&release=RELEASE_WARRIOR_V1.1_DART-MX8M.
I want to add fftw package whose recipe is in meta-oe layer. Whenever I add this package in my local.conf file, I get an error with bitbake regarding a dnf related task.
I add the package like this in my local.conf file : IMAGE_INSTALL_append = " fftw"
I get the following error when building image with bitbake fsl-image-gui :
...ANSWER
Answered 2020-Nov-02 at 21:11The fftw recipe is set up to create a few different packages (RPM) like libfftw, libfftwl, libfftwf, fftw-wisdom, fftwl-wisdom, fftwf-wisdom, and fftw-wisdom-to-conf. You probably want to add one or more of those. It seems there is no actual fftw package.
It is important to remember that IMAGE_INSTALL and RDEPEND lists items from the package namespace, while DEPENDS lists items from the recipe namespace.
If you are unsure about which package you want to install you can inspect the packages-split folder for fftw in tmp/work to see which files are included in which package.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kernel-dev
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page