improve linux-header to support driver modules (#746)

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update android.yml

* Update android.yml

* Update xmake.lua

* Update xmake.lua
pull/747/head
ruki 3 years ago committed by GitHub
parent 12824a05f6
commit 8d1a45b741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      packages/l/linux-headers/xmake.lua

@ -14,10 +14,27 @@ package("linux-headers")
add_versions("5.9.16", "b0d7abae88e5f91893627c645e680a95c818defd1b4fcaf3e2afb4b2b6b4ab86")
add_versions("5.10.46", "569122a39c6b325befb9ac1c07da0c53e6363b3baacd82081d131b06c1dc1415")
add_deps("rsync")
add_configs("driver_modules", {description = "Enable driver modules files.", default = false, type = "boolean"})
on_install("@linux", function (package)
os.vrunv("make", {"headers_install", "INSTALL_HDR_PATH=" .. package:installdir()})
on_load(function (package)
if package:config("driver_modules") then
package:add("deps", "flex", "bison", "bc", "pkg-config")
package:add("deps", "openssl", "elfutils", {host = true})
else
package:add("deps", "rsync")
end
end)
on_install("linux", function (package)
import("package.tools.make")
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"))
else
os.vrunv("make", {"headers_install", "INSTALL_HDR_PATH=" .. package:installdir()})
end
end)
on_test(function (package)

Loading…
Cancel
Save