Compiling custom kernel has its own advantages and disadvantages.
However, new Linux user / admin find it difficult to compile Linux
kernel. Compiling kernel needs to understand few things and then just
type couple of commands. This step by step howto covers compiling Linux
kernel version 2.6.xx under Debian GNU Linux. However, instructions
remains the same for any other distribution except for apt-get command.
Step # 1 Get Latest Linux kernel code
Visit http://kernel.org/ and
download the latest source code. File name would be
linux-x.y.z.tar.bz2, where x.y.z is actual version number. For example
file inux-2.6.25.tar.bz2 represents 2.6.25 kernel version. Use wget
command to download kernel source code:
$ cd /tmp
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2
Note: Replace x.y.z with actual version number.
Step # 2 Extract tar (.tar.bz3) file
Type the following command:
# tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src
# cd /usr/src
Step # 3 Configure kernel
Before you configure kernel make sure you have development tools
(gcc compilers and related tools) are installed on your system. If gcc
compiler and tools are not installed then use apt-get command under
Debian Linux to install development tools.
# apt-get install gcc
Now you can start kernel configuration by typing any one of the command:
- $ make menuconfig - Text based color menus, radiolists &
dialogs. This option also useful on remote server if you wanna compile
kernel remotely. - $ make xconfig - X windows (Qt) based configuration tool, works best under KDE desktop
- $ make gconfig - X windows (Gtk) based configuration tool, works best under Gnome Dekstop.
For example make menuconfig command launches following screen:
$ make menuconfig
You have to select different options as per your need. Each
configuration option has HELP button associated with it so select help
button to get help.
Step # 4 Compile kernel
Start compiling to create a compressed kernel image, enter:
$ make
Start compiling to kernel modules:
$ make modules
Install kernel modules (become a root user, use su command):
$ su -
# make modules_install
Step # 5 Install kernel
So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.
# make install
It will install three files into /boot directory as well as modification to your kernel grub configuration file:
- System.map-2.6.25
- config-2.6.25
- vmlinuz-2.6.25
Step # 6: Create an initrd image
Type the following command at a shell prompt:
# cd /boot
# mkinitrd -o initrd.img-2.6.25 2.6.25
initrd images contains device driver which needed to load rest of
the operating system later on. Not all computer requires initrd, but it
is safe to create one.
Step # 7 Modify Grub configuration file - /boot/grub/menu.lst
Open file using vi:
# vi /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.25 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.25
savedefault
boot
Remember to setup correct root=/dev/hdXX device. Save and close the
file. If you think editing and writing all lines by hand is too much
for you, try out update-grub command to update the lines for each
kernel in /boot/grub/menu.lst file. Just type the command:
# update-grub
Neat. Huh?
Step # 8 : Reboot computer and boot into your new kernel
Just issue reboot command:
# reboot
For more information see:
- Our Exploring Linux kernel article and Compiling Linux Kernel module only.
- Official README file has more information on kernel and software
requirement to compile it. This file is kernel source directory tree. - Documentation/ directory has interesting kernel documentation for you in kernel source tree.
Original source:http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html
Tags: AI,Art,kernel,SoftWare,ubuntu linux kernel,WORK
在安装新的OSS驱动之前,如果系统中还有残留的驱动文件存在,安装过程是不能够完成的,因此首先要做的就是查看一下,系统内是否有以前的驱动存在。方法如下:
1 在终端下进入目录/var/lib/dpkg/info,命令 cd /var/lib/dpkg/info
2 删除所有以oss-linux开头的文件,命令sudo rm oss-linux*
3 编辑文件/var/lib/dpkg/status,sudo gedit /var/lib/dpkg/status,找到关于oss-linux的有关内容,并将其删除(内容如下)
Status: install ok installed
Priority: extra
Section: alien
Installed-Size: 8440
Maintainer: root <root@dev-desktop>
Architecture: amd64
Version: v4.0rc9-999
Depends: libatk1.0-0 (>= 1.12.1), libc6 (>= 2.4-1), libcairo2 (>= 1.2.4), libfontconfig1 (>= 2.3.0), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.10.3), libpango1.0-0 (>= 1.14.5), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxfixes3, libxi6, libxinerama1, libxrandr2, libxrender1
Conffiles:
/etc/oss.conf 055432d38aaf37fc6de3dba4a95accc3
Description: Open Sound System sound drivers for Linux
Open Sound System for Linux (OSS/Linux) is a commercial quality sound driver
distributed by 4Front Technologies (http://www.opensound.com). OSS provides
support for practically all sound cards on the market including PnP and
many PCI ones. Installation and configuration is higly automated and easy to
perform. To obtain technical support and additional features, you will need to
order a license key from http://www.opensound.com/order.html
(Converted from a rpm package by alien version 8.64.)
4 查看oss-linux当前状态,命令 sudo dpkg –purge oss-linux,则会显示如下信息
dpkg - warning: ignoring request to remove oss-linux which isn’t installed.
5 安装oss-linux,命令 sudo dpkg -i oss-linux_v4.0-1013_i386.deb,安装显示信息如下
brucebot@brucebot-laptop:~/MyDownloads$ sudo dpkg -i oss-linux_v4.0-1013_i386.deb
Selecting previously deselected package oss-linux.
(Reading database … 132118 files and directories currently installed.)
Unpacking oss-linux (from oss-linux_v4.0-1013_i386.deb) …
Setting up oss-linux (v4.0-1013) …
Building OSS Modules for Linux-unknown 2.6.22-14-generic
OSS build environment set up for REGPARM kernels
Building module osscore
Building module ali5455
Building module allegro
Building module als300
Building module als4000
Building module apci97
Building module atiaudio
Building module audigyls
Building module audioloop
Building module audiopci
Building module cmi8788
Building module cmpci
Building module cs4280
Building module cs4281
Building module digi32
Building module digi96
Building module emu10k1x
Building module envy24
Building module envy24ht
Building module fm801
Building module geode
Building module hdaudio
Building module hdsp
Building module ich
Building module imux
Building module lynxone
Building module lynxtwo
Building module maestro
Building module neomagic
Building module ossusb
Building module riptide
Building module s3vibes
Building module sblive
Building module sbxfi
Building module softoss
Building module solo
Building module sonorus
Building module trident
Building module via8233
Building module via97
Building module vmix
Building module vortex
Building module ymf7xx
depmod -a
—————————–
Detected Intel High Definition Audio (ICH8)
Detected Generic USB audio device (BETA)
Detected OSS Transparent Virtual Mixing Architecture
—————————–
Starting Open Sound System
Tags: AI,Art,brucebot,G1,kernel,SoftWare,status,终端
ChRoMicro - Cheap Robotic Microhelicopter HOWTO
Copyright © 2005 pascal.brisset@wanadoo.fr
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.

Table of Contents
- 1. Introduction
- 2. Off-the-shelf Components
-
- 2.1. Helicopter platform
- 2.2. Embedded computer
- 2.3. Other equipment
- 3. Hardware
-
- 3.1. Voltage regulator mod
- 3.2. PWM injection mod
- 3.3. Xbox controller mod
- 4. Software
- 5. System integration
- 6. Operation
- 7. Disclaimer
- 8. Related open-source projects
- 9. Roadmap
-
- 9.1. Weight reduction
- 9.2. PWM generator accuracy
- 9.3. Sensors
- 9.4. Bluetooth QoS
- 9.5. WiFi datalink
- 9.6. Bluetooth-enabled controller
- 9.7. Flight control software
- References
- Glossary
List of Figures
- 1. Contents of the integrated controller in a typical commercial microhelicopter kit.
- 2. RC receiver board details and modifications (in red).
- 3. Mixer configuration xpad_ccpm120_mode2.mix.
- 4. Coefficients for 120° CCPM mixing.
- 5. Helicopter + ARM + Linux.
- 6. Rear view with connector on I/O daughterboard.
- 7. Bluetooth remote control overview.
List of Tables
RCmodel helicopter prices have reached a point where all sorts ofchallenging (i.e. crash-prone) robotics projects become affordable.This document explains how to build a 300 g, 3D-capable helicopter withembedded Linux and Bluetooth datalink for less than 500 EUR.
Asa proof of concept, we provide software which allows the helicopter tobe remotely controlled over Bluetooth with a PC joystick. Future workwill focus on the integration of sensors (IMU, altitude, magneticcompas, GPS, camera) and flight control software (either third-party ordedicated).
Anumber of inexpensive microhelicopters are now available to RC modelhobbyists: Ikarus Piccolo, MS Hornet, Carboon, Dragonfly, Hummingbird,Tiny, Aerohawk. These are essentially scaled-down versions of regularmodel helicopters, made possible by advances in battery technology.Some models have a rotor head with fixed collective pitch (FP), whileothers have both cyclic and collective pitch (CP). Most have adedicated tail motor rather than a variable-pitch tail rotor.
Arecent radical innovation is the "ProxFlyer" self-stabilizingdeformable rotor design. Unfortunately, current commercialimplementations are too small to be used as robotic platforms. Besides,stability is obtained by sacrificing maneuverability.
For this project we use a commercial ARF microelicopter kit containing:
-
A pre-assembled helicopter with collective-pitch rotor, two brushed motors and three miniature servos
-
An electronics package with BEC, 6-channel RC receiver, yaw gyro, and motor drivers
-
A 41 MHz 6-channel RC transmitter with hardwired CCPM mixing
-
A 11.1 V, 850 mAh lithium-polymer battery
-
A battery charger.
The aircraft weighs 270 g and can lift at least 50 g of payload.
Theelectronics package is a "black box" which connects all componentstogether. This is in contrast with larger model helicopters, where theconnections between the receiver, gyro, BEC and motor drivers areexposed and documented. Integrating all these components reduces size,weight and cost, but makes modifications harder.
Fortunately,in some commercial microhelicopters, the "black box" can be tinkeredwith fairly easily. It actually consists of two boards connectedback-to-back with a 2×3-pin connector (see Figure 1):
-
A generic RC receiver board with seven 3-pin PWM servo outputs.
-
A power/gyro board with BEC, gyro, failsafe, and motor controllers.
Table 1 lists the PWM outputs, two of which are routed internally between the two boards.
Table 1. RC receiver PWM outputs.
| Channel | Usage |
|---|---|
| 1 | Right servo |
| 2 | Front servo |
| 3 | Main motor (internally connected to the power/gyro board) |
| 4 | Tail rotor (internally connected to the power/gyro board) |
| 5 | Unused |
| 6 | Left servo |
| B | Unused (12 ms sync pulses) |
Any similar helicopter can be used. The main requirements are:
-
The controller board must use PWM signals. Generating PCM signals would require more work, especially if proprietary encodings are involved.
-
The controller board must expose the multiplexed PWM signal between the FM radio receiver and the demultiplexer (see Section 3.2), or at least the PWM inputs to the motor drivers.
-
The helicopter must be strong enough to lift at least 30 g of payload.
-
The battery must be able to supply 200mA of additional current.
We use a Gumstix single-board computer with the following features:
-
200 MHz XScale PXA255 processor (ARM)
-
4 MiB flash with factory-installed Linux-2.6.10 and utilities
-
64 MiB SDRAM
-
General-purpose I/O pins
-
I/O daughterboard with 2.54 mm pads
-
I2C bus
-
Bluetooth module and antenna
-
Comprehensive software development environment
Some features are not used:
-
Hardware PWM generator: Intended for driving the brightness and contrast of a LCD display. We need more than two channels.
-
USB client interface: Intended for ARM-based PDAs. usbnet is useful for logging into the Gumstix, but we can use Bluetooth instead.
The power/gyro board has two +5 V voltage regulators labelled CX1117-5.0 and mounted in parallel. Idle current is 50 mA.
Sincethis +5 V rail is exposed on each servo connector (including the unusedones), the Gumstix can be conveniently powered from it. In order toaccomodate the extra current (100-200 mA total), it might be necessaryto replace the two voltage regulators with a larger, externally-mounted7805.
In order control the helicopter, we modify the RC receiver board so that the Gumstix can inject its own PWM signal into the PWM demultiplexer.
Why not get rid of the receiver board entirely and generate five PWM signals with the Gumstix ? The proposed approach has several advantages:
-
No need to build a custom PCB.
-
Only three wires between the Gumstix and the helicopter (GND, +5 V, multiplexed PWM).
-
The PWM demultiplexer adds one layer of electrical isolation between the Gumstix and the power electronics.
Figure 2 shows details of a typical RC receiver board and the modification. Simply cut the correct PCB trace(s) and connect both ends to a 2-pin connector outside of the plastic enclosure. Chronograms should help locate the signals.
The original functionality can be restored by disconnecting the Gumstix and inserting a jumper.
Xbox controllers are widely available, cheap, and have well-defined functionality (unlike PC joysticks). They can be connected to a PC by replacing the proprietary connector with a USB plug.
Alternatively, any USB joystick (a.k.a. joypad or gamepad) with two dual-axis analog sticks can be used. In this case the mixer configuration file must be adjusted to match the layout of the axes (see Section 4.3).
Source code is available from http://perso.wanadoo.fr/pascal.brisset/chromicro/dist/chromicro-1.0.tgz.
pxa_mpwm.ko is a timer-based multi-channel PWM signal generator for the PXA255, implemented as a loadable kernel module for linux-2.6.10gum.
It can be configured to a generate a single multi-channel PWM signal and/or multiple single-channel PWM signals on GPIO pins. GPIO pins, channels and timings are configured with module parameters as illustrated in Table 2.
Table 2. MPWM configuration examples.
| Application | Module parameters |
|---|---|
| One output signal with 6 multiplexed PWM channels | modprobe pxa_mpwm gpio=61 nchans=6 tmin=500 tmax=1500 tpause=500 tsync=12000 |
| Same with single-channel servo outputs except CH5 | modprobe pxa_mpwm gpio=61 nchans=6 servo=58,59,60,62,-1,63 tmin=500 tmax=1500 tpause=500 tsync=12000 |
| Single-channel servo outputs only | modprobe pxa_mpwm nchans=6 servo=58,59,60,62,-1,63 tmin=500 tmax=1500 tpause=500 tsync=12000 |
User-mode programs drive the PWM generator through a device interface. See Table 3. PWM generation begins when a program opens the device and sets values for all channels. GPIO pins are reverted to a logical 1 when the program closes the device.
Table 3. MPWM devices.
| Device | Usage |
|---|---|
| /dev/mpwm0 | PWM signal #1 (all channels written at once) |
| /dev/mpwm0-0 | Channel #1 of PWM signal #1 |
| /dev/mpwm0-1 | Channel #2 of PWM signal #1 |
| /dev/mpwm0-2 | Channel #3 of PWM signal #1 |
| /dev/mpwm0-3 | Channel #4 of PWM signal #1 |
| /dev/mpwm0-4 | Channel #5 of PWM signal #1 |
| /dev/mpwm0-5 | Channel #6 of PWM signal #1 |
MPWM uses OSMR1 (OS Match Register 1), which is normally available on the Gumstix. (OSMR0 is used by the Linux system timer and OSMR3 is used by the watchdog.)
The PXA255 timer period is 270 ns, which provides 11 bits of resolution for a typical PWM signal with 1 ms range. Although MPWM uses a high-priority PXA255 FIQ rather than a regular IRQ, jitter can be as high as several microseconds. This is still good enough for flying a helicopter. See also Section 9.2.
bluerc_rxis a user-mode program designed to run on the Gumstix. It receives RCdata as UDP packets over a Bluetooth BNEP connection and forwards themto the PWM generator.
The program will terminate if it does notreceive any UDP packet during a configurable interval. This willdisable the PWM outputs and (hopefully) cause the power/gyro board toshutdown the motors.
Usage: bluerc_rx [-p
Example: bluerc_rx -p 9000 -t 2000 -c /dev/mpwm0
bluerc_txis a user-mode program designed to run on a Linux host with a Bluetoothdongle and a USB joystick. It reads the positions of the analog sticksand triggers, mixes them linearly into 6 RC channels, and sends thechannel values to the helicopter as 6-byte UDP packets over a BluetoothBNEP link.
Usage: bluerc_tx [-c
Example: bluerc_tx -c /dev/js0 -r 50 -m xpad_ccpm120_mode2.mix -d 192.168.10.1 -p 9000
The mapping from joystick axes to RC channels is defined by a matrix in the configuration file. Figure 3 shows the default setup.
Procedure 1. Trimming
-
Bring the sticks to the desired "neutral" setting.
-
Depress the "back" button.
-
Allow the sticks to return to their central position.
-
Release the "back" button.
In this scenario (Figure 7) we simply emulate a regular remote control. There are no sensors on the helicopter, no complex embedded software, and no feedback from the helicopter to the ground station.
For a quick start, try make tx and make rx in the src directory.
Procedure 2. Startup
-
Start bluerc_tx on the PC.
-
Connect the battery. The GPIO pin will be pulled high while the Gumstix is booting.
-
Setup networking over Bluetooth (BNEP). This can be automated with pand.
-
Load pxa_mpwm.ko on the Gumstix. The GPIO pin will be configured for output, but kept at logical 1.
-
Start bluerc_rx on the Gumstix. PWM will be generated as soon as UDP packets are received.
Procedure 3. Shutdown
-
Either disconnect the battery, stop bluerc_rx, or stop bluerc_tx.All alternatives should be equally safe. Note that with the original FMremote control, it is mandatory to disconnect the receiver or batterybefore stopping the transmitter.
Use these instructions and the related software at your own risk.
This is experimental software with none of the failsafe features one could expect in a commercial product.
Remote-controlledaircrafts are not toys. They are usually operated by properly-trainedand insured hobbyists on dedicated airfields.
Due to their mechanical complexity and moving parts, helicopters are among the most dangerous aircrafts.
Robotic aircrafts tend to wander in unpredictable ways.
Software dumps core; hardware just crashes.
Lithium-polymer batteries are known to burst in flames when damaged.
Bluetooth radio range is 10 m. This is not appropriate for outdoor flight.
rcpilot - http://rcpilot.sourceforge.net/
Autopilot - http://autopilot.sourceforge.net/
Paparazzi - http://www.nongnu.org/paparazzi/ (Note: I am *NOT* related to pascal.brisset (at) enac (dot) fr).
-
Remove the Gumstix daughterboard. Connect directly to the 60-pin Hirose connector.
-
Remove the RC receiver board. Generate 5 PWM signals.
Goal: Reduce the jitter of the timer-based PWM generator.
Lock the FIQ handler in the I/D cache ?
-
Inertial measurement unit. 6 DOF, I2C interface.
-
Video camera
-
Magnetometer. I2C interface.
-
Pressure (altitude, airspeed). I2C interface.
-
Camera.
9.5. WiFi datalink
Goal: Improve range.
Goal: Get rid of the computer.
Thanks to the next generation of videogame consoles, cheap Bluetooth joysticks should be available in 2006.
- Almost Ready to Fly (ARF)
-
Refers to a model aircraft which is sold pre-assembled.
- Battery-Elimination Circuit (BEC)
-
A DC-DC voltage converter (linear regulator or switching converter) which is used to power a RC receiver and servos from the same battery as the motors. Output is typically 4.8V or 5V.
- Bluetooth Network Encapsulation Protocol (BNEP)
-
Provides an ethernet-like interface (e.g. bnep0) at each end of a Bluetooth connection.
- Collective pitch (CP)
-
Refersto a helicopter rotor design with variable collective pitch. Thrust iscontrolled by varying either the collective pitch or the speed of themain motor.
See Also Fixed pitch.
- Cyclic-Collective Pitch Mixing (CCPM)
- Fixed pitch (FP)
-
Refersto a helicopter rotor design with cyclic pitch, but fixed collectivepitch. Thurst is controlled by varying the speed of the main motor.This causes more inertia than a "CP" helicopter. Besides, "FP"helicopters cannot fly inverted.
See Also Collective pitch.
- General-Purpose I/O (GPIO)
-
The PXA255 has 85 general-purpose pins which can be independently configured for input or output, or connected to integrated peripheral functions (e.g. serial ports and LCD).
- Global Positioning System (GPS)
- Inertial Measurement Unit (IMU)
-
Accelerometers (translation) and gyros (rotation)
- Lithium-Polymer (LiPo)
- Mode 1 / Mode 2 ()
-
Alternative layouts for axes on a RC helicopter transmitter.
- Printed Circuit Board (PCB)
- Pulse Code Modulation (PCM)
-
A generic term for digital transmission.
- Pulse Position Modulation (PPM)
-
An improper term for PWM, in RC terminology
- Pulse Width Modulation (PWM)
-
A modulation which encodes an analog signal into variable-length digital pulses.
- Unmanned Aerial Vehicle (UAV)
-
Not necessarily autonomous.
Tags: 2000,AI,Art,blog,China,google,kernel,robot,Robotics,Robotics,SAR,WIFI,WORK
昨天装上的Ubuntu,用着真是不一样,比RH好多了,比较简便,升级也比较智能,一个apt-get update, apt-get -y upgrade就能搞定所有的升级,并且这个系统官方宣传永远免费,可以非常方便的在线升级,现在最新版本的是5.04,包括了最新的linux kernel 2.6.10的内核,Gnome 2.10,X.org 6.8.2等,你可以去官方网站或中文镜像站点下载ISO文件,自己烧成CD安装,你也可以免费向Ubuntu团队免费索取CD.
Linux对于不太有钱的机器人爱好者们来说真是一种福音,而Ubuntu对于懒人更是一种福音,装上就可以用了,基本上能识别所有的硬件.我安装她用了一个半小时,系统在我的PII机子上运行非常良好,比RH快多了.我的机子的配置:PII350MHZ+Intel440BX+128MB SDRAM+40GB+Nvidia TNT 32MB.
Ubuntu" 是一个古非洲语单词, 意思是 "乐于分享". 班图精神也意味 "我和他人紧紧相连, 密不可分, 我们都在同一种生活之中. " Ubuntu Linux 也将班图精神带到了软件世界。
Ubuntu 是一个完全以 Linux 为基础的操作系统, 可自由的获得,并提供社区和专业的支持。
Ubuntu 宣言: 软件应免费提供,软件工具应能以人们本地语种的形式可用且不牺牲任何功能,人们应拥有定制及改变他们软件的自由,这包括以任何他们认为适宜的方式。
这些自由让 Ubuntu 从根本上与传统的专有软件不同: 不仅仅是你需要的免费工具,你有权利修正你的软件,直到它以你想要方式工作。
Ubuntu 团队对它的使用者公开的承诺:
- Ubuntu 永远免费 , 并且对于 "企业版本" 没有任何额外的费用, 在同样的自由团队上,将最好的工作成果带给每一个人。
- Ubuntu 包含了非常好的翻译和容易使用的架构,这些由自由软件社团将不断的提供, 将尽可能的使大多数人方便使用 Ubuntu 。
- Ubuntu 将有规律和计划的不断发布; 每 6 个月发布一个新版本。你可以使用当前稳定版本或者开发版本。每一种版本的安全升级将支持 18 个月。
- Ubuntu 完全忠于自由开源软件的发展; 我们鼓励人们使用自由开源软件 ,改进它和继续传递它。
Ubuntu 对于桌面和服务器都是合适的。当前 Ubuntu 发布版支持 Intel x86 (IBM-compatible PC),AMD64 (Hammer) and PowerPC (Apple iBook and Powerbook, G4 and G5) 架构。
Ubuntu 包含了超过 1,000 种软件, 使用 Linux kernel version 2.6 and Gnome 2.10,覆盖了所有的桌面应用程序, 包含了文字处理,电子表格, internet 应用程序, web server 软件, email 软件,开发设计工具, 常用工具, 当然还有一些游戏。
相关链接:
官方网站:https://www.ubuntulinux.org/
中文镜像站点:http://www.ubuntu.org.cn/
Tags: AI,google,kernel,SoftWare,Ubuntu,工作,机器人







最近评论