Saturday, May 12, 2007

lm sensor compilation..sdp2430

If you already know how to build a filesystem, good else for OMAP2430, here it is: http://www.geocities.com/crecmca98/Linux/omap2430_From_almost_scratch.pdf

lmsensor for OMAP has been a slight pain so far..
lmsensor needs sysfsutils to build properly..
pick them up here: http://sourceforge.net/project/showfiles.php?group_id=44427
./configure --target=arm-linux --build=i386-pc-linux-gnu --prefix=/home/fs/nmenon/arm/ --host=arm-linux CC=arm-none-linux-gnueabi-gcc
mymake install

lmsensor: Download it from here: http://www.lm-sensors.org/wiki/Download
compiling this is a pain:
first I modified Makefile, changed
I2C_HEADERS := $(LINUX_HEADERS)
WARN := 1
DEBUG := 1
CC := $(CROSS_COMPILE)gcc
the last one was not sensible... but personally, I hate seeing CC=gcc in Makefiles...
might have been good to have ETCDIR := $(PREFIX)/etc

Next compilation started
mymake LINUX=/home/nmenon/opensource/copy/linux-omap.git/ MACHINE=ARM CFLAGS="-I/home/fs/nmenon/arm/include/" V=1 PREFIX=/home/fs/nmenon/arm/ LIBDIR=/home/fs/nmenon/arm/lib INCLUDEDIR=/home/fs/nmenon/arm/include ETCDIR=/home/fs/nmenon/arm/etc user_install

For some stupid reason, it'd not compile lib/libsensors.so.3.1.3
quick step: arm-none-linux-gnueabi-gcc -shared -Wl,-soname,libsensors.so.3 -o lib/libsensors.so.3.1.3 lib/data.lo lib/general.lo lib/error.lo lib/chips.lo lib/proc.lo lib/access.lo lib/init.lo lib/sysfs.lo lib/conf-parse.lo lib/conf-lex.lo -lc -lm -L/home/fs/nmenon/arm/lib -lsysfs
later it compiles and proceeds to install... :)

I had posted a FIFO enable patch to the omap list here: http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/009842.html. This seem to remarkably stabilize i2c operations for 2430 HS/FS ops(it has i2c-dev enabled).. but I am still not happy.. look at the following:
~ $ i2cdetect -y -a 1

0 1 2 3 4 5 6 7 8 9 a b c d e f

00: 00 01 02 03 04 -- 06 -- 08 -- -- -- -- -- -- 0f

10: 10 11 12 13 -- 15 -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- 27 -- -- -- -- -- 2d -- --

30: 30 31 32 33 34 35 -- 37 38 -- -- -- -- 3d -- --

40: 40 41 -- -- 44 45 46 47 48 -- -- -- -- 4d 4e --

50: 50 51 -- 53 54 55 56 57 58 59 5a 5b 5c 5d -- 5f

60: -- 61 -- -- -- -- 66 67 68 69 6a -- -- -- -- --

70: 70 -- -- 73 74 75 -- 77 78 79 -- -- -- 7d -- --

~ $ i2cdetect -y -a 2

0 1 2 3 4 5 6 7 8 9 a b c d e f

00: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f

20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f

30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f

40: 40 41 42 43 44 45 46 47 UU UU UU UU 4c 4d 4e 4f

50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f

60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f

70: 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f


I know that there are no devices all those locations... but why does it display it?? need to dig into this in the middle of mundane tasks such as grocery shopping, movie and library visits... Shrug.. Also need to probe with a scope the i2c scl and sda lines to see if multistart causes goof up in hsi2c protocol.. aaah.. bugs bugs to fix.. not ever enough time to do... I still need to be reading for my new work.... err.. somethings are addictive :(

No comments: