embedded-linux

Valgrind cross compilation for ARMv5tel

烈酒焚心 提交于 2019-11-30 13:36:37
I ran configure with the following option: ./configure --target=armv5tel CC=arm-linux-gnueabi-gcc --host=i686-linux then ran make I encountered the following error: m_cpuid.S: Assembler messages: m_cpuid.S:40: Error: bad instruction `pushl %ebp' m_cpuid.S:41: Error: bad instruction `movl %esp,%ebp' m_cpuid.S:42: Error: bad instruction `pushl %ecx' m_cpuid.S:43: Error: bad instruction `pushfl' m_cpuid.S:44: Error: bad instruction `pushfl' m_cpuid.S:45: Error: bad instruction `popl %eax' m_cpuid.S:46: Error: bad instruction `movl %eax,%ecx' m_cpuid.S:47: Error: bad instruction `xorl $0x200000,

How to attach file operations to sysfs attribute in platform driver?

我只是一个虾纸丫 提交于 2019-11-30 13:25:34
问题 I wrote a platform driver for a peripheral we developed and would like to expose some configuration options to the sysfs. I have managed to create the appropriate files using attribute structs (see below) and sysfs_create_file in the probe function, but I can't figure out how to attach the show/store functions to the structs in a platform driver. Most resources I found online used a device_attribute struct or something similar to create their files, is that also appropriate here? Is there

insmod error: inserting './hello.ko': -1 Invalid module format\"

和自甴很熟 提交于 2019-11-30 12:39:50
I have just made my first driver module, the hello world module following LDD3. However unfortunately encountered this error: insmod: error inserting './hello.ko': -1 Invalid module format. I am doing this on Ubuntu 11.04, and my environment: $ uname -r 2.6.38-8-generic I get the kernel source like this: sudo apt-cache search linux-source linux-source - Linux kernel source with Ubuntu patches linux-source-2.6.38 - Linux kernel source for version 2.6.38 with Ubuntu patches $sudo apt-get install linux-source-2.6.38 my /usr/src: $ls /usr/src/ linux-headers-2.6.38-8 linux-source-2.6.38 vboxguest-5

What is the difference between RTOS and Embedded Linux? [closed]

℡╲_俬逩灬. 提交于 2019-11-30 10:21:44
问题 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 5 years ago . RTOS and Embedded Linux are used for embedded systems programming. Is Embedded Linux itself an RTOS ? Can anyone list the comparison or difference please? 回答1: Linux is a general-purpose OS (GPOS); its application to embedded systems is usually motivated by the availability of device support, file-systems,

valgrind on the ARM9?

[亡魂溺海] 提交于 2019-11-30 07:29:12
问题 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 回答1: 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),

How to attach file operations to sysfs attribute in platform driver?

别说谁变了你拦得住时间么 提交于 2019-11-30 07:26:42
I wrote a platform driver for a peripheral we developed and would like to expose some configuration options to the sysfs. I have managed to create the appropriate files using attribute structs (see below) and sysfs_create_file in the probe function, but I can't figure out how to attach the show/store functions to the structs in a platform driver. Most resources I found online used a device_attribute struct or something similar to create their files, is that also appropriate here? Is there another way to do this for a platform driver? My attribute struct looks like this: struct attribute subkey

How to write a simple Linux device driver?

夙愿已清 提交于 2019-11-29 19:14:18
I need to write an SPI Linux character device driver for omap4 from scratch. I know some basics of writing device drivers. But, I don't know how to start writing platform specific device driver from scratch. I've written some basic char drivers, and I thought writing SPI device driver would be similar to it. Char drivers have a structure file_operations which contains the functions implemented in the driver. struct file_operations Fops = { .read = device_read, .write = device_write, .ioctl = device_ioctl, .open = device_open, .release = device_release, /* a.k.a. close */ }; Now, I am going

Learning Kernel Programming [closed]

丶灬走出姿态 提交于 2019-11-29 18:34:53
I want to learn lLinux Kernel programming. What would be the starting points for that? What could be some of the simpler problems to target? Try to get hold of Robert Love's book on Linux Kernel Programming. Its very concise and easy to follow. After that or along with that, you may want to take a look at "Understanding the Linux kernel".But I wouldn't recommend it during the early stages. Also, look at the Linux kernel programming guide . Since a lot can be learnt from programing kernel modules, that guide will help you. And yes, for a lot of information, consult the 'documentation' sub

Are kernel headers depend on processor type, vendor etc?

烈酒焚心 提交于 2019-11-29 16:59:19
I have downloaded the sources for a Linux kernel from kernel.org and created the header files by calling make ARCH=arm headers_check I have an embedded platform and ask myself if this is enough because I don't have the header files from the vendor. What are the dependencies of header files? It looks to me that header files are quite hardware specific and I expect that they depend on the CPU type etc.. Is it enough to specify the architecture just by ARCH=arm? Is it probable that a vendor of an arm system creates its own header files for a Linux kernel? If you have a specific ARM board in mind

error while loading new compiled Linux kernel image into the android emulator(1.5)

Deadly 提交于 2019-11-29 15:10:19
I have successfully compiled Linux kernel for android: root@ubuntu:~/common# ARCH=arm CROSS_COMPILE=~/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make CHK include/linux/version.h make[1]: `include/asm-arm/mach-types.h' is up to date. CHK include/linux/utsrelease.h . . . SYMLINK include/asm -> include/asm-arm CALL scripts/checksyscalls.sh <stdin>:1097:2: warning: #warning syscall fadvise64 not implemented <stdin>:1265:2: warning: #warning syscall migrate_pages not implemented <stdin>:1321:2: warning: #warning syscall pselect6 not implemented <stdin>:1325:2: warning: