Build kernel driver with QTCreator
-
Hi guys, I tried to build exist kernel driver through QTCreator, which is a Makefile project.
I load this project into the QTCreator and then build it.
But it encountered the mistake while building.11:34:42: Running steps for project driver_test... 11:34:42: Starting: "/bin/make" -j40 all make[1]: into directory「/home/」 make[2]: into directory「/home/drv」 -e ==> build customize.ko 64-bit........ make[3]: into directory「/usr/src/linux-headers-5.8.0-63-generic」 CC [M] /home/drv/main.o CC [M] /home/drv/access.o CC [M] /home/drv/su.o /bin/sh: 1: cannot create /home/drv/.su.o.cmd: Permission denied make[4]: *** [scripts/Makefile.build:286:/home/drv/su.o] fault 2 make[4]: *** deleting file「/home/shawn/drv/su.o」 make[4]: *** waiting uncompleted work.... /bin/sh: 1: cannot create /home/drv/.main.o.cmd: Permission denied make[4]: *** [scripts/Makefile.build:286:/home/drv/main.o] fault 2 make[4]: *** deleting file「/home/drv/main.o」 /bin/sh: 1: cannot create /home/drv/.access.o.cmd: Permission denied make[4]: *** [scripts/Makefile.build:286:/home/drv/access.o] fault 2 make[4]: *** deleting file「/home/drv/access.o」 make[3]: *** [Makefile:1785:/home/drv] fault 2 make[3]: leave directory「/usr/src/linux-headers-5.8.0-63-generic」 make[2]: *** [Makefile:65:all] fault 2 make[2]: leave directory「/home/drv」 make[1]: *** [Makefile:12:all] fault 2 make[1]: leave directory「/home/drv」 make: *** [Makefile:25:all] fault 2 11:34:43: The process "/bin/make" exited with code 2. Error while building/deploying project driver_test (kit: desktop) When executing step "Make" 11:34:43: Elapsed time: 00:01.
Have anyone know how to solve this problem?Thank
-
@shawn_hsiao said in Build kernel driver with QTCreator:
cannot create /home/drv/.su.o.cmd: Permission denied
You apparently have no write access in /home/drv
-
@jsulm thank you for quick reply.
I don't understand why have not write access .the directory has permission for anyone.
I can build this project in this directory through maketools and it compiled well.
I guess it may be that QTCreator dose not have write permission ,but I don't know how to do. -
@shawn_hsiao said in Build kernel driver with QTCreator:
I guess it may be that QTCreator dose not have write permission
QtCreator does not build anything itself, it simply calls make.
How exactly are the access rights set on /home/drv ?
Also, do the build files (like /home/drv/main.o) already exist and if they do how are the access rights set on these files?