LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 06-06-2008, 10:07 PM   #16
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15

Hi, one more query.
Do I need to build linux kernel also or just cross tool chain is enough?
thanks once again
kiran
 
Old 06-06-2008, 11:57 PM   #17
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
It is all up to you. If the kernel needs features added, you will have to rebuild it.
--- rod.
 
Old 07-05-2008, 03:06 PM   #18
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi,
I want to know
how a normal Linux system differs from embedded Linux?
when designing for any RTOS(OSE or VxWorks etc.,) there will be a startup code or "initializing code" which is initially loaded and executed by the kernel.Then that startup code executes main application or(process or thread) which will be an infinite loop keeps executing until any other (process or thread or ISR) interrupts it to perform some other task. similarly I want to know, when I write a application for Linux, how can I initiate and then execute?
My product is a data acquisition system. where the loaded RTOS should initiate a main process(LCD driver) which displays the product name and executes continuously until an ISR interrupts it to start acquiring data.

any guidance or references will be a great help.
thanks in advance
regards
kiran
 
Old 07-05-2008, 05:48 PM   #19
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
There are a few different ways, but probably the easiest would be to start it as a service, or from rc.local. Those two methods would be best if the application relies on other standard services being initialized a priori. If your application is fully self contained, you might want to start it from the init process, in lieu of say, a shell or getty type of process. If you are familiar with vxWorks, the Linux inittab file is somewhat conceptually close to the behavior of the startup script used in vxWorks. There are some significant differences, just as there are significant differences in the two OS's as a whole.
Some component of your application might benefit from running as a kernel driver (you mentioned ISR), either a loadable module or built into the kernel. It would not be uncommon to use a kernel that has been trimmed down to the least amount of features to support the application.
--- rod.
 
Old 08-04-2008, 11:05 PM   #20
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi rod,
How r u doing?
I have another query for u.
How can I test wheather a ethernet driver? as an end user I see its available in computer but not able to connect to internet. Similarly a USB driver. when i connect a USB pen drive its not recognized by the system.
thanks in advace.
kiran
 
Old 08-05-2008, 09:42 AM   #21
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Most desktop Linux systems use a script that parses one or more configuration files, and starts the networking device. Often this is called 'ifup' or a name similar to that. On a desktop system, these scripts may be quite complex. Your embedded system may also use a similar arrangement and you can read it to understand how the network gets started. This is one area where an embedded device may be significantly customized and it would be difficult to generalize about what it might include.
You could start by checking whether there is an ethernet driver for your ethernet hardware loaded (lsmod). If yes, then the usual first step would be to run ifconfig. If no, then loading and configuring the driver would be your next step (modprobe or insmod).
You may be able to glean information about the state of hardware initialization from dmesg. I am mostly unfamiliar with the processes involved with starting a USB subsystem, although it is likely conceptually similar to the networking setup.
When you say 'USB pen drive its not recognized by the system', what have you done to determine this?
--- rod.
 
Old 08-06-2008, 10:17 AM   #22
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi,
In desktop systems I saw a temporary drive is mounted when I plug in a USB device. I read few of the documents and basics from http://www.usb.org. USB driver too like PCI driver do a "plug and play" to check if any new device is connected or not.whenever a new device is inserted to a PCI slot the PCI driver tries to identify the device, then registers it with a driver. similar is the case with USB . If its USB mouse, it is registered as Human Interface Device and a usb interface is shown in /sys/devices/pci---/usb2/. If its pen drive it should mounted a temporary drive.
So when I connected the pen drive to my hardware board I thought it should be recognized and a temporary file system should be mounted, but its not happening. I tried to find if any interface is created or not in "/sys/devices/pci---/usb2/". I didn't find any.
thanks in advance
regards
kiran
 
Old 08-06-2008, 12:09 PM   #23
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
A tool which will give you some useful information is lsusb (man lsusb). This should tell you whether the thumbdrive is seen at the USB level. After that, fdisk -l may show that a filesystem on the device is recognizable. If so, you can try mounting it manually.
There is a system utility called udev (plus hotplug) which uses a set of configuration files for creating device files when a device is plugged in or enabled in some way. This is likely to be part of the solution to automatically mounting the device in your filesystem.
--- rod.
 
Old 08-16-2008, 12:31 AM   #24
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi rod,
our previous mails really helped me alot to understand the linux internels.
I came up with few more queries while exploring the linux booting process....
I want to know what is a Board support package is?
what it contains? how to create such a package for embedded linux?
are there any tools in open source to develop and debug BSP?
How this BSP is different from Boot programs such as Uboot or LILO?
can we debug bootloader too using GNU tools or any other open source tools?
 
Old 08-17-2008, 09:52 AM   #25
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
A board support package (BSP) is the collection of drivers, kernel mod's, and tools that allow the OS to run on a particular hardware platform, and provide access to the facilities that the hardware provides. Since Linux was originally targeted to the Intel PC platform, that target naturally has the greatest degree of support. Others that have ported Linux to other platforms have written what amounts to BSPs for those platforms. BSPs may be provided by hardware vendors, OS vendors (other OS's also use the term 'BSP' to describe the same customizations), or may be developed by third parties.
In order to write a BSP, you should have thorough documentation of the target hardware, especially including chip data sheets, and an understanding of the target compiler toolchain. The boot process is one customization that may be part of a BSP. In a protected mode OS like Linux, most of the BSP will be running in kernel mode, so debugging aid is largely limited to messaging that you snd to system log files for post-mortem examination. Sometimes, it can be useful to write the skeleton of a driver as a user-mode program, in order to gain an understanding of how a particular chip or sub-system works, and then move the functionality into a proper kernel driver. In an embedded systems environment, a common aid is the JTAG interface. This a more or less industry standard interface that is used for communicating with the hardware, and for downloading code to the target. This is particularly useful when there is no console on which to display diagnostic output. Cross-debuggers may be able to use the JTAG interface to assist in target debugging. I do not know the details of how this is implemented, and if another reader can add some information about it, I would be interested to read it. If your target has an RS-232 port, it can be a valuable aid as a way of sending diagnostic output to a terminal for inspection and logging. If the BSP you are developing requires you to write support for the RS-232 interface, I would make it a high priority, so you can leverage it to assist in further development.
Writing a BSP is not an easy task. If your target platform is a commonly used product, it has probably already been done. It would be worthwhile to find out if such is the case. It may be that a package has been written for a similar hardware platform, and simply needs a few additions or modifications. Do you have some particular target hardware in mind?

--- rod.
 
Old 09-02-2008, 09:34 AM   #26
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi,

I am using ARM AT9200 which is already having all the tools and BSP's including JTAG and RS-232 drivers to interact with the target board. The BSP queries I asked is becasue, while browzing different features and tools of each RTOS, I found Windows CE has tools to develop and debug BSP and bootloader. When I am working on RTOS like OSE, the bootloader and the BSP are provided by the Target board vender. So gave a thought if embedded linux to might have had such tools for its supporting target boards. Moreover thought how, if any error occurs in bootloader or BSP it is debugged in linux environment.
 
Old 09-24-2008, 10:48 AM   #27
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi, can any one suggest helpful guides to understand audio and video drivers and how to design them.
thanks in advance.
regards
kumar
 
Old 01-10-2009, 05:59 PM   #28
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi,

Can any one give an idea on linux device file modal?
I am facing a weird problem with one of the device driver. I compiled and build the driver successfully and got *.ko file. I used "mknod /dev/filename type majornumber" command and created a device file in /dev directory. then i wrote an application to open the device file and executed it.
I get an error message "No device or file with "filename". in /dev
can any one suggest where i am going wrong. I read about udev and hotplugging etc., but i want this device driver to load statically. when i try to open some other device driver like "Console" using the same application it is executing successfully.

thanks and regards
kiran
 
Old 01-11-2009, 10:55 AM   #29
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Did you get an error message from mknod? According to all I know, it requires both a major and minor number. What do you see with
Code:
ls -l /dev/filname
after you try to instantiate the device with mknod?

--- rod.
 
Old 01-14-2009, 12:51 PM   #30
kirany
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Hi rod,
How are doing?
When I call mknod /dev/filename major minor to instantiate the device file is successfully created in /dev
when I do ls -l /dev/filename it returns the filename with major and minor numbers too.
I feel there is some problem in my driver code while registering. actually i am calling register method with major = 0, so that kernel assigns major number dynamically.
when i do insmod the device driver module is successfully loaded and in /proc/modules i could see the dd module name.
then i am using the major number and minor number displayed in that /proc/modules and doing mknod.
after that i am trying to open the driver using the application.
 
  


Reply

Tags
help



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
power down on an embedded board knobby67 Debian 2 09-05-2018 11:27 PM
ARM based WinCE/Embedded Linux Development Board (SBC) @ jointech.com.hk jointech Linux - Hardware 2 09-01-2007 12:44 AM
SuSE on an Embedded Soekris Board? jantman Linux - Hardware 3 01-01-2007 06:24 PM
LXer: Embedded Linux webinars cover real-time, board bring-up, more LXer Syndicated Linux News 0 09-08-2006 03:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 07:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration