Cyber memos for my personal knowledge.

2009-10-28

Standard Linux uvcvideo doesn't work for Bison camera module 5986:0241

Usually, current uvcvideo driver kernel module can handle all uvc complaint devices.
But I got a special module which ID is 5986:0241, can not work w/ it.
You can see a dmesg log as "No valid video chain found.", and driver never drive this device.
There is no device file created under /dev and /sys.

This is a FW bug, so that driver doesn't parse video steaming data well.
I patch the uvcvideo source to skip this checking.....:-(
Not a good way but it works.

Use kernel 2.6.31.5 source as an example to patch the driver:

-> drivers/media/video/uvc/uvc_driver.c, Line 430:
modify "return -EINVAL;" to "break;"

-> drivers/media/video/uvc/uvc_driver.c, Line 723:
modify "goto error;" to "break;"

Save and compile the uvcvideo.ko again.
After install this new kernel module, your 5986:0241 camera should be back to work.

2009-09-02

RHEL / CentOS 5.3 never read MAC address on SiS 190/191 NIC

Oops........
This issue was reported for a while from my FAE.
The kernel of default RHEL 5.3 is v2.6.18........(WTF..)

I personally think that it's a bug of sis190.c driver but I don't have time to dig into the source code.
The NIC MAC address can not be read correctly from EEPROM.

I use sis190.c and mii.c from kernel v2.6.19.7 w/o any modification, and then compile them on RHEL 5.3.
Well, they still taint kernel a bit because no version magic.
But works well (so far..), and my MAC address of SiS 190/191 NIC was now detected.

Use root permission and just # modprobe -rfv sis190
Make mii.ko and sis190.ko by yourself. If you see warnings, forget about it now......
# install -m 644 *.ko /lib/modules/`uname -r`/kernel/drivers/net/
You can make a backup of original mii.ko and sis190.ko if you want.
# depmod -ae
# modprobe -fv sis190

2009-07-22

Linux SiS 190/191 NIC lose traffic on 64bit kernel with 4GB RAM

SiS190.x driver got a bug on 64bit Linux kernel with 4GB RAM.
NIC can get IP via DHCP correctly but can not have any traffic any more...Orz

If you limit RAM size while bootup to "mem=3G", everything works fine ( Of course......XD ).

See this for bugzilla report: here.

I test the patch on Mandriva 2009.1 and it works.
But I never test it on Ubuntu or any other distro yet.
Here is the duplicated issue on launchpad for Ubuntu.



CM Linux is a small distro which is based and modified from Mandriva Linux......囧rz

2009-07-06

clevo_laptop v1.0.0 is released

Finally, I uploaded the first release of Clevo ACPI WMI Linux kernel driver module to Sourceforge.net.
The release is clevo_laptop_1.0.0.tar.gz.

After a long time investigating of BIOS ASL code, I found so many bugs and NGs on their laptops.
For the ACPI supportinf about Linux.
Even I have told them, the BIOS engineers, no body gives a shit about my opinion........

Will keep developing this kernel module to support Linux on Clevo platform as much as possible.
('Cauz BIOS guys don't want to pay efforts to Linux, this is not listed in their spec........)

2009-06-26

R.I.P - King of Pop - Michael Jackson 1958-2009

OMG, this morning I got a bad news that a most widely famous artist - Michael Jackson just past away!

I got almost all his albums that I can bought here.
Since Off the wall, Thriller, Bad, Dangerous, History, Scream, Invincible...etc.
Of course, too many songs he performed can be classics..

Q__Q..

I will miss you, Michael.
I will miss your dancing.
I will miss the performance you made with Slash.

You are always the best!

2009-06-16

SourceForge clevo-extra project kick-off

It is a milestone for myself...;-)

  • Project UNIX name : clevo-extra
  • Registered : 2009-06-11 10:17


http://sourceforge.net/projects/clevo-extra

2009-06-02

Compiling SiS X driver on Mandriva 2009.1

Based on this one, I also try to compile and install SiS X driver on Mandriva 2009.1.
Of course I have to install some additional packages.
Use urpmi and all related sw automatically:

Xorg X server is v1.6.1.

1. binutils;
2. make;
3. libxorg-x11-devel;
4. xorg-x11 (this is a meta package);
5. xorg-x11-xvfb (I think this one is optional..);

BTW, I try it on a small distro called Caixa Magica 12.
Can compile and install 'cause it's a Mandriva-based distro.

2009-05-27

Compiling SiS X driver on Ubuntu 9.04

I got new verison of SiS Linux X driver which fixed some bugs and the AUO panel issue.
And again, I have to verify it for our company's product on Ubuntu 9.04 first.
(Company decision........)

Xorg X server is v1.6.0 on Ubuntu 9.04.

Well, some packages I need to install to compile the SiS X driver source code:
1. xserver-xorg-dev;
2. x11proto-*-dev; (Lazy, so I install them all......)
3. libdrm-dev;
4. libgl1-mesa-dev;
5. build-essential; (This is ur call..)

And, of course, ./configure; make, then you can find the driver sis_drv.so under ./src/.libs/.
Nothing special.

Next I have to verify it on Mandriva 2009.1 also.

2009-05-20

Inside the Linux reboot.c of kernel 2.6.25

I got a bug report from one of my customer, they said system hang up after issuing reboot command if using T3400 CPU...= =|||

I can duplicate this issue and I think it is a BIOS bug on our product, because I saw this issue before BIOS POST.

After confirm with our BIOS team members and we use 80 port debug card to see what is going on. We know that BIOS team need to modify their watchdog to monitor this kind of problem......They need to know some information to catch for the system reboot. In Windows, they can monitor it because system will write 0xfe to 0x64. I believe that Linux will do something smiliar to this but I can not figure it out in kernel 2.6.24.7 source code under arch/x86/kernel/reboot_*.c...

Well, starting from Linux kernel 2.6.25, there is only ONE reboot.c under arch/x86/kernel, and they do change some points in the code.

In arch/x86/kernel/reboot.c and line 367 we can see the code:
outb(0xfe, 0x64); /* pulse reset low */

This function is defined in arch/x86/boot/boot.h.

囧rz..
This means that system will do basic port I/O to write to port 0x64 with value 0xfe when system is going to reboot. Bingo! So our BIOS team will be very happy with it........'cause they now can do something to their cute dog........

Another interesting point is that BIOS can detect memory address 0x472 to know this is a warm or cold reboot we want. If the reboot mode is 0x1234 that is a warm reboot. If reboot mode is 0 that is cold reboot...;-)

BTW, this is my desktop wallpaper recently...;-)
And I want to say that openSUSE rocks!!
Also the president Ma of TW rocks!!

This hot girl is named 王思平 and she is a famous model of TW!!
I personally love her bott....XD

2009-04-28

Jaunty was released on 4-23-2009

Ubuntu 9.04 Jaunty was released on 4/23/2009.
Although I don't like this distro, I still have to install and evaluate it on my company's NB products...Orz

This release of Ubuntu implement the ext4 file system which was improved from previous ext3 fs type.

First, I have tasted the Ubuntu 9.04 Netbook Remix edition. This is the first formal release for Ubuntu distro which got a optimized system on netbook products. With a different kind of "desktop" interface which can be more useful with touch screen device such as MID.

Basically, Ubuntu have made the OS image for LPIA and/or netbook product, but they didn't formal announce it such as 9.04. I downloaded those non-announced image and installed it to give it a try. I have to say the truth that, those releases suck..damn..!! Very low performance and laggy response of the whole system, it's very terrible........

Now, finally 9.04 netbook remix with ext4 supported, it is just OK to use. Even I still see error messages of built-in Intel i915 / drm driver.



2009-03-25

Linux kernel 2.6.29 is released

Cool~!

On 2009-03-23 the Linux kernel 2.6.29 is out there~!
Let's find out how many cool stuffs' inside this release.

Message from Linus: click here.

For the changes in 2.6.29: click here.

BTW, I love this new logo - Tuz, it's cute.

2009-03-13

Code::Blocks IDE in openSUSE 11.1-build and install

Again, today I will try to build and install the Code::Blocks, an open source and free IDE for programming, in my own openSUSE 11.1 box...;-)

1. First, I need wxWidgets supported in my openSUSE 11.1 box. In a terminal console:

$
zypper search wxWidgets

I got some information about it as:
正在載入儲存庫資料...
正在讀取已安裝的套件...
S | 名稱 | 摘要 | 類型--+-----------------------+-------------------------------------------------------+-----------
| wxWidgets | C++ framework for cross-platform development | 套件
| wxWidgets | C++ framework for cross-platform development | srcpackage
| wxWidgets-compat | WxWidgets Compatibility Package | 套件
| wxWidgets-debuginfo | Debug information for package wxWidgets | 套件
| wxWidgets-debugsource | Debug sources for package wxWidgets | 套件
| wxWidgets-devel | Include files and libraries for wxWidgets development | 套件
| wxWidgets-docs | WxWidgets html documentations | 套件
| wxWidgets-gl | OpenGL add-on for wxWidgets | 套件
| wxWidgets-gl-compat | OpenGL add-on for wxWidgets | 套件
| wxWidgets-lang | Languages for package wxWidgets | 套件

So, I decided to install some packages:
$ sudo zypper install wxWidgets wxWidgets-compat wxWidgets-devel wxWidgets-lang

System will automatically check your box and tells you about how many new packages would be installed.
Just type your passwoed and hit 'y' to go.

2. Get Code::Blocks source code via SVN. (Or you may want to check this page first):
$ svn checkout svn://svn.berlios.de/codeblocks/trunk svn-trunk/

This will try to checkout the latest Code::Blocks source code trunk to the directory called "./svn-trunk/"
Revision of my code that checked out is 5483.

3. Just read the file inside your truck directory called "BUILD", and now I can build and install it:
$ cd svn-trunk/
$ ./bootstrap

Output message is:
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

$ ./configure --enable-contrib

Output message is a little bit weird but seems fine to go on......
I checked the help page of ./configure but there is no "--enable-contrib" option......:

...
...
configure: WARNING: unrecognized options: --enable-contrib
*************************************************
* Code::Blocks source tree has been configured. *
*************************************************
You can now build Code::Blocks by issuing 'make'.
When the build is complete, become root and install
it by issuing 'make install'.

Finally, we can:
$ make
$ sudo make install

All good to install and play with it...;-)

2009-02-04

Install RTL8187SE PCI-e wifi card on Ubuntu 8.10

I just got a new platform with the RTL8187SE wifi card (PCI-e).
Damn it doesn't work on Ubuntu 8.10 with native kernel module rtl8180.ko........Orz
I think maybe the device ID is not supported (my device ID is 10ec:8199).

I try to grep some useful infomation about source code to install by myself.
And, now it works!
See below..;-):

1. Download the source code deb package from here. (name: rtl8187se-source_1023.0928.2008_all.deb)

2. I DO NOT want to use dpkg to install this, so I use command dpkg --extract to extract the src only.

!! CHECK THE README FILE INSIDE THE PACKAGE BEFORE YOU DO ANY THING !!

3. $ cd ./modules/rtl8187se

4. $ sudo ./makecln; sudo ./makedrv

5. $ sudo ./wlan0up (this is a test for new kernel module r8180.ko that we just made.)

If there is no problem,

6. $ sudo ./wlan0down; sudo ./install

System will automatically depmod -a and reboot. Done..;-)
BTW, the kernel for this process is 2.6.27-7-generic.

2009-01-16

Cable with RJ45 jacks how-to

RJ45 jack (tenon faces to ground..):

Normal:
Both jacks: 白橘 白綠 白藍 白棕

Cross-over:
a jack: 白綠 白橘 白藍 白棕
b jack: 白橘 白綠 白藍 白棕

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 | 名稱 | 摘要 | 類型
--+----------+--------------------------------------------------+-----
---| 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...;-)