public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] i2c support for u-boot
@ 2012-03-01 21:42 yannick.niane at micromentis.com
  2012-03-02  6:32 ` Heiko Schocher
  0 siblings, 1 reply; 3+ messages in thread
From: yannick.niane at micromentis.com @ 2012-03-01 21:42 UTC (permalink / raw)
  To: u-boot



Hi All,
I'm trying to build u-boot with i2c support for  a mba2440 board. U-boot version is mba2440-uboot1.1.1. 
In mba2440.h config file i have selected the i2c commands :

#define CONFIG_COMMANDS \
                        (CONFIG_CMD_DFL         | \
                        CFG_CMD_CACHE         | \
                        CFG_CMD_NAND         | \
                        CFG_CMD_PING         | \
                        /*CFG_CMD_EEPROM |*/ \
                        CFG_CMD_I2C         | \
                        /*CFG_CMD_USB                  |*/ \
                        CFG_CMD_REGINFO  | \
                        CFG_CMD_DATE         | \
                        CFG_CMD_FAT                 | \
                        CFG_CMD_MMC                 | \
                        CFG_CMD_NET                 | \
                        CFG_CMD_ELF)

I get the following error when trying to build:

UNDEF_SYM=`arm-linux-objdump -x lib_generic/libgeneric.a board/mba2440/libmba2440.a cpu/arm920t/libarm920t.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
        arm-linux-ld -Bstatic -T /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/board/mba2440/u-boot.lds -Ttext 0x30F00000          $UNDEF_SYM cpu/arm920t/start.o \
            --start-group lib_generic/libgeneric.a board/mba2440/libmba2440.a cpu/arm920t/libarm920t.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --no-warn-mismatch -L /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3 -lgcc --end-group \
            -Map u-boot.map -o u-boot
common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_md >>:
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:188: undefined reference to `i2c_read'
common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_mw >>:
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:287: undefined reference to `i2c_write'
common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_crc >>:
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:369: undefined reference to `i2c_read'
common/libcommon.a(cmd_i2c.o): dans la fonction << mod_i2c_mem >>:
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:458: undefined reference to `i2c_read'
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:507: undefined reference to `i2c_write'
common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_probe >>:
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:550: undefined reference to `i2c_probe'
common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_loop >>:
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:631: undefined reference to `i2c_read'
common/libcommon.a(exports.o): dans la fonction << jumptable_init >>:
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/exports.c:35: undefined reference to `i2c_write'
/home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/exports.c:35: undefined reference to `i2c_read'
make: *** [u-boot] Erreur 1

I'm new to u-boot programing, am i missing something in the config file?
Thanks
Yannick Niane

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] i2c support for u-boot
  2012-03-01 21:42 [U-Boot] i2c support for u-boot yannick.niane at micromentis.com
@ 2012-03-02  6:32 ` Heiko Schocher
  2012-03-05 22:43   ` Yannick Niane
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Schocher @ 2012-03-02  6:32 UTC (permalink / raw)
  To: u-boot

Hello yannick.niane at micromentis.com,

yannick.niane at micromentis.com wrote:
> 
> Hi All,
> I'm trying to build u-boot with i2c support for  a mba2440 board. U-boot version is mba2440-uboot1.1.1. 

you use a very old version of u-boot, you should update to current
version.

> In mba2440.h config file i have selected the i2c commands :

I cannot find such a config file in mainline ...

> #define CONFIG_COMMANDS \
>                         (CONFIG_CMD_DFL         | \
>                         CFG_CMD_CACHE         | \
>                         CFG_CMD_NAND         | \
>                         CFG_CMD_PING         | \
>                         /*CFG_CMD_EEPROM |*/ \
>                         CFG_CMD_I2C         | \
>                         /*CFG_CMD_USB                  |*/ \
>                         CFG_CMD_REGINFO  | \
>                         CFG_CMD_DATE         | \
>                         CFG_CMD_FAT                 | \
>                         CFG_CMD_MMC                 | \
>                         CFG_CMD_NET                 | \
>                         CFG_CMD_ELF)
> 
> I get the following error when trying to build:
> 
> UNDEF_SYM=`arm-linux-objdump -x lib_generic/libgeneric.a board/mba2440/libmba2440.a cpu/arm920t/libarm920t.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
>         arm-linux-ld -Bstatic -T /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/board/mba2440/u-boot.lds -Ttext 0x30F00000          $UNDEF_SYM cpu/arm920t/start.o \
>             --start-group lib_generic/libgeneric.a board/mba2440/libmba2440.a cpu/arm920t/libarm920t.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --no-warn-mismatch -L /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3 -lgcc --end-group \
>             -Map u-boot.map -o u-boot
> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_md >>:
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:188: undefined reference to `i2c_read'
> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_mw >>:
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:287: undefined reference to `i2c_write'
> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_crc >>:
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:369: undefined reference to `i2c_read'
> common/libcommon.a(cmd_i2c.o): dans la fonction << mod_i2c_mem >>:
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:458: undefined reference to `i2c_read'
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:507: undefined reference to `i2c_write'
> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_probe >>:
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:550: undefined reference to `i2c_probe'
> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_loop >>:
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c:631: undefined reference to `i2c_read'
> common/libcommon.a(exports.o): dans la fonction << jumptable_init >>:
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/exports.c:35: undefined reference to `i2c_write'
> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/exports.c:35: undefined reference to `i2c_read'
> make: *** [u-boot] Erreur 1

As the error message says, some symbols are missing ... if you want to
use i2c, you must enable through a CONFIG option, which i2c driver you
want to use on your hardware. I cannot help you more here, because I
do not know anything about your board.

> I'm new to u-boot programing, am i missing something in the config file?

Yep!

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] i2c support for u-boot
  2012-03-02  6:32 ` Heiko Schocher
@ 2012-03-05 22:43   ` Yannick Niane
  0 siblings, 0 replies; 3+ messages in thread
From: Yannick Niane @ 2012-03-05 22:43 UTC (permalink / raw)
  To: u-boot

Thank you Heiko,


> yannick.niane at micromentis.com wrote:
>>
>> Hi All,
>> I'm trying to build u-boot with i2c support for  a mba2440 board. U- 
>> boot version is mba2440-uboot1.1.1.
>
> you use a very old version of u-boot, you should update to current
> version.
>
>> In mba2440.h config file i have selected the i2c commands :
>
> I cannot find such a config file in mainline ...
Actually i got that u-boot version from our vendor. They ported u-boot  
to make it work  with the mba2440 board(s3c2440 processor) they are  
selling,  but they didn't submit it as patch, i guess that's why i  
have all files for that board and you don't in mainline.
I've downloaded u-boot-2011-12 and tried porting it to the mba 2440  
hardware by adding configuration options and files but i had errors  
when compiling with arm-linux-gcc cross compiler. I think i'll just  
try to fix the missing symbols problem using the old u-boot version
Regards
Yannick



    Yannick Niane ing.jr
    Junior computer engineer

    Tel.:  1.450.628.9292         2010, Dagenais Blvd. W.
             1.888.628.9292         Laval (Qu?bec)
    Fax.: 1.450.628.0770        Canada H7L 5W2
    Cell.: 1.514.220.9232

    www.micromentis.com




Le 2-Mar-12 ? 1:32 AM, Heiko Schocher a ?crit :

>  yannick.niane at micromentis.com,
>
> yannick.niane at micromentis.com wrote:
>>
>> Hi All,
>> I'm trying to build u-boot with i2c support for  a mba2440 board. U- 
>> boot version is mba2440-uboot1.1.1.
>
> you use a very old version of u-boot, you should update to current
> version.
>
>> In mba2440.h config file i have selected the i2c commands :
>
> I cannot find such a config file in mainline ...
>
>> #define CONFIG_COMMANDS \
>>                        (CONFIG_CMD_DFL         | \
>>                        CFG_CMD_CACHE         | \
>>                        CFG_CMD_NAND         | \
>>                        CFG_CMD_PING         | \
>>                        /*CFG_CMD_EEPROM |*/ \
>>                        CFG_CMD_I2C         | \
>>                        /*CFG_CMD_USB                  |*/ \
>>                        CFG_CMD_REGINFO  | \
>>                        CFG_CMD_DATE         | \
>>                        CFG_CMD_FAT                 | \
>>                        CFG_CMD_MMC                 | \
>>                        CFG_CMD_NET                 | \
>>                        CFG_CMD_ELF)
>>
>> I get the following error when trying to build:
>>
>> UNDEF_SYM=`arm-linux-objdump -x lib_generic/libgeneric.a board/ 
>> mba2440/libmba2440.a cpu/arm920t/libarm920t.a lib_arm/libarm.a fs/ 
>> cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/ 
>> libjffs2.a fs/reiserfs/libreiserfs.a net/libnet.a disk/libdisk.a  
>> rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/ 
>> libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a | 
>> sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
>>        arm-linux-ld -Bstatic -T /home/developer/Documents/Sensor/ 
>> CommunicationBoard/Devkit/kraken_bsp/bootloader/mba2440-uboot1.1.1- 
>> v2.1_1G/board/mba2440/u-boot.lds -Ttext 0x30F00000           
>> $UNDEF_SYM cpu/arm920t/start.o \
>>            --start-group lib_generic/libgeneric.a board/mba2440/ 
>> libmba2440.a cpu/arm920t/libarm920t.a lib_arm/libarm.a fs/cramfs/ 
>> libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a  
>> fs/reiserfs/libreiserfs.a net/libnet.a disk/libdisk.a rtc/librtc.a  
>> dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/ 
>> libpost.a post/cpu/libcpu.a common/libcommon.a --no-warn-mismatch - 
>> L /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3 -lgcc --end- 
>> group \
>>            -Map u-boot.map -o u-boot
>> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_md >>:
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c: 
>> 188: undefined reference to `i2c_read'
>> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_mw >>:
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c: 
>> 287: undefined reference to `i2c_write'
>> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_crc >>:
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c: 
>> 369: undefined reference to `i2c_read'
>> common/libcommon.a(cmd_i2c.o): dans la fonction << mod_i2c_mem >>:
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c: 
>> 458: undefined reference to `i2c_read'
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c: 
>> 507: undefined reference to `i2c_write'
>> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_probe >>:
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c: 
>> 550: undefined reference to `i2c_probe'
>> common/libcommon.a(cmd_i2c.o): dans la fonction << do_i2c_loop >>:
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/cmd_i2c.c: 
>> 631: undefined reference to `i2c_read'
>> common/libcommon.a(exports.o): dans la fonction << jumptable_init >>:
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/exports.c: 
>> 35: undefined reference to `i2c_write'
>> /home/developer/Documents/Sensor/CommunicationBoard/Devkit/ 
>> kraken_bsp/bootloader/mba2440-uboot1.1.1-v2.1_1G/common/exports.c: 
>> 35: undefined reference to `i2c_read'
>> make: *** [u-boot] Erreur 1
>
> As the error message says, some symbols are missing ... if you want to
> use i2c, you must enable through a CONFIG option, which i2c driver you
> want to use on your hardware. I cannot help you more here, because I
> do not know anything about your board.
>
>> I'm new to u-boot programing, am i missing something in the config  
>> file?
>
> Yep!
>
> bye,
> Heiko
> -- 
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MM_pour_Cartouche.jpg
Type: image/jpeg
Size: 7271 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120305/a867eb37/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swips.gif
Type: image/gif
Size: 1583 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120305/a867eb37/attachment.gif>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-05 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 21:42 [U-Boot] i2c support for u-boot yannick.niane at micromentis.com
2012-03-02  6:32 ` Heiko Schocher
2012-03-05 22:43   ` Yannick Niane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox