What does request_mem_region() actually do and when it is needed?

request_mem_region tells the kernel that your driver is going to use this range of I/O addresses, which will prevent other drivers to make any overlapping call to the same region through request_mem_region. This mechanism does not do any kind of mapping, it’s a pure reservation mechanism, which relies on the fact that all kernel device … Read more

How to find which Yocto Project recipe populates a particular file on an image root filesystem

This is exact use case for oe-pkgdata-util script and its subcommand find-path. That script is part of openembedded-core. See this example (executed in OE build environment, i.e. bitbake works): tom@pc:~/oe/build> oe-pkgdata-util find-path /lib/ld-2.24.so glibc: /lib/ld-2.24.so You can clearly see that this library belongs to glibc recipe. oe-pkgdata-util has more useful subcommands to see information about … Read more

How to create a defconfig file from a .config?

I think you have to do just one command and use the created file as you want to. % make savedefconfig % cp defconfig arch/arm/configs/my_cool_defconfig (Pay attention to the filename template that is used for defconfig) To get all possible targets just run % make help As noted by Adam Miller followed by Jeremy, users … Read more

Tool to visualize the device tree file (dtb) used by the Linux kernel? [closed]

dtc -O dts sudo apt-get install device-tree-compiler dtc -I dtb -O dts -o a.dts a.dtb gives a well indented textual representation of the device tree a.dtb, which is easy to understand with a text editor. Or dump it to stdout with: dtc -I dtb -O dts -o – a.dtb The source code for dtc is … Read more

Write a bash shell script that consumes a constant amount of RAM for a user defined time [closed]

Even if traditional Bash arrays are not supported, it may still be possible to create array-like variables using the eval command built into the particular shell. The following example script is based on some scripting I did when using BusyBox in an embedded Linux project. BusyBox uses the Almquist shell (also known as A Shell, … Read more

How to know linux scheduler time slice?

The quantum allocated for a particular process may vary: You can tune “slice” by adjusting sched_latency_ns and sched_min_granularity_ns, but note that “slice” is not a fixed quantum. Also note that CFS preemption decisions are based upon instantaneous state. A task may have received a full (variable) “slice” of CPU time, but preemption will be triggered … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)