tech-kern archive

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

Can't compile kernel with DRI legacy drivers



Hello

I was having some trouble on an old ThinkPad x201i with intel
integrated graphics. So was thinking of trying something as an effort
to fix it.

Not so accustomed in building kernel from source, let alone debugging
it.

I wonder if I'm doing anything wrong or is there any solution to this.
Please help.

Tried this on NetBSD 10.0 x86_64:

# ftp https://cdn.NetBSD.org/pub/NetBSD/NetBSD-$(uname -r)/source/sets/syssrc.tgz
# tar zxvf syssrc.tgz -C /
# cd /usr/src/sys/arch/$(uname -m)/conf/
# cp GENERIC MYKERNEL

Uncommented and changed the ident line and uncommented the
"i915drm*	at drm?" line on MYKERNEL.

Then:

# config MYKERNEL
# cd ../compile/MYKERNEL
# make depend
# make

make ends with (output attached):

#      link  MYKERNEL/netbsd
ld -Map netbsd.map --cref -T netbsd.ldscript -Ttext 0xffffffff80200000 -e start -z max-page-size=0x200000 -X -o netbsd ${SYSTEM_OBJ:[@]:Nswapnetbsd.o} ${EXTRA_OBJ} vers.o swapnetbsd.o
ld: drm_drawable.o: in function `drm_adddraw':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_drawable.c:90: undefined reference to `drm_debug_flag'
ld: drm_fops.o: in function `drm_open_helper':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_fops.c:69: undefined reference to `drm_debug_flag'
ld: drm_sman.o: in function `drm_sman_mm_allocate':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:95: undefined reference to `drm_mm_search_free'
ld: drm_sman.o: in function `drm_sman_do_owner_cleanup':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:310: undefined reference to `drm_debug_flag'
ld: drm_sman.o: in function `drm_sman_alloc':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:215: undefined reference to `drm_debug_flag' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:233: undefined reference to `drm_debug_flag' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:238: undefined reference to `drm_debug_flag'
ld: drm_sman.o: in function `drm_sman_get_owner_item':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:184: undefined reference to `drm_debug_flag' ld: drm_sman.o:/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:233: more undefined references to `drm_debug_flag' follow
ld: drm_sman.o: in function `drm_sman_mm_free':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_sman.c:108: undefined reference to `drm_mm_put_block'
ld: drm_sman.o: in function `drm_mm_get_block_atomic':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drm_mm.h:74: undefined reference to `drm_mm_get_block_generic'
ld: i915_dma.o: in function `drm_core_ioremapfree':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drmP.h:1292: undefined reference to `drm_ioremapfree' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drmP.h:1292: undefined reference to `drm_ioremapfree'
ld: i915_dma.o: in function `i915_set_status_page':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:811: undefined reference to `drm_debug_flag'
ld: i915_dma.o: in function `drm_core_ioremap':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drmP.h:1286: undefined reference to `drm_ioremap'
ld: i915_dma.o: in function `i915_set_status_page':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:833: undefined reference to `drm_debug_flag' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:835: undefined reference to `drm_debug_flag'
ld: i915_dma.o: in function `i915_initialize':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:166: undefined reference to `drm_getsarea'
ld: i915_dma.o: in function `drm_core_ioremap':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/bsd-core/drmP.h:1286: undefined reference to `drm_ioremap'
ld: i915_dma.o: in function `i915_dma_resume':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:222: undefined reference to `drm_debug_flag' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:240: undefined reference to `drm_debug_flag' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:246: undefined reference to `drm_debug_flag'
ld: i915_dma.o: in function `i915_flip_bufs':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:719: undefined reference to `drm_debug_flag'
ld: i915_dma.o: in function `i915_dispatch_flip':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:544: undefined reference to `drm_debug_flag' ld: i915_dma.o:/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:667: more undefined references to `drm_debug_flag' follow
ld: i915_dma.o: in function `i915_driver_load':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:862: undefined reference to `drm_get_resource_start' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:863: undefined reference to `drm_get_resource_len' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:865: undefined reference to `drm_addmap' ld: /usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:869: undefined reference to `gm45_get_vblank_counter'
ld: i915_dma.o: in function `i915_driver_unload':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:917: undefined reference to `drm_rmmap'
ld: i915_dma.o: in function `i915_init_phys_hws':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:98: undefined reference to `drm_debug_flag'
ld: i915_dma.o: in function `i915_driver_unload':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:917: undefined reference to `drm_rmmap'
ld: i915_dma.o: in function `i915_driver_open':
/usr/src/sys/arch/amd64/compile/MYKERNEL/../../../../external/bsd/drm/dist/shared-core/i915_dma.c:933: undefined reference to `drm_debug_flag'
ld: i915_dma.o:(.data+0x88): undefined reference to `i915_irq_emit'
ld: i915_dma.o:(.data+0xa0): undefined reference to `i915_irq_wait'
ld: i915_dma.o:(.data+0x160): undefined reference to `i915_vblank_pipe_set' ld: i915_dma.o:(.data+0x178): undefined reference to `i915_vblank_pipe_get'
ld: i915_dma.o:(.data+0x190): undefined reference to `i915_vblank_swap'
ld: ioconf.o:/usr/src/sys/arch/amd64/compile/MYKERNEL/ioconf.c:4858: undefined reference to `i915drm_ca'
*** Error code 1

Stop.
make: stopped in /usr/src/sys/arch/amd64/compile/MYKERNEL


Home | Main Index | Thread Index | Old Index