GPS problem

Gabor Laszlo glaszlo at gmail.com
Sat Oct 17 17:11:32 CEST 2009


On Fri, Oct 16, 2009 at 7:54 PM, Joachim Ott <jo.omsl at googlemail.com> wrote:
> 2009/10/12 Gabor Laszlo <glaszlo at gmail.com>:
>> I also finetuned my post-flash setup and install scripts, so
>> reflashing, updating and getting all my settings back is a matter of a
>> few commands and an hour's thumb-twiddling. If anyone is interested I
>> can post them.
>
> Yes, I'd like to look at that script. Actually I'd like 2 scripts, one
> to save my changes I made to system files on the FR to the desktop pc
> and the other script to merge this changes to a newly flashed system.

Well, I have all personal data on a flash card, including the scripts, so
after a reflash I just need to call /media/mmcblk0/setup.sh in the terminal.
Note that I moved Maps, Music, and Books to /media/card/home. Here's the
script:
### start setup.sh

#!/bin/sh
echo "# Set card device name"
sed -i -e 's/mmcblk0p1/mmcblk0/' /etc/fstab
grep card /etc/fstab
mount /media/card
mount |grep card

echo "# Relink home"
cd /media/card/home
for i in $(ls -a); do rm -rf ~/$i; done
cd
# link Books      .FBReader  Maps       .mplayer   Music      .navit
.purple    .ssh       .tangogps
ln -s /media/card/home/* .
ln -s /media/card/home/.* .

echo "# Configure network"
sed -i -e 's/192\.168\.0/192\.168\.1/g' /etc/network/interfaces
/etc/init.d/networking restart
ifconfig usb0

killall dropbear && dropbear

echo "# Set timezone"
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime

echo "# Resume speedup"
cat > /etc/init.d/resumespeedup << EOF
#!/bin/sh
/sbin/klogd -c 1
EOF

chmod +x /etc/init.d/resumespeedup
ln -s ../init.d/resumespeedup /etc/rc1.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc2.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc3.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc4.d/S06resumespeedup
ln -s ../init.d/resumespeedup /etc/rc5.d/S06resumespeedup

echo "# Depmod when needed"
cat > /etc/init.d/moduledepends << EOF
#!/bin/sh
if cmp /proc/version /var/lib/kernelversion; then
   echo Not recalculating the module dependencies: Kernel has not changed.
else
   echo Recalculating the kernel module dependencies...
   depmod -a
   cp /proc/version /var/lib/kernelversion
fi
EOF

chmod +x /etc/init.d/moduledepends
ln -s ../init.d/moduledepends /etc/rc1.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc2.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc3.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc4.d/S00moduledepends
ln -s ../init.d/moduledepends /etc/rc5.d/S00moduledepends

### end setup.sh

And here's the other, run after connecting to the PC:

### start install.sh

#!/bin/sh

echo "# Fix software repos"
sed -i 's-ipk//-ipk/-' /etc/opkg/*feed.conf
mv /etc/opkg/armv4-feed.conf /etc/opkg/armv4-feed.conf_
echo "src/gz navit http://download.navit-project.org/navit/openmoko/svn"
>/etc/opkg/navit-feed.conf

echo "# Run update"
opkg update
opkg list_upgradable
if read dummy; then opkg upgrade; fi
echo "# Install other packages"
opkg install libpurple-protocol-yahoo libpurple-protocol-icq
libpurple-protocol-bonjour fbreader midori-doc libgps17 navit pidgin-doc
pythm libcanberra-gtk mokomaze
ln -s /usr/lib/libgps.so.17 /usr/lib/libgps.so.16
#diff -w -U 0 navit.xml /usr/share/navit/navit.xml

### end install.sh

The list of packages there at the end is a matter of personal preference.
>
> Much better would be, if I could mount the rootfs readonly and have an
> overlay-fs for changes.
Or at least put root's home on the card from the start. Hmmm, I might try
that.

Gabor
-- 
We are born wet, naked and hungry.
Then things get worse.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/support/attachments/20091017/48dcdbfa/attachment.htm 


More information about the support mailing list