SheevaPlug Ubuntu rootfs (rootstock)


sudo apt-get install rootstock
sudo apt-get install -y qemu qemu-kvm-extras debootstrap

# download
#wget -P /tmp
wget -P /tmp

# extract
#tar xzf /tmp/rootstock-0.1.3.tar.gz -C /tmp/
tar xzf /tmp/rootstock- -C /tmp/

# build
#sudo /tmp/rootstock-*/rootstock -f sheevaplug -l sheevaplug -p terceS -d jaunty --serial ttyS0 --seed ssh
sudo /tmp/rootstock-*/rootstock -f sheevaplug -l sheevaplug -p terceS -d oneiric --serial ttyS0 --seed ssh

# format sd card

# mount sd card
mount /dev/mmcblk0p1 /mnt/

# extrackt to sd card
tar xzf armel-rootfs-*.tgz -C /mnt/

# get debian kernel
wget -P /tmp
tar xjf /tmp/base.tar.bz2 -C /tmp/
cp -a /tmp/boot/* /mnt/boot/
cp -a /tmp/lib/modules/2.6.32-5-kirkwood/ /mnt/lib/modules/

mv /mnt/boot/uImage /mnt/boot/uImage.old

#wget -P /mnt/boot/
wget -P /mnt/boot/uImage

#wget -P /tmp/
wget -P /tmp/

#tar xzf /tmp/sheeva- -C /mnt/
tar xzf /tmp/sheeva-3.1.2-Modules.tar.gz -C /mnt/

cat <> /mnt/etc/network/interfaces
auto eth0
iface eth0 inet dhcp

cd /
umount /mnt

# login
user: sheevaplug
pass: terceS

# set new password for root

# sync time

# update system
apt-get update
apt-get -y dist-upgrade

# Create printserver
apt-get install python
wget -O /usr/sbin/jetpipe
chmod a+x /usr/sbin/jetpipe

vi /etc/rc.local
(add bevore exit 0)
/usr/sbin/jetpipe /dev/usb/lp0 9100

cat < /etc/udev/rules.d/90-printer.rules
KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0482", ACTION=="add", RUN+="/usr/sbin/jetpipe /dev/usb/lp0 9100"

update-rc.d defautls

locale-gen en_US.UTF-8
echo LANG=en_US.UTF-8 >> /etc/environment
echo LC_ALL=en_US.UTF-8 >> /etc/environment

# add mounts
cd /etc/rc0.d
ln -s ../init.d/
cd /etc/rc1.d
ln -s ../init.d/
cd /etc/rc2.d
ln -s ../init.d/
cd /etc/rc3.d
ln -s ../init.d/
cd /etc/rc4.d
ln -s ../init.d/
cd /etc/rc5.d
ln -s ../init.d/
cd /etc/rc6.d
ln -s ../init.d/

# create dir for apt-get
add to /etc/rc.local
mkdir -p /var/cache/apt/archives/partial