Sunday, April 8, 2007

geexbox & dropbear (sshd): issues

in scripts/gentree add :

mkdir -p $INSTALL/root
mkdir -p $INSTALL/.ssh


in packages/initrd/scripts/linuxrc add:

cp -a "$GEEXBOX/root" /
progress 47000 "copying system into ram"
cp -a "$GEEXBOX/.ssh" /
progress 48000 "copying system into ram"

in packages/dropbear create a directory named init.d and put there the following script, naming it as 51_sshd :

#!/bin/sh
#
# start ssh daemon
#
# runlevels: geexbox, debug

# get options
test -f /etc/network || exit 1
. /etc/network

/usr/bin/dropbear >/dev/null 2>&1 &

exit 0

Saturday, April 7, 2007

geexbox & nano mini how-to

In order to include the nano editor inside the geexbox linux distribution, the following steps has to be made:

  1. Download the geexbox sources
  2. Compile it in order to have a working toolchain
  3. In the sources directory create a new directory named nano
  4. Download the last distribution of nano from http://www.nano-editor.org/dist/v2.0/nano-2.0.3.tar.gz and put it in the nano directory
  5. Now in the packages directory, add a directory named nano and create the following files here:

    packages/build :

    #!/bin/sh

    . config/options

    $SCRIPTS/build toolchain
    $SCRIPTS/build ncurses

    CFLAGS="-L$LIB_PREFIX -lncurses"

    cd $BUILD/$1*
    ./configure --host=$TARGET_NAME \
    --build=$HOST_NAME \
    --libdir=$LIB_PREFIX\
    --includedir=$LIB_PREFIX/include\
    --enable-tiny
    make


    packages/install :

    #!/bin/sh

    . config/options

    cp $BUILD/$1*/src/$1 $INSTALL/usr/bin
    packages/url:

    http://www.nano-editor.org/dist/v2.0/nano-2.0.3.tar.gz
  6. Nano uses ncurses library, so in the packages/ncurses/install file, add:

    $SCRIPTS/build nano

    and in the line:

    libstrip $SO $BUILD/$1*/lib/libncurses.a "$BUILD/dialog*/dialog $BUILD/util-linux*/fdisk/cfdisk $BUILD/gdb*/objdir/gdb/gdb"

    insert:

    $BUILD/nano*/src/nano

    after ".../gdb"

  7. In scripts/gentree add:

    $SCRIPTS/install nano $1

  8. Finally, a make will build a new .iso, including the nano editor