Auto generation of PCMCIA config.opts file?

"Steven J. Hill" <[email protected]> Thu, 31 Jul 2003 21:22:12 -0400
Newsgroups gmane.linux.pcmcia.devel
Message-ID <[email protected]>
I am having difficulties with automatically generating an
'/etc/pcmcia/config.opts' file for my MIPS board. I was curious
if anyone else had run into this problem on other architectures
other than x86. Below is the dump for the PCI I/O and memory
spaces:

    bash-2.05# cat /proc/iomem
    00000000-07ffffff : System RAM
      00100000-002f9c97 : Kernel code
      00316000-00356fff : Kernel data
    08000000-0fffffff : PCI Memory space
      08001000-08400fff : PCI CardBus #01
      08402000-08801fff : PCI CardBus #05
      08802000-08802fff : card services

    bash-2.05# cat /proc/ioports
    00001000-01000fff : PCI I/O space
      00001000-00004fff : PCI CardBus #01
      00005000-000050ff : PCI CardBus #01
      00005400-000054ff : PCI CardBus #05
      00005800-000058ff : PCI CardBus #05

 From this I generate, by hand, my '/etc/pcmcia/config.opts' file:

    exclude port 0x1000-0x4fff
    exclude port 0x5000-0x50ff
    exclude port 0x5400-0x54ff
    exclude port 0x5800-0x58ff
    include port 0x5100-0x53ff
    include port 0x5900-0x69ff
    include memory 0x08802000-0x08802fff

It works perfectly. This has the problem of PCI bus ordering
effecting what the addresses are though. My only solution would
seem to create a quick C program that is called by the the boot
up script that runs cardmgr and have it go look at the /proc
entries and create the proper file. Does anyone have a better
idea than this? Thanks.

-Steve




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01