devmem2 | devmem2 - simple program to read/write from/to any location
kandi X-RAY | devmem2 Summary
kandi X-RAY | devmem2 Summary
A github mirror (and potential place to collect improvements) for the devmem2 utility. Originally written by, and hosted at, www.lartmaker.nl/lartware/ .
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 devmem2
devmem2 Key Features
devmem2 Examples and Code Snippets
Community Discussions
Trending Discussions on devmem2
QUESTION
I want to read the values of some Cortex-A53 registers, such as
- D_AA64ISAR0_EL1 (AArch64)
- ID_ISAR5 (Aarch32)
- ID_ISAR5_EL1 (Aarch64)
Unfortunately, I lack a little embedded/assembly experience. The documentation reveals
To access the ID_AA64ISAR0_EL1: MRS , ID_AA64ISAR0_EL1 ; Read ID_AA64ISAR0_EL1 into Xt ID_AA64ISAR0_EL1[31:0] can be accessed through the internal memory-mapped interface and the external debug interface, offset 0xD30.
I decided to utilize devmem2 on my target (since busybox does not include the devmem applet). Is the following procecure correct to read the register?
...ANSWER
Answered 2020-Feb-05 at 20:36Disclaimer: I am not an Aarch64 expert, but I am currently learning about the architecture and have read a bit.
You cannot read ID_AA64ISAR0_EL1
, ID_ISAR5_EL1
nor ID_ISAR5
from a user-mode application running at EL0
: the _EL1
suffix means than running at least at EL1
is required in order to be allowed to read those two registers.
You may find helpful to read the pseudo-code in the arm documentation here and here. In the case of ID_ISAR5 for example, the pseudo-code is very explicit:
QUESTION
I am trying to access some MMIO GPIO addresses for LED control and battery monitoring. But I am not sure how to calculate the right addresses.
The documentation states the following:
...ANSWER
Answered 2019-Sep-01 at 15:10I don't understand how they got 0xD0C506A0
exactly, but only to the extent I don't understand why it's in the address starting with 0xD0000000
to start with.
You have an error in how you're calculating everything else. The <<
operator has higher precedence than +
, so the equation should be parenthesized as COMMUNITY_BASE + (PORT ID << 16) + 0x500
. Calculating PORT_ID << 16
for the port in question yields COMMUNITY_BASE + 0xC50000 + 0x500
= COMMUNITY_BASE + 0xC50500
. To that you add the red user 1 LED offset of 0x1A0
to get COMMUNITY_BASE + 0xC506A0
.
I mostly do ARM architectures at this level, so I don't understand how the device 0x0D information gets turned into COMMUNITY_BASE
being 0xD0000000
, but there you have it.
If you look at the documentation you'll also see that the address is write-only ("output"), which explains why you're unable to read from the example address. If you're unfamiliar with using write-only GPIO registers, they aren't that uncommon. The usual approach is to either just not read them, or to maintain an in-memory copy of what you think they SHOULD be, then abstract the object so that you "read" from your private value of the register and "write" to the actual GPIO pin and update your private value.
QUESTION
I am working on IMX6QP with yocto rocko / Linux 4.14.24 and I am trying to use the GPU.
My yocto configuration file :
...ANSWER
Answered 2018-Nov-22 at 11:23I see you are using the KaRo TX6QP, too. I've managed to get eglfs with QT5 running on TX6DL/TX6S/TX6QP.
For the newer Kernels (e.g. mainline) you don't want the deprecated vivante-gpu-driver. Toss that out of your local.conf
! You want (or need) the community-developed mesa-etnaviv
driver for your Kernel and QP-Board.
Only three Steps are needed, since meta-karo
already enabled mesa
for all boards like you pasted from the meta-karo/conf/machine/include/tx-base.inc
In your own meta-layer create the file recipes-qt5/qt5/qtbase_%.bbappend
with the following content:
QUESTION
I am trying to build an image for beaglebone that contains Qt5, as well as generate the SDK for this image.
Problemmy problem is, that the build fails the do_populate_sdk
task to create the SDK with the following error:
Error: Transaction check error: file /opt/poky/2.3.1/sysroots/x86_64-pokysdk-linux/environment-setup.d conflicts between attempted installs of nativesdk-cmake-3.7.2-r0.x86_64_nativesdk and nativesdk-qtbase-tools-5.8.0+git0+49dc9aa409-r0.x86_64_nativesdk
A little further up the stream I encountered the following error message:
What I haveERROR: Could not invoke dnf. Command '/home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my_machine-poky-linux-gnueabi/my-image-dev/1.0-r0/recipe-sysroot-native/usr/bin/dnf [...] ' returned 1:
Added oe-repo repo from file:///home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my-machine-poky-linux-gnueabi/my-image-dev/1.0-r0/oe-rootfs-repo.
Last metadata expiration check: 0:00:00 ago on Wed Aug 16 11:47:27 2017 UTC.
Dependencies resolved.
To configure my image I followed the advice here as well as similar posts stating the same elsewhere on the web. This is my (shortened and slightly redacted) image bb-file:
...ANSWER
Answered 2017-Aug-28 at 12:27Edit: Anders' answer provides a more elegant solution by switching the packaging class. If you can, check out his approach before trying this workaround.
I found a workaround that worked for me but is no ideal solution. I am posting it anyway, in case it helps someone:
I figured out, that the nativesdk-cmake
package somehow collided with the Qt one. Therefor I created a nativesdk-packagegroup-sdk-host.bbappend
file in my custom layer, with the following content:
QUESTION
Currently, I work on creating a yocto image for the beaglebone black, using the morty branch. I followed the tutorial here, mostly successful. At some point I encountered the following error:
Fetcher failure for URL: 'http://www.lartmaker.nl/lartware/port/devmem2.c'. Checksum mismatch! File: '/home/user/bbb/downloads/devmem2.c' has md5 checksum e23f236e94be4c429aa1ceac0f01544b when be12c0132a1ae118cbf5e79d98427c1d was expected [...]
I did some research, and found that this problem is known, and fixed with this commit to the meta-openembedded repo - it occurred because of changes in the devmem2 code.
As the fixing commit was made to the master branch, I decided to override my local morty copy of devmem2.bb
.
Doing so worked fine, and I was able to download and compile my image from command line using bitbake qt5-image
.
After doing so, I decided to give Toaster a go. I added the required layers to a new Toaster project and ran a build of the qt5-image
(which is part of the meta-bbb layer). However, I ran into the same error as before, as Toaster downloads its own copies of the repositories. I tried doing the same as before, overriding the devmem2.bb
- without success, as Toaster checks out the current version from the VCS and therefore reverts my changes.
Now, what I want to know is what would be the correct way of action, or what are my options?
Openembedded advises to write to the mailing list in cases of checksum errors. But I am hesitant about this, as it is not really an open problem anymore and I don't exactly know what I am doing. But manually overriding recipes is dangerous and feels just plain wrong; even while working.
Obviously, I am still new to yocto and even newer to Toaster, so this problem might be a beginners error (pretty sure, actually).
...ANSWER
Answered 2017-Jun-02 at 13:24The recipe devmem2.bb
in the branch Krogoth is broken because the mirror http://www.lartmaker.nl/lartware/port/devmem2.c is not available.
The cleanest way to fix this issue would be to create another layer.
Copy meta-openembedded/meta-oe/recipes-support/devmem2
to meta-newlayer/recipes-support/devmem2
.
Rename meta-newlayer/recipes-support/devmem2/devmem2.bb
in devmem2.bbapend
and replace everything inside it by :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install devmem2
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