embedded-linux

Install things on Pepper

旧时模样 提交于 2019-11-26 17:13:10
问题 How would I install things on Pepper, since I don't know what package manager it uses. I usually use apt on my Ubuntu machine and want to install some packages on Pepper. I'm not sure what package manager Pepper has (if any) and want to install some packages, but also only know the name of the package using apt (not sure if the package name is the same on other package managers). And if possible, would I be able to install apt on Pepper. Thanks. Note: From the research I've done, Pepper is

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

馋奶兔 提交于 2019-11-26 16:51:59
问题 I am trying to write a bash shell script that consumes a high amount of RAM on an embedded device for a user defined time. How do I do it without using arrays ? 回答1: 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,

How do the files in '/dev' match Linux's model of a device? [closed]

时光怂恿深爱的人放手 提交于 2019-11-26 16:38:25
问题 Here is my understanding in opening to a file for reading/writing. In the application layer, I can invoke the fopen() function. The fwrite() function will invoke a system call open() . After the OS receives the open() call, it will pass the command to VFS(virtual file system). VFS looks up the file name, including any directories needed and does the necessary access checks. If this is in RAM cache then no disk access is needed. If not, the VFS sends a read request to the specific file system

Cross compile mono for arm

纵饮孤独 提交于 2019-11-26 14:31:44
问题 Has anyone successfully cross-compiled mono for ARM under Linux without scratchbox or qemu? (maybe with distcc or some cross-compiler toolchain) 回答1: I managed to cross compile mono(2.0, 2.4, 2.6, 2.8, 2.10.1) with Scratchbox 2 installed on a Ubuntu machine using CodeSourcery Lite tool chain. I used the article from the Mono project page. First compile it on the native machine ./configure $ make $ make install DESTDIR=path Then in sb2: [sbox-ARMEL: ~] > ./configure --disable-mcs-build [sbox

Working of __asm__ __volatile__ (“” : : : “memory”)

荒凉一梦 提交于 2019-11-26 11:56:54
问题 What basically __asm__ __volatile__ () does and what is significance of \"memory\" for ARM architecture? 回答1: asm volatile("" ::: "memory"); creates a compiler level memory barrier forcing optimizer to not re-order memory accesses across the barrier. For example, if you need to access some address in a specific order (probably because that memory area is actually backed by a different device rather than a memory) you need to be able tell this to the compiler otherwise it may just optimize

Linux memory overcommit details

 ̄綄美尐妖づ 提交于 2019-11-26 10:03:22
问题 This question was migrated from Server Fault because it can be answered on Stack Overflow. Migrated 6 years ago . I am developing SW for embedded Linux and i am suffering system hangs because OOM Killer appears from time to time. Before going beyond i would like to solve some confusing issues about how Linux Kernel allocate dynamic memory assuming /proc/sys/vm/overcommit_memory has 0 and /proc/sys/vm/min_free_kbytes has 712, and no swap. Supposing embedded Linux currently physical memory

Image vs zImage vs uImage

扶醉桌前 提交于 2019-11-26 07:56:00
问题 What is the difference between them? I know that u-boot needs a kernel in uImage format. The system I use first boots from stage 1 loader and then it calls u-boot. I want to discard u-boot and directly boot from stage 1 loader. Which type of kernel image do I have to use? 回答1: What is the difference between them? Image : the generic Linux kernel binary image file. zImage : a compressed version of the Linux kernel image that is self-extracting. uImage : an image file that has a U-Boot wrapper

How to read a binary data over serial terminal in C program?

无人久伴 提交于 2019-11-26 05:14:28
I read followed links and other sources, but didn't find answer for my question. Binary data over serial terminal Data gets corrupted during transmission over the serial port I communicate with my embedded device through a serial port. By default, embedded Linux uses this port as a terminal. But I want to transfer also binary data (service packets) through the port. My /etc/inittab file has a "getty" call: console::respawn:/sbin/getty 115200 ttyS0 I also have /etc/passwd file with string where "admin" user launch my "cli" application after log in: admin:8Mt/Jtxcyg8AY:1000:0:admin:/tmp:/tmp/cli

How to know linux scheduler time slice?

一曲冷凌霜 提交于 2019-11-26 02:34:50
问题 I\'m looking for the value of the time slice (or quantum) of my Linux kernel. Specific Questions: Is there a /proc file which expose such an information ? (Or) Is it well-defined in the Linux header of my distributions ? (Or) Is there a C function of the Linux API (maybe sysinfo) that expose this value ? 回答1: 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.

How to read a binary data over serial terminal in C program?

冷暖自知 提交于 2019-11-26 01:54:21
问题 I read followed links and other sources, but didn\'t find answer for my question. Binary data over serial terminal Data gets corrupted during transmission over the serial port I communicate with my embedded device through a serial port. By default, embedded Linux uses this port as a terminal. But I want to transfer also binary data (service packets) through the port. My /etc/inittab file has a \"getty\" call: console::respawn:/sbin/getty 115200 ttyS0 I also have /etc/passwd file with string