From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2935 invoked by alias); 2 Nov 2007 11:24:30 -0000 Received: (qmail 2926 invoked by uid 22791); 2 Nov 2007 11:24:28 -0000 X-Spam-Check-By: sourceware.org Received: from 204-133-123-27.dia.static.slbbi.com (HELO mail.chez-thomas.org) (204.133.123.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 02 Nov 2007 11:24:23 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 11A7A37C8006; Fri, 2 Nov 2007 05:24:20 -0600 (MDT) Received: from [192.168.1.101] (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 97DED195009F; Fri, 2 Nov 2007 05:24:16 -0600 (MDT) Message-ID: <472B08DF.8000000@mlbassoc.com> Date: Fri, 02 Nov 2007 11:24:00 -0000 From: Gary Thomas User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Oscar Gueta CC: ecos-discuss@ecos.sourceware.org References: <580244.27714.qm@web56412.mail.re3.yahoo.com> In-Reply-To: <580244.27714.qm@web56412.mail.re3.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Adding PCI eth pro100 for testing new port to MPC8313 RDB X-SW-Source: 2007-11/txt/msg00010.txt.bz2 Oscar Gueta wrote: > Hello all, > > In order to fully test the new PCI HAL for > Freescale's MPC8313 RDB I added an Intel PCI ethernet > (pro100) to the source tree as follows under > packages/devs/eth/powerpc/rdb/i82559/current/cdl: > > cdl_package CYGPKG_DEVS_ETH_RDB_I82559 { > display "RDB pci intel i82559 ethernet > driver" > description "Ethernet driver for RDB pci intel > i82559." > > parent CYGPKG_IO_ETH_DRIVERS > active_if CYGPKG_IO_ETH_DRIVERS > active_if CYGPKG_HAL_POWERPC_RDB > > include_dir cyg/io > > # FIXME: This really belongs in the INTEL_I82559 > package > cdl_interface > CYGINT_DEVS_ETH_INTEL_I82559_REQUIRED { > display "Intel i82559 ethernet driver > required" > } > > define_proc { > puts $::cdl_system_header "/***** ethernet > driver proc output start *****/" > puts $::cdl_system_header "#define > CYGDAT_DEVS_ETH_INTEL_I82559_INL > " > puts $::cdl_system_header "#define > CYGDAT_DEVS_ETH_INTEL_I82559_CFG > " > puts $::cdl_system_header "/***** ethernet > driver proc output end *****/" > } > > ..... > > I also added a new target to ecos.db in order to > insert the pro100 driver as follows: > > package CYGPKG_HAL_POWERPC_RDB { > alias { "FreeScale MPC83xxRDB" > hal_powerpc_rdb powerpc_rdb_hal } > directory hal/powerpc/rdb > script hal_powerpc_rdb.cdl > hardware > description " > The RDB HAL package provides the support > needed to run > eCos on a FreeScale MPC83xx RDB board." > } > > target rdb_pr100 { > alias { "FreeScale MPC83xx RDB board > with pro100" } > packages { CYGPKG_HAL_POWERPC > CYGPKG_HAL_POWERPC_MPC831X > CYGPKG_HAL_POWERPC_RDB > > CYGPKG_IO_SERIAL_POWERPC_MPC831X > CYGPKG_IO_PCI > CYGPKG_IO_ETH_DRIVERS > CYGPKG_DEVS_ETH_INTEL_I82559 > CYGPKG_DEVS_ETH_RDB_I82559 > > } > description "FreeScale MPC83xx RDB board with > pro100" > } > > > I created a Redboot minimal configuration, and is > defined as follows: > > cdl_configuration eCos { > description "" ; > hardware rdb ; > template redboot ; > package -hardware CYGPKG_HAL_POWERPC current ; > package -hardware CYGPKG_HAL_POWERPC_MPC831X > current ; > package -hardware CYGPKG_HAL_POWERPC_RDB current ; > package -hardware > CYGPKG_DEVS_FLASH_POWERPC_RATTLER current ; > package -hardware CYGPKG_DEVS_FLASH_AMD_AM29XXXXX > current ; > package -hardware CYGPKG_IO_PCI current ; > package -hardware CYGPKG_IO_ETH_DRIVERS current ; > package -hardware CYGPKG_DEVS_ETH_INTEL_I82559 > current; > package -hardware CYGPKG_DEVS_ETH_RDB_I82559 > current ; > package -template CYGPKG_HAL current ; > package -template CYGPKG_INFRA current ; > package -template CYGPKG_REDBOOT current ; > package -template CYGPKG_ISOINFRA current ; > package -template CYGPKG_LIBC_STRING current ; > package -template CYGPKG_CRC current ; > package CYGPKG_NS_DNS current ; > package CYGPKG_IO_FLASH current ; > }; > > > Without importing the RedBoot, everything > compiles OK. I can see the ethernet driver compiling. > The problem is when Redboot minimal configuration is > imported and tried to be compiled, there are pci > library routines unresolved: > > powerpc-eabi-gcc -msoft-float -mcpu=603e -g -nostdlib > -Wl,--gc-sections -Wl,-static > -L/root/ecos/projects/pcieth/pcieth_install/lib > -Ttarget.ld -o > /root/ecos/projects/pcieth/pcieth_install/bin/redboot.elf > /root/ecos/projects/pcieth/pcieth_install/lib/version.o > make[1]: Leaving directory > `/root/ecos/projects/pcieth/pcieth_build/redboot/current' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o: > In function `rity': > make: Leaving directory > `/root/ecos/projects/pcieth/pcieth_build' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o(.text.pci_init_find_82559s+0xbc): > undefined reference to `cyg_pci_init' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o: > In function `CYG_WORD64': > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o(.text.pci_init_find_82559s+0xf8): > undefined reference to `cyg_pci_find_matching' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o: > In function `_callbacks': > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o(.text.pci_init_find_82559s+0x128): > undefined reference to `cyg_pci_get_device_info' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o: > In function `yg_flag_t': > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o(.text.pci_init_find_82559s+0x13c): > undefined reference to `cyg_pci_translate_interrupt' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o: > In function `83xx_t': > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o(.text.pci_init_find_82559s+0x15c): > undefined reference to `cyg_pci_configure_device' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o: > In function `riority': > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o(.text.pci_init_find_82559s+0x29c): > undefined reference to `cyg_pci_read_config_uint16' > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o: > In function `11ddr_cs_bndsaSERKS_': > /root/ecos/projects/pcieth/pcieth_install/lib/extras.o(.text.pci_init_find_82559s+0x2b8): > undefined reference to `cyg_pci_write_config_uint16' > collect2: ld returned 1 exit status > make[1]: *** > [/root/ecos/projects/pcieth/pcieth_install/bin/redboot.elf] > Error 1 > > > I am completely lost here as in cdl files and in ecm > file PCI is included (I am also positive that library > is compiling and working as far as I can test). Does > anybody have a clue how to fix this code without > making dirty changes in the ethernet driver source > code or makefiles to force the compilation? It looks like you are missing the hardware support functions for PCI on your architecture. If you look at '.../packages/io/pci/current/src/pci.c', you'll see these comments: // CYG_PCI_PRESENT only gets defined for targets that provide PCI HAL support. // See pci_hw.h for details. #ifdef CYG_PCI_PRESENT ... all the generic code is protected by this #ifdef Look at how PCI is supported on other platforms. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss