On Sun, Dec 22, 2024 at 07:09:56PM -0000, Stuart Henderson wrote:
> On 2024-12-22, Avon Robertson <avo...@xtra.co.nz> wrote:
> > Greetings misc@,
> >
> > I am working towards adding support for another serial card, and
> > occasionally I need to compile the kernel.  Yesterday, for the first
> > time, I failed to compile the kernel.
> >
> > With /usr/src updated by cvs immediately before a 'sysupgrade -s' to
> > OpenBSD 7.6-current (GENERIC.MP) #485: Tue Dec 17 17:10:38 MST 2024
> > followed immediately by an update of all packages, a compile of the
> > kernel (as per release(8) 2.), produced the errors below.
> >
> > /sys/dev/ic/dc.c:670:14: error: use of undeclared identifier 
> > 'PCI_PRODUCT_LITEON_PNIC'
> >                                         return (PCI_PRODUCT_LITEON_PNIC);
> >                                                 ^
> > /sys/dev/ic/dc.c:671:13: error: use of undeclared identifier 
> > 'PCI_PRODUCT_DEC_21142'
> >                                 return (PCI_PRODUCT_DEC_21142);
> >                                         ^
> > 2 errors generated.
> > *** Error 1 in /sys/arch/amd64/compile/GENERIC.MP (Makefile:2408 'dc.o')
> >
> > Upgrading every thing as shown above, and then ensuring that all files
> > and directories were removed in and below /usr/obj, another compile was
> > attempted using kernel:
> > OpenBSD 7.6-current (GENERIC.MP) #486: Fri Dec 20 18:18:24 MST 2024
> >
> > This produced the exact same errors shown above.
> >
> > File /sys/dev/ic/dc.c includes several files including
> ><dev/pci/pcidevs.h>.
> >
> > fgrep -e of the two undeclared identifiers above, outputs:
> >
> > /usr/include/dev/pci/pcidevs.h:#define      PCI_PRODUCT_LITEON_PNIC 0x0002  
> >         /* PNIC */
> > /usr/include/dev/pci/pcidevs.h:#define      PCI_PRODUCT_LITEON_PNICII       
> > 0xc115          /* PNIC-II */
> > /usr/include/dev/pci/pcidevs_data.h:            PCI_VENDOR_LITEON, 
> > PCI_PRODUCT_LITEON_PNIC,
> > /usr/include/dev/pci/pcidevs_data.h:            PCI_VENDOR_LITEON, 
> > PCI_PRODUCT_LITEON_PNICII,
> >
> > /usr/include/dev/pci/pcidevs.h:#define      PCI_PRODUCT_DEC_21142   0x0019  
> >         /* 21142/3 */
> > /usr/include/dev/pci/pcidevs_data.h:            PCI_VENDOR_DEC, 
> > PCI_PRODUCT_DEC_21142,
> >
> > So, it seems that something has not been done correctly by me.
> >
> > TIA for pointers to correct my error[s].
> >
> >
> 
> In a kernel build those headers come from /sys/dev/pci/pcidevs.h, I
> suppose you probably have a diff in that file if you're adding device
> support. Check any diffs you have under /sys and make sure they're still
> all in order (no conflicts etc).
> 
> -- 
> Please keep replies on the mailing list.
> 

Thank you for your reply Stuart.

As you indirectly pointed out, fgrep'ing /usr/include, was of no use
at all.

The checkout of /usr/src on the machine has somehow become out of
sync.  I noticed for example, that directory /sys/arch did not have a
CVS sub-directory and there may have been other differences elsewhere..

I have been using Stefan Sperling's eurobsdcon2017-device-drivers.pdf
paper as a guide. 

I have cvs released the checkout and will procede from a new checkout.

Thanks again.

-- 
aer

Reply via email to