Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Build failure using GENERIC_TINY kernel config



From taking a brief glance at intr.c, my proposed change is to wrap all calls that trigger undefined references using a preprocessor #if that checks if NPCI > 0 (does anyone know which header defines that symbol)? Moreover, some calls to the MSIPIC driver require that an IOAPIC exist; though rare, I know of some mainboards new enough to have an IOAPIC that also have ISA slots, so perhaps all calls need to be wrapped?

I can try later and check the results. Now is not currently a good time.

-----Original Message----- From: William D. Jones
Sent: Thursday, May 07, 2015 6:12 AM
To: port-i386%netbsd.org@localhost
Subject: Build failure using GENERIC_TINY kernel config

Hello all,

As some users/devs know, I run NetBSD-current on a 486 for fun. I figured it
was about time to upgrade the kernel after about 5 months. The current
kernel config I use is a slightly-modified GENERIC_TINY in the usual
sys/arc/i386/conf directory. I suspect my changes to the kernel conf- which
are meant to add in driver dev- do not have any effect on the problems I am
having. As of this morning, I can not compile the kernel due to missing
references to a recently-added PCI device that is a dependency of
sys/arch/x86/x86/intr.c

#      link  PB_KERNEL/netbsd
/home/william/Projects/NetBSD-CVS/src/../tools/i386-pb/bin/i486--netbsdelf-ld
-Map netbsd.map --cref -T
/home/william/Projects/NetBSD-CVS/src/sys/arch/i386/conf/kern.ldscript -Ttext
c0100000 -e start -X -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
intr.o: In function `intr_allocate_slot_cpu':
intr.c:(.text+0x2d1): undefined reference to `msipic_is_msi_pic'
intr.o: In function `intr_disestablish':
intr.c:(.text+0xa4d): undefined reference to `msipic_is_msi_pic'
intr.o: In function `intr_establish':
intr.c:(.text+0xb94): undefined reference to `msipic_get_devid'
intr.c:(.text+0xbd3): undefined reference to `pci_msi_string'
intr.c:(.text+0xc4d): undefined reference to `msipic_is_msi_pic'

*** Failed target:  netbsd
*** Failed command: echo '# ' " link PB_KERNEL/netbsd"; echo
/home/william/Projects/NetBSD-CVS/src/../tools/i386-pb/bin/i486--netbsdelf-ld
-Map netbsd.map --cref -T
/home/william/Projects/NetBSD-CVS/src/sys/arch/i386/conf/kern.ldscript -Ttext
c0100000 -e start -X -o netbsd '${SYSTEM_OBJ}' '${EXTRA_OBJ}' vers.o;
/home/william/Projects/NetBSD-CVS/src/../tools/i386-pb/bin/i486--netbsdelf-ld
-Map netbsd.map --cref -T
/home/william/Projects/NetBSD-CVS/src/sys/arch/i386/conf/kern.ldscript -Ttext
c0100000 -e start -X -o netbsd locore.o copy.o spl.o vector.o lock_stubs.o
devsw.o ioconf.o param.o aout_machdep.o apic.o arc4.o at_print.o ata.o
ata_wdc.o atapi_base.o atapi_wdc.o atapiconf.o attimer.o attimer_isa.o
auconv.o audio.o autoconf.o bios32.o bioscall.o bpf.o bpf_filter.o
bpf_stub.o bridgestp.o bufq_disksort.o bufq_fcfs.o bus_dma.o bus_space.o
busfunc.o cd9660_bmap.o cd9660_lookup.o cd9660_node.o cd9660_rrip.o
cd9660_util.o cd9660_vfsops.o cd9660_vnops.o clock.o clock_subr.o clockctl.o
cnmagic.o com.o com_isa.o compat_13_machdep.o compat_16_machdep.o
compat_mod.o cons.o consinit.o convert_xmm_s87.o core_elf32.o core_machdep.o
core_netbsd.o cprng_fast.o cpu.o cpu_in_cksum.o cpu_topology.o cpufunc.o
db_access.o db_break.o db_command.o db_cpu.o db_dbgreg.o db_disasm.o
db_examine.o db_expr.o db_input.o db_interface.o db_kernel.o db_lex.o
db_lwp.o db_machdep.o db_memrw.o db_output.o db_panic.o db_print.o db_proc.o
db_run.o db_sym.o db_trace.o db_trap.o db_variables.o db_watch.o
db_write_cmd.o db_xxx.o dead_vfsops.o dead_vnops.o debugsyms.o dev_verbose.o
dk.o dl_print.o dumpsys.o eisabusprint.o elink.o elink3.o errata.o
exec_aout.o exec_elf32.o exec_script.o exec_subr.o fd.o fdc_isa.o
ffs_alloc.o ffs_balloc.o ffs_inode.o ffs_snapshot.o ffs_subr.o ffs_tables.o
ffs_vfsops.o ffs_vnops.o fifo_vnops.o fil.o fpu.o fss.o gdt.o
genfb_machdep.o genfs_io.o genfs_rename.o genfs_vfsops.o genfs_vnops.o
i386func.o i82586.o i8259.o identcpu.o idt.o if.o if_arp.o if_bridge.o
if_ef.o if_ep_isa.o if_ep_isapnp.o if_ethersubr.o if_loop.o if_media.o
if_ppp.o if_pppoe.o if_spppsubr.o if_tun.o igmp.o in.o in4_cksum.o
in6_print.o in_cksum.o in_offload.o in_pcb.o in_print.o in_proto.o
init_main.o init_sysctl.o init_sysctl_base.o init_sysent.o intr.o ioapic.o
ip_auth.o ip_dstlist.o ip_encap.o ip_fil_compat.o ip_fil_netbsd.o ip_frag.o
ip_htable.o ip_icmp.o ip_id.o ip_input.o ip_lookup.o ip_nat.o ip_nat6.o
ip_output.o ip_pool.o ip_proxy.o ip_reass.o ip_state.o ip_sync.o ipi.o isa.o
isa_machdep.o isabusprint.o isadma.o isapnp.o isapnp_machdep.o isapnpdebug.o
isapnpdevs.o isapnpres.o joy.o joy_isapnp.o kern_acct.o kern_auth.o
kern_cfglock.o kern_clock.o kern_condvar.o kern_core.o kern_cpu.o
kern_descrip.o kern_event.o kern_exec.o kern_exit.o kern_fork.o kern_hook.o
kern_idle.o kern_ksyms.o kern_kthread.o kern_lock.o kern_lwp.o kern_malloc.o
kern_module.o kern_module_vfs.o kern_mutex.o kern_mutex_obj.o kern_ntptime.o
kern_physio.o kern_pmf.o kern_proc.o kern_prot.o kern_ras.o kern_rate.o
kern_resource.o kern_rndpool.o kern_rndq.o kern_rndsink.o kern_runq.o
kern_rwlock.o kern_rwlock_obj.o kern_sig.o kern_sleepq.o kern_softint.o
kern_ssp.o kern_stub.o kern_subr.o kern_synch.o kern_syscall.o kern_sysctl.o
kern_tc.o kern_time.o kern_timeout.o kern_todr.o kern_turnstile.o
kern_uidinfo.o kern_uuid.o kern_xxx.o kernfs_vfsops.o kernfs_vnops.o
krpc_subr.o lapic.o link_proto.o longrun.o lpt.o lpt_isa.o machdep.o
mainbus.o mcabusprint.o mfs_miniroot.o mii.o mii_bitbang.o mii_ethersubr.o
mm.o mp.o mpbios.o mptramp.o msdosfs_conv.o msdosfs_denode.o msdosfs_fat.o
msdosfs_lookup.o msdosfs_vfsops.o msdosfs_vnops.o mulaw.o net_stats.o
nfs_bio.o nfs_boot.o nfs_clntsocket.o nfs_clntsubs.o nfs_iod.o nfs_kq.o
nfs_node.o nfs_socket.o nfs_subs.o nfs_vfsops.o nfs_vnops.o nist_ctr_drbg.o
nmi.o patch.o pcd.o pcdisplay.o pcdisplay_chars.o pcdisplay_subr.o
pcibusprint.o pckbc.o pckbc_isa.o pckbd.o pckbport.o pcppi.o pfil.o
pktqueue.o platform.o pmap.o pmap_tlb.o portalgo.o ppp_tty.o
process_machdep.o quota1_subr.o radix.o radix_ipf.o raw_cb.o raw_ip.o
raw_usrreq.o rijndael-alg-fst.o rijndael-api-fst.o rijndael.o rndpseudo.o
route.o rtbl.o rtc.o rtsock.o sb.o sb_isa.o sb_isapnp.o sbdsp.o sched_4bsd.o
scsipi_base.o scsipi_ioctl.o scsipiconf.o secmodel.o secmodel_bsd44.o
secmodel_extensions.o secmodel_securelevel.o secmodel_suser.o slcompress.o
spec_vnops.o spkr.o subr_autoconf.o subr_blist.o subr_bufq.o subr_callback.o
subr_copy.o subr_cprng.o subr_cpufreq.o subr_device.o subr_devsw.o
subr_disk.o subr_disk_mbr.o subr_disk_open.o subr_evcnt.o subr_exec_fd.o
subr_extent.o subr_hash.o subr_humanize.o subr_iostat.o subr_ipi.o
subr_kcpuset.o subr_kmem.o subr_kobj.o subr_kobj_vfs.o subr_lockdebug.o
subr_log.o subr_lwp_specificdata.o subr_once.o subr_optstr.o subr_pcq.o
subr_pcu.o subr_percpu.o subr_pool.o subr_prf.o subr_prof.o
subr_pserialize.o subr_specificdata.o subr_time.o subr_vmem.o
subr_workqueue.o subr_xcall.o sys_aio.o sys_descrip.o sys_generic.o
sys_lwp.o sys_machdep.o sys_module.o sys_mqueue.o sys_pmc.o sys_process.o
sys_pset.o sys_sched.o sys_select.o sys_sig.o sys_socket.o syscall.o
tcp_congctl.o tcp_input.o tcp_output.o tcp_sack.o tcp_subr.o tcp_timer.o
tcp_usrreq.o tcp_vtw.o trap.o tsc.o tty.o tty_bsdpty.o tty_conf.o tty_ptm.o
tty_pty.o tty_subr.o tty_tty.o udp_usrreq.o ufs_bmap.o ufs_inode.o
ufs_lookup.o ufs_rename.o ufs_vfsops.o ufs_vnops.o uipc_accf.o uipc_domain.o
uipc_mbuf.o uipc_mbuf2.o uipc_proto.o uipc_sem.o uipc_socket.o
uipc_socket2.o uipc_syscalls.o uipc_usrreq.o uvm_amap.o uvm_anon.o
uvm_aobj.o uvm_bio.o uvm_coredump.o uvm_device.o uvm_emap.o uvm_fault.o
uvm_glue.o uvm_init.o uvm_io.o uvm_km.o uvm_loan.o uvm_map.o uvm_meter.o
uvm_mmap.o uvm_mremap.o uvm_object.o uvm_page.o uvm_pager.o uvm_pdaemon.o
uvm_pdpolicy_clock.o uvm_pglist.o uvm_readahead.o uvm_stat.o uvm_swap.o
uvm_unix.o uvm_user.o uvm_vnode.o vfs_bio.o vfs_cache.o vfs_cwd.o
vfs_dirhash.o vfs_getcwd.o vfs_hooks.o vfs_init.o vfs_lockf.o vfs_lookup.o
vfs_mount.o vfs_quotactl.o vfs_subr.o vfs_syscalls.o vfs_trans.o vfs_vnode.o
vfs_vnops.o vfs_xattr.o vga.o vga_common.o vga_isa.o vga_subr.o vm86.o
vm_machdep.o vnd.o vnode_if.o wd.o wdc.o wdc_isa.o wsdisplay.o
wsdisplay_compat_usl.o wsdisplay_util.o wsemul_dumb.o wsemul_vt100.o
wsemul_vt100_chars.o wsemul_vt100_keys.o wsemul_vt100_subr.o wsemulconf.o
wsevent.o wsfont.o wskbd.o wskbdmap_mfii.o wskbdutil.o x86_autoconf.o
x86_machdep.o x86_stub.o
/home/william/Projects/NetBSD-CVS/objdir/i386-pb/sys/arch/i386/compile/PB_KERNEL/lib/compat/libcompat.a
/home/william/Projects/NetBSD-CVS/objdir/i386-pb/sys/arch/i386/compile/PB_KERNEL/lib/kern/libkern.a
vers.o swapnetbsd.o
*** Error code 1

Stop.
nbmake: stopped in
/home/william/Projects/NetBSD-CVS/objdir/i386-pb/sys/arch/i386/compile/PB_KERNEL

ERROR: Failed to make all in
"/home/william/Projects/NetBSD-CVS/src/../objdir/i386-pb/sys/arch/i386/compile/PB_KERNEL"
*** BUILD ABORTED ***

It's been a while since I last looked at the autoconf framework, but I seem
to recall that the kernel config decides which hardware drivers *and* busses
need to be pulled into the kernel. Because GENERIC_TINY does not use PCI
devices, it has no need to pull in the PCI bus and PCI drivers either. Since
NetBSD still officially supports 486 machines- some of which do not have PCI
slots- I suspect the crosstalk between this new PCI device and intr.c is an
oversight/not intended. Can anyone else confirm? If so, what would be the
cleanest way to remove the msipic driver code out of the generic x86
interrupt handling functions? I would still like to run Net on my ISA-only
486 :P.

Thanks in advance for any help!

Sincerely,

--
William D. Jones
thor0505%comcast.net@localhost

--
William D. Jones
thor0505%comcast.net@localhost

Home | Main Index | Thread Index | Old Index