Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build kernel driver with QTCreator

Build kernel driver with QTCreator

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 2 Posters 574 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shawn_hsiao
    wrote on last edited by
    #1

    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

    jsulmJ 1 Reply Last reply
    0
    • S shawn_hsiao

      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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      1
      • jsulmJ jsulm

        @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

        S Offline
        S Offline
        shawn_hsiao
        wrote on last edited by
        #3

        @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.

        jsulmJ 1 Reply Last reply
        0
        • S shawn_hsiao

          @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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          2
          • jsulmJ jsulm

            @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?

            S Offline
            S Offline
            shawn_hsiao
            wrote on last edited by
            #5

            @jsulm Thank you for quick reply

            You are right! The built files already exist in those directory ,I cleaned all the built files and then it compiled well.

            thank your help!

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved