Subject: Compiling kernel with ppbus support.
To: None <netbsd-users@netbsd.org>
From: Brendon Costa <bcosta@avdat.com.au>
List: netbsd-users
Date: 11/17/2005 15:47:57
Hi,

    I plan on writing some software that uses the parallel port in order 
to control an external circuit with NetBSD. After reading around on the 
net for a while I found a project called NetBSD-ppbus that seems to 
provide the functionality I am after in a module called ppui. The wesite 
for ppbus has a downloadable 1.6 alpha release from June 6, 2004 that 
was used to patch the then NetBSD-current. We are currently using NetBSD 
2.1. I had a look at the source for NetBSD 2.1 RELEASE and noticed that 
the code files from ppbus seem to be in the NetBSD source tree now. I 
also saw that the man pages for ppbus were in the NetBSD source tree but 
they were not installed on my system so I assume that by default ppbus 
is not compiled and installed as part of the kernel and userland.

    I seem to be unable to compile the kernel with support for ppbus 
enabled. Looking at the old release of ppbus the kernel config file 
included additional information that I can not see in the GENERIC 
configuration for I386. Is anyone able to point me in the right 
direction for setting up NetBSD so that I can use this ppbus functionality?

Thanks for any help in advance,
Brendon.


I have tried using the config items from the old ppbus example GENERIC 
config file, by adding to the I386 GENERIC config the items shown below:

#-----------------------------
# Parallel Printer Interfaces

# PCI parallel printer interfaces
#lpt*    at puc? port ?            # || ports on "universal" comm boards

# ISA parallel printer interfaces
#lpt0    at isa? port 0x378 irq 7    # standard PC parallel ports
#lpt1    at isa? port 0x278
#lpt2    at isa? port 0x3bc

# atppc device
# flag values: 0x01 - disable irq, 0x02 - disable dma
# Parallel port directly configured on ISA bus
atppc0    at isa? port 0x378 irq 7 drq 3 flags 0x00
# Parallel port configured by ACPI
atppc*    at acpi? flags 0x00
# Parallel port configured by PNPBIOS
atppc*    at pnpbios? index ? flags 0x00
# Parallel port on a PCI PUC
atppc*    at puc? port ? flags 0x00   
# Parallel port configured by ISAPNP
atppc* at isapnp? flags 0x00
options ATPPC_DEBUG
options ATPPC_VERBOSE

# PPBUS device and flags
ppbus* at atppc?
options PPBUS_VERBOSE
options PPBUS_DEBUG
options DEBUG_1284
#options DONTPROBE_1284
#options PERIPH_1284

#Devices which attach to ppbus

#printer
lpt* at ppbus?
options LPT_DEBUG
options LPT_VERBOSE

#network device
plip* at ppbus?
options PLIP_DEBUG

#pps device
pps* at ppbus?

#lpbb device
lpbb* at ppbus?
iic* at lpbb?

#ppui device
ppui* at ppbus?

#parallel zip drives
#vpo* at ppbus?
#imm* at ppbus?
#-----------------------------

However when trying to compile the kernel I got error messages like:

/usr/netbsd/src/sys/arch/I386/conf/GENERIC_2_1_RELEASE_VirtualTerminals_PPBUS:549: 
lpbb*: unknown device `lpbb'
/usr/netbsd/src/sys/arch/I386/conf/GENERIC_2_1_RELEASE_VirtualTerminals_PPBUS:550: 
iic* at lpbb?: `lpbb' unknown
/usr/netbsd/src/sys/arch/I386/conf/GENERIC_2_1_RELEASE_VirtualTerminals_PPBUS:553: 
ppui*: unknown device `ppui'
/usr/netbsd/src/sys/arch/I386/conf/GENERIC_2_1_RELEASE_VirtualTerminals_PPBUS:516: 
`atppc* at acpi?' is orphaned (nothing matching `acpi?' declared)
/usr/netbsd/src/sys/arch/I386/conf/GENERIC_2_1_RELEASE_VirtualTerminals_PPBUS:518: 
`atppc* at pnpbios?' is orphaned (nothing matching `pnpbios?' declared)
*** Stop.

ERROR: nbconfig failed for GENERIC_2_1_RELEASE_VirtualTerminals_PPBUS
*** BUILD ABORTED ***