1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 2# $FreeBSD$ 3# 4# The include file <bsd.kmod.mk> handles building and installing loadable 5# kernel modules. 6# 7# 8# +++ variables +++ 9# 10# CLEANFILES Additional files to remove for the clean and cleandir targets. 11# 12# EXPORT_SYMS A list of symbols that should be exported from the module, 13# or the name of a file containing a list of symbols, or YES 14# to export all symbols. If not defined, no symbols are 15# exported. 16# 17# KMOD The name of the kernel module to build. 18# 19# KMODDIR Base path for kernel modules (see kld(4)). [/boot/kernel] 20# 21# KMODOWN Module file owner. [${BINOWN}] 22# 23# KMODGRP Module file group. [${BINGRP}] 24# 25# KMODMODE Module file mode. [${BINMODE}] 26# 27# KMODLOAD Command to load a kernel module [/sbin/kldload] 28# 29# KMODUNLOAD Command to unload a kernel module [/sbin/kldunload] 30# 31# KMODISLOADED Command to check whether a kernel module is 32# loaded [/sbin/kldstat -q -n] 33# 34# PROG The name of the kernel module to build. 35# If not supplied, ${KMOD}.ko is used. 36# 37# SRCS List of source files. 38# 39# FIRMWS List of firmware images in format filename:shortname:version 40# 41# FIRMWARE_LICENSE 42# Set to the name of the license the user has to agree on in 43# order to use this firmware. See /usr/share/doc/legal 44# 45# DESTDIR The tree where the module gets installed. [not set] 46# 47# KERNBUILDDIR 48# Set to the location of the kernel build directory where 49# the opt_*.h files, .o's and kernel winds up. 50# 51# +++ targets +++ 52# 53# install: 54# install the kernel module; if the Makefile 55# does not itself define the target install, the targets 56# beforeinstall and afterinstall may also be used to cause 57# actions immediately before and after the install target 58# is executed. 59# 60# load: 61# Load a module. 62# 63# unload: 64# Unload a module. 65# 66# reload: 67# Unload if loaded, then load. 68# 69 70AWK?= awk 71KMODLOAD?= /sbin/kldload 72KMODUNLOAD?= /sbin/kldunload 73KMODISLOADED?= /sbin/kldstat -q -n 74OBJCOPY?= objcopy 75 76.include "kmod.opts.mk" 77.include <bsd.sysdir.mk> 78 79.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m 80 81# amd64 and mips use direct linking for kmod, all others use shared binaries 82.if ${MACHINE_CPUARCH} != amd64 && ${MACHINE_CPUARCH} != mips 83__KLD_SHARED=yes 84.else 85__KLD_SHARED=no 86.endif 87 88.if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) 89CFLAGS+= -fno-strict-aliasing 90.endif 91.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 92WERROR?= -Wno-error 93.else 94WERROR?= -Werror 95.endif 96 97LINUXKPI_GENSRCS+= \ 98 bus_if.h \ 99 device_if.h \ 100 pci_if.h \ 101 pci_iov_if.h \ 102 vnode_if.h \ 103 usb_if.h \ 104 opt_usb.h \ 105 opt_stack.h 106 107CFLAGS+= ${WERROR} 108CFLAGS+= -D_KERNEL 109CFLAGS+= -DKLD_MODULE 110.if defined(MODULE_TIED) 111CFLAGS+= -DKLD_TIED 112.endif 113 114# Don't use any standard or source-relative include directories. 115NOSTDINC= -nostdinc 116CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*} 117.if defined(KERNBUILDDIR) 118CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h 119.else 120SRCS+= opt_global.h 121CFLAGS+= -include ${.OBJDIR}/opt_global.h 122.endif 123 124# Add -I paths for system headers. Individual module makefiles don't 125# need any -I paths for this. Similar defaults for .PATH can't be 126# set because there are no standard paths for non-headers. 127CFLAGS+= -I. -I${SYSDIR} -I${SYSDIR}/contrib/ck/include 128 129CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT} 130CFLAGS.gcc+= -fms-extensions 131CFLAGS.gcc+= --param inline-unit-growth=100 132CFLAGS.gcc+= --param large-function-growth=1000 133 134# Disallow common variables, and if we end up with commons from 135# somewhere unexpected, allocate storage for them in the module itself. 136# 137# -fno-common is the default for src builds, but this should be left in place 138# until at least we catch up to GCC10/LLVM11 or otherwise enable -fno-common 139# in <bsd.sys.mk> instead. For now, we will have duplicate -fno-common in 140# CFLAGS for in-tree module builds as they will also pick it up from 141# share/mk/src.sys.mk, but the following is important for out-of-tree modules 142# (e.g. ports). 143CFLAGS+= -fno-common 144LDFLAGS+= -d -warn-common 145 146.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} 147LDFLAGS+= --build-id=sha1 148.endif 149 150CFLAGS+= ${DEBUG_FLAGS} 151.if ${MACHINE_CPUARCH} == amd64 152CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer 153.endif 154 155.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \ 156 ${MACHINE_CPUARCH} == "powerpc" 157CFLAGS+= -fPIC 158.endif 159 160# Temporary workaround for PR 196407, which contains the fascinating details. 161# Don't allow clang to use fpu instructions or registers in kernel modules. 162.if ${MACHINE_CPUARCH} == arm 163.if ${COMPILER_VERSION} < 30800 164CFLAGS.clang+= -mllvm -arm-use-movt=0 165.else 166CFLAGS.clang+= -mno-movt 167.endif 168CFLAGS.clang+= -mfpu=none 169CFLAGS+= -funwind-tables 170.endif 171 172.if ${MACHINE_CPUARCH} == powerpc 173CFLAGS+= -mlongcall -fno-omit-frame-pointer 174.if ${LINKER_TYPE} == "lld" 175# TOC optimization in LLD (9.0) currently breaks kernel modules, so disable it 176LDFLAGS+= --no-toc-optimize 177.endif 178.endif 179 180.if ${MACHINE_CPUARCH} == mips 181CFLAGS+= -G0 -fno-pic -mno-abicalls -mlong-calls 182.endif 183 184.if defined(DEBUG) || defined(DEBUG_FLAGS) 185CTFFLAGS+= -g 186.endif 187 188.if defined(FIRMWS) 189${KMOD:S/$/.c/}: ${SYSDIR}/tools/fw_stub.awk 190 ${AWK} -f ${SYSDIR}/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} \ 191 ${FIRMWARE_LICENSE:C/.+/-l/}${FIRMWARE_LICENSE} 192 193SRCS+= ${KMOD:S/$/.c/} 194CLEANFILES+= ${KMOD:S/$/.c/} 195 196.for _firmw in ${FIRMWS} 197${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} 198 @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} 199 @if [ -e ${_firmw:C/\:.*$//} ]; then \ 200 ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ 201 -m ${LD_EMULATION} -r -d \ 202 -o ${.TARGET} ${_firmw:C/\:.*$//}; \ 203 else \ 204 ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \ 205 ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ 206 -m ${LD_EMULATION} -r -d \ 207 -o ${.TARGET} ${_firmw:C/\:.*$//}; \ 208 rm ${_firmw:C/\:.*$//}; \ 209 fi 210 211OBJS+= ${_firmw:C/\:.*$/.fwo/:T} 212.endfor 213.endif 214 215# Conditionally include SRCS based on kernel config options. 216.for _o in ${KERN_OPTS} 217SRCS+=${SRCS.${_o}} 218.endfor 219 220OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 221 222.if !defined(PROG) 223PROG= ${KMOD}.ko 224.endif 225 226.if !defined(DEBUG_FLAGS) 227FULLPROG= ${PROG} 228.else 229FULLPROG= ${PROG}.full 230${PROG}: ${FULLPROG} ${PROG}.debug 231 ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \ 232 ${FULLPROG} ${.TARGET} 233${PROG}.debug: ${FULLPROG} 234 ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} 235.endif 236 237.if ${__KLD_SHARED} == yes 238${FULLPROG}: ${KMOD}.kld 239 ${LD} -m ${LD_EMULATION} -Bshareable -znotext -znorelro ${_LDFLAGS} \ 240 -o ${.TARGET} ${KMOD}.kld 241.if !defined(DEBUG_FLAGS) 242 ${OBJCOPY} --strip-debug ${.TARGET} 243.endif 244.endif 245 246EXPORT_SYMS?= NO 247.if ${EXPORT_SYMS} != YES 248CLEANFILES+= export_syms 249.endif 250 251.if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE_ARCH}) 252LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE_ARCH} 253.endif 254 255.if ${__KLD_SHARED} == yes 256${KMOD}.kld: ${OBJS} 257.else 258${FULLPROG}: ${OBJS} 259.endif 260 ${LD} -m ${LD_EMULATION} ${_LDFLAGS} ${LDSCRIPT_FLAGS} -r -d \ 261 -o ${.TARGET} ${OBJS} 262.if ${MK_CTF} != "no" 263 ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} 264.endif 265.if defined(EXPORT_SYMS) 266.if ${EXPORT_SYMS} != YES 267.if ${EXPORT_SYMS} == NO 268 :> export_syms 269.elif !exists(${.CURDIR}/${EXPORT_SYMS}) 270 echo -n "${EXPORT_SYMS:@s@$s${.newline}@}" > export_syms 271.else 272 grep -v '^#' < ${EXPORT_SYMS} > export_syms 273.endif 274 ${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \ 275 export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} 276.endif 277.endif # defined(EXPORT_SYMS) 278.if defined(PREFIX_SYMS) 279 ${AWK} -v prefix=${PREFIX_SYMS} -f ${SYSDIR}/conf/kmod_syms_prefix.awk \ 280 ${.TARGET} /dev/null | xargs -J% ${OBJCOPY} % ${.TARGET} 281.endif 282.if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no 283 ${OBJCOPY} --strip-debug ${.TARGET} 284.endif 285 286.if ${COMPILER_TYPE} == "clang" || \ 287 (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) 288_MAP_DEBUG_PREFIX= yes 289.endif 290 291_ILINKS=machine 292.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 293_ILINKS+=x86 294.endif 295CLEANFILES+=${_ILINKS} 296 297all: ${PROG} 298 299beforedepend: ${_ILINKS} 300beforebuild: ${_ILINKS} 301 302# Ensure that the links exist without depending on it when it exists which 303# causes all the modules to be rebuilt when the directory pointed to changes. 304# Ensure that debug info references the path in the source tree. 305.for _link in ${_ILINKS} 306.if !exists(${.OBJDIR}/${_link}) 307OBJS_DEPEND_GUESS+= ${_link} 308.endif 309.if defined(_MAP_DEBUG_PREFIX) 310.if ${_link} == "machine" 311CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include 312.else 313CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include 314.endif 315.endif 316.endfor 317 318.NOPATH: ${_ILINKS} 319 320${_ILINKS}: 321 @case ${.TARGET} in \ 322 machine) \ 323 path=${SYSDIR}/${MACHINE}/include ;; \ 324 *) \ 325 path=${SYSDIR}/${.TARGET:T}/include ;; \ 326 esac ; \ 327 path=`(cd $$path && /bin/pwd)` ; \ 328 ${ECHO} ${.TARGET:T} "->" $$path ; \ 329 ln -fns $$path ${.TARGET:T} 330 331CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} 332 333.if defined(DEBUG_FLAGS) 334CLEANFILES+= ${FULLPROG} ${PROG}.debug 335.endif 336 337.if !target(install) 338 339_INSTALLFLAGS:= ${INSTALLFLAGS} 340.for ie in ${INSTALLFLAGS_EDIT} 341_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} 342.endfor 343 344.if !target(realinstall) 345KERN_DEBUGDIR?= ${DEBUGDIR} 346realinstall: _kmodinstall 347.ORDER: beforeinstall _kmodinstall 348_kmodinstall: .PHONY 349 ${INSTALL} -T release -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ 350 ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/ 351.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" 352 ${INSTALL} -T debug -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ 353 ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR}/ 354.endif 355 356.include <bsd.links.mk> 357 358.if !defined(NO_XREF) 359afterinstall: _kldxref 360.ORDER: realinstall _kldxref 361.ORDER: _installlinks _kldxref 362_kldxref: .PHONY 363 @if type kldxref >/dev/null 2>&1; then \ 364 ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ 365 ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ 366 fi 367.endif 368.endif # !target(realinstall) 369 370.endif # !target(install) 371 372.if !target(load) 373load: ${PROG} .PHONY 374 ${KMODLOAD} -v ${.OBJDIR}/${PROG} 375.endif 376 377.if !target(unload) 378unload: .PHONY 379 if ${KMODISLOADED} ${PROG} ; then ${KMODUNLOAD} -v ${PROG} ; fi 380.endif 381 382.if !target(reload) 383reload: unload load .PHONY 384.endif 385 386.if defined(KERNBUILDDIR) 387.PATH: ${KERNBUILDDIR} 388CFLAGS+= -I${KERNBUILDDIR} 389.for _src in ${SRCS:Mopt_*.h} 390CLEANFILES+= ${_src} 391.if !target(${_src}) 392${_src}: 393 ln -sf ${KERNBUILDDIR}/${_src} ${.TARGET} 394.endif 395.endfor 396.else 397.for _src in ${SRCS:Mopt_*.h} 398CLEANFILES+= ${_src} 399.if !target(${_src}) 400${_src}: 401 :> ${.TARGET} 402.endif 403.endfor 404.endif 405 406# Add the sanitizer C flags 407CFLAGS+= ${SAN_CFLAGS} 408 409# Add the gcov flags 410CFLAGS+= ${GCOV_CFLAGS} 411 412# Respect configuration-specific C flags. 413CFLAGS+= ${ARCH_FLAGS} ${CONF_CFLAGS} 414 415.if !empty(SRCS:Mvnode_if.c) 416CLEANFILES+= vnode_if.c 417vnode_if.c: ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src 418 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -c 419.endif 420 421.if !empty(SRCS:Mvnode_if.h) 422CLEANFILES+= vnode_if.h vnode_if_newproto.h vnode_if_typedef.h 423vnode_if.h vnode_if_newproto.h vnode_if_typedef.h: ${SYSDIR}/tools/vnode_if.awk \ 424 ${SYSDIR}/kern/vnode_if.src 425vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h 426 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -h 427vnode_if_newproto.h: 428 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -p 429vnode_if_typedef.h: 430 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -q 431.endif 432 433# Build _if.[ch] from _if.m, and clean them when we're done. 434# __MPATH defined in config.mk 435_MFILES=${__MPATH:T:O} 436_MPATH=${__MPATH:H:O:u} 437.PATH.m: ${_MPATH} 438.for _i in ${SRCS:M*_if.[ch]} 439_MATCH=M${_i:R:S/$/.m/} 440_MATCHES=${_MFILES:${_MATCH}} 441.if !empty(_MATCHES) 442CLEANFILES+= ${_i} 443.endif 444.endfor # _i 445.m.c: ${SYSDIR}/tools/makeobjops.awk 446 ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c 447 448.m.h: ${SYSDIR}/tools/makeobjops.awk 449 ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -h 450 451.for _i in mii pccard 452.if !empty(SRCS:M${_i}devs.h) 453CLEANFILES+= ${_i}devs.h 454${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs 455 ${AWK} -f ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs 456.endif 457.endfor # _i 458 459.if !empty(SRCS:Mbhnd_nvram_map.h) 460CLEANFILES+= bhnd_nvram_map.h 461bhnd_nvram_map.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ 462 ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 463 ${SYSDIR}/dev/bhnd/nvram/nvram_map 464bhnd_nvram_map.h: 465 sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 466 ${SYSDIR}/dev/bhnd/nvram/nvram_map -h 467.endif 468 469.if !empty(SRCS:Mbhnd_nvram_map_data.h) 470CLEANFILES+= bhnd_nvram_map_data.h 471bhnd_nvram_map_data.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ 472 ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 473 ${SYSDIR}/dev/bhnd/nvram/nvram_map 474bhnd_nvram_map_data.h: 475 sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 476 ${SYSDIR}/dev/bhnd/nvram/nvram_map -d 477.endif 478 479.if !empty(SRCS:Musbdevs.h) 480CLEANFILES+= usbdevs.h 481usbdevs.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs 482 ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -h 483.endif 484 485.if !empty(SRCS:Musbdevs_data.h) 486CLEANFILES+= usbdevs_data.h 487usbdevs_data.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs 488 ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -d 489.endif 490 491.if !empty(SRCS:Msdiodevs.h) 492CLEANFILES+= sdiodevs.h 493sdiodevs.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs 494 ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -h 495.endif 496 497.if !empty(SRCS:Msdiodevs_data.h) 498CLEANFILES+= sdiodevs_data.h 499sdiodevs_data.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs 500 ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -d 501.endif 502 503.if !empty(SRCS:Macpi_quirks.h) 504CLEANFILES+= acpi_quirks.h 505acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks 506 ${AWK} -f ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks 507.endif 508 509.if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) 510CLEANFILES+= assym.inc genassym.o 511DEPENDOBJS+= genassym.o 512DPSRCS+= offset.inc 513.endif 514.if defined(MODULE_TIED) 515DPSRCS+= offset.inc 516.endif 517.if !empty(SRCS:Moffset.inc) || !empty(DPSRCS:Moffset.inc) 518CLEANFILES+= offset.inc genoffset.o 519DEPENDOBJS+= genoffset.o 520.endif 521assym.inc: genassym.o 522offset.inc: genoffset.o 523assym.inc: ${SYSDIR}/kern/genassym.sh 524 sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} 525genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc 526genassym.o: ${SRCS:Mopt_*.h} 527 ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ 528 ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c 529offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o 530 sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} 531genoffset.o: ${SYSDIR}/kern/genoffset.c 532genoffset.o: ${SRCS:Mopt_*.h} 533 ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ 534 ${SYSDIR}/kern/genoffset.c 535 536CLEANDEPENDFILES+= ${_ILINKS} 537# .depend needs include links so we remove them only together. 538cleanilinks: 539 rm -f ${_ILINKS} 540 541OBJS_DEPEND_GUESS+= ${SRCS:M*.h} 542.if defined(KERNBUILDDIR) 543OBJS_DEPEND_GUESS+= opt_global.h 544.endif 545 546.include <bsd.dep.mk> 547.include <bsd.clang-analyze.mk> 548.include <bsd.obj.mk> 549.include "kern.mk" 550