Sunteți pe pagina 1din 6

# To start up X server

$ cd /usr/X11R6/bin/
$ startxwin.sh
# To clear the console screen in gtk folder
alias clear='cat temp.txt'
# To display the content of folder with color
alias ls='ls -F --color'
# To export DISPLAY variable
$ DISPLAY=192.168.4.136:0.0
$ export DISPLAY
# To compile gtk source file
$ gcc source.c -Wall -o exe `gtk-config --libs --cflags`

#---------------------------------------------------------
# Net services
#---------------------------------------------------------
To start/stop inetd:
$ net start inetd
$ net stop inetd
#---------------------------------------------------------
# Using RSHD in cygwin
#---------------------------------------------------------
Exsample for user : Administrator
/etc/inetd.conf
To enable the following services:
shell stream tcp nowait root /usr/sbin/rshd rshd -L
login stream tcp nowait root /usr/sbin/rlogind rlogind
Goto user's home folder:
$ cd /home/Administrator
$ vi .rhosts
192.168.4.162 Administrator
[Computer_Name Administrator]
Restart bash shell and test command:
$ rsh -l Administrator 192.168.4.162 ls

#---------------------------------------------------------
# Using Putty For client
#---------------------------------------------------------
Please reference the following link for more detail
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

#---------------------------------------------------------
# Support Component for Window Programing
#---------------------------------------------------------
http://www.ssh-activex.com/download-ssh-activex.html
http://www.djhd.com/onlinehelp/myssh/execcommand.htm
http://www.activexperts.com/activsocket/howto/telnet/vb/ -> Telnet
http://activexperts.com/activsocket/howto/telnet/vc/
-> Telnet for VC++6 -> Cool, try it first

#----------------------------------------------------------
# INSTALL GUIDE
#----------------------------------------------------------
http://www.ibiblio.org/apollo/WinGtkHowto.html -> guide
http://www.gtk.org/download-windows.html -> Download source
http://wingtk.sourceforge.net/ -> For Glade
PATH %PATH%;c:\wingtk\BIN -> autoexec.bat
http://library.gnome.org/devel/gtk/unstable/ -> API reference
#-----------------------------------------------------------
# DOWNLOAD AND INSTALL MINGW
#-----------------------------------------------------------
http://www.mingw.org/MinGWiki/index.php/GettingStarted -> guide to install MinGW
http://www.compsci.hunter.cuny.edu/~sweiss/course_materials/CSci493.73/GTK_Insta
llation.pdf
http://modulatum.wordpress.com/2008/06/02/get-started-with-gtk-using-mingw/ -> s
imple guide (co ve chay duoc)
#-----------------------------------------------------------
# USING GLADE AND CYGWIN
#-----------------------------------------------------------
1> ( using mirror mirror.rhsmith.umd.edu)
Install cygwin, xwin and libraries such as atk, pango, pkg-config...
2> Install gtk-dev-2.10.11-win32-1.exe (Note: Not check any environment variable
)
( Only tick : Glade and documentations )
-> Now, we write a simple hello.c and try to compile whit command
$ gcc -o exe hello.c `pkg-config --libs --cflags`
5> Compile the project
We can compile the glade sources by using following manual command line
For instance my project's name is hello
1> Edit main.c
add :
#define G_OS_WIN32
Comment out the following line :
// package_prefix = g_win32_get_package_installation_directory (NULL, NUL
L);
// package_data_dir = g_build_filename (package_prefix, "share", NULL);
// package_locale_dir = g_build_filename (package_prefix, "share", "local
e", NULL);
Change the following
pixmap_dir = g_build_filename (package_data_dir, PACKAGE, "pixmaps", NULL)
;
To
pixmap_dir = g_build_filename (package_prefix, PACKAGE, "pixmaps", NULL);
( to retry /usr/src/hello/pixmaps )
2> Use the following command line (or run compile.sh script)
$ cd hello/src
$ gcc
-o hello
*.c
-DPACKAGE = \""hello"\"
-DPACKAGE_PREFIX = \""/usr/src"\"
-DPACKAGE_DATA_DIR = \""/usr/src/hello/data"\"
-DPACKAGE_LOCALE_DIR = \""/usr/src/hello/locale"\"
`pkg-config --libs --cflags gtk+-2.0`
and we can run the result in the folder /source
# PROBLEMS
http://lists.freedesktop.org/archives/pkg-config/2006-August/000128.html ->
about pkg-config
#-----------------------------------------------------------
# HOW TO UNINSTALL CYGWIN
#-----------------------------------------------------------
* Delete All in the folder c:\cygwin
1> Method 1: Run "cygtidy" (download via Internet)
2> Method 2: Run commad regedt32
In HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER
Delete the entry in registry "Software\Cygnus"
#-----------------------------------------------------------
# USING CYGWIN
#-----------------------------------------------------------
http://www.zieg.com/faqs/cygwin/ -> guide to use cygwin
#-----------------------------------------------------------
# Note for Makefile
#-----------------------------------------------------------
Top line of "command line" must be a Tab (not a space)
Top line of "ifeq" must not be a Tab
#------------------------------------------------------------
# SCRIPT WRITING NOTE
#------------------------------------------------------------
$0 -> script name
$1 -> 1st argument
$2 -> 2st argument
Example : Write a script delete hello.exe if it's exist
using :
if ls -l | grep "hello.exe"
then
rm hello.exe
fi
#------------------------------------------------------------
# DEBUG TECHNOLOGY
#------------------------------------------------------------
Create debug.h and edit the following
#ifndef DEBUG_H
#define DEBUG_H
#define DEBUG 1 /* Enable debugging */
#define DBG(...) if(DEBUG) printf(__VA_ARGS__)
#endif
#----------------------------------------------------------
# LINUX COMMAND
#----------------------------------------------------------
dos2unix *.* -> convert all file in current dir
dos2unix */*.* -> convert all file in sub dir
dos2unix */*/*.: -> convert all file in sub sub dir ...
#------------------------------------------------------------
# MP3 NOTE
#------------------------------------------------------------
http://oreilly.com/catalog/mp3/chapter/ch02.html
http://www.dv.co.yu/mpgscript/mpeghdr.htm
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.12.html -> C language file a
cess
http://www.p23.nl/projects/mp3header/ -> MP3 frame header analysic
http://www.codeproject.com/KB/audio-video/mpegaudioinfo.aspx -> MP3 frame head
er analysic
http://www.mail-archive.com/mp3encoder@geek.rcc.se/msg04026.html -> about mp3
frame's CRC
http://wiki.hydrogenaudio.org/index.php?title=MP3 -> wiki MP3
http://www.mp3-tech.org/programmer/docs/mp3_theory.pdf -> The excilence page f
or mp3 technology

For more information : read mp3_theory.pdf and ThesisReportDecoder.pdf


IntelliSense : Support for programming such as VC#, Visual C 2005
#-----------------------------------------------------------
# BEST IDE FOR LINUX & WINDOW SUPPORT INTELLISENCE FEATURE
#-----------------------------------------------------------
http://www.codeblocks.org/downloads -> for download and help
http://wiki.codeblocks.org/index.php?title=Installing_Cygwin_Compiler -> guide f
or setting the compiler
http://www.codeblocks.org/docs/manual_en.pdf -> manual
#----------------------------------------------------------
# RUN DOS COMMAND USING BAT FILE (CODE::BLOCKS)
#----------------------------------------------------------
1> Create new run.bat file
2> Goto "Project" -> "Build Option"
3> Choose Tab "Pre/Post build steps
4> Add command : "run.bat" (e.g. In post/build steps session)
5> Click OK and rebuild project for checking
#----------------------------------------------------------
# ECOS UNDER CYGWIN INSTALATION GUIDE
#----------------------------------------------------------
1> From the bash shell type
$ mkdir ecos
$ cd ecos
2> Get script file .tcl for installation
$ wget --passive-ftp ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl
3> Run script
$ sh ecos-install.tcl
Note: While running script, if connected failed, we can fix this problem by edi
ting
the script file. Chane "variable metadata_url" for excistence mirrors.
5> Choose GCC options and quit with "q"
6> Choose mirror

#----------------------------------------------------------
# BUILD REDBOOT FOR ML403 PLATFORM
#----------------------------------------------------------
1> Edit flag ( for ML403 redboot )
-I$(HW_DESIGN) -I$(HW_DESIGN)/ppc405_0/include -I$(ECOS_EXTRA)
-> -I../bsp -I../bsp/ppc405_0/include -I$(ECOS_EXTRA)
In this case we create the /bsp directory under $(PROJECT) directory
2> Ortheway : We use configtool for only configuring the system, and invoke
"make" under Cygwin command shell for compiling instead clicking the build
button of configtool on the menu bar. Before compile, we must export the
value of the HW_DESIGN variable.
EX: $ mkdir redboot -> we create project in here (under /usr/src/)
Directory structure: Generated by configtool
redboot _____redboot_build
|
|_____redboot_install
|
|_____redboot_mlt
|
|_____redboot.ecc (project name)
|
|_____hardware_design -> we create new folder here
$ export HW_DESIGN=/usr/src/redboot/hardware_design
NOTE: When use EDK under window, we mus convert all files in ppc405_0 folder
and sub folders to unix format by command :
$ cd ppc405_0
$ dos2unix *.* */*.* */*/*.* ...
#----------------------------------------------------------
# BUILD REDBOOT FOR OLIMEX LPC2294
#----------------------------------------------------------
http://sgs.gomel.by/sg/articles/olpce2294/index.html
#----------------------------------------------------------
# ECOS APPLICATION DEVELOPING
#----------------------------------------------------------
http://homepage.ntlworld.com/dallaway/papers/ew07.html -> instroduce ecos appl
ications
http://noc.lmkr.com/html/white_papers/redboot_ecos_paper.pdf -> Linker, behavi
or of system
http://digitais.ist.utl.pt/ec-sc/0405/docs/ecos-2.0b1/doc/html/ref/ecos-ref.ht
ml -> ecos reference
http://www.informit.com/content/downloads/perens/0130354732.pdf -> Ecos embedd
ed reference

S-ar putea să vă placă și