2009-10-29

Install dotProject on CentOS 5

Install required tools
  1. sudo yum install mysql-server gd php-gd php-ldap php-mysql
  2. sudo /sbin/chkconfig --levels 235 mysqld on
  3. sudo service mysqld start
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
/usr/bin/mysql_secure_installation

References

Installing dotProject on Centos 5
Installing dotProject
使用 DotProject 架設 Project Server,整合 LDAP
CentOS - Apache server with SSL 的作法

2009-10-15

[Ubuntu Netbook Remix] 如何不讓視窗自動放大?

在 Ubuntu Netbook Remix 中開啟的應用程式總是將視窗自動放大,可以用 gconf-editor 來關閉這個功能, 方法如下:
  1. 按 "Alt-F2" 鍵,跳出執行程式的輸入視窗
  2. 輸入 "gconf-editor" ,再點「執行」
  3. 在 "apps->maximux" 中點選 "no_maximize",以關閉視窗自動放大的功能
  4. 完成
  5. 參考討論文章

2009-05-26

Setup Dual Head for EeePC with Ubuntu


  1. refer to How to setup Dual Head for Intel Graphics with RandR 1.2
  2. edit /etc/X11/xorg.conf for Section "Screen"
    SubSection "Display"
    Depth 32

    Virtual 2048 2048

    EndSubSection

  3. restart X with "ctrl-alt-backspace"
  4. confirm the maximum "Screen 0" size is 2048x2048 with "xrandr -q"
  5. set the screen layout
    xrandr --output VGA --pos 0x0
    xrandr --output LVDS --pos 0x1024

EeePC model: 904
Linux distribution: Ubuntu 8.04 LTS

2009-05-04

Build EMC2 on CentOS 5.3 (x86_64)

Required packages:
  • pth-devel
  • bwidget
  • tcl-devel
  • tk-devel
  • libtermcap-devel
  • readline-devel
  • libXmu-devel
  • tkinter
sudo yum install pth-devel bwidget tcl-devel tk-devel libtermcap-devel readline-devel libXmu-devel tkinter
cd /usr/share/tcl8.4; sudo ln -sf ../../share/bwidget1.8.0 BWidget

edit src/hal/utils/Submakefile
  1. locate for ../bin/halrmt
  2. remove $(READLINE_LIBS) from its dependent list
  3. add $(READLINE_LIBS) to "@$(CXX) $(LDFLAGS) -o $@ $^ -lpthread"


../bin/halrmt: $(call TOOBJS, $(HALRMTSRCS)) ../lib/libemcini.so.0 ../lib/libnml.so.0 ../lib/libemchal.so.0
$(ECHO) Linking $(notdir $@)
@$(CXX) $(LDFLAGS) -o $@ $^ -lpthread $(READLINE_LIBS)


cd src
./configure --enable-simulator --enable-run-in-place
make
cd ../; . ./scripts/emc-environment
unset LD_LIBRARY_PATH # to disable incorrect xilinx library search path
emc

2009-05-03

Build EMC2 on Windwos

1. GNU PTH Library
2. BWidget:
  • download BWidget-*.tar.bz2 from tclib.sf.net
  • uncompress and copy it to /usr/share/BWidget
  • verify the installation with 'tclsh'
  • % set auto_path
  • % package require BWidget
Build emc2
  1. cd src
  2. ./configure --enable-simulator --enable-run-in-place
  3. make (stuck at here: cannot build libnml on Windows)
    # Before running the software, set the emc environment:
    # . (top dir)/scripts/emc-environment
    # To run the software type
    # emc
  4. libnml is forked from rcslib
  5. rcslib can be built with MinGW; cannot be built with cygwin
  6. replace libnml with rcslib?
  7. port libnml to cygwin?
  8. skip emc2 and try orocos?

2008-12-02

Teal, Truss, and NCsim: Resolved all the Random Crash Issuess

Finally, I've resolved yet another random crash issues for teal, truss, and ncsim. Now it has passed more than 100,000 verification loops without crashing. Thanks to Mike and Robert, who chose to open source teal and truss. As a result, I got a great chance to dig into the source code and learned the internal mechanism for a verification framework.

Today, I felt lucky to find another person at another corner of the world, who also chose teal and made customizations on it. Here's his post at Verification Guild:

"I am using teal right now. We picked it up about a year ago, and have done fairly extensive customization to it. I cannot, however, recommend the version we originally downloaded, it had some bugs, and I have not downloaded a newer version since then, so I can't say anything about the bug fixes. I have to say, that as far as the concepts and functionality of teal go, it is exactly what it should be. I couldn't imagine an easier and cleaner way to connect verilog to C++. I would suggest starting with it, and seeing how far it takes you. It is also free. -- Richard"

2008-11-26

Resolved a subtle teal::vout bug

I've confirmed a subtle teal::vout bug for multi-threaded truss verification environment. In my Linux box (both i686 and x86_64), the ncsim got crashed randomly. Although the crash rate is bellow 1%, it makes me not able to run regression test with teal/truss.

Here's the symptom:
./teal_vout.cpp: (set_file_and_line:631) test_component_0 thread(0x44606960) vout(0x2109718) [FILE: truss/trunk/cpp/inc/truss_test_component.h][line: 70] begin
... ... ...
./teal_vout.cpp: (set_file_and_line:631) test_component_0 thread(0x40A00960) vout(0x2109718) [FILE: ./test_component.cpp][line: 92] begin
... ... ...
=> crashed

Here's the reason:
  • Thread test_component_0 is with ID(0x44606960)
  • Thread verification_top is with ID(0x40A00960)
  • vout(0x2109718) is constructed by thread(0x40A00960) with test_component_0 as its function_area_ name
truss::verification_top calls "test_0->start()", which calls "lls::test_component_[0]->start()", which calls "truss::thread.start()" to create a new thread(0x44606960), which calls "truss::test_component.start_()" to start a new teal::vout message to vout(0x2109718).

However, before it was finished with teal::vout::end_message_() at thread(0x44606960), a new message to the same vout(0x2109718) was issued. It was called from "truss::verification_top::test_0->wait_for_completion ()", which calls "lls::test_component_[0]->wait_for_completion ()", which calls "truss::test_component.wait_for_completion()", which calls "lls::test_component::wait_for_completion_()" at thread (0x40A00960).

As a result, the message_list_ and the other maps of teal::vout got polluted. Sometime, it will end up with a "glibc detected double free or corruption error", which crashed the simulation.

And, here's my solution:
  1. remove internal_mutex_sentry() from teal::vout::put_message()
  2. put a pthread_mutex_lock() at teal::vout::set_file_and_line()
  3. put a pthread_mutex_unlock() at teal::vout::clear_message_()
Although this decreased the simulation crash rate dramatically (from 1% to bellow 0.1%). There's still a simulation error to be resolved: "Cannot place a value with no or zero delay at read only sync".