Monthly Archives: January 2013

Prepare a package (Pioneers) for a Debian i18n-release

Pioneers needs an i18n update, but Debian is in deep freeze, so only i18n related patches (and security patches) will be accepted.

  • Get all patches:
    gawk 'BEGIN { i=1812; while (i < 1844) { print "svn diff -r " (i-1) ":" i " > svn" i ".patch"; i++ }}' | sh
  • Review the patches and remove all non-i18n, non-security related patches
  • Prepare the repository, go to the moment of the last release:
    svn update -r 1812
  • Fetch all updates to the debian packaging:
    cd debian;svn update
  • Prepare quilt as instructed in the Debian wiki:
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
  • Prepare quilt:
    quilt push -a
  • Apply each relevant patch:
    quilt new svn1819.diff
    lsdiff svn1819.patch | xargs quilt add
    quilt remove ChangeLog
    patch -p0 -i svn1819.patch
    quilt refresh
    quilt header --dep3 -e
      Description: as in the ChangeLog
      Author: as in the ChangeLog
      Origin: upstream
      Applied-upstream: svn revision 1819
  • End quilt:
    quilt pop -a
  • Add all patches to svn
  • Start the release cycle

Connecting a DVB-T stick to the SheevaPlug

The stock Debian kernel (2.6.32-5-kirkwood) does not have the kernel module for the DVB-T stick with USB-ID: 1d19:1102 (Aldi) or 0ccd:00d7 (Terratec TStick+). I’ve use the following steps from the description by Dionysios Fragkopoulos:

  • Install the kernel headers:
    # aptitude install linux-headers-`uname-r`
  • Install the requirements:
    # aptitude install patchutils libproc-processtable-perl wget bzip2
  • Get the source code:
    $ git clone git://linuxtv.org/media_build.git
  • Build it:
    $ ./build
    Note: It takes more than 630MiB, so extra disk space must be attached to the SheevaPlug (non-FAT partition)
  • Copy the modules to the kernel path (manually, because I want to save disk space on the root partition):
    # cp rtl283?.ko /lib/modules/2.6.32-5-kirkwood/kernel/drivers/media/dvb/dvb-usb
    # cp dvb-usb-rtl28xxu.ko /lib/modules/2.6.32-5-kirkwood/kernel/drivers/media/dvb/dvb-usb
    # cp dvb_usb_v2.ko /lib/modules/2.6.32-5-kirkwood/kernel/drivers/media/dvb/dvb-usb
  • Update the module list:
    # depmod -a
  • Plug in the usb device

It works!
The /dev/dvb/adapter0 devices are now present.

Next steps to write in the blog:

  1. Configure the stick
  2. Configure PVR software

Use a regular Debian kernel on the Sheevaplug

A long time ago I found information about installing ubifs on the Sheevaplug.
However, it used a non-Debian kernel. This port describes the steps to boot from a regular Debian kernel.

The information used is found here, here, here and here.

$ dpkg-reconfigure linux-image-2.6.32-5-kirkwood
A warning is issued about the name of the root device ubi0:rootfs
$ flash-kernel
It doesn’t write to the flash memory, but generates /boot/uImage and /boot/uInitrd

The following environment is used in U-Boot (version 2011.12):

baudrate=115200
bootargs=console=ttyS0,115200 mtdparts=orion_nand:512k(uboot),4m@1m(kernel),507m@5m(rootfs) rw ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
bootcmd=run bootubi
bootdelay=3
bootnand=${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; ${x_bootcmd_usb}; ${x_bootcmd_sata}; bootm 0x6400000;
bootubi=run x_bootcmd_ubi; run x_bootcmd_regular; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x800000 0x1100000;
ethact=egiga0
ethaddr=XX:XX:XX:XX:XX:XX
mtddevname=uImage
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x0500000(rootfs)
partition=nand0,0
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200 mtdparts=orion_nand:512k(uboot),4m@1m(kernel),507m@5m(rootfs) rw
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
x_bootcmd_kernel=nand read 0x6400000 0x100000 0x400000
x_bootcmd_regular=setenv mainlineLinux yes; setenv arcNumber 2097;
x_bootcmd_sata=ide reset;
x_bootcmd_ubi=ubi part nand0,1; ubifsmount rootfs; ubifsload 0x800000 /boot/uImage; ubifsload 0x1100000 /boot/uInitrd;
x_bootcmd_usb=usb start;

In order to use the setenv command, the $ and ; must be escaped with a backslash.The highlighted parts are the parts I needed for a correct boot.