On Sunday 23 April 2006 22:37, Larry Nguyen wrote:
> #CONFIG_I2C is not set
> ddo^?i tha`nh
> CONFIG_I2C=y
> Save file. Go~ make oldconfig, tra? lo+`i m (module) cho ta^'t ca? nhu+~ng
> gi` lie^n quan dde^'n i2c (dda(.c bie^.t pha^`n chipset).
> Sau ddo' go~ make, ne^'u 0 bi. error, make modules_install ro^`i emerge
> lm_sensors
> Ba'c post le^n forum ddi ba'c. Cho mo.i ngu+o+`i quan ta^m xem luo^n.
>
> -Larry
>



1/ Quên chưa trả lời câu hỏi trước về lspci
localhost linux # lspci
00:00.0 Host bridge: Intel Corporation 915G/P/GV/GL/PL/910GL Express Memory 
Controller Hub (rev 0e)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
USB UHCI #1 (rev 05)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
USB UHCI #2 (rev 05)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
USB UHCI #3 (rev 05)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
USB UHCI #4 (rev 05)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
USB2 EHCI Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d5)
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW 
(ICH6 Family) AC'97 Audio Controller (rev 05)
00:1f.0 ISA bridge: Intel Corporation 82801FB/FR (ICH6/ICH6R) LPC Interface 
Bridge (rev 05)
00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
IDE Controller (rev 05)
00:1f.2 IDE interface: Intel Corporation 82801FB/FW (ICH6/ICH6W) SATA 
Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus 
Controller (rev 05)
01:00.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 
28)
01:02.0 VGA compatible controller: nVidia Corporation NV5M64 [RIVA TNT2 Model 
64/Model 64 Pro] (rev 15)
01:05.0 Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit 
Ethernet Controller (rev 13)


2/ Sửa
#CONFIG_I2C is not set
CONFIG_I2C=y

3/ Chạy
cd /usr/src/linux
make oldconfig
make modules_install
emerge lm_sensors

4/
>>Hehe, quên béng là đang chạy emerge --sync trên Workspace4! Nhưng cả hai chú 
vẫn cứ hùng hục làm việc :)

Number of files: 141655
Number of files transferred: 44022
Total file size: 127057880 bytes
Total transferred file size: 68495195 bytes
Literal data: 68502021 bytes
Matched data: 0 bytes
File list size: 3292439
Total bytes written: 880621
Total bytes read: 73777381

wrote 880621 bytes  read 73777381 bytes  23637.17 bytes/sec
total size is 127057880  speedup is 1.70

>>> Updating Portage cache:  100%
Performing Global Updates: /usr/portage/profiles/updates/1Q-2005
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'

Performing Global Updates: /usr/portage/profiles/updates/4Q-2005
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'

Performing Global Updates: /usr/portage/profiles/updates/1Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'

Performing Global Updates: /usr/portage/profiles/updates/2Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......
>>> /usr/lib/libsensors.so -> libsensors.so.3


5/ Kết quả chạy emerge lm_sensors (mấy dòng chót)
 
*
 * Next you need to run:
 *   /usr/sbin/sensors-detect
 * to detect the I2C hardware of your system and create the file:
 *   /etc/conf.d/lm_sensors
 *
 * You will also need to run the above command if you're upgrading from
 * <=lm_sensors-2.9.0, as the needed entries in /etc/conf.d/lm_sensors has
 * changed.
 *
 * Be warned, the probing of hardware in your system performed by
 * sensors-detect could freeze your system. Also make sure you read
 * the documentation before running lm_sensors on IBM ThinkPads.
 *
 * Please see the lm_sensors documentation and website for more information.
 *
>>> Regenerating /etc/ld.so.cache...
>>> sys-apps/lm_sensors-2.10.0 merged.
>>> Recording sys-apps/lm_sensors in "world" favorites file...

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


 * GNU info directory index is up-to-date.


6/ Chạy
 /usr/sbin/sensors-detect

 We can start with probing for (PCI) I2C or SMBus adapters.
 You do not need any special privileges for this.
 Do you want to probe now? (YES/no): yes
Probing for PCI bus adapters...
Use driver `rivatv' for device 01:02.0: RIVA UVTNT2
Use driver `i2c-i801' for device 00:1f.3: Intel 82801FB ICH6
Probe succesfully concluded.

We will now try to load each adapter module in turn.
Load `rivatv' (say NO if built into your kernel)? (YES/no):


Thôi! Hơi kinh kinh. Tạm Ctrl+C nghỉ gỉai lao :)
==============================================

:)


Chạy tiếp coi ra cái gì.
Ra cái này :


localhost linux # /usr/sbin/sensors-detect
# sensors-detect revision 1.413 (2006/01/19 20:28:00)

This program will help you determine which I2C/SMBus modules you need to
load to use lm_sensors most effectively. You need to have i2c and
lm_sensors installed before running this program.
Also, you need to be `root', or at least have access to the /dev/i2c-*
files, for most things.
If you have patched your kernel and have some drivers built in, you can
safely answer NO if asked to load some modules. In this case, things may
seem a bit confusing, but they will still work.

It is generally safe and recommended to accept the default answers to all
questions, unless you know what you're doing.

 We can start with probing for (PCI) I2C or SMBus adapters.
 You do not need any special privileges for this.
 Do you want to probe now? (YES/no): y
Probing for PCI bus adapters...
Use driver `rivatv' for device 01:02.0: RIVA UVTNT2
Use driver `i2c-i801' for device 00:1f.3: Intel 82801FB ICH6
Probe succesfully concluded.

We will now try to load each adapter module in turn.
Load `rivatv' (say NO if built into your kernel)? (YES/no): y
FATAL: Module rivatv not found.
Loading failed... skipping.
** Note: rivatv module is available at http://rivatv.sourceforge.net/
Load `i2c-i801' (say NO if built into your kernel)? (YES/no): y
FATAL: Error inserting i2c_i801 
(/lib/modules/2.6.15-gentoo-r5/kernel/drivers/i2c/busses/i2c-i801.ko): 
Unknown symbol in module, or unknown parameter (see dmesg)
Loading failed... skipping.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.

 To continue, we need module `i2c-dev' to be loaded.
 If it is built-in into your kernel, you can safely skip this.
 i2c-dev is not loaded. Do you want to load it now? (YES/no): y
FATAL: Error inserting i2c_dev 
(/lib/modules/2.6.15-gentoo-r5/kernel/drivers/i2c/i2c-dev.ko): Unknown symbol 
in module, or unknown parameter (see dmesg)
 Loading failed, expect problems later on.

 We are now going to do the adapter probings. Some adapters may hang halfway
 through; we can't really help that. Also, some chips will be double detected;
 we choose the one with the highest confidence value in that case.
 If you found that the adapter hung after probing a certain address, you can
 specify that address to remain unprobed. That often
 includes address 0x69 (clock chip).

Some chips are also accessible through the ISA bus. ISA probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this. This is usually safe though.

Do you want to scan the ISA bus? (YES/no): y
Probing for `National Semiconductor LM78'
  Trying address 0x0290... Failed!
Probing for `National Semiconductor LM78-J'
  Trying address 0x0290... Failed!
Probing for `National Semiconductor LM79'
  Trying address 0x0290... Failed!
Probing for `Winbond W83781D'
  Trying address 0x0290... Failed!
Probing for `Winbond W83782D'
  Trying address 0x0290... Failed!
Probing for `Winbond W83627HF'
  Trying address 0x0290... Failed!
Probing for `Winbond W83627EHF'
  Trying address 0x0290... Failed!
Probing for `Silicon Integrated Systems SIS5595'
  Trying general detect... Failed!
Probing for `VIA Technologies VT82C686 Integrated Sensors'
  Trying general detect... Failed!
Probing for `VIA Technologies VT8231 Integrated Sensors'
  Trying general detect... Failed!
Probing for `ITE IT8712F'
  Trying address 0x0290... Success!
    (confidence 8, driver `it87')
Probing for `ITE IT8705F / SiS 950'
  Trying address 0x0290... Failed!
Probing for `IPMI BMC KCS'
  Trying address 0x0ca0... Failed!
Probing for `IPMI BMC SMIC'
  Trying address 0x0ca8... Failed!

Some Super I/O chips may also contain sensors. Super I/O probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this. This is usually safe though.

Do you want to scan for Super I/O sensors? (YES/no): y
Probing for `ITE 8702F Super IO Sensors'
  Failed! (0x8712)
Probing for `ITE 8705F Super IO Sensors'
  Failed! (0x8712)
Probing for `ITE 8712F Super IO Sensors'
  Success... found at address 0x0290
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
  Failed! (skipping family)
Probing for `Winbond W83627EHF/EHG Super IO Sensors'
  Failed! (skipping family)

Do you want to scan for secondary Super I/O sensors? (YES/no): y
Probing for `ITE 8702F Super IO Sensors'
  Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
  Failed! (skipping family)
Probing for `Winbond W83627EHF/EHG Super IO Sensors'
  Failed! (skipping family)

 Now follows a summary of the probes I have just done.
 Just press ENTER to continue:

Driver `it87' (should be inserted):
  Detects correctly:
  * ISA bus address 0x0290 (Busdriver `i2c-isa')
    Chip `ITE 8712F Super IO Sensors' (confidence: 9)


I will now generate the commands needed to load the I2C modules.

If you want to load the modules at startup, generate a config file
below and make sure lm_sensors gets started at boot time; e.g
$ rc-update add lm_sensors default

To make the sensors modules behave correctly, add these lines to
/etc/modules.d/lm_sensors and run modules-update:

#----cut here----
# I2C module options
alias char-major-89 i2c-dev
#----end cut here----

WARNING! If you have some things built into your kernel, the list above
will contain too many modules. Skip the appropriate ones! You really should
try these commands right now to make sure everything is working properly.
Monitoring programs won't work until it's done.
To load everything that is needed, execute the commands below...

#----cut here----
# I2C adapter drivers
modprobe i2c-isa
# I2C chip drivers
# Warning: the required module it87 is not currently installed on your system.
# For status of 2.6 kernel ports see 
http://secure.netroedge.com/~lm78/supported.html
# If driver is built-in to the kernel, or unavailable, comment out the 
following line.
modprobe it87
# sleep 2 # optional
/usr/bin/sensors -s # recommended
#----end cut here----

Do you want to overwrite /etc/conf.d/lm_sensors? Enter s to specify other file 
name?
  (yes/NO/s): y
Done.
localhost linux #

===============================================================

localhost deb # cat /etc/conf.d/lm_sensors
#    /etc/conf.d/sensors - Defines modules loaded by /etc/init.d/lm_sensors
#    Copyright (c) 1998 - 2001  Frodo Looijaard <[EMAIL PROTECTED]>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# See also the lm_sensors homepage at:
#     http://www2.lm-sensors.nu/~lm78/index.html
#
# This file is used by /etc/init.d/lm_sensors and defines the modules to
# be loaded/unloaded. This file is sourced into /etc/init.d/lm_sensors.
#
# The format of this file is a shell script that simply defines the modules
# in order as normal variables with the special names:
#    MODULE_0, MODULE_1, MODULE_2, etc.
#
# Please note that the numbers in MODULE_X must start at 0 and increase in
# steps of 1. Any number that is missing will make the init script skip the
# rest of the modules. Use MODULE_X_ARGS for arguments.
#
# List the modules that are to be loaded for your system
#
# Generated by sensors-detect on Mon Apr 24 12:46:10 2006

# Load modules at startup
LOADMODULES=yes

# Initialize sensors at startup
INITSENSORS=yes

MODULE_0=i2c-isa
MODULE_1=it87

=================================================================

Rồi làm cái gì nữa đây hè ?

-- 
m k h _ s g n
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
VietLUG-users mailing list
VietLUG-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vietlug-users

Trả lời cho