rcrun and usbd releated issue

lhmwzy lhmwzy at gmail.com
Sat Mar 22 07:12:35 PDT 2014


I used the following kernel config to build a customer kernel

platform        pc64
machine         x86_64
machine_arch    x86_64
cpu             HAMMER_CPU
ident           lhmwzy
maxusers        0
#options        CPU_DISABLE_AVX


options         INET                    #InterNETworking
options         HAMMER                  #Hammer Filesystem
options         NULLFS                  #NULL filesystem
options         FFS                     #Berkeley Fast Filesystem
options         FFS_ROOT                #FFS usable as root device [keep
this!]
options         SOFTUPDATES             #Enable FFS soft updates support
options         UFS_DIRHASH             #Improve performance on big
directories
options         MFS                     #Memory Filesystem
options         TMPFS                   #Temporary Filesystem
options         MD_ROOT                 #MD is a potential root device
options         NFS                     #Network Filesystem
options         NFS_ROOT                #NFS usable as root device, NFS
required
options         MSDOSFS                 #MSDOS Filesystem
options         CD9660                  #ISO 9660 Filesystem
options         PROCFS                  #Process filesystem
#options        COMPAT_43               #Compatible with BSD 4.3
options         SCSI_DELAY=5000         #Delay (in ms) before probing SCSI
options         IFPOLL_ENABLE           # Support mixed interrupt-polling
                                        # handling of network device drivers
options         UCONSOLE                #Allow users to grab the console
options         KTRACE                  #ktrace(1) support
options         SYSVSHM                 #SYSV-style shared memory
options         SYSVMSG                 #SYSV-style message queues
options         SYSVSEM                 #SYSV-style semaphores
options         P1003_1B                #Posix P1003_1B real-time extensions
options         _KPOSIX_PRIORITY_SCHEDULING
options         ICMP_BANDLIM            #Rate limit bad replies
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         AHC_REG_PRETTY_PRINT    # Print register bitfields in debug
                                        # output.  Adds ~128k to driver.
options         AHD_REG_PRETTY_PRINT    # Print register bitfields in debug
                                        # output.  Adds ~215k to driver.
options         DSCHED_FQ               # Fair-queuing disk scheduler

# ALTQ
options         ALTQ            #alternate queueing
options         ALTQ_CBQ        #class based queueing
options         ALTQ_RED        #random early detection
options         ALTQ_RIO        #triple red for diffserv (needs RED)
options         ALTQ_HFSC       #hierarchical fair service curve
options         ALTQ_PRIQ       #priority queue
options         ALTQ_FAIRQ      #fair queueing
#options        ALTQ_NOPCC      #don't use processor cycle counter
#options        ALTQ_DEBUG      #for debugging

# Debugging for Development
options         DDB
options         DDB_TRACE
options         INVARIANTS

device          isa
device          pci

# AHCI driver, this will override NATA for AHCI devices,
# both drivers may be included.
#
device          ahci


# NEW-ATA (NATA) and ATAPI devices
#
device          nata
device          natadisk                # ATA disk drives
device          natapicd                # ATAPI CDROM drives
device          natapifd                # ATAPI floppy drives
device          natapist                # ATAPI tape drives
device          natapicam               # Emulate ATAPI devices as SCSI
device          nataraid                # support for ATA software RAID
                                        # controllers
device          natausb                 # ATA-over-USB support
options         ATA_STATIC_ID           # Static device numbering


# SCSI peripherals
device          mpt
device          scbus           # SCSI bus (required)
device          da              # Direct Access (disks)
device          cd              # CD
device          pass            # Passthrough device (direct SCSI access)
device          sg              # Passthrough device (linux scsi generic)


# VirtIO support
device          virtio          # VirtIO core
device          virtio_blk      # VirtIO disk driver
device          virtio_pci      # VirtIO transport over PCI bus

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc0 at isa? port IO_KBD
device          atkbd0  at atkbdc? irq 1 flags 0x1
device          psm0    at atkbdc? irq 12

device          vga0    at isa?

# kbdmux is the keyboard multiplexer
device          kbdmux

# splash screen/screen saver
pseudo-device   splash
# syscons is the default console driver, resembling an SCO console
device          sc0     at isa? flags 0x100
options         SC_PIXEL_MODE           # add support for the raster text
mode

device          agp             # support several AGP chipsets



device          em              # Intel PRO/1000 adapter Gigabit Ethernet
Card (``Wiseman'')
                                # Requires ig_hal
                                # Requires ig_hal
device          ig_hal          # Intel PRO/1000 hardware abstraction layer


device          miibus          # MII bus support


# Pseudo devices - the number indicates how many units to allocate.
pseudo-device   loop            # Network loopback
pseudo-device   ether           # Ethernet support
pseudo-device   sl      1       # Kernel SLIP
pseudo-device   tun             # Packet tunnel.
pseudo-device   pty             # Pseudo-ttys (telnet etc)
pseudo-device   md              # Memory "disks"

# CARP support
options         CARP
pseudo-device   carp

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device   bpf             #Berkeley packet filter

pseudo-device   crypto          # core crypto support, used by wlan
# FireWire support
device          firewire        # FireWire bus code
device          sbp             # SCSI over FireWire (Requires scbus and da)
device          fwe             # Ethernet over FireWire (non-standard!)


As you can see,I removed all usb related things.

I have solved the problem as following:
remove usbd from /etc/rc.d


But I still confused why the issue would happen.

the script name "openresty" I put in /usr/local/etc/rc.d/

#!/bin/sh
#
# PROVIDE: openresty
# REQUIRE: LOGIN
# KEYWORD: shutdown

#
# Add the following line to /etc/rc.conf to enable :
# openresty_enable="YES"
#

. /etc/rc.subr

name="openresty"
rcvar=openresty_enable

load_rc_config "$name"

: ${openresty_enable="NO"}


command="/usr/local/openresty/nginx/sbin/nginx"
pidfile="/usr/local/openresty/nginx/logs/nginx.pid"

required_files="/usr/local/openresty/nginx/conf/nginx.conf"


run_rc_command "$1"


When run "rcrun start openresty",then the error:
openresty depends on usbd, current state:


I have seen the code In the rcrun script :
...
    for i in $@; do
        case X`varsym -s -q rcng_$i` in
        Xrunning*)
            echo "$i has already been started"
            ;;
        Xconfigured*)
            echo "$i has already been configured"
            ;;
        *)
            _return=0
            buildrclist $i
            for j in $rclist; do
                need=1
                for k in `rcorder -p $j`; do
                    if [ $k = $i ]; then
                        need=0
                    else
                        state=`varsym -s -q rcng_$k`
                        case X$state in
                        Xrunning*|Xconfigured*|Xirrelevant*|Xdisabled*)
                            ;;
                        *)
                            echo "$i depends on $k, current state: $state"
                            _return=1
                            ;;
                        esac
                    fi
                done
            done
.....
So I removed usbd from /etc/rc.d/ and no errors,everything go well.

So rcrun  needs to be improved?




2014-03-22 21:17 GMT+08:00 Sascha Wildner <saw at online.de>:

> On Fri, 21 Mar 2014 06:51:14 +0100, lhmwzy <lhmwzy at gmail.com> wrote:
>
>  Under 3.6.1,I build a customer kernel and disable usb.
>>
>
> Can you be more specific about how you disabled it?
>
> Regards,
> Sascha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20140322/73dac536/attachment-0003.htm>


More information about the Users mailing list