読者です 読者をやめる 読者になる 読者になる

BHyVeビルドめも14

DragonFlyBSD BHyVe

φ(・ω・ )かきかき
今日は怒涛の2ファイル分コンパイルエラー修正( ´∀`)bグッ!  まぁ、たんに簡単な修正で済んだだけですけどね(;・∀・)
ともかくvdev.cvlapic.cのコンパイルできました。
vdev.cはホント単純にs/malloc/kmallocというレベルの修正。vlapic.cはマクロとか変数名がちょっと違うという程度でした。
さて、次はvmm.cです。ヘッダファイル周りのエラーは大したこと無いので良いとして、面倒そうなのはこの手の関数が無い系ですね。

error: implicit declaration of function 'sched_unbind
--------------------------------------------------------------
>>> Kernel build for BHYVE started on Tue Jul 10 21:14:47 JST 2012
--------------------------------------------------------------
===> BHYVE
cd /usr/src/sys/config;  PATH=/usr/obj/usr/src/ctools_x86_64_x86_64/usr/sbin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/games:/usr/obj/usr/src/btools_x86_64/usr/sbin:/usr/obj/usr/src/btools_x86_64/usr/bin:/usr/obj/usr/src/btools_x86_64/bin:/usr/obj/usr/src/btools_x86_64/usr/games:/usr/pkg/bin  config  -d /usr/obj/usr/src/sys/BHYVE  /usr/src/sys/config/BHYVE
Kernel build directory is /usr/obj/usr/src/sys/BHYVE
cd /usr/obj/usr/src/sys/BHYVE;  MAKEOBJDIRPREFIX=/usr/obj/usr/src/world_x86_64  OBJTREE=/usr/obj  MACHINE_ARCH=x86_64  MACHINE=x86_64  MACHINE_PLATFORM=pc64  OBJFORMAT_PATH=/usr/obj/usr/src/ctools_x86_64_x86_64  HOST_CCVER=gcc44  CCVER=gcc44  BINUTILSVER=binutils221  DESTDIR=/usr/obj/usr/src/world_x86_64  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/ctools_x86_64_x86_64/usr/sbin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/games:/usr/obj/usr/src/btools_x86_64/usr/sbin:/usr/obj/usr/src/btools_x86_64/usr/bin:/usr/obj/usr/src/btools_x86_64/bin:/usr/obj/usr/src/btools_x86_64/usr/games:/usr/pkg/bin make KERNEL=kernel all
cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wold-style-definition -std=c99 -Wold-style-declaration -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/BHYVE -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix/include" -I/usr/src/sys/dev/netif/ath/hal -I/usr/src/sys/dev/netif/ath/hal/ath_hal  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -ffreestanding -mpreferred-stack-boundary=4 -fno-stack-protector -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a  -mno-sse5 -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt -msoft-float -fno-asynchronous-unwind-tables -fno-omit-frame-pointer  /usr/src/sys/platform/pc64/vmm/io/vlapic.c -Werror
cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wold-style-definition -std=c99 -Wold-style-declaration -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/BHYVE -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix/include" -I/usr/src/sys/dev/netif/ath/hal -I/usr/src/sys/dev/netif/ath/hal/ath_hal  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -ffreestanding -mpreferred-stack-boundary=4 -fno-stack-protector -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a  -mno-sse5 -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt -msoft-float -fno-asynchronous-unwind-tables -fno-omit-frame-pointer  /usr/src/sys/platform/pc64/vmm/vmm.c -Werror
/usr/src/sys/platform/pc64/vmm/vmm.c:38:22: error: sys/pcpu.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/vmm.c:48:24: error: machine/vm.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/vmm.c:50:25: error: x86/apicreg.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/vmm.c:57:20: error: vlapic.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/vmm.c:74: error: 'savefpu' defined as wrong kind of tag
cc1: warnings being treated as errors
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vcpu_cleanup':
/usr/src/sys/platform/pc64/vmm/vmm.c:148: error: implicit declaration of function 'vlapic_cleanup'
/usr/src/sys/platform/pc64/vmm/vmm.c:148: error: nested extern declaration of 'vlapic_cleanup'
/usr/src/sys/platform/pc64/vmm/vmm.c:150: error: implicit declaration of function 'fpu_save_area_free'
/usr/src/sys/platform/pc64/vmm/vmm.c:150: error: nested extern declaration of 'fpu_save_area_free'
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vcpu_init':
/usr/src/sys/platform/pc64/vmm/vmm.c:162: error: implicit declaration of function 'vlapic_init'
/usr/src/sys/platform/pc64/vmm/vmm.c:162: error: nested extern declaration of 'vlapic_init'
/usr/src/sys/platform/pc64/vmm/vmm.c:162: error: assignment makes pointer from integer without a cast
/usr/src/sys/platform/pc64/vmm/vmm.c:163: error: implicit declaration of function 'fpu_save_area_alloc'
/usr/src/sys/platform/pc64/vmm/vmm.c:163: error: nested extern declaration of 'fpu_save_area_alloc'
/usr/src/sys/platform/pc64/vmm/vmm.c:163: error: assignment makes pointer from integer without a cast
/usr/src/sys/platform/pc64/vmm/vmm.c:164: error: implicit declaration of function 'fpu_save_area_reset'
/usr/src/sys/platform/pc64/vmm/vmm.c:164: error: nested extern declaration of 'fpu_save_area_reset'
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vm_create':
/usr/src/sys/platform/pc64/vmm/vmm.c:243: error: implicit declaration of function 'malloc'
/usr/src/sys/platform/pc64/vmm/vmm.c:243: error: nested extern declaration of 'malloc'
/usr/src/sys/platform/pc64/vmm/vmm.c:243: error: assignment makes pointer from integer without a cast
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vm_destroy':
/usr/src/sys/platform/pc64/vmm/vmm.c:276: error: implicit declaration of function 'free'
/usr/src/sys/platform/pc64/vmm/vmm.c:276: error: nested extern declaration of 'free'
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vm_map_mmio':
/usr/src/sys/platform/pc64/vmm/vmm.c:290: error: 'VM_MEMATTR_UNCACHEABLE' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/vmm.c:290: error: (Each undeclared identifier is reported only once
/usr/src/sys/platform/pc64/vmm/vmm.c:290: error: for each function it appears in.)
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vm_unmap_mmio':
/usr/src/sys/platform/pc64/vmm/vmm.c:299: error: 'VM_MEMATTR_UNCACHEABLE' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vm_malloc':
/usr/src/sys/platform/pc64/vmm/vmm.c:325: error: 'VM_MEMATTR_WRITE_BACK' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vm_set_pinning':
/usr/src/sys/platform/pc64/vmm/vmm.c:484: error: implicit declaration of function 'thread_lock'
/usr/src/sys/platform/pc64/vmm/vmm.c:484: error: nested extern declaration of 'thread_lock'
/usr/src/sys/platform/pc64/vmm/vmm.c:485: error: implicit declaration of function 'sched_unbind'
/usr/src/sys/platform/pc64/vmm/vmm.c:485: error: nested extern declaration of 'sched_unbind'
/usr/src/sys/platform/pc64/vmm/vmm.c:486: error: implicit declaration of function 'thread_unlock'
/usr/src/sys/platform/pc64/vmm/vmm.c:486: error: nested extern declaration of 'thread_unlock'
/usr/src/sys/platform/pc64/vmm/vmm.c:490: error: implicit declaration of function 'CPU_ABSENT'
/usr/src/sys/platform/pc64/vmm/vmm.c:490: error: nested extern declaration of 'CPU_ABSENT'
/usr/src/sys/platform/pc64/vmm/vmm.c:498: error: implicit declaration of function 'sched_bind'
/usr/src/sys/platform/pc64/vmm/vmm.c:498: error: nested extern declaration of 'sched_bind'
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'restore_guest_fpustate':
/usr/src/sys/platform/pc64/vmm/vmm.c:510: error: implicit declaration of function 'fpuexit'
/usr/src/sys/platform/pc64/vmm/vmm.c:510: error: nested extern declaration of 'fpuexit'
/usr/src/sys/platform/pc64/vmm/vmm.c:511: error: implicit declaration of function 'stop_emulating'
/usr/src/sys/platform/pc64/vmm/vmm.c:511: error: nested extern declaration of 'stop_emulating'
/usr/src/sys/platform/pc64/vmm/vmm.c:512: error: implicit declaration of function 'fpurestore'
/usr/src/sys/platform/pc64/vmm/vmm.c:512: error: nested extern declaration of 'fpurestore'
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'save_guest_fpustate':
/usr/src/sys/platform/pc64/vmm/vmm.c:519: error: implicit declaration of function 'fpusave'
/usr/src/sys/platform/pc64/vmm/vmm.c:519: error: nested extern declaration of 'fpusave'
/usr/src/sys/platform/pc64/vmm/vmm.c:520: error: implicit declaration of function 'start_emulating'
/usr/src/sys/platform/pc64/vmm/vmm.c:520: error: nested extern declaration of 'start_emulating'
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vm_run':
/usr/src/sys/platform/pc64/vmm/vmm.c:538: error: implicit declaration of function 'critical_enter'
/usr/src/sys/platform/pc64/vmm/vmm.c:538: error: nested extern declaration of 'critical_enter'
/usr/src/sys/platform/pc64/vmm/vmm.c:542: error: implicit declaration of function 'PCPU_GET'
/usr/src/sys/platform/pc64/vmm/vmm.c:542: error: nested extern declaration of 'PCPU_GET'
/usr/src/sys/platform/pc64/vmm/vmm.c:542: error: 'curpcb' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/vmm.c:543: error: implicit declaration of function 'set_pcb_flags'
/usr/src/sys/platform/pc64/vmm/vmm.c:543: error: nested extern declaration of 'set_pcb_flags'
/usr/src/sys/platform/pc64/vmm/vmm.c:543: error: 'PCB_FULL_IRET' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/vmm.c:545: error: 'curcpu' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/vmm.c:555: error: implicit declaration of function 'critical_exit'
/usr/src/sys/platform/pc64/vmm/vmm.c:555: error: nested extern declaration of 'critical_exit'
/usr/src/sys/platform/pc64/vmm/vmm.c: In function 'vmm_is_pptdev':
/usr/src/sys/platform/pc64/vmm/vmm.c:635: error: implicit declaration of function 'getenv'
/usr/src/sys/platform/pc64/vmm/vmm.c:635: error: nested extern declaration of 'getenv'
/usr/src/sys/platform/pc64/vmm/vmm.c:635: error: assignment makes pointer from integer without a cast
/usr/src/sys/platform/pc64/vmm/vmm.c:640: error: implicit declaration of function 'sscanf'
/usr/src/sys/platform/pc64/vmm/vmm.c:640: error: nested extern declaration of 'sscanf'
/usr/src/sys/platform/pc64/vmm/vmm.c:651: error: implicit declaration of function 'freeenv'
/usr/src/sys/platform/pc64/vmm/vmm.c:651: error: nested extern declaration of 'freeenv'
*** Error code 1

Stop in /usr/obj/usr/src/sys/BHYVE.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.