Browse Source

update linux-headers

ruki 3 years ago
parent
commit
66b5950b24
1 changed files with 5 additions and 4 deletions
  1. 5 4
      packages/l/linux-headers/xmake.lua

+ 5 - 4
packages/l/linux-headers/xmake.lua

@@ -28,10 +28,11 @@ package("linux-headers")
     on_install("linux", function (package)
     on_install("linux", function (package)
         import("package.tools.make")
         import("package.tools.make")
         if package:config("driver_modules") then
         if package:config("driver_modules") then
-            os.cp("*", package:installdir())
-            make.make(package, {"allyesconfig"}, {curdir = package:installdir()})
-            make.make(package, {"modules_prepare"}, {curdir = package:installdir()})
-            os.rm(path.join(package:installdir(), "source"))
+            local kernelsrc = package:installdir("kernelsrc")
+            os.cp("*", kernelsrc)
+            make.make(package, {"allyesconfig", "O=" .. package:installdir()}, {curdir = kernelsrc})
+            make.make(package, {"modules_prepare", "O=" .. package:installdir()}, {curdir = kernelsrc})
+            os.rm(path.join(kernelsrc, "source"))
         else
         else
             os.vrunv("make", {"headers_install", "INSTALL_HDR_PATH=" .. package:installdir()})
             os.vrunv("make", {"headers_install", "INSTALL_HDR_PATH=" .. package:installdir()})
         end
         end