Serge Bazanski | 2fb13a8 | 2020-02-11 12:41:37 +0100 | [diff] [blame] | 1 | # Copyright 2020 The Monogon Project Authors. |
| 2 | # |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 18 | |
| 19 | def linux_external(name, version): |
| 20 | sums = { |
| 21 | "5.4.7": "abc9b21d9146d95853dac35f4c4489a0199aff53ee6eee4b0563d1b37079fcc9", |
Lorenz Brun | fd16651 | 2020-04-01 17:29:45 +0200 | [diff] [blame] | 22 | "5.6": "e342b04a2aa63808ea0ef1baab28fc520bd031ef8cf93d9ee4a31d4058fcb622", |
Lorenz Brun | 5999e92 | 2021-01-27 18:53:54 +0100 | [diff] [blame^] | 23 | "5.10.4": "904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec", |
Serge Bazanski | 2fb13a8 | 2020-02-11 12:41:37 +0100 | [diff] [blame] | 24 | } |
| 25 | http_archive( |
| 26 | name = name, |
| 27 | build_file = "//third_party/linux/external:BUILD.repo", |
| 28 | patch_args = ["-p1"], |
| 29 | patches = [ |
Lorenz Brun | 1d80175 | 2020-04-02 09:24:51 +0200 | [diff] [blame] | 30 | # Add fsinfo() syscall |
Lorenz Brun | 5999e92 | 2021-01-27 18:53:54 +0100 | [diff] [blame^] | 31 | "//third_party/linux/external:0001-fsinfo-Introduce-a-non-repeating-system-unique-super.patch", |
| 32 | "//third_party/linux/external:0002-fsinfo-Add-fsinfo-syscall-to-query-filesystem-inform.patch", |
| 33 | "//third_party/linux/external:0003-fsinfo-Allow-retrieval-of-superblock-devname-options.patch", |
Serge Bazanski | 2fb13a8 | 2020-02-11 12:41:37 +0100 | [diff] [blame] | 34 | ], |
| 35 | sha256 = sums[version], |
| 36 | strip_prefix = "linux-" + version, |
| 37 | urls = ["https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-%s.tar.xz" % version], |
| 38 | ) |