embedded-linux

call to request_mem_region() fails

情到浓时终转凉″ 提交于 2019-11-29 12:30:00
The start address 0x4806E000 (UART4 base address) is already present in /proc/iomem with the name omap4-uart. How to disable the memory regions already allocated ?. Edit : Even though request_mem_region is successful the console during booting shows this messages. [ 0.758514] Serial: 8250/16550 driver, 3 ports, IRQ sharing enabled [ 0.760040] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0 [ 0.760498] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1 [ 0.760955] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2 [ 1.778808] console [ttyO2]

what is chained irq in linux, when are they need to used?

别说谁变了你拦得住时间么 提交于 2019-11-29 09:33:10
问题 What is chained IRQ ? What does chained_irq_enter and chained_irq_exit do, because after an interrupt is arised the IRQ line is disabled, but chained_irq_enter is calling functions related to masking interrupts. If the line is already disabled why to mask the interrupt ? 回答1: what is chained irq ? There are two approaches how to call interrupt handlers for child devices in IRQ handler of parent (interrupt controller) device. Chained interrupts: "chained" means that those interrupts are just

Content of /proc/iomem

懵懂的女人 提交于 2019-11-29 08:55:01
1) Is it possible to access a physical address which is not defined in /proc/iomem? 2) If the physical address range of a device does not appear in /proc/iomem, does it mean that the device has not been utilized/initialized yet? 1) Is it possible to access a physical address which is not defined in /proc/iomem? Yes. Assuming an ARM processor which memory maps all directly-connected periperals, the driver could perform an ioremap() operation to map the physical memory to virtual memory for access. But a properly written driver would first call request_mem_region() to ensure that it can use (and

how to change the host type for a 'Canadian cross' compilation of GCC with crosstool-NG

落爺英雄遲暮 提交于 2019-11-29 08:37:51
I've installed crosstool-NG and built GCC on a host+build x86 machine that targets arm-unknown-linux-gnueabi. I've then used arm-unknown-linux-gnueabi-gcc to compile a program that ran well on my ARM board. I'm wanting to now build GCC, targeting ARM to be hosted on ARM. I believe the lingo is build=i486-pc-linux-gnu target=arm-unknown-linux-gnueabi-gcc host=arm-unknown-linux-gnueabi-gcc How do I do this? do I run ./configure for crosstool-NG passing --host=arm-unknown-linux-gnueabi-gcc? or do I change the environment variables for CC/etc? You do this with a .config file. I think samples with

Can I prevent a Linux user space pthread yielding in critical code?

北慕城南 提交于 2019-11-29 07:31:22
I am working on an user space app for an embedded Linux project using the 2.6.24.3 kernel. My app passes data between two file nodes by creating 2 pthreads that each sleep until a asynchronous IO operation completes at which point it wakes and runs a completion handler. The completion handlers need to keep track of how many transfers are pending and maintain a handful of linked lists that one thread will add to and the other will remove. // sleep here until events arrive or time out expires for(;;) { no_of_events = io_getevents(ctx, 1, num_events, events, &timeout); // Process each aio event

Determining CPU utilization

≡放荡痞女 提交于 2019-11-29 07:10:07
问题 Is there a command or any other way to get the current or average CPU utilization (for a multi-processor environment) in Linux? I am using embedded Linux in a small system. Basically, I need to determine the CPU utilization, so that if it is high, I can instead divert a new process to another controller in the system, rather than executing on the main processor, which could be busy doing a more important process. This question is not about merely prioritizing processes, the other controller

Building a minimal Linux for Raspberry Pi [closed]

白昼怎懂夜的黑 提交于 2019-11-29 07:07:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Now I got my Raspberry Pi. I am an experienced application software developer, but I've never done hardware stuff or low-level programming before. I want to build a minimal Linux, including drivers for all hardware on my Pi. For learning purpose, I don't want to install any pre-built Linux distribution on my Pi.

Detailed explanation for profile from “adb shell dumpsys meminfo my-app-name”?

China☆狼群 提交于 2019-11-29 06:42:18
问题 Can anyone give me a detailed explanation about the profile gotten by adb shell dumpsys meminfo my-app-name ? The result is just as below as it mentioned in How do I discover memory usage of my application in Android?: ** MEMINFO in pid 890 [process-name] ** native dalvik other total size: 10940 7047 N/A 17987 allocated: 8943 5516 N/A 14459 free: 336 1531 N/A 1867 (Pss): 4585 9282 11916 25783 (shared dirty): 2184 3596 916 6696 (priv dirty): 4504 5956 7456 17916 Objects Views: 149 ViewRoots: 4

valgrind on the ARM9?

☆樱花仙子☆ 提交于 2019-11-29 04:14:41
I see that valgrind has an ARM7 target, but I find conflicting information on whether valgrind has support for the ARM9. The ARM9 target I am working with is running linux. Has anyone specifically succeeded in using valgrind on an ARM9 target? If so, any pointers you can offer would be helpful, including "how did you build it?". Thanks -z Valgrind runs on ARM-v7 (architecture name), not ARM7 (chip family name). ARM7 is a name of a fairly old chip family (which uses architecture ARM-v4), as is ARM9 (ARM-v5). Are you sure that your chip is an ARM9 and not a Cortex-A9 (which uses the ARM-v7

How to cross-compile for MIPS?

杀马特。学长 韩版系。学妹 提交于 2019-11-29 01:39:16
I have a DVB receiver ( set-top box ) similar like Dreambox and it has MIPS cpu It has embedded Linux and I can connect to it with telnet Question is how to compile simple " Hello World " application in C ? Where to get toolchain , SDK ? MannyNS You should use Codescape SDK . http://www.linux-mips.org/wiki/Toolchains There you have some prebuilt cross compilers, or the instruction to build GCC as a cross compiler. 来源: https://stackoverflow.com/questions/5291190/how-to-cross-compile-for-mips