embedded-linux

When signal handler is not called when segment fault occurs?

允我心安 提交于 2021-02-10 06:11:47
问题 Below is the operation method of my program, and there was a case where the registered handler was not called when the program was terminated due to the occurrence of a segment fault. Is there a case where the registered handler can be terminated without being called when a segment fault occurs? When initializing program A, register handler through signal() function.( SIGSEGV, SIGABRT, SIGFPE, SIGTERM ) fork() -> waitpid() for program A in program B Aging Segment Fault occurs due to unknown

When signal handler is not called when segment fault occurs?

你离开我真会死。 提交于 2021-02-10 06:11:39
问题 Below is the operation method of my program, and there was a case where the registered handler was not called when the program was terminated due to the occurrence of a segment fault. Is there a case where the registered handler can be terminated without being called when a segment fault occurs? When initializing program A, register handler through signal() function.( SIGSEGV, SIGABRT, SIGFPE, SIGTERM ) fork() -> waitpid() for program A in program B Aging Segment Fault occurs due to unknown

How to get list of programs which can open a particular file extension in Linux?

一世执手 提交于 2021-02-10 05:42:06
问题 Basically I am trying to get list of programs in Linux which are installed and can open particular file extension .jpg for example. If not all, At-least default program should get listed. 回答1: Linux (the kernel) has no knowledge on file types to application mapping. If you want to use Gnome programs you can look at https://people.gnome.org/~shaunm/admin-guide/mimetypes-7.html. For KDE there is another mechanism. Each toolkit can define it as it likes. And the programmer can use the defaults

Sending realtime signal from a kernel module to user space fails

ぃ、小莉子 提交于 2021-02-08 03:32:28
问题 I found example code on how to send a realtime signal from a kernel module to user space here I implemented it in the kernel module as shown below: static int dmtimer_sendSignal(int val, int id, int sig) { struct siginfo info; struct task_struct *t; int ret; ret = 0; if ((id > 0) && (sig > 0)) { /* send the signal */ memset(&info, 0, sizeof(struct siginfo)); info.si_signo = sig; info.si_code = SI_QUEUE; // this is bit of a trickery: SI_QUEUE is normally used by sigqueue from user space, //

How to acess the physical address from linux kernel space?

旧时模样 提交于 2021-02-07 08:21:33
问题 I am working on rasberry pi board. Is it possible to directly access the GPIO physical address from linux kernel space using inb(), outb()... ?. If yes how ?. GPIO register address link Page 90 http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf Thank you 回答1: Yes. Get a virtual address mapping setup to the registers in question using ioremap Use readl/writel to manipulate the physical memory. Beware that ARM processors will fault on unaligned accesses. Linux

Yocto build for a static library fails with error “No Match Found”

柔情痞子 提交于 2021-01-29 17:46:56
问题 I am trying to include a Yocto recipe in the image which I wrote for static library. Created recipes-test/static folder in my own layer . Created 'static_0.1.bb' file in this folder Created 'files' folder inside the 'recipes-test/static' folder Copied the below files. hello.c char * hello (void) { return "Hello"; } world.c char *world(void) { return "World"; } helloworld.h #ifndef HELLOWORLD_H #define HELLOWORLD_H char * hello (void); char * world (void); #endif Created recipe with the

Configuring the bootloader with `fw_env.config` and `CONFIG_ENV_OFFSET`

佐手、 提交于 2021-01-29 07:10:39
问题 I have a previously built image where the content of fw_env.config is (using u-boot): /dev/mmcblk0 0x400000 0x4000 /dev/mmcblk0 0x800000 0x4000 Do I understand correctly that this tells u-boot the partition layout? That is the layout that I would like to have also on a new image. I have a libubootenv\%.bbappend which is supposed to copy the layout above into the new image's fw_env.config (even though I didn't come to the point, yet to test if that actually worked). There are also u-boot

Yocto Project Boost library : Change default package version used in bitbake recipe

大城市里の小女人 提交于 2021-01-28 05:06:18
问题 I am developing a Linux image operating system using Yocto Project . I am using SUMO branch ( Yocto Project 2.5 ). In order to install the boost library in my Linux image, I added this line to the local.conf file : IMAGE_INSTALL_append = " boost" But I discover that the default version installed is Boost 1.66.0 . Under meta/recipes-support/boost directory I can find three files : recipes-support/boost/boost_1.66.0.bb recipes-support/boost/boost-1.66.0.inc recipes-support/boost/boost.inc I

How to check whether SMP is enabled or disabled in the kernel?

安稳与你 提交于 2021-01-27 04:52:05
问题 I was wondering how can I check on my running machine, whether the kernel is configured for SMP or not? Of course, I can look into the kernel .config file and can search for it. But, the question is let's say I don't have a source code, how will I check the SMP configuration? Is there any proc file to check it? The following says that I have no multi-cores: #cat /proc/cpuinfo processor : 1 cpu model : Broadcom BMIPS5000 V1.1 FPU V0.1 BogoMIPS : 651.26 cpu MHz : 1305.018 wait instruction : yes

How to check whether SMP is enabled or disabled in the kernel?

江枫思渺然 提交于 2021-01-27 04:50:36
问题 I was wondering how can I check on my running machine, whether the kernel is configured for SMP or not? Of course, I can look into the kernel .config file and can search for it. But, the question is let's say I don't have a source code, how will I check the SMP configuration? Is there any proc file to check it? The following says that I have no multi-cores: #cat /proc/cpuinfo processor : 1 cpu model : Broadcom BMIPS5000 V1.1 FPU V0.1 BogoMIPS : 651.26 cpu MHz : 1305.018 wait instruction : yes