ASUS motherboard and FreeBSD

I have just bought a pretty cool book-sized computer that I can haul around in a suitcase and demo my new science museum exhibit prototypes. A notebook computer wouldn't do, because I can only get 30 f/s video into a FreeBSD system using a PCI board with the Brooktree chips.

(There are several other possible sources of video. One could use a web cam, but I have found no non-window drivers that know how to talk to one, especially in compressed mode, which is what those puppies use to get 640x480 at 30 frames per second. Why doesn't some webcam manufacturer publish this interface? The Unix/Linux world is waiting.

Another potential source of video is a Firewire device, but again, I don't know of any drivers or the documentation needed to write one. It sure would make this task easier.)

So I need a small, fast computer with one or two IDE slots. I wandered the web and found a bare-bones system, plus 3GHz Pentium 4, with a quarter gig of RAM, for under $500. Not bad. I populated it with an old disk (only 13G!) and CD-ROM reader.

I obtained the system from Essential Computers. They appear to be an efficient company in New York that sells Taiwanese stuff. I ordered an Asus Pundit AB-P2600 on Thursday, expedited, and it arrived on Monday. Very nice.

They have packed a complete computer into a small space, with -2mm of extra room. Yep, the Intel heat sink doesn't quite fit, and they supplied their own, which seems to be 2mm smaller. Also, the 2 PCI slots assume that the PCI board is shorter than the metal tang. Another 2mm would have let it fit. I managed to weave one Hauppauge video board into place.

FreeBSD problems

I loaded the FreeBSD release 4.9 into it. There are problems:
  • After booting, the ATA bus resets, and stops working. Checking the net, I learn that turning off DMA access to the disk avoids this problem. The hand entry at boot is:
    set hw.ata.ata_dma=0
    
    I found the variable involved in dev/ata.c and rebuilt a kernel with it set to zero.
  • The Ethernet port is not recognized, so the built-in port doesn't work. Inconvenient. This little beauty is loaded with slots: memory stick slots, USB 2, firewire, and PC-BUS. I slap in a PC card Ethernet and boot up. It doesn't recognize it on boot up, but it does if I remove and reseat the card.

    The Ethernet card is a Broadcom BCM4401, and the net tells me that we can almost use it. There was one entry that offered an unsupported patch, and then:

    julian      2004/02/12 13:00:54 PST
    
      FreeBSD src repository
    
      Added files:           (Branch: RELENG_4)
        sys/dev/bfe          if_bfe.c if_bfereg.h 
      Log:
      MFC the Broadcom 4401 ethernet driver
      This commmit just brings over the files unchanged..
      I will be applying the patches to make it 4.x as a second commit.
      
      Revision  Changes    Path
      1.4.4.1   +1557 -0   src/sys/dev/bfe/if_bfe.c (new)
      1.1.4.1   +512 -0    src/sys/dev/bfe/if_bfereg.h (new)
    
    The device entry was in LINT. Thanks for the patch, Julian! It complains that the miibus module is already installed, but it seems to work just fine.

    Bringing the kernel up-to-date is something I do a lot. Alas, it hasn't fixed the bge driver, nor the DMA problem. The disk is good: I tried several different ones, with and without the old CD-ROM installed. Of course, I now have to make an actual patch for the ATA DMA fix:

    *** dev/ata/ORIGata-disk.c      Thu Apr  8 20:02:40 2004
    --- dev/ata/ata-disk.c  Thu Apr  8 20:02:51 2004
    ***************
    *** 87,93 ****
      
      /* internal vars */
      static u_int32_t adp_lun_map = 0;
    ! static int ata_dma = 1;
      static int ata_wc = 1;
      static int ata_tags = 0; 
      TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
    --- 87,93 ----
      
      /* internal vars */
      static u_int32_t adp_lun_map = 0;
    ! static int ata_dma = 0;
      static int ata_wc = 1;
      static int ata_tags = 0; 
      TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
    

    Gosh ftp5.freebsd.org has gotten slow. I am having trouble finding a site with enough speed for these updates. I'd donate a server, but don't have enough bandwidth.

  • The VGA chip doesn't support the VESA modes I had hoped. I have people interested in this exhibit software, and appropriate VESA modes are part of the specs, but it is hard to tell someone to go to the store and buy a chip that supports VESA mode 1024x768x24, that the 1024x768x32 mode is not currently supported in the kernel, or in my driver routines.

    One solution would be to turn off the motherboard VGA chip and install something appropriate in the other PCI slot. Of course, it couldn't be a full-height card and, in fact, must be a PCI card, not an AGP card. Such a card is now a rare commodity: we want to run with common boards, and gamers are driving the market for incredible AGP VGA cards.

    So it looks like I am going to have to hack the kernel to let me set some of the x32 modes, and modify my drivers to deal with it. That certainly would make it more general, though slower. But then again, with a 3GHz CPU, I expect that even my video applications will have cycles to spare. If I am really radical, I might even process 640x480 images instead of the current 320x240.