i386/102678: Dell PowerEdge DRAC5 USB Keyboard

Brian A. Seklecki bseklecki at collaborativefusion.com
Thu Sep 7 18:32:20 UTC 2006


The following reply was made to PR i386/102678; it has been noted by GNATS.

From: "Brian A. Seklecki" <bseklecki at collaborativefusion.com>
To: bug-followup at FreeBSD.org, Maksim Yevmenkin <maksim.yevmenkin at gmail.com>,  John Baldwin <jhb at freebsd.org>, Scott Wilson <scott.wilson at gmail.com>
Cc: Bill Moran <wmoran at collaborativefusion.com>, Bryan Kaplan <bkaplan at collaborativefusion.com>, Sam Eaton <sam at fqdn.net>
Subject: Re: i386/102678: Dell PowerEdge DRAC5 USB Keyboard
Date: Thu, 07 Sep 2006 14:23:46 -0400

 Alright now I remember why I love this job.
 
 I've managed to get a 6.1-p5 working with the 1950 and a bit of
 back-porting.	
 
 After toiling with pxeboot(8) for several unforgiving hours, I was able
 to work-around a libnfs(3) bug that our PIX/ASA was blocking due to
 packet corruption (see post to freebsd-questions at freebsd.org) and enable
 TFTP kernel file retrieval with the proper combination of DHCP client
 entry flags and mojo.
 
 Next I confirmed that src/dev/usb/* code from 7-CURRENT did indeed work
 using a 08/06 ISO snapshot and the Dell DRAC5 remote media feature, thus
 one of the many changes yet-to-be-pulled into RELENG_6 had inadvertently
 fixed the problem with the Dell DRAC virt-USB kbd.  Perhaps a developer
 forgot to mention they were working on a bleeding edge piece of hardware
 that would be in demand in the near future?  Forgot to mention RFP?
 
 Anyway, there were too many patches to dev/usb/* that hadn't be
 MFC/RFP'd to RELENG_6, so I decided to CVS checkout -rHEAD dev/usb/ code
 into my RELENG_6_1 tree and build a custom kernel for PXE/TFTP booting.
 
 I expected breakage with a blind overlap, and I got it.  The trick was
 to disable any unneeded USB devices that may have 6--->7 kernel
 subsystem related changes.  Including ohci(4) which just refuses to
 build. (1)
 
 # USB support
 device          uhci            # UHCI PCI->USB interface
 #device         ohci            # OHCI PCI->USB interface
 device          ehci            # EHCI PCI->USB interface (USB 2.0)
 device          usb             # USB Bus (required)
 #device         udbp            # USB Double Bulk Pipe devices
 device          ugen            # Generic
 device          uhid            # "Human Interface Devices"
 device          ukbd            # Keyboard
 #device         ulpt            # Printer
 device          umass           # Disks/Mass storage - Requires 
 device          ums             # Mouse
 #device         ural            # Ralink Technology RT2500USB  
 #device         urio            # Diamond Rio 500 MP3 player
 #device         uscanner        # Scanners
 # USB Ethernet, requires miibus
 #device         aue             # ADMtek USB Ethernet
 #device         axe             # ASIX Electronics USB Ethernet
 #device         cdce            # Generic USB over Ethernet
 #device         cue             # CATC USB Ethernet
 #device         kue             # Kawasaki LSI USB Ethernet
 #device         rue             # RealTek RTL8150 USB Ethernet
 
 You also need to disable building of unnecessary kernel modules.  This
 is by far my most-favoritest-undocumented-feature(r) in 5x/6x.  If the
 device isn't *explicitly included* in the kernel config (static compiled
 in), it gets automatically built as a module (which we don't want
 because none of the USB network device modules will build because of
 6->7 breakage).  
 
 The fun part about this feature (the one that really heats me up, gets
 me ready to roll-out), is that if_ndis{,_usb} refuses to honor
 "nodevice{,s}" arguments in the kernel config.
 
 nodevice        ndis
 nooptions       ndis
 
 nodevice        ndisapi
 nooption        ndisapi
 
 nooption        NDISAPI
 nooptions       NDISAPI
 nodevices       ndis
 
 And since clearly I want to build a driver as a module if I haven't
 defined it in my kernel config file, and the mechanism to disable
 drivers doesn't override module building, we have to disable modules all
 together with my second-most-favoritest-undocumented-feature(r),
 "makeoptions NO_MODULES".
 
 So we set:
 
 makeoptions     NO_MODULES=yes
                                                                                                              
 Next drop the kernel in place in your tftproot relative to
 '/boot' (remember chroot(2) in tftpd(8) into tftproot)
 
 Next use mdconfig(8) to extract 'mfsroot' from the 6.1-RELEASE install
 ISO image.
 
 Next setup your loader.rc:
 
 echo Loading Kernel...
 load /boot/kernel
 set hint.acpi.0.disabled="1"
 set acpi_load="0"
 show
 echo Loading mfsroot...
 load -t mfs_root /boot/mfsroot
 echo booting...
 echo initializing h0h0magic...
 set vfs.root.mountfrom="ufs:/dev/md0c"
 boot
 
 Next recompile pxeboot(8) using 'make LOADER_TFTP_SUPPORT=yes"
 
 Next file a bug report with FreeBSD about how NFS-related code makes it
 into the pxeboot(8) binary even when you explicitly disable building
 with it, and how that NFS code likes to set destination UDP sockets to
 "port 0":
 
 # strings /tftpboot/pxeboot |grep -i nfs
 boot.nfsroot.server
 boot.nfsroot.path
 boot.nfsroot.nfshandle
 NFS MOUNT RPC error: %d
 /usr/src/lib/libstand/nfs.c
 no rootpath, no nfs
 nfsread: short packet, %d < %ld
 stale NFS file handle
 
 
 Next PXE boot your system (screenshot_00)
 
 Next notice how the kernel tries to load ACPI even though you've
 compiled it out of the kernel told the 2nd stage boot loader not to.
 
 Next notice how the pretty ANSI bolded kernel dmesg output to the
 console is somehow missing even though $console is set to 'vidconsole'
 in loader(8) and serial console redirection is disabled in hardware.
 
 Next go through the entire partition, slicing, package selection
 process, then attempt to fetch the distribution using FTP....only to
 realize that the sysinst(8) network configuration menu is inadvertently
 toggling off the 'up' flag on the bce(4) interface because it insists on
 prompting to reconfigure the interface every time you select a new media
 source until that media source fetch operation exists successfully.
 
 Which, BTW, is not an option you can disable -- even though you can
 properly configure the interface properly using ifconfig(8) and route(8)
 in the emergency holographic Fixit shell  >:}
 
 Anyway, the point is that the 1.7 if_bce.c also needed in your custom
 kernel (1.4 HEAD -> 1.2.2.2 in RELENG_6_1_0_RELEASE).
 
 http://digitalfreaks.org/~lavalamp/screenshot00.png
 http://digitalfreaks.org/~lavalamp/screenshot01.png
 http://digitalfreaks.org/~lavalamp/screenshot02.png
 http://digitalfreaks.org/~lavalamp/screenshot03.png
 
 Ironically, unless you remember to tftp(1) a copy of your custom kernel
 down using the Fixit shell after the copy/install process, the end
 result is an unusable 6.1-RELEASE system because the SMP/GENERIC kernels
 will not properly probe your keyboard.  
 
 Another option is to setup network interface, enable sshd(8), create
 users, setup groups.
 
 Now onto the grueling task of individually backporting USB drivers to
 determine which one be RFP/MFC'd, or possibly just a local patch in our
 local source tree.
 
 ~BAS
 
 1. Actually, if you need ohci(4) for some reason, you can force it to
 build.  The kernel build bombs because they set -Wwarn, so just run the
 command w/o -Wwarn:
 
 ../../../dev/usb/ohci_pci.c: In function `ohci_pci_attach':
 ../../../dev/usb/ohci_pci.c:310: warning: implicit declaration of
 function `bus_get_dma_tag'
 ../../../dev/usb/ohci_pci.c:310: warning: nested extern declaration of
 `bus_get_dma_tag'
 ../../../dev/usb/ohci_pci.c:313: warning: passing arg 1 of
 `bus_dma_tag_create' makes pointer from integer without a cast
 *** Error code 1
 
 
 cc -c -O -pipe -Wredundant-decls -Wnested-externs -Wstrict-prototypes
 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
 -fformat-extensions -std=c99 -g -nostdinc -I-  -I. -I../../..
 -I../../../contrib/altq -I../../../contrib/ipfilter
 -I../../../contrib/pf -I../../../contrib/dev/ath
 -I../../../contrib/dev/ath/freebsd -I../../../contrib/ngatm
 -I../../../dev/twa -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include
 opt_global.h -fno-common -finline-limit=8000 --param
 inline-unit-growth=100 --param large-function-growth=1000
 -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx
 -mno-3dnow -mno-sse -mno-sse2
 -ffreestanding   ../../../dev/usb/ohci_pci.c
 
 
 However, linking causes more problems later with:
 
 ohci_pci.o(.text+0x897): In function `ohci_pci_attach':
 ../../../dev/usb/ohci_pci.c:310: undefined reference to
 `bus_get_dma_tag'
 *** Error code 1
 
 So you have to clean that, too.
 
 ~BAS
 
 On Wed, 2006-09-06 at 17:14 -0400, Brian A. Seklecki wrote:
 > "Maksim Yevmenkin" <maksim.yevmenkin at gmail.com> Reports success with
 > 7.0-CURRENT snapshot from August 2006 i386 ISO snapshot.
 > ~BAS
 > 
 > 
 -- 
 Brian A. Seklecki <bseklecki at collaborativefusion.com>
 Collaborative Fusion, Inc.
 


More information about the freebsd-i386 mailing list