Skip to content

Instantly share code, notes, and snippets.

@adaskar
Created Jan 30, 2020
Embed
What would you like to do?
make -C /lib/modules/5.3.0-29-generic/build M=/home/guru/Desktop/lkm modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-29-generic'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
make -f ./scripts/Makefile.build obj=/home/guru/Desktop/lkm need-modorder=1
gcc -Wp,-MD,/home/guru/Desktop/lkm/.lkm.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/9/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -flive-patching=inline-clone -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -fcf-protection=none -Wno-packed-not-aligned -DMODULE -DKBUILD_BASENAME='"lkm"' -DKBUILD_MODNAME='"lkm"' -c -o /home/guru/Desktop/lkm/lkm.o /home/guru/Desktop/lkm/lkm.c
./tools/objtool/objtool check --module --retpoline --uaccess /home/guru/Desktop/lkm/lkm.o
{ echo /home/guru/Desktop/lkm/lkm.o; echo; } > /home/guru/Desktop/lkm/lkm.mod
{ echo /home/guru/Desktop/lkm/lkm.ko; :; } \
| awk '!x[$0]++' - > /home/guru/Desktop/lkm/modules.order
make -f ./scripts/Makefile.modpost
sed 's/ko$/o/' /home/guru/Desktop/lkm/modules.order | scripts/mod/modpost -a -i ./Module.symvers -I /home/guru/Desktop/lkm/Module.symvers -o /home/guru/Desktop/lkm/Module.symvers -s -T -
ld -r -m elf_x86_64 -z max-page-size=0x200000 -T ./scripts/module-common.lds --build-id -o /home/guru/Desktop/lkm/lkm.ko /home/guru/Desktop/lkm/lkm.o /home/guru/Desktop/lkm/lkm.mod.o ; true
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-29-generic'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment