NSLU2-Linux
view · edit · print · history

Peripherals.USBRemote History

Hide minor edits - Show changes to markup

April 18, 2007, at 05:11 PM by Marco Kubon -- edited wrong link
Changed lines 13-14 from:

Even though it's mentioned somewhere else in this wiki in AddAnInfraredReceiverAndTransmitterWithLIRC? the lirc package is not in the package repository for OpenSlug and my slug is configured for native compilation, bitbake won't work for me, I do not have a cross development environment set up.

to:

Even though it's mentioned somewhere else in this wiki in AddAnInfraredReceiverAndTransmitterWithLIRC the lirc package is not in the package repository for OpenSlug and my slug is configured for native compilation, bitbake won't work for me, I do not have a cross development environment set up.

September 25, 2006, at 10:40 AM by hs -- +Safe shutdown via remote
Added line 55:
 SHUTDOWN='sudo shutdown -h now'
September 25, 2006, at 09:58 AM by hs -- +Safe shutdown via remote
Changed line 26 from:
  CC      init/main.o \\
to:

CC init/main.o\\

Added lines 46-65:

Misc tips

Safe shutdown via remote

Suppose you want to be able to power off your nslu2 via a remote, but you fear that you (or your curious guests/kids) could accidentially tap on the power button while your mega important backup job runs.

Use a script snippet like the following and assign it to the power button action.

 POWERSTAMP=/var/run/CONFIGURE_ME/power.stamp
 if [ -f $POWERSTAMP ]; then
         last=$(cat $POWERSTAMP)
         now=$(date "+%s")
         diff=$(($now-$last))
         if [ $diff -gt 2 -a $diff -lt 10 ]; then
                 $SHUTDOWN
         fi
 fi
 date "+%s" > $POWERSTAMP

That way you have to press the button twice with a delay between 2 and 10 seconds.

September 25, 2006, at 09:51 AM by hs -- formatting
Changed lines 17-19 from:

Set up your native build environment

  1. ipkg install slugos-native
to:

Using a native build environment

  1. Set up your native build environment
    ipkg install slugos-native
Changed lines 23-28 from:
  1. Run the kernel build at least up to the point where all the symlinks in the include

directory are created, this bit had me stumped for a while, I thought that the symlinks would have been created at the end of the configuration step (no reason to go through the whole build process though!), so that's

  1. * make
    • wait for
      CC init/main.o
      then you can interrupt the kernel build (messy...)
to:
  1. Run the kernel build at least up to the point where all the symlinks in the include directory are created, this bit had me stumped for a while, I thought that the symlinks would have been created at the end of the configuration step (no reason to go through the whole build process though!), so that's
    • make
    • wait for
      CC init/main.o
      then you can interrupt the kernel build (messy...)
Changed line 38 from:
    CC      init/main.o. 
to:

CC init/main.o.

Changed lines 42-43 from:
  depmod -a
  modprobe -v lirc-dev
to:

depmod -a
modprobe -v lirc-dev

September 25, 2006, at 09:47 AM by hs -- formatting
Changed lines 1-4 from:

this page is a work in progress, I'm keeping notes here as I go and will tidy up when it's done...

I'm building a car computer based on the slug and wanted to run 'lirc' for remote control of madplay as per http://www2.informatik.hu-berlin.de/~hofer/projects/howto/mpd-lirc-miniHOWTO.html these instructions.

to:

This page is a work in progress, I'm keeping notes here as I go and will tidy up when it's done...


Intro

I'm building a car computer based on the slug and wanted to run 'lirc' for remote control of madplay as per these instructions.

Changed lines 17-25 from:

first get your native build environment set up:

ipkg install slugos-native

install the kernel sources in /usr/src/ , current version is 2.6.12.2 on my openslug

and configure the kernel for your Slug.

Run the kernel build at least up to the point where all the symlinks in the include

to:

Set up your native build environment

  1. ipkg install slugos-native
  2. install the kernel sources in /usr/src/, current version is 2.6.12.2 on my openslug
  3. and configure the kernel for your Slug.
  4. Run the kernel build at least up to the point where all the symlinks in the include
Changed lines 24-55 from:

make

wait for

  CC      init/main.o

then you can interrupt the kernel build (messy...)

Next install the lirc source code, configure and make install

[DebianSlug] If you're running DebianSlug, installing Lirc is as easy as apt-get install lirc. However, if you want to get Lirc modules working, it's a _MUCH_ different story. Follow my instructions below to save yourself from ripping your hair off, as I did:

first, install lirc, lirc-modules-source, module-assistant - as well as compile tools (gcc, binutils, make, autoconf...etc) using apt get:

apt-get install lirc lirc-modules-source module-assistant

next, you need to get the openslung kernel source, not the debian sources! If you have a mastermakefile/openembedded/bitbake crosscompile enviroment, there should be kernel sources somewhere in there - slugos-3.10-beta\debianslug-nslu2.tmp\work\ixp4xx-kernel-2.6.16-r6.4. If you don't, you probably should build this crosscompile as it will take hours on the nslu2. Just do a make debianslug-image. I don't know of any other way to get the kernel source, and whatever you do, DON'T USE a generic kernel as you WILL get module errors.

Figure out which version of gcc your kernel was compiled with using uname. If you're running slugos-3.10 this is probably gcc-3.4, so you need to get it and make sure the version in /usr/bin/gcc is 3.4, you might have to rename the old gcc and mv gcc-3.4 gcc. Check with gcc -v. Go to the kernel source directory and type make modules, and break (ctrl+C) when it says CC init/main.o.

Finally, put the kernel sources in /usr/src/linux. If you don't have enough space on your slug, like me, you can always use smbfs (apt-get install smbfs) to mount a network drive (mount -t smbfs -username=x, password=x /myserver/myshare /mnt/destdir) and symlink it (cd /usr/src, ln -s /mylinuxsrcdir).

Now, run module-assistant by typing m-a. You don't need to set it up or configure it, just go to the last option to select the module you want to build (lirc-modules) and hit build, and let it autoinstall. press exit to get out of module-assist.

now, check if the modules you wanted are installed with modprobe, depmod -a modprobe -v lirc-dev

and hopefully it worked! otherwise use dmesg and see what went wrong, you probably compiled with the wrong kernel headers or wrong version of gcc. alternatively, you can download the lirc source, it's much easier to configure! you'll still need the kernel headers from OE/bitbake though!

to:
  1. * make
    • wait for
      CC init/main.o
      then you can interrupt the kernel build (messy...)
  2. Next install the lirc source code, configure and make install

DebianSlug

If you're running DebianSlug, installing Lirc is as easy as apt-get install lirc. However, if you want to get Lirc modules working, it's a much different story. Follow my instructions below to save yourself from ripping your hair off, as I did:

  1. first, install lirc, lirc-modules-source, module-assistant - as well as compile tools (gcc, binutils, make, autoconf...etc) using apt get:
    apt-get install lirc lirc-modules-source module-assistant
  2. next, you need to get the openslung kernel source, not the debian sources! If you have a mastermakefile/openembedded/bitbake crosscompile enviroment, there should be kernel sources somewhere in there - slugos-3.10-beta\debianslug-nslu2.tmp\work\ixp4xx-kernel-2.6.16-r6.4. If you don't, you probably should build this crosscompile as it will take hours on the nslu2. Just do a make debianslug-image. I don't know of any other way to get the kernel source, and whatever you do, don't use a generic kernel as you will get module errors.
  3. Figure out which version of gcc your kernel was compiled with using uname. If you're running slugos-3.10 this is probably gcc-3.4, so you need to get it and make sure the version in /usr/bin/gcc is 3.4, you might have to rename the old gcc and ln -s gcc-3.4 gcc. Check with gcc -v. Go to the kernel source directory and type make modules, and break (ctrl+C) when it says
    CC init/main.o.
  4. Finally, put the kernel sources in /usr/src/linux. If you don't have enough space on your slug, like me, you can always use smbfs (apt-get install smbfs) to mount a network drive (mount -t smbfs -username=x, password=x /myserver/myshare /mnt/destdir) and symlink it (cd /usr/src, ln -s /mylinuxsrcdir).
  5. Now, run module-assistant by typing m-a. You don't need to set it up or configure it, just go to the last option to select the module you want to build (lirc-modules) and hit //build//, and let it autoinstall. Press //exit// to get out of module-assist.
  6. now, check if the modules you wanted are installed with modprobe,
    depmod -a modprobe -v lirc-dev
  7. and hopefully it worked! otherwise use dmesg and see what went wrong, you probably compiled with the wrong kernel headers or wrong version of gcc. alternatively, you can download the lirc source, it's much easier to configure! you'll still need the kernel headers from OE/bitbake though!
August 15, 2006, at 05:45 AM by MichaelWei -- added debian info (messy)
Added lines 7-8:

Debianslug users, read below.

Deleted lines 32-33:
Changed lines 35-54 from:
to:

[DebianSlug] If you're running DebianSlug, installing Lirc is as easy as apt-get install lirc. However, if you want to get Lirc modules working, it's a _MUCH_ different story. Follow my instructions below to save yourself from ripping your hair off, as I did:

first, install lirc, lirc-modules-source, module-assistant - as well as compile tools (gcc, binutils, make, autoconf...etc) using apt get:

apt-get install lirc lirc-modules-source module-assistant

next, you need to get the openslung kernel source, not the debian sources! If you have a mastermakefile/openembedded/bitbake crosscompile enviroment, there should be kernel sources somewhere in there - slugos-3.10-beta\debianslug-nslu2.tmp\work\ixp4xx-kernel-2.6.16-r6.4. If you don't, you probably should build this crosscompile as it will take hours on the nslu2. Just do a make debianslug-image. I don't know of any other way to get the kernel source, and whatever you do, DON'T USE a generic kernel as you WILL get module errors.

Figure out which version of gcc your kernel was compiled with using uname. If you're running slugos-3.10 this is probably gcc-3.4, so you need to get it and make sure the version in /usr/bin/gcc is 3.4, you might have to rename the old gcc and mv gcc-3.4 gcc. Check with gcc -v. Go to the kernel source directory and type make modules, and break (ctrl+C) when it says CC init/main.o.

Finally, put the kernel sources in /usr/src/linux. If you don't have enough space on your slug, like me, you can always use smbfs (apt-get install smbfs) to mount a network drive (mount -t smbfs -username=x, password=x /myserver/myshare /mnt/destdir) and symlink it (cd /usr/src, ln -s /mylinuxsrcdir).

Now, run module-assistant by typing m-a. You don't need to set it up or configure it, just go to the last option to select the module you want to build (lirc-modules) and hit build, and let it autoinstall. press exit to get out of module-assist.

now, check if the modules you wanted are installed with modprobe, depmod -a modprobe -v lirc-dev

and hopefully it worked! otherwise use dmesg and see what went wrong, you probably compiled with the wrong kernel headers or wrong version of gcc. alternatively, you can download the lirc source, it's much easier to configure! you'll still need the kernel headers from OE/bitbake though!

July 07, 2006, at 08:56 PM by eFfeM -- openslug-native -> slugos-native
Deleted line 0:
Changed lines 13-14 from:

ipkg install openslug-native

to:

ipkg install slugos-native

May 02, 2006, at 10:04 PM by jacquesm --
Added lines 1-36:

this page is a work in progress, I'm keeping notes here as I go and will tidy up when it's done...

I'm building a car computer based on the slug and wanted to run 'lirc' for remote control of madplay as per http://www2.informatik.hu-berlin.de/~hofer/projects/howto/mpd-lirc-miniHOWTO.html these instructions.

This bit of information assumes you're running OpenSlug, I don't know how much (or if any) of it would apply to other versions of the slug firmware.

Even though it's mentioned somewhere else in this wiki in AddAnInfraredReceiverAndTransmitterWithLIRC? the lirc package is not in the package repository for OpenSlug and my slug is configured for native compilation, bitbake won't work for me, I do not have a cross development environment set up.

So, here's how to set up for a native compilation of lirc on the slug:

first get your native build environment set up:

ipkg install openslug-native

install the kernel sources in /usr/src/ , current version is 2.6.12.2 on my openslug

and configure the kernel for your Slug.

Run the kernel build at least up to the point where all the symlinks in the include directory are created, this bit had me stumped for a while, I thought that the symlinks would have been created at the end of the configuration step (no reason to go through the whole build process though!), so that's

make

wait for

  CC      init/main.o

then you can interrupt the kernel build (messy...)

Next install the lirc source code, configure and make install

view · edit · print · history · Last edited by Marco Kubon.
Based on work by hs, MichaelWei, and eFfeM.
Originally by jacquesm.
Page last modified on April 18, 2007, at 05:11 PM