RJ45 jack (tenon faces to ground..):
Normal:
Both jacks: 白橘 橘 白綠 藍 白藍 綠 白棕 棕
Cross-over:
a jack: 白綠 綠 白橘 藍 白藍 橘 白棕 棕
b jack: 白橘 橘 白綠 藍 白藍 綠 白棕 棕
Cyber memos for my personal knowledge.
2009-01-16
2009-01-08
How to install p7zip 4.61 - UNIX/Linux version of 7-zip on openSUSE 11.1
I install it because I love it...;=)
Again, I'd like to compile it via source code by myself.
BTW, if you are NOT an advanced user I think, you should try the pre-built binary package instead of compiling it by yourself.
Well, if you now stay with M$ Windows I still recommend it. Check it out.
1. Get source code package from here. Currently, latest verson is 4.61.
2. My box is openSUSE 11.1 x86_64, T9500 CPU...;-). So I just un-tar and cd into the directory:
$ cd ./p7zip_4.61/
$ sudo zypper search -d yasm
I got output such as follows:
正在載入套件庫資料...
讀取已安裝的套件...
S | 名稱 | 摘要 | 類型
Again, I'd like to compile it via source code by myself.
BTW, if you are NOT an advanced user I think, you should try the pre-built binary package instead of compiling it by yourself.
Well, if you now stay with M$ Windows I still recommend it. Check it out.
1. Get source code package from here. Currently, latest verson is 4.61.
2. My box is openSUSE 11.1 x86_64, T9500 CPU...;-). So I just un-tar and cd into the directory:
$ cd ./p7zip_4.61/
$ sudo zypper search -d yasm
I got output such as follows:
正在載入套件庫資料...
讀取已安裝的套件...
S | 名稱 | 摘要 | 類型
--+----------+--------------------------------------------------+-----
---| yasm | YASM is a complete rewrite of the NASM assembler | 套件
3. Install yasm:
$ sudo zypper install yasm
I got output such as follows:
正在載入套件庫資料...
讀取已安裝的套件...
正在解決套件相依性...
將會安裝下列新的套件:
yasm
全部下載大小: 240.0 K。 完成操作後,將增加 654.0 K 的使用。
要繼續嗎? [是/否]: y
正在取出 套件 yasm-0.6.2-1.75.x86_64 (1/1), 240.0 K (已解開 654.0 K)
正在取出: yasm-0.6.2-1.75.x86_64.rpm [完成]
正在安裝: yasm-0.6.2-1.75 [完成]
4. Modify ./makefile.machine. Here is my makefile.machine:
$ cp makefile.machine makefile.machine.backup
$ cp makefile.linux_x86_asm_gcc_4.X makefile.machine
$ vim ./makefile.machine
I modify ./makefile.machine as following RED words for my T9500 x86_64 system:
#
# makefile for Linux (x86, PPC, alpha ...)
#
OPTFLAGS=-O
ALLFLAGS=${OPTFLAGS} -m64 -s \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-DNDEBUG -D_REENTRANT -DENV_UNIX \
$(LOCAL_FLAGS)
CXX=g++ $(ALLFLAGS) -DHAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden
CC=gcc $(ALLFLAGS)
CC_SHARED=-fPIC
LINK_SHARED=-fPIC -shared
ASM=yasm -f elf -m amd64
LOCAL_LIBS=-lpthread
LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
CPU=x64
OBJ_CRC32=$(OBJ_CRC32_x86_64)
5. Of course, make it!
$ make clean; make all2; sudo ./install.sh
Note that if you need 7zr just replace above "make all2" with "make all3".
Done...;-)
---| yasm | YASM is a complete rewrite of the NASM assembler | 套件
3. Install yasm:
$ sudo zypper install yasm
I got output such as follows:
正在載入套件庫資料...
讀取已安裝的套件...
正在解決套件相依性...
將會安裝下列新的套件:
yasm
全部下載大小: 240.0 K。 完成操作後,將增加 654.0 K 的使用。
要繼續嗎? [是/否]: y
正在取出 套件 yasm-0.6.2-1.75.x86_64 (1/1), 240.0 K (已解開 654.0 K)
正在取出: yasm-0.6.2-1.75.x86_64.rpm [完成]
正在安裝: yasm-0.6.2-1.75 [完成]
4. Modify ./makefile.machine. Here is my makefile.machine:
$ cp makefile.machine makefile.machine.backup
$ cp makefile.linux_x86_asm_gcc_4.X makefile.machine
$ vim ./makefile.machine
I modify ./makefile.machine as following RED words for my T9500 x86_64 system:
#
# makefile for Linux (x86, PPC, alpha ...)
#
OPTFLAGS=-O
ALLFLAGS=${OPTFLAGS} -m64 -s \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-DNDEBUG -D_REENTRANT -DENV_UNIX \
$(LOCAL_FLAGS)
CXX=g++ $(ALLFLAGS) -DHAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden
CC=gcc $(ALLFLAGS)
CC_SHARED=-fPIC
LINK_SHARED=-fPIC -shared
ASM=yasm -f elf -m amd64
LOCAL_LIBS=-lpthread
LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
CPU=x64
OBJ_CRC32=$(OBJ_CRC32_x86_64)
5. Of course, make it!
$ make clean; make all2; sudo ./install.sh
Note that if you need 7zr just replace above "make all2" with "make all3".
Done...;-)
2009-01-04
How to install mplayer and browser plug-in on openSUSE 11.1 w/ Firefox 3.0.5
OK first, HAPPY NEW YEAR...X-D
Today I just want to install a movie player for my openSUSE 11.1 box.
Well, mplayer is always my favorite one...;-)
BTW, I know there are several repositories which provided pre-built package.
Hmm..., I think I just like to do this by myself instead of using package which I don't trust (security reason...:-P).
So, here is a very simple memo for installation steps.
Basically I want to do 2 tasks:
A.) Install mplayer with GUI enabled (gmplayer).
B.) Install mplayer plug-in for Firefox web browser.
=======================
==== A. Install mplayer ====
=======================
1. Get source code. Use following command to do so:
$ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
There is a directory called "mplayer" which will be created under current directory for storing source code of mplayer. So you should have the write permission for this dir. Note that if you use this way to get source code (svn) you will have libav* from FFmpeg inside already.
2. Get proper binary codecs package. Go to here and look for your CPU arch. type and download a binary codecs package. Note the if you used a wrong codecs package, the compile and install process will be failed. In my box I use Linux x86 20071007.
3. Get mplayer skin for enabling GUI feature. Go to here and scroll down the page to skins section. Select any skin you prefer and download it. I use Blue.
4. Install the binary codecs package. In my box I install into /usr/local/lib/codecs which is the default path that mplayer will look for. Issue followinig commands:
$ tar jxvf essential-20071007.tar.bz2
$ cd ./essential-20071007/
$ sudo mkdir -p /usr/local/lib/codecs
$ sudo cp -rfv ./* /usr/local/lib/codecs
5. Compile and install mplayer w/ GUI enabled. Issue following commands:
$ cd ./mplayer/
$ ./configure --enable-gui --enable-menu
$ make
$ sudo make install
6. Create a symbolic link for ttf. It will be used for mplayer OSD. In my box I issue following commands:
$ cd /usr/local/share/mplayer
$ sudo ln -s /usr/share/fonts/truetypes/uming.ttf subfont.ttf
7. Install the skin for GUI (gmplayer). Issue following commands:
$ tar jxvf ./Blue-1.7.tar.bz2
$ cd ./Blue/
$ sudo mkdir -p /usr/local/share/mplayer/skins/default
$ sudo cp -rfv ./* /usr/local/share/mplayer/skins/default/
8. It's done!! Let's play!!...;-) Just type mplayer or gmplayer with a movie file.

=======================
==== B. Install plug-in ====
=======================
1. Since the browser plug-in path between every distros is a little bit different. So we need to identify where we should copy our mplayer plug-in to. An easy way to do this just search a plug-in which was already installed for your browser. In my box I type:
$ sudo find / -name npwrapper.libflashplayer.so -print

Then I know the plug-ins are in the path /usr/lib64/browser-plugins/.
2. Grep the source package from here.
3. Un-tar the package and read the README/INSTALL first. Then I know that I have to install Mozilla devel files or Gecko SDK to compile mplayer plug-in. Issue following commands to install Gecko SDK package on openSUSE 11.1:
$ zypper search -d gecko
$ sudo zypper install mozilla-xulrunner190-devel

4. Change to mplayer-plugin's directory. And compile it:
$ cd ./mplayerplug-in-3.55/
$ ./configure --with-gecko-sdk=/path/to/gecko-sdk (replace /path/to with the correct value on your system)
$ make
5. Install *.so and *.xpt files, close your Firefox now and:
$ sudo cp mplayerplug-in*.so /usr/lib64/browser-plugins/
$ sudo cp mplayerplug-in*.xpt /usr/lib64/firefox/components/

6. Bingo! Launch your Firefox and enter "about:plugins" in the URL box then hit Enter, check the mplayer plug-ins are all installed...;-)


Today I just want to install a movie player for my openSUSE 11.1 box.
Well, mplayer is always my favorite one...;-)
BTW, I know there are several repositories which provided pre-built package.
Hmm..., I think I just like to do this by myself instead of using package which I don't trust (security reason...:-P).
So, here is a very simple memo for installation steps.
Basically I want to do 2 tasks:
A.) Install mplayer with GUI enabled (gmplayer).
B.) Install mplayer plug-in for Firefox web browser.
=======================
==== A. Install mplayer ====
=======================
1. Get source code. Use following command to do so:
$ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
There is a directory called "mplayer" which will be created under current directory for storing source code of mplayer. So you should have the write permission for this dir. Note that if you use this way to get source code (svn) you will have libav* from FFmpeg inside already.
2. Get proper binary codecs package. Go to here and look for your CPU arch. type and download a binary codecs package. Note the if you used a wrong codecs package, the compile and install process will be failed. In my box I use Linux x86 20071007.
3. Get mplayer skin for enabling GUI feature. Go to here and scroll down the page to skins section. Select any skin you prefer and download it. I use Blue.
4. Install the binary codecs package. In my box I install into /usr/local/lib/codecs which is the default path that mplayer will look for. Issue followinig commands:
$ tar jxvf essential-20071007.tar.bz2
$ cd ./essential-20071007/
$ sudo mkdir -p /usr/local/lib/codecs
$ sudo cp -rfv ./* /usr/local/lib/codecs
5. Compile and install mplayer w/ GUI enabled. Issue following commands:
$ cd ./mplayer/
$ ./configure --enable-gui --enable-menu
$ make
$ sudo make install
6. Create a symbolic link for ttf. It will be used for mplayer OSD. In my box I issue following commands:
$ cd /usr/local/share/mplayer
$ sudo ln -s /usr/share/fonts/truetypes/uming.ttf subfont.ttf
7. Install the skin for GUI (gmplayer). Issue following commands:
$ tar jxvf ./Blue-1.7.tar.bz2
$ cd ./Blue/
$ sudo mkdir -p /usr/local/share/mplayer/skins/default
$ sudo cp -rfv ./* /usr/local/share/mplayer/skins/default/
8. It's done!! Let's play!!...;-) Just type mplayer or gmplayer with a movie file.

=======================
==== B. Install plug-in ====
=======================
1. Since the browser plug-in path between every distros is a little bit different. So we need to identify where we should copy our mplayer plug-in to. An easy way to do this just search a plug-in which was already installed for your browser. In my box I type:
$ sudo find / -name npwrapper.libflashplayer.so -print

Then I know the plug-ins are in the path /usr/lib64/browser-plugins/.
2. Grep the source package from here.
3. Un-tar the package and read the README/INSTALL first. Then I know that I have to install Mozilla devel files or Gecko SDK to compile mplayer plug-in. Issue following commands to install Gecko SDK package on openSUSE 11.1:
$ zypper search -d gecko
$ sudo zypper install mozilla-xulrunner190-devel

4. Change to mplayer-plugin's directory. And compile it:
$ cd ./mplayerplug-in-3.55/
$ ./configure --with-gecko-sdk=/path/to/gecko-sdk (replace /path/to with the correct value on your system)
$ make
5. Install *.so and *.xpt files, close your Firefox now and:
$ sudo cp mplayerplug-in*.so /usr/lib64/browser-plugins/
$ sudo cp mplayerplug-in*.xpt /usr/lib64/firefox/components/

6. Bingo! Launch your Firefox and enter "about:plugins" in the URL box then hit Enter, check the mplayer plug-ins are all installed...;-)


2008-12-23
Additional packages for compiling kernel on Ubuntu 8.04.1
I apt-get installed follows:
build-essential libtool makedepend libncurses5-dev linux-kernel-devel libcunit1-ncurses-dev
Of course this is for make menuconfig.
I also found some pages but I never tried their way:
http://ubuntuforums.org/showthread.php?t=56835
https://help.ubuntu.com/community/Kernel/Compile
http://www.howtoforge.com/kernel_compilation_ubuntu
This is not my first time to compile Linux kernel.
But on Ubuntu...hmm, yes it is...囧rz
Actually I like Redhat/Fedora, Mandrake more........= =|||
build-essential libtool makedepend libncurses5-dev linux-kernel-devel libcunit1-ncurses-dev
Of course this is for make menuconfig.
I also found some pages but I never tried their way:
http://ubuntuforums.org/showthread.php?t=56835
https://help.ubuntu.com/community/Kernel/Compile
http://www.howtoforge.com/kernel_compilation_ubuntu
This is not my first time to compile Linux kernel.
But on Ubuntu...hmm, yes it is...囧rz
Actually I like Redhat/Fedora, Mandrake more........= =|||
2008-12-19
Compiling SiS X driver on Ubuntu 8.10
In order to compile the X driver for SiS chip, I have to apt-get install following packages additionally:
build-essential
libtool
makedepend
libgl1-mesa-dev
x11proto-*
xserver-xorg-dev
libdrm-dev
Then, of course, ./configure; make.
Cd to ./src/.libs/, you can see your sis_drv.so...;-D
Now I just try to port this version to support another chip...Orz
(You want the source code for SiS X driver...hmm...I think it is not a difficult task to you, right?)
build-essential
libtool
makedepend
libgl1-mesa-dev
x11proto-*
xserver-xorg-dev
libdrm-dev
Then, of course, ./configure; make.
Cd to ./src/.libs/, you can see your sis_drv.so...;-D
Now I just try to port this version to support another chip...Orz
(You want the source code for SiS X driver...hmm...I think it is not a difficult task to you, right?)
RealPlayer 11 on Linux
I try to install RealPlayer 11 on my DELL Vostro 1310 with Mandriva 2008.1, kernel 2.6.24.7-desktop. All things are fine. why this player? Hmm......somtimes I feel the .RM files are really pains in my ass and I don't have time to search for other codec or player for it. So..you know that...;-)
Download RealPlayer here. You can choose .BIN format (personally recommand) or even RPM/DEB package if you want.
Just cd to where you put the file and issue commands with root permission:
(optional step) $ chmod a+x RealPlayer11GOLD.bin
$ ./RealPlayer11GOLD.bin
Follow on-screen instruction to answer some questions. Use the default installation path is ok on my system (/opt/Real/RealPlayer).
Note that the RealPlayer is not able to start with zh_* locales so that I have worte a simple script to change my $LANGUAGE dynamically to en_US.UTF-8 (or en_US*) to launch it...;-)
Download RealPlayer here. You can choose .BIN format (personally recommand) or even RPM/DEB package if you want.
Just cd to where you put the file and issue commands with root permission:
(optional step) $ chmod a+x RealPlayer11GOLD.bin
$ ./RealPlayer11GOLD.bin
Follow on-screen instruction to answer some questions. Use the default installation path is ok on my system (/opt/Real/RealPlayer).
Note that the RealPlayer is not able to start with zh_* locales so that I have worte a simple script to change my $LANGUAGE dynamically to en_US.UTF-8 (or en_US*) to launch it...;-)
Install NV driver under Ubuntu 8.10
I have also tested Ubuntu 8.10 with kernel 2.6.27-7-generic.
Basically all steps are almost the same as 8.04.1 but only this one:
For step 2, only you have to do within Ubuntu 8.10 is "S30gdm".
I use nVidia 180.11 Beta Linux X driver.
Currently official release is 177.82.
Basically all steps are almost the same as 8.04.1 but only this one:
For step 2, only you have to do within Ubuntu 8.10 is "S30gdm".
I use nVidia 180.11 Beta Linux X driver.
Currently official release is 177.82.
2008-12-11
DLink DI-604 and DIR-605
Two DLink broadband network IP switchies in the same place, 1st is DI-604 and second one is DIR-605:
1. Use DI-604 to connect to internet via xDSL/Cable, and connect DIR-605 "WAN port" to DI-604 LAN port. Disable DIR-605 NAT function. Just treat it as a regular "wireless" hub/switch. This is not a good idea but only workable solution...Orz...And, in this case you can NOT use MAC filter to lock up some MAC addresses you want, because the NAT of DIR-605 is disabled........
2. Use DI-604 to connect to internet via xDSL/Cable, and connect DIR-605 "LAN port" to DI-604 LAN port. Disable DIR-605 DHCP server function only and change DIR-605's IP to differ from DI-604. This is more easier and you may use MAC filter function on DIR-605!...;-)
Check it out here.
1. Use DI-604 to connect to internet via xDSL/Cable, and connect DIR-605 "WAN port" to DI-604 LAN port. Disable DIR-605 NAT function. Just treat it as a regular "wireless" hub/switch. This is not a good idea but only workable solution...Orz...And, in this case you can NOT use MAC filter to lock up some MAC addresses you want, because the NAT of DIR-605 is disabled........
2. Use DI-604 to connect to internet via xDSL/Cable, and connect DIR-605 "LAN port" to DI-604 LAN port. Disable DIR-605 DHCP server function only and change DIR-605's IP to differ from DI-604. This is more easier and you may use MAC filter function on DIR-605!...;-)
Check it out here.
Subscribe to:
Posts (Atom)
