How to compile a newly created file while building kernel

jr.santhoshkumar

Member


Messages: 25

I have created a new file called /usr/src/sys/amd64/amd64/hibernate_machdep.c
In this file, I have defined a function and I declare that function in /usr/src/sys/sys/hibernate.h
I called that function in acpi.c file
I have included this header in file in both "hibernate_machdep.c" and "acpi.c"
while building kernel, it shows an error of unable to find the definition.

Please give solution for compiling that newly created file while building.
 

ralphbsz

Daemon

Reaction score: 1,007
Messages: 1,627

Find the make file in the directory. Update it. I assume you know about make file syntax, and how the kernel make system works? If not, you are in for an interesting voyage of discovery.
 
OP
OP
J

jr.santhoshkumar

Member


Messages: 25

There is a file called files.amd64
This file has the entry of what are all the files which is inside the directory of "/usr/src/sys/amd64/amd64/ " has to be compiled while building kernel

If we create a new entry for our newly created file, while building our newly created file also get compiled.
 
Top