Labels

12/10/2011

Load Gumstix Libraries


1) Install rsync pakage:
$ scp /build/czhang/overo-oe/tmp/deploy/glibc/ipk/armv7a/rsync_3.0.6-r0.6_armv7a.ipk root@10.0.0.146://home/root/

$ opkg install rsync_3.0.6-r0.6_armv7a.ipk

2) Install Qt lib:
$ rsync -av czhang@10.0.1.202://build/czhang/qt-everywhere-opensource-src-4.7.0/lib/* /usr/lib

3) Install serial port lib:
$ rsync -av czhang@10.0.1.202://build/czhang/qt-everywhere-opensource-src-4.7.0/projects/qextserialport/build/libqextserialport* /usr/lib

4) Install qwt lib:
$ rsync -av czhang@10.0.1.202:///build/czhang/qt-everywhere-opensource-src-4.7.0/projects/qwt-5.2.1/lib/* /usr/lib

4) Install sqlit3 lib:
$ scp czhang@x.x.x.x:/build/czhang/qt-everywhere-opensource-src-4.7.0/plugins/sqldrivers/libqsqlite.so /home/m4/sqldrivers

5) Install qzip lib:
$ rsync -av czhang@10.0.1.202://build/czhang/qt-everywhere-opensource-src-4.7.0/projects/quazip-0.3/quazip/libquazip.so* /usr/lib

6) Install Analogwidget lib:
$ scp /build/czhang/qt-everywhere-opensource-src-4.7.0/projects/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so root@10.0.0.146://usr/lib

 

01/10/2011

Create an Application Shortcut to Open Nautilus as Root in Ubuntu


$ sudo nano /usr/share/applications/Nautilus-root.desktop

Paste the following text in the editor that comes up in Terminal:

 [Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksudo nautilus
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;

 Hit Ctrl+X  then Y

Done!

29/09/2011

User Management


Create a user:
$  useradd tech

Add password:
$ passwd tech
Enter new UNIX password:
Retype new UNIX password:

Direct user to a preferred directory when the user log on:
usermod -d /home/tempdir/ tech


25/08/2011

Gumstix touch screen problem


I re-installed file system (2Gb SD card) for my Overo gumstix. After i booted from SD, I found the touch screen did not work. So, I had a look in /dev/input directory. I can only see 'mice' in this folder, no 'touchscreen0'.

Then I tried different way to solve the problem. I tried:
$ nand erase 240000 20000
$ reset

When I booted gumstix, the back light of screen turned on, but nothing displays on the screen.  I can see 'touchscreen0' in /dev/input.  I tried '/usr/bin/ts_test'. This command can detect the position when i touched screen, but just no display.

I thought my screen was faulty.

After that, I took a look the u-boot environment:

# printenv
dvimode=1024x768MR-16@60
defaultdisplay=dvi

DVI? The touch screen I am using is LCD!

Ok, changed it to:
# setenv defaultdisplay lcd43
# saveenv
# boot

Haha, screen is working.

08/08/2011

Install AnalogWidget in Ubuntu / Gumstix

Install in Ubuntu:

System spec:

Ubuntu 10.04 (lucid)
2.30.2 (Ubuntu 2010-06-25)
2.6.32-33-generic (#70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011)
4.4.3 (x86_64-linux-gnu)
AnalogWidgets_234.zip

Download from here:
http://qt-apps.org/content/show.php?content=87780&forumpage=0

unzip it.

$ cd /home/czhang/Downloads/AnalogWidgets
$ qmake AnalogWidgets.pro
$ make
$ sudo make install
$ cp  /home/czhang/Downloads/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so /home/czhang/QtSDK/QtCreator/lib/qtcreator/plugins/designer/libanalogwidgets_plugin.so

In .pro file, added:
LIBS += /home/czhang/Downloads/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so
INCLUDEPATH += /home/czhang/Downloads/AnalogWidgets/analogwidgets/analogwidgets


Install in Gumstix:

unzip Analogwidget.zip under:
/build/czhang/qt-everywhere-opensource-src-4.7.0/projects

$ qmake AnalogWidgets.pro
$ make

got some error messages according to file:
/build/czhang/AnalogWidgets/analogwidgets/code/chart/channel.cpp
/build/czhang/AnalogWidgets/analogwidgets/code/scriptwidget.cpp

I edited these two files:
in channel.cpp
void Channel::setType(unsigned int i)
{
//if (i!=Line && i!=Dots)
// throw "Bledny typ";

m_type = i;

}

in scriptwidget.cpp:
void ScriptWidget::setScript(const QString & s)
{
m_script = s;
qDebug("ScriptWidget::setScript() %s",qPrintable(m_script));
try
{
QFile file(m_script);
if (file.open( QIODevice::ReadOnly ))
{
QString src = QString(file.readAll());
QScriptValue widget = m_engine->newQObject(this);
m_engine->globalObject().setProperty(objectName(),widget);
m_engine->evaluate(src);
QScriptValue v = m_engine->uncaughtException();

if (v.isValid())
qDebug("Error %s",qPrintable(v.toString()));
}
}
//catch (std::exception & e)
//{
// qDebug("Wyjatek %s",e.what());
//}
}// setScript


$ scp /build/czhang/qt-everywhere-opensource-src-4.7.0/projects/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so root@10.0.0.146://usr/lib