Problems during compiling in kernel modules
Subsystems (2)
Hi,
I was trying to compile a particular folder in my kernel tree.
AFAIK the way to do this is:make drivers/staging/iio/ from the kernel base directory.
This gives me the following output:
`
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
`
No object files are generated.
I feel like I am missing something.
Thanks,
Rohit
Quoted 13 lines · Rohit Sarkar
Hi,
I was trying to compile a particular folder in my kernel tree.AFAIK the way to do this is:
make drivers/staging/iio/from the kernel base directory.This gives me the following output:
`
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
`
Quoted 5 lines
No object files are generated.
I feel like I am missing something.Thanks,
Rohit
I ran make clean in the drivers/iio/accel directory which removed all object files in the first place. However running make after that doesnt seem to compile the modules.
Thanks,
Rohit
Quoted 17 lines · Rohit Sarkar
Quoted 16 lines · Rohit Sarkar
Hi,
I was trying to compile a particular folder in my kernel tree.AFAIK the way to do this is:
make drivers/staging/iio/from the kernel base directory.This gives me the following output:
`
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
`No object files are generated.
I feel like I am missing something.
Quoted 6 lines
Quoted 2 lines
Thanks,
RohitI ran
make cleanin thedrivers/iio/acceldirectory which removed all object files in the first place. However running make after that doesnt seem to compile the modules.
Hi,
It works for me. Do you have a kernel .config file?
Does it set/enable CONFIG_IIO and some/any/all drivers in drivers/iio/accel/ ?
If you don't have a kernel .config file, I don't expect it to work.
Signature · 1 line
~Randy
Quoted 7 lines · Randy Dunlap
Hi,
It works for me. Do you have a kernel .config file?
Does it set/enableCONFIG_IIOand some/any/all drivers indrivers/iio/accel/?If you don't have a kernel .config file, I don't expect it to work.
Signature · 1 line
~Randy
Hey Randy,
I do have a .config file but no it does not set "CONFIG_IIO". The weird thing is when I built the kernel initially the object files for drivers/iio/accel/ were generated.
That's strange right?
Thanks for helping!
Rohit
Quoted 9 lines · Rohit Sarkar
Quoted 7 lines · Randy Dunlap
Hi,
It works for me. Do you have a kernel .config file?
Does it set/enableCONFIG_IIOand some/any/all drivers indrivers/iio/accel/?If you don't have a kernel .config file, I don't expect it to work.
Signature · 1 line
~Randy
Quoted 5 lines
Hey Randy,
I do have a .config file but no it does not set "CONFIG_IIO". The weird thing is when I built the kernel initially the object files fordrivers/iio/accel/were generated.
That's strange right?
Sounds like you now have a different .config file and that the earlier .config file did enable CONFIG_IIO.
Signature · 1 line
~Randy
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the Kconfig files inside drivers/iio/accel and see what are the dependencies for building various drivers.
Quoted 27 lines · Rohit Sarkar
Quoted 13 lines · Rohit Sarkar
Hi,
I was trying to compile a particular folder in my kernel tree.AFAIK the way to do this is:
make drivers/staging/iio/from the kernel base directory.This gives me the following output:
`
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
`Quoted 5 lines
No object files are generated.
I feel like I am missing something.Thanks,
RohitI ran
make cleanin thedrivers/iio/acceldirectory which removed all object files in the first place. However running make after that doesnt seem to compile the modules.Thanks,
Rohit
Signature · 2 lines
Thanks and Regards, Jay
Quoted 6 lines · Jay Aurabind
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the
Kconfigfiles insidedrivers/iio/acceland see what are the dependencies for building various drivers.
It looks like some of the drivers are individual files. So you can also just compile them one at a time make staging/drivers.iio/accel/foo.o.
julia
Quoted 37 lines · Rohit Sarkar
Quoted 21 lines · Rohit Sarkar
Quoted 13 lines
Hi,
I was trying to compile a particular folder in my kernel tree.AFAIK the way to do this is:
make drivers/staging/iio/from the kernel base directory.This gives me the following output:
`
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
`Quoted 5 lines
No object files are generated.
I feel like I am missing something.Thanks,
RohitQuoted 6 lines
I ran
make cleanin thedrivers/iio/acceldirectory which removed all object files in the first place. However running make after that doesnt seem to compile the modules.Thanks,
Rohit--
Thanks and Regards,
Jay
Quoted 11 lines · Julia Lawall
Quoted 6 lines · Jay Aurabind
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the
Kconfigfiles insidedrivers/iio/acceland see what are the dependencies for building various drivers.
Quoted 5 lines
It looks like some of the drivers are individual files. So you can also just compile them one at a time make
staging/drivers.iio/accel/foo.o.julia
Hey julia,
I ran a make clean on that directory by mistake which I realised I shouldn't have done. Hence no object files are there.
Giving me this:
`
make drivers/staging/iio/adis16240.o staging/git/remove-include
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
make[1]: *** No rule to make target 'drivers/staging/iio/adis16240.o'. Stop. Makefile:1772: recipe for target 'drivers/staging/iio/adis16240.o' failed
make: *** [drivers/staging/iio/adis16240.o] Error 2
`
I guess I will have to enable CONFIG_IIO and rebuild? Although what I don't understand is if CONFIG_IIO was not enabled how were there object files in the first place?
Thanks,
Rohit
Quoted 24 lines · Rohit Sarkar
Quoted 11 lines · Julia Lawall
Quoted 6 lines · Jay Aurabind
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the
Kconfigfiles insidedrivers/iio/acceland see what are the dependencies for building various drivers.Quoted 5 lines
It looks like some of the drivers are individual files. So you can also just compile them one at a time make
staging/drivers.iio/accel/foo.o.julia
Hey julia,
I ran amake cleanon that directory by mistake which I realised I shouldn't have done. Hence no object files are there.Giving me this:
Quoted 9 lines
`
makedrivers/staging/iio/adis16240.ostaging/git/remove-include
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
make[1]: *** No rule to make target 'drivers/staging/iio/adis16240.o'. Stop. Makefile:1772: recipe for target 'drivers/staging/iio/adis16240.o' failed
make: *** [drivers/staging/iio/adis16240.o] Error 2
`
OK
Quoted 3 lines
I guess I will have to enable
CONFIG_IIOand rebuild? Although what I don't understand is ifCONFIG_IIOwas not enabled how were there object files in the first place?
Perhaps the build system is just not very well designed here.
However, for me
make allyesconfig
make drivers/staging/iio/
works, and after that it is possible to do:
make drivers/staging/iio/accel/adis16203.o
I didn't do anything explicitly with CONFIG_IIO.
julia
Quoted 51 lines · Julia Lawall
Quoted 24 lines · Rohit Sarkar
Quoted 11 lines · Julia Lawall
Quoted 6 lines · Jay Aurabind
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the
Kconfigfiles insidedrivers/iio/acceland see what are the dependencies for building various drivers.Quoted 5 lines
It looks like some of the drivers are individual files. So you can also just compile them one at a time make
staging/drivers.iio/accel/foo.o.julia
Hey julia,
I ran amake cleanon that directory by mistake which I realised I shouldn't have done. Hence no object files are there.Giving me this:
Quoted 9 lines
`
makedrivers/staging/iio/adis16240.ostaging/git/remove-include
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
make[1]: *** No rule to make target 'drivers/staging/iio/adis16240.o'. Stop. Makefile:1772: recipe for target 'drivers/staging/iio/adis16240.o' failed
make: *** [drivers/staging/iio/adis16240.o] Error 2
`OK
Quoted 3 lines
I guess I will have to enable
CONFIG_IIOand rebuild? Although what I don't understand is ifCONFIG_IIOwas not enabled how were there object files in the first place?Perhaps the build system is just not very well designed here.
However, for me
make allyesconfig
makedrivers/staging/iio/
Quoted 7 lines
works, and after that it is possible to do:
make
drivers/staging/iio/accel/adis16203.oI didn't do anything explicitly with
CONFIG_IIO.julia
Bingo! :D
This worked.
Thanks everyone!
Rohit
Quoted 44 lines · Julia Lawall
Quoted 24 lines · Rohit Sarkar
Quoted 11 lines · Julia Lawall
Quoted 6 lines · Jay Aurabind
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the
Kconfigfiles insidedrivers/iio/acceland see what are the dependencies for building various drivers.Quoted 5 lines
It looks like some of the drivers are individual files. So you can also just compile them one at a time make
staging/drivers.iio/accel/foo.o.julia
Hey julia,
I ran amake cleanon that directory by mistake which I realised I shouldn't have done. Hence no object files are there.Giving me this:
Quoted 9 lines
`
makedrivers/staging/iio/adis16240.ostaging/git/remove-include
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
make[1]: *** No rule to make target 'drivers/staging/iio/adis16240.o'. Stop. Makefile:1772: recipe for target 'drivers/staging/iio/adis16240.o' failed
make: *** [drivers/staging/iio/adis16240.o] Error 2
`OK
Quoted 3 lines
I guess I will have to enable
CONFIG_IIOand rebuild? Although what I don't understand is ifCONFIG_IIOwas not enabled how were there object files in the first place?
Quoted 5 lines
Perhaps the build system is just not very well designed here.
However, for me
make allyesconfig
That 'allyesconfig' enables CONFIG_IIO.
Quoted 10 lines
make
drivers/staging/iio/works, and after that it is possible to do:
make
drivers/staging/iio/accel/adis16203.oI didn't do anything explicitly with
CONFIG_IIO.julia
Signature · 1 line
~Randy
Quoted 34 lines · Rohit Sarkar
Quoted 11 lines · Julia Lawall
Quoted 6 lines · Jay Aurabind
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the
Kconfigfiles insidedrivers/iio/acceland see what are the dependencies for building various drivers.Quoted 5 lines
It looks like some of the drivers are individual files. So you can also just compile them one at a time make
staging/drivers.iio/accel/foo.o.julia
Hey julia,
I ran amake cleanon that directory by mistake which I realised I shouldn't have done. Hence no object files are there.Giving me this:
`
makedrivers/staging/iio/adis16240.ostaging/git/remove-include
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
make[1]: *** No rule to make target 'drivers/staging/iio/adis16240.o'. Stop. Makefile:1772: recipe for target 'drivers/staging/iio/adis16240.o' failed
make: *** [drivers/staging/iio/adis16240.o] Error 2
`
Quoted 6 lines
I guess I will have to enable
CONFIG_IIOand rebuild? Although what I don't understand is ifCONFIG_IIOwas not enabled how were there object files in the first place?Thanks,
Rohit
For reference:
This is the result of make drivers/staging/iio/
`
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
AR drivers/staging/iio/accel/built-in.a AR drivers/staging/iio/adc/built-in.a AR drivers/staging/iio/addac/built-in.a AR drivers/staging/iio/cdc/built-in.a AR drivers/staging/iio/frequency/built-in.a AR drivers/staging/iio/impedance-analyzer/built-in.a AR drivers/staging/iio/meter/built-in.a AR drivers/staging/iio/resolver/built-in.a AR drivers/staging/iio/built-in.a
`
Rohit
Quoted 48 lines · Rohit Sarkar
Quoted 34 lines · Rohit Sarkar
Quoted 11 lines · Julia Lawall
Quoted 6 lines · Jay Aurabind
Hi Rohit,
The required config options need to the objects in that folder to be build. Apparently there is no way to automatically set the required configs. You can look at the
Kconfigfiles insidedrivers/iio/acceland see what are the dependencies for building various drivers.Quoted 5 lines
It looks like some of the drivers are individual files. So you can also just compile them one at a time make
staging/drivers.iio/accel/foo.o.julia
Hey julia,
I ran amake cleanon that directory by mistake which I realised I shouldn't have done. Hence no object files are there.Giving me this:
`
makedrivers/staging/iio/adis16240.ostaging/git/remove-include
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
make[1]: *** No rule to make target 'drivers/staging/iio/adis16240.o'. Stop. Makefile:1772: recipe for target 'drivers/staging/iio/adis16240.o' failed
make: *** [drivers/staging/iio/adis16240.o] Error 2
`Quoted 6 lines
I guess I will have to enable
CONFIG_IIOand rebuild? Although what I don't understand is ifCONFIG_IIOwas not enabled how were there object files in the first place?Thanks,
RohitFor reference:
This is the result ofmake drivers/staging/iio/
`
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
Quoted 9 lines
AR drivers/staging/iio/accel/built-in.a AR drivers/staging/iio/adc/built-in.a AR drivers/staging/iio/addac/built-in.a AR drivers/staging/iio/cdc/built-in.a AR drivers/staging/iio/frequency/built-in.a AR drivers/staging/iio/impedance-analyzer/built-in.a AR drivers/staging/iio/meter/built-in.a AR drivers/staging/iio/resolver/built-in.a AR drivers/staging/iio/built-in.a
Perhaps you have already compiled the .o files that are used to produce these .a files? There seem to be some files that are simply not possible to compile. Perhaps they can be compiled for some other architecture. But you can also just work on the files that you are able to compile.
julia
Hi,
Would you follow below steps to build kernel source?
1) Download latest linux kernel source tree:
git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git
2) Generate kernel config(allyesconfig):
cd linux-next
make arch=x86_64 allyesconfig
3) Build kernel Source as you mentioned:
2019년 9월 14일 (토) 오전 4:26, Rohit Sarkar <[email protected]>님이 작성:
Quoted 27 lines · Rohit Sarkar
Quoted 13 lines
Hi,
I was trying to compile a particular folder in my kernel tree.AFAIK the way to do this is:
make drivers/staging/iio/from the kernel base directory.This gives me the following output:
`
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
`Quoted 5 lines
No object files are generated.
I feel like I am missing something.Thanks,
RohitI ran
make cleanin thedrivers/iio/acceldirectory which removed all object files in the first place. However running make after that doesnt seem to compile the modules.Thanks,
Rohit