blob: f6f4119676cffe318737681508b60d48b9e779ab [file] [log] [blame]
Andrew Walbranbc342d42019-02-05 16:56:02 +00001# Copyright 2019 The Hafnium Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15action("linux") {
16 script = "//build/make.py"
17 args = [
18 "--directory",
19 rebase_path("linux"),
20 "--out_file",
21 "hafnium.ko",
22 "--copy_out_file",
23 rebase_path("${target_out_dir}/linux/hafnium.ko"),
24 "CC=" + rebase_path("//prebuilts/linux-x64/clang/bin/clang"),
25 "ARCH=arm64",
26 "CROSS_COMPILE=aarch64-linux-gnu-",
27 ]
28 sources = [
29 "linux/Makefile",
30 "linux/hf_call.S",
31 "linux/main.c",
32 ]
33 outputs = [
34 "${target_out_dir}/linux/hafnium.ko",
35 ]
36 deps = [
37 "//third_party:linux_defconfig",
38 ]
39}