Saturday, September 11, 2010

TS101: gcc compiler

TS101 is a powerpc based architecture.
There is a mini-native-powerpc compiler that one can find at uClibc that will work for the TS101.
I tested the 0.9.30 (click here to get it), at the time of this post there is also a 0.9.30.1.
Note that this post uses information and directory structure from previous posts.
When you have the tar ball on your NAS, log as administrator and do the following commands:
mkdir /mnt/HDA_ROOT/mini-native-powerpc
cd /mnt/HDA_ROOT/mini-native-powerpc
tar -xjf mini-native-powerpc.tar.bz2

edit /share/HDA_DATA/adminfiles/addprofile.sh2 and add the following lines:
/bin/echo "export PATH=$PATH:/mnt/HDA_ROOT/mini-native-powerpc/bin" >> /etc/profile

This sh2 file will be automatically called at next startup of the TS (see previous post).
So restarting the TS will give you a gcc compiler.

Friday, September 10, 2010

TS101: improve ethernet performances

This post is using information from the SpeedGuide.net that should improve the performance of the ethernet link of the TS.
This configuration was tested and is working but I have not done any bench to check if I really get improvement. Anyway, it should not be worth. ;-)
Assuming you are using the previous post method for having .sh2 files called at startup,
create a file named /share/HDA_DATA/adminfiles/config_ethernet.sh2
add the following lines in it:
ifconfig eth0 txqueuelen 50000
echo 1 > /proc/sys/net/ipv4/tcp_rfc1337
echo 2 > /proc/sys/net/ipv4/tcp_frto
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
echo 0 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_low_latency
echo 1 > /proc/sys/net/ipv4/tcp_ecn
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling

TS101:setup an autorun.sh on your harddrive

The autorun.sh is a script used by the TS to initialise and launch application at startup.
This file is unfortunatly located in an ext2 filesystem in the flash memory of the TS.
This filesystem is unmounted after bootup. Modifying this file can then endanger the system if you forget to unmount it after modification.
To overcome this issue, I propose to setup a file on your harddrive that will be called by autorun.sh at startup.


1. create the file on your harddrive
mkdir /share/HDA_DATA/adminfiles
cd /share/HDA_DATA/adminfiles
touch myautorun.sh
chmod +x myautorun.sh


2. call myautorun.sh from autorun.sh
(see previous post for editing autorun.sh)
add the following lines:

#call user script located on harddrive
[ -f /share/HDA_DATA/adminfiles/myautorun.sh ] && /share/HDA_DATA/adminfiles/myautorun.sh


Don't forget to unmount /tmp/config after modifications

3. I propose that you give your myautorun.sh the following lines:
#!/bin/sh
echo "Starting myautorun script:"
for file in /share/HDA_DATA/adminfiles/*.sh2;
do
echo $file;
[ -f $file ] && $file;
done

Then any file you may add in this directory with extension .sh2 will be executed at startup

Thursday, September 09, 2010

Install SVN client to TS 101

1. Update the list of available packages
/opt/bin/ipkg update

2. Install svn
/opt/bin/ipkg install svn

This actually also install some svn server stuff, but there is some more configuration to be done to have an svn server up and running. Have to check if this is possible over apache...

optware Installation on TS-101

With optware installed on the turbostation you can manage additional packages easily.
This post follows the post from glomde but add some corrections while doing it at the same time.

1. Change /opt location

a. create a /mnt/HDA_ROOT/opt directory
mkdir /mnt/HDA_ROOT/opt

b. edit your autorun.sh (see previous post for that) and add the following lines
if [ -d /opt ]; then rmdir /opt; fi
if [ -e /opt ]; then true; else ln -sf /mnt/HDA_ROOT/opt /opt

c. reboot your TS

2. Get and install latest ipkg. Currently the below is latest
a. find the name of the lattest version

cd /tmp
wget http://ipkg.nslu2-linux.org/feeds/optware/ts101/cross/unstable
grep "ipkg-opt" index.html | grep "powerpc\.ipk"

at the time of this post, the result was ipkg-opt_0.99.163-10_powerpc.ipk

b. download it
wget http://ipkg.nslu2-linux.org/feeds/optware/ts101/cross/unstable/ipkg-opt_0.99.163-10_powerpc.ipk
tar -zxOf ipkg-opt_0.99.163-10_powerpc.ipk ./data.tar.gz | tar -zx -C /

c. Configure it

echo src ts101a http://sources.nslu2-linux.org/feeds/optware/ts101/cross/stable/ >> /opt/etc/ipkg.conf
echo src ts101b http://ipkg.nslu2-linux.org/feeds/optware/ts101/cross/unstable >> /opt/etc/ipkg.conf

3. Backitup
cd /share/Public
tar -cf backup.tar /opt