Friday, October 3, 2014

Building a p2 repository with tycho

  1. Use packing type
      <packaging>eclipse-repository</packaging>
  2. Use plugin
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-p2-publisher-plugin</artifactId>
            <version>${tycho-version}</version>
            <configuration>
              <publishArtifacts>true</publishArtifacts>
            </configuration>
          </plugin>
        </plugins>
      </build>
  3. What's included in the repository depends on which files are present in the project. The plugin executes 2 commands tycho-p2-publisher-plugin:publish-products and tycho-p2-publisher-plugin:publish-categories. It seems that publish-products looks a a *.product file in the project and adds all features referenced in this file to the repository. The publish-categories command searches for a categories.xml and adds the features referenced here to the repository. To limit the repository content to only the new plugins without any dependencies it is best to create a separate project with just a categories.xml file for the repository and use a different project for the product build. This way the product can contain additional eclipse features that need not be part of the repository.

Sunday, November 10, 2013

Fix Broken Bluetooth After Sleep in Kubuntu 13.10

Buetooth is broken after sleep with 3.11 kernel used in Kubuntu 13.10. The workaround:

Create a file /etc/pm/sleep.d/10_bluetooth with the following content

 #!/bin/bash
#Code from http://ubuntuforums.org/showthread.php?t=1387211

. /usr/lib/pm-utils/functions

case "$1" in
    hibernate|suspend)
        rfkill block bluetooth
        ;;
    thaw|resume)
        rfkill unblock bluetooth
        ;;
    *)
        ;;
esac

exit



Set permissions

chmod 755 10_bluetooth

Dell BH200 Headset in Kubuntu 13.10

The Dell BH200 bluetooth headset doesn't pair. There's a bug in the headset. The workaroud:

echo 'Y' > /sys/module/bluetooth/parameters/disable_esco

Monday, July 22, 2013

Debugging OCaml on Ubuntu

A Debian patch breaks OCaml debugging on Ubuntu by messing with the bytecode file format. See /usr/share/doc/ocaml-nox/README.Debian for the fix. Set OCAML_COMPAT=c in .bashrc.

Thursday, April 18, 2013

CIL Notes

  • CIL on github: 
    http://kerneis.github.com/cil/
  • Pass an additional parameter to a plugin (note the '=')
    cilly --dovardecls --pom-path="." ...
  • Don't invoke the compiler
    CILLY_DONT_COMPILE_AFTER_MERGE=1 cilly ...
  • ...

Saturday, January 5, 2013

Fixing Low CPU Frequency

My Laptop (Dell Latitude E6520) sometimes gets stuck on the lowest CPU frequency setting. This happens when it is connected to power, suspended, disconnected from power, and resumes. This can be fixed by setting the governor to performance and then back to ondemand.
 
sudo bash -c '
for gov in $(ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor); do
  echo performance > $gov;
done'

sudo bash -c '
for gov in $(ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor); do
  echo ondemand > $gov;
done'
 
For some reason this does not work any more. When switching back to ondemand the frequency gets stuck again. As a workaround one can switch to conservative and leave it there.

sudo bash -c '
for gov in $(ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor); do
  echo conservative > $gov;
done'