embedded-linux

Linux Interrupt Handling

谁说胖子不能爱 提交于 2019-12-22 13:49:46
问题 I am trying to understand the Linux interrupt handling mechanism. I tried googling a bit but couldn't find an answer to this one. Can someone please explain it to me why the handle_IRQ_event needs to call local_irq_disable at the end? After this the control goes back to do_irq which eventually will go back to the entry point. Then who will enable the interrupts back.? It is the responsibility of the interrupt handler? If so why is that so? Edit Code for reference asmlinkage int handle_IRQ

Write a recipe in yocto for a python application

非 Y 不嫁゛ 提交于 2019-12-22 05:16:30
问题 I have a simple python application which does: acquire information from a GPS parse information store it in InfluxDB The package requirements: certifi==2018.4.16 chardet==3.0.4 idna==2.6 influxdb==5.0.0 pynmea2==1.12.0 pyserial==3.4 python-dateutil==2.7.3 pytz==2018.4 requests==2.18.4 six==1.11.0 urllib3==1.22 The above is generated by using: pip3 install pynmea2 pyserial influxdb In the OpenEmbedded Layers Index I have already found pyserial package for Python3 . Which implies on the board I

Reading from a block device in kernel space

我怕爱的太早我们不能终老 提交于 2019-12-21 22:25:50
问题 I am writing a kernel module and need to perform reads from an existing block device. (/dev/something). Does anyone know of any other modules that do these that I can use as reference ? Any pointers would be welcome (Linux.2.6.30) 回答1: If you really absolutely must then use the filp_open , filp_close , vfs_read and vfs_write functions. The description for for filp_open states "This is the helper to open a file from kernelspace if you really have to. But in generally you should not do this, so

Overwriting Yocto Classes through meta-layer

本秂侑毒 提交于 2019-12-21 21:38:32
问题 Thanks for your time and support I am planning to use swupdate for updates. So, I need to create an additional partition in which I need to store the recovery partition. poky/meta/classes/image-live.bbclass is the class which creates partitions and flashes the root file system. I have updated the above file to create one more partition and store the swupdate root filesystem. How can I override this class in my own BSP layer, I don't want to touch poky source code.. 回答1: Generally in Yocto

Chipsee 7 inch LCD support in Linux kernel 3.14

柔情痞子 提交于 2019-12-21 21:27:11
问题 Has anybody ported Chipsee 7 inch LCD on Linux kernel 3.14 or later ? Is there any patch available for the same ? If no patches any suggestion porting Chipsee LCD support from Linux kernel 3.8 to Linux kernel 3.14 ? Update: `/* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ /dts-v1

Huge delay on first browser-request to Mono XSP hosted web-application

戏子无情 提交于 2019-12-21 18:14:30
问题 We are using the Mono (2.10) XSP4 webserver to host an ASP.Net MVC3 web-application running on an open-embedded Linux (ARM). When starting XSP4 it takes some seconds until it is ready and accepts requests. No problem with that so far. But when the first request from a browser / website-visitor is made XSP4 uses all CPU it can get for about 55 seconds until the webpage is (successfully) shown in the webbrowser. This happens after each start/restart of XSP. My first thought was that this is the

Huge delay on first browser-request to Mono XSP hosted web-application

旧街凉风 提交于 2019-12-21 18:12:27
问题 We are using the Mono (2.10) XSP4 webserver to host an ASP.Net MVC3 web-application running on an open-embedded Linux (ARM). When starting XSP4 it takes some seconds until it is ready and accepts requests. No problem with that so far. But when the first request from a browser / website-visitor is made XSP4 uses all CPU it can get for about 55 seconds until the webpage is (successfully) shown in the webbrowser. This happens after each start/restart of XSP. My first thought was that this is the

Passing Bootargs via Chosen node in Device Tree not working for Beaglebone Black

喜欢而已 提交于 2019-12-21 17:35:11
问题 As per my understanding chosen node is used to send boot arguments to the kernel. The following is the chosen node of the existing device code (am335x-bone-common.dtsi). chosen { stdout-path = &uart0; }; So, I have modified chosen node to pass kernel arguments. chosen { bootargs = "console=ttyO0,115200 root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait"; stdout-path = &uart0; }; While bringing up the board I encountered KERNEL PANIC, Here is the log {https://pastebin.com/XHyrsmfG} FYI: These are

Exactly when tasklet runs after it is schedule by ISR?

不羁岁月 提交于 2019-12-21 17:27:56
问题 I written my ISR and my tasklet ran immediately. BUT , I have seen people saying that tasklet runs only when it gets CPU attention. This is a very generic term CPU attention so i recite for those responders. I mean exactly which moment cpu attention goes to tasklet execution and what happen to the state of CPU ? Secondly, if suppose that i am keep on getting hard interrupt then when will tasklet get chance to run? Is it possible that tasklet may not get chance to run? How does kernel take

Obtain packet timestamp through ioctl call on socket file descriptor

China☆狼群 提交于 2019-12-21 12:12:15
问题 I'm working on a system running embedded linux. I'm trying to obtain the packet timestamp from a stream I'm receiving on a socket. After creating the socket, I do the following: if (fd != -1) { int enabled = 1; setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP, &enabled, sizeof(enabled); } After that I bind the socket, the socket is of type SOCK_STREAM. I successfully receive data on the socket, by calling the function recv(fd, buf, size, 0) . Now in order to obtain the timestamp of the received data,