-
Notifications
You must be signed in to change notification settings - Fork 54
Home
Welcome to the yocto-manifest wiki!
This page has been created to catch miscellaneous, yet still time-saving, information about the BSP layer. For an overview, please visit the official software development section
There are 3 different images that you can build with the Gumstix BSP Layer.
- Gumstix Console Image - This is console-only image
- Gumstix XFCE Image - This is a desktop image built on top of the console image
- Gumstix Test Image - This image contains tools required to test features such as the Caspa camera
Different COMs and SBCs use different Linux kernels
Platform | Previous Stable | Current Stable |
---|---|---|
Overo | [omap-3.5] (https://github.com/gumstix/linux/tree/omap-3.5) (config) | 3.17.y (config) |
Duovero | omap-3.6 (config) | 3.17.y (config) |
Pepper | pepper-3.14 (config) | 3.17.y (config) |
Bitbake's clean option (eg. bitbake -c clean virtual/kernel
) does not completely remove the build data. This is especially true for the boot loader and kernel packages. You can do the following to rebuild these packages:
bitbake -f -c compile virtual/kernel
bitbake -f -c deploy virtual/kernel
By default both tar ball and ubi images (ie. gumstix-test-image-overo.tar.bz2 and gumstix-test-image-overo.ubi) are created. If you don't need the ubi image, you can disable it in the machine configuration file for your build target.
For overo, change meta-gumstix/conf/machine/overo.conf:
from
IMAGES_FSTYPE += "tar.bz2 ubi"
to
IMAGES_FSTYPE += "tar.bz2"
And duovero.conf and pepper.conf for Duovero and Pepper respectively.
Comment out the following line in conf/local.conf
to take out GDM from image
VIRTUAL-RUNTIME_graphical_init_manager = "gdm"
If you want to temporarily disable GDM while running your image, you can disable the service like this from console:
$ systemctl disable gdm
# Show _image's_ packages
bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq
# Check if certain _package_ is present on current Yocto Setup
bitbake -s | grep <pkg>
# List all tasks for _package_
bitbake -c listtasks <package>
# Show versions
#bitbake --show-versions | grep <package>
You can search for available Linux applications, tools and libraries that can be easily added to the Gumstix Yocto Project images from the Recipe page of OpenEmbedded Layer Index.
Edit your gumstix-console-image.bb
or gumstix-xfce-image.bb
in meta-gumstix-xfce-image/recipes/images/
to add and/or remove recipes.
You can login as root
without password.
#For ethernet connection Ethernet connection is detected and eth0 is configured automatically. No additional steps are necessary.
#For wireless connections, Please modify /etc/wpa_supplicant/wpa_supplicant-wlan0.conf with your SSID and passphrase and reboot the machine. This will configure wlan0 with an IP. It is recommended to have the external antenna always connected.
Note: If no SSID is given in the wpa_supplicant-wlan0.conf, the wlan0 will try to connect to any open network available and you might see it hopping from one network to another.
$ systemctl enable bluetooth.service
$ hcitool scan #should reveal bluetooth devices in the vicinity
$ systemctl enable bluetooth.service
From Yocto Project 1.5 and on, serial gadget driver is built into the Gumstix Linux kernel. Hence even if your board does not have a dedicated serial console port, you can use an existing USB-otg port for serial communication. Once you connect the USB-otg port of your Gumstix board to one of your computer's USB ports, you should see a new device in /dev
. You can check the exact name by running dmesg
from your computer's console. Usually the new device has the name of /dev/ttyACM0
. Use minicom or kermit to access your Gumstix through this device.
Due to the way USB controller is implemented, we have to load a gadget driver for an MUSB port to work as the host mode. There is an extra step for Duovero:
1. As mentioned in my original post, I enabled the "USB gadget driver"
and "USB OTG support" through menuconfig.
2. I tried loading the driver at run-time using "modprobe g_serial" ==>
But no use, device not detected on OTG port.
3. I loaded the driver at boot time ==> For this, make a file
"g_serial.conf" in /etc/modules.d/ on target board (duoVero here).
Content of the file:
g_serial
Actually, this specifies the name of driver to be loaded at boot
time, that is "g_serial" in our case.
4. Reboot/hard-reset the board with USB device connected on OTG port.
5. See the results and your device connected using "lsusb" command.
See original post
- Build kernel, kernel modules, and a new rootfs with
g_mass_storage
support. In other words, markMass Storage Gadget
asM
, as a module, in the kernel config, and bitbake a new image. - Deploy the new kernel and rootfs to your uSD card.
- You can mount the boot partition of your COM as follow:
$ modprobe g_mass_storage file=/dev/mmcblk0
- On your host machine, your COM should appear as a USB storage device.
For debug tips take a look at here
-
On the target
modprobe g_ether
-
On the host
HOST_USB_IP=10.0.1.1 sudo ifconfig usb0 $HOST_USB_IP netmask 255.255.255.0
-
On the target
HOST_USB_IP=10.0.1.1 TARGET_USB_IP=10.0.1.2 ifconfig usb0 $TARGET_USB_IP netmask 255.255.255.0 route add default gw $HOST_USB_IP
-
Test connection from target to host
ping -c 5 10.0.1.1
##Auto login into XFCE LXDM does not adopt to small screens very well. For example, the user selector is not visible on 4.3 inch resistive touch screens available for Overo and Pepper.
You can simply bypass the login screen with this:
/etc/lxdm/lxdm.conf
## uncomment and set autologin username to enable autologin
autologin=gumstix
##Setting time zone
The default time zone is UTC (tzdata
).
root@duovero:~$ date
Fri May 2 22:24:58 UTC 2014
You can set it to your own time zone like below:
root@duovero:~$ ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
root@duovero:~$ date
Fri May 2 15:30:41 PDT 2014
You can also set it during the image creation time. Scott at Jumpnow Technologies has posted this:
...
set_local_timezone() {
ln -sf /usr/share/zoneinfo/EST5EDT ${IMAGE_ROOTFS}/etc/localtime
}
ROOTFS_POSTPROCESS_COMMAND += " \
set_local_timezone ; \
"
root@duovero:~# date
Mon Apr 14 11:31:52 EDT 2014
You can append the above in the image recipe.
##Using Duovero Zepher as Wireless Access Point Access point mode can be supported using Duovero Zepher's Wi2Wi 0015 chip. Scott at Jumpnow Technologies has written a thorough article on getting it configured.
##Adding Joystick support
#bitbake -c menuconfig virtual/kernel
enable input device joystick "*"
#bitbake -f -c compile virtual/kernel
#bitbake -f -c deploy virtual/kernel
/dev/input/js0 is now detected.
##Change Touchscreen Orientation on Pepper
To change the orientation of the screen, add the line Option "Rotate" "CCW"
in /etc/X11/xorg.conf
Section "Device"
Identifier "Builtin Default fbdev Device 0"
Driver "fbdev"
Option "Rotate" "CCW"
EndSection
Also you will probably want to correct the touch sensor orientation. Add Option "SwapAxes" "true"
and Option "InvertX" "true"
in /usr/share/X11/xorg.conf.d/10-evdev.conf
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "SwapAxes" "true"
Option "InvertX" "true"
EndSection
[ref] http://elinux.org/CircuitCo:BeagleBone_LCD7
- Boot the board and connet it to the Internet, enable the ethernet by:
ifup eth0
- Download runpy.py to the python library folder
cd /usr/lib/python2.7/
wget http://svn.python.org/projects/python/trunk/Lib/runpy.py
- Goes to the folder of the web server root and type:
python -m SimpleHTTPServer
If the COM and your PC are in the same LAN, You should be able to access the folder content by:
http://your.board.ip.address/8000
The python-pip is provided through the recipe:
poky/meta-openembedded/meta-python/recipes-devtools/python/python-pip_1.3.1.bb
We can add the recipe to the image we want to build, for example if we want to build a gumstix-console-image. We can edit
./meta-gumstix-extras/recipes-images/gumstix/gumstix-console-image.bb
Add python-pip to gumstix-console-image.bb
shawn@beech:~/yocto/poky/meta-gumstix-extras/recipes-images/gumstix$ git diff
diff --git a/recipes-images/gumstix/gumstix-console-image.bb b/recipes-images/gumstix/gumstix-
index bfcbde7..f254dd8 100644
--- a/recipes-images/gumstix/gumstix-console-image.bb
+++ b/recipes-images/gumstix/gumstix-console-image.bb
@@ -32,6 +32,7 @@ NETWORK_TOOLS_INSTALL = " \
iputils \
iw \
ntp \
"
MEDIA_TOOLS_INSTALL = " \
@@ -61,6 +62,7 @@ UTILITIES_INSTALL = " \
vim \
wget \
zip \
+ python-pip \ // I added python-pip here
"
IMAGE_INSTALL += " \
Now build the gumstix-console-image, flash the uSD card and enjoy python pip
- Add iperf to recipes-images/gumstix/gumstix-console-image.bb
@@ -61,6 +62,7 @@ UTILITIES_INSTALL = " \
vim \
wget \
zip \
+ iperf \ // make iperf to build into the image
Build and flash the image.
- There is one PC(192.168.0.100) and one DuoVero (192.168.0.111) connected to the same LAN Let's set PC as server
iperf -s -P 1 -i 1 -p 5001 -C -f k
On DuoVero (192.168.0.111)
iperf -c 192.168.1.100
[More instructions on iperf] (http://openmaniak.com/iperf.php)
We can use jperf on PC side to visualize the testing result [Instructions on jperf] (https://code.google.com/p/xjperf/)
Edit the file in /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="your network name" # You network name
proto=WPA2 # try WPA RSN if you WPA2 fails
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
scan_ssid=1
psk="your pass word" #you passwd here
priority=10
}
Then use command to enable the wlan interface
ifup mlan0
OR you can use
ifconfig mlan0 up
wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf&
Marvell Bluetooth 3.0 chip is available on DuoVero™ Zephyr COM. The steps described below maybe usable for USB Bluetooth devices as well, but it is not tested at the moment.
The kernel environment is Linux DuoVero 3.6.11
The following messages from dmesg
show the Bluetooth driver is properly initialised:
[ 25.884857] Bluetooth: Core ver 2.16
[ 25.890655] Bluetooth: HCI device and connection manager initialized
[ 25.895996] Bluetooth: HCI socket layer initialized
[ 25.899719] Bluetooth: L2CAP socket layer initialized
[ 25.903686] Bluetooth: SCO socket layer initialized
[ 26.083221] Bluetooth: vendor=0x2df, device=0x911a, class=255, fn=2
[ 27.388702] Bluetooth: vendor=0x2df, device=0x911b, class=255, fn=3
[ 27.892120] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 27.897399] Bluetooth: BNEP filters: protocol multicast
There are three Bluetooth utilities be used: hciconfig, hcitool and l2ping
hciconfig
is used for local Bluetooth device management, some useful hciconfig commands:
hciconfig -a #list all active Bluetooth device
hciconfig hci0 piscan # Set DuoVero as a discoverable device
hciconfig hci0 class 010704 # Set DuoVero as a car audio device the Bluetooth class
hcitool is used for remote Bluetooth discovery and connection management, some useful hcitool commands:
hcitool scan # scan and list current Bluetooth device that is visible
l2ping can be used to test if a device is reachable. The result address of hcitool scan should respond to l2ping request
l2ping XX:XX:XX:XX:XX
- Download bluez-4.99.tar.gz source and extract it
wget http://pkgs.fedoraproject.org/repo/pkgs/bluez/bluez-4.99.tar.gz/570aa10692ed890aa0a4297b37824912/bluez-4.99.tar.gz
tar xvzf bluez-4.99.tar.gz
There are two useful scripts we can use:
1). bluez-4.99/test/simple-agent #This is used for pairing a pin for Bluetooth device.
2). bluez-4.99/test/test-audio #This is used for establishing a audio test channel on Bluetooth.
Run the following command to make a connection to Bluetooth speaker. I used an INSIGNIA Bluetooth speaker, Model No:NS-SPBT02-G-C :
bluez-4.99/test/simple-agent hci0 XX:XX:XX:XX:XX:XX #XX:XX:XX:XX:XX:XX is the speaker Bluetooth address discovered by hcitool scan. First, turn on the speaker, the LED on the speaker will start to flash blue and red. This means the device is in pairing mode. Execute the command and the Bluetooth agent should be created. You only need to do this once. If there is a notification showing the agent is already created, you can skip this step.
bluez-4.99/test/test-audio connect XX:XX:XX:XX:XX:XX # This will connect DuoVero to the speaker. The flashing LED will become constant blue once the connection is established.
Write a configuration file at ~/.asoundrc
, One example of .asoundrc
file (Replace xx:xx:xx:xx:xx:xx with the target bluetooth device address):
pcm.bluetooth {
type bluetooth
device "xx:xx:xx:xx:xx:xx" # This should be the target bluetooth device address
profile "auto"
}
Change the settings in /etc/bluetooth/audio.conf
The contents of /etc/bluetooth/audio.conf
:
root@duovero:/etc/bluetooth$ cat audio.conf
# Configuration file for the audio service
# This section contains options which are not specific to any
# particular interface
[General]
Enable=Source,Sink,Headset,Gateway,Control,Socket,Media
# Switch to master role for incoming connections (defaults to true)
#Master=true
# If we want to disable support for specific services
# Defaults to supporting all implemented services
#Disable=Gateway,Source,Socket
# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI
SCORouting=PCM
# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
AutoConnect=true
# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)
[Headset]
# Set to true to support HFP, false means only HSP is supported
# Defaults to true
HFP=true
# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnected=1
# Set to true to enable use of fast connectable mode (faster page scanning)
# for HFP when incoming call starts. Default settings are restored after
# call is answered or rejected. Page scan interval is much shorter and page
# scan type changed to interlaced. Such allows faster connection initiated
# by a headset.
FastConnectable=false
# Just an example of potential config options for the other interfaces
#[A2DP]
#SBCSources=1
#MPEG12Sources=0
Reboot the board and connect using the test-audio Python script
bluez-4.99/test/test-audio connect XX:XX:XX:XX:XX:XX
We can use aplay
to play audio on Bluetooth device:
aplay -D plug:bluetooth some.wav
If you want to play on the native audio-out on DuoVero:
aplay -D some.wav
./var/lib/bluetooth
folder contains currently Bluetooth paired and trusted devices
If you want to change the volume of the playback, edit the configuration file at ~/.asoundrc
and add the following lines to it:
pcm.softvol
{
type softvol
slave.pcm "bluetooth"
control.name "Bluetooth Playback Volume"
control.card 0
}
Note: The control name must end with "Playback Volume" because this prevents the alsamixer from showing it as capture control. Refer to the alsa page for more details.