Tag Archive: gumstix


Wlan otomatik bir essid ile başlamak ve statik ip atamak:

vi /etc/network/interfaces dosyasını açıp şunları ekliyoruz;

auto wlan0

iface wlan0 inet static

pre-up /sbin/iwconfig wlan0 essid beagleNet #essid adını veriyoruz (örnekte: beagleNet))

pre-up /sbin/iwconfig wlan0 txpower on

address 10.10.220.255 #bu ip sizin vereceğiniz ip olacak

netmask 255.255.240.0  #bu da sizin vereceğiniz ağ maskesi

/sbin/ifconfig wlan0 up # wlan0 için bir nevi yeniden başlat komutu

düzenleme işlei sonunda dosyayı kapatıp kaydediyoruz. Sonrasında;

reboot

komutu ile yeniden başlatıyoruz. İşte bu kadar basit.

Gerekli PWC web kamera sürücü dosyaları ve Video 4 Linux sürücüleri zaten Gumstix program kaynak kod ağacı içinde bulunmaktadır. Tek yapılması gereken kernelin bitbake işlemiyle derlenmesidir, böylece PWC web kameralar için kernel modülü sürücüleri oluşturulur.

Bu derleme işleminde önce derlemek istediğimiz paket programların kaynak kodlarını

user.collection dosyasına konulması gerekir. Tüm paketlerin derlenmesi için tüm Linux paketleri user.collection dosyasına aktarılır.

Sonraki adım olarak .config dosyası bulunup düzenlenmesi gerekir. Bu dosya /tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/ dizininde bulunur.

cd /tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/

komutuyla bu dizinin içine girilir ve şu komut çalıştırılır:

make ARCH=arm menuconfig

Komut bir süre sonra kernel ayarları değişikiliği yapılabilen menü tabanlı bir ara yüz açar.

Bu arayüzü kullanarak derlemek istediğimiz özel kernel modüllerini seçebiliriz.     Kernel     modülü olarak derlemek istediğimiz paketleri m tuşu ile seçilmelidir (yanında <M> görünür)

Aşağıdaki yollar izlenerek seçimler yapılır:

–> Multimedia devices –> Video For Linux

–> Multimedia devices –> Video Capture Adapters –> V4L USB Devices –> usb philips camera

Tüm seçimler bittikten sonra yeni bir .config dosyası oluşur, ve bu .config dosyası user.collection dosyası içindeki defconfig dosyası üzerine yazılır. Bu dosya linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/ dizininde bulunmaktadır.

Tüm işlemler sonunda şu komut ile kernel derlemesi başlatışlır:

bitbake -c rebuild gumstix-kernel

Nispeten uzun bir derleme sonunda istediğimiz kernel modülleri derlenmiş olur.

Derleme sonucunda bize gerekli olan şu kernel modülleri oluşur:

compat_ioctl.ko

v4l1-compat.ko

v4l2-common.ko

videodev.ko

pwc.ko.

Bu modüllerden pwc hariç dördü olan compat_ioctl.ko, v4l1-compat.ko, v4l2-common.ko, videodev.ko dosyaları Gumstix içindeki /lib/modules/2.6.21/kernel/drivers/media/video dizinine ve pwc.ko ise kendi dizini olan …/kernel/drivers/media/video/pwc içine aktarılır. Son olarak da:

depmod –a

komutu çalıştırılarak sistemin modülleri tanıması sağlanır.

Sistem yeniden başlatılır ve kullanıma hazır olur. Bu işlemler sonucunda PWC web kamera sürücülerini kullanan web kameralar (Philips marka web kameraları çoğu) Gumstix tarafından tanınır ve kullanılabilir.

Sistemin web kamerayı tanıdığını görebilmek için:

dmesg

komutu çalıştırılarak son satırdan USB ihazın tanınıp tanınmadığına bakılır.

Pre-requisites

I will assume you have set up Open Embedded on your build machine and have built one of the image recipes through to completion so you know all the bitbake elements actually work and it builds without errors. That’s all that’s essential I think – however if you haven’t done this already, I highly recommend setting the gumstix up to boot and run from an SD or CF card. The advantages are you can keep the whole of the kernel and filesystem on the card and have no space limitation problems – and it’s very quick and easy to change things just by loading the card into your desktop machine.

Pwc driver webcams

Outline

What you are going to do is rebuild the kernel, having custom edited the kernel config file, to produce a custom kernel with the appropriate drivers activated as modules. The sources for the pwc driver, the Video 4 Linux drivers and other drivers needed are already built into the build system so when you rebuild the kernel with bitbake, you get a new kernel and ipk packages for the modules which you can then install.

You want to make any custom changes in the user.collection folder. Why? Anything in user.collection takes priority over the same recipe elsewhere, but if you mess anything up (or just want to go back to the original configuration) you can delete the contents of user.collection and start over.

Step 1: Copy To user.collection

So the first step is to copy over the recipes for the kernel build and associated files into user.collection. Copy the whole “linux” package folder across from com.gumstix.collection/packages into user.collection/packages.

Step 2: Edit the .config

Next, find the .config file which was produced when you built your first (or subsequent) image. It should be in /tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/ (or connex etc. if you have a connex and not a verdex). The kernel version actually used by the build will change over time – this is the one mine currently uses.

CD into this directory and type:

 make ARCH=arm menuconfig

After a bit of crunching a menu based kernel configuration tool opens up. You can step through this and enable whatever you want – generally (but not always) you have the choice of building the driver into the kernel or building as a module. You want to build pwc and the associated drivers as modules so you will need to enter “M” where appropriate.

Here are the entries you want to change to build pwc and the supporting v4l support. You might want to wander through the menus though and change other stuff – for example I have modified my boot from SD card to run an ext3 filesystem.

–> Device drivers –> USB Support –> Support for host-side USB

–> Device drivers –> USB Support –> turn off USB Gadget support

–> Multimedia devices –> Video For Linux

–> Multimedia devices –> Video Capture Adapters –> V4L USB Devices –> usb philips camera

When you are satisfied with the result, save it. This writes a new .config file back to the same place. Now you want to copy this file over the default kernel config file (defconfig) in user.collection, replacing it.

This will be in linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/ (or connex etc). Make sure you target the file for the same version of the kernel your build uses.

Now type “bitbake -c rebuild gumstix-kernel”. You should end up, when the build process finishes, with a new kernel and a series of ipks in tmp/deploy. You may, however, get a message saying the kernel file is too big.

You can override the size checker by adding the following line to your gumstix-custom-verdex.conf file ( in /conf/machine/)

KERNEL_IMAGE_MAXSIZE += “1070000″ (or whatever, a bit bigger than the expected size of the kernel).

Again, I would copy over the conf files into user.collection and edit them there. Making the kernel bigger is fine if like me you are booting from a card with 2GB of space and therefore don’t care about the size of the kernel. If you really need to get the kernel under 1MB however you might have to go back to do some pruning of your changes to get the kernel to fit – so back to “menuconfig” etc.

You then replace your kernel with the newly built one, and install the ipks. There are 5 in total, for the following *.ko modules: compat_ioctl.ko, v4l1-compat.ko, v4l2-common.ko, videodev.ko, and pwc.ko.

The package manager should take care of the installation but you can install the modules manually – the four modules other than pwc.ko go in /lib/modules/2.6.21/kernel/drivers/media/video, and pwc goes in it’s own subdirectory in …. …/kernel/drivers/media/video/pwc. Then do depmod -a so your system recognises the modules.

The modules are now installed but not active. When you plug in your camera, however, the hotplugger should recognise the camera and load up the modules. If you can, try this with a connection over a serial port as then you will see the kernel messages over the port – otherwise run “dmesg”. This should show your camera being recognised and if you go into /dev, you should see the new device (/dev/video0 if this is your only video device).

Seeing the output

So far so good, you might say, but how do I get a picture? I’m sure there are many ways of accessing the driver. I used a package called motion. It’s pretty straightforward to build and install motion and turn on the built in webserver. There is a bitbake recipe for motion which built for me with no problems. The documentation for motion is good – you do more or less everything by editing the conf file. One of the options is to set up a mini webserver. If you then view the webpage created from another machine, you should see your webcam picture, provided you don’t use I E which can’t handle the streaming format – but Firefox works fine if your viewing machine is running Windows.

source:  www.gumstix.net

Bu işlem çok uzun sürebilir, internet bağlantısı gerektirmektedir.

Aşağıdaki işlemler sırasıyla yapılmalıdır:

1-)

sudo dpkg-reconfigure dash

2-)

sudo apt-get update

sudo apt-get install build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk

sudo apt-get install python-dev python-pysqlite2 python-psyco ckermit lrzsz subversion

3-)

mkdir ~/gumstix

cd ~/gumstix

svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe

cat gumstix-oe/extras/profile >> ~/.bashrc

sudo groupadd oe

sudo usermod -a -G oe YOUR_CURRENT_USERNAME

sudo mkdir /usr/share/sources

sudo chgrp oe /usr/share/sources

sudo chmod 0775 /usr/share/sources

sudo chmod ug+s /usr/share/sources

4-) İşlemlerimizde sorun olmaması için gcc’yi sürümünü düşürüyoruz:

sudo aptitude install gcc-4.1 g++-4.1

sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc

sudo ln -sf /usr/bin/g++-4.1 /usr/bin/g++

5-) Oturumu kapatıp açın.

6-) bitbake gumstix-basic-image komutunu çalıştırın.

6.a) Eğer hata verirse:

gumstix/gumstix-oe/tmp/work/i686-linux/dbus-native-1.0.1-r0/dbus-1.0.1/dbus/dbus-sysdeps-unix.c dosyasını açın ve şu yapıyı ekleyin(header lardan hemen sonrasına);

struct ucred {

unsigned int pid;

unsigned int uid;

unsigned int gid;

};

tekrar,

bitbake gumstix-basic-image çalıştırın,

6.b) Eğer yine tekrar hata verirse;

gumstix/gumstix-oe/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/scripts/mod/sumversion.c dosyasını düzenlemek için açın ve şunu ekleyin;

#include <limits.h>

tekrar,

bitbake gumstix-basic-image çalıştırın,

6.c) Eğer yine hata verirse;

http://download.gnome.org/sources/GConf-dbus/2.16/GConf-dbus-2.16.0.tar.gz

dosyasını indirin aşağıdaki yere taşıyın ve onu aşağıdaki şekilde yeniden adlandırın:

/usr/share/sources/trunk_developer.imendio.com_.svn.gconf-dbus_606_.tar.gz

ve tekrar deneyin:

bitbake gumstix-basic-image

Kolay gelsin…

WordPress.com'dan blog alın. | Tema Motion, volcanic tarafından yapılmıştır.
Takip Et

Get every new post delivered to your Inbox.