blob: ac66a3e3e433ef8879958c57e4d2dcdfbadee607 [file] [log] [blame]
Serge Bazanski2fb13a82020-02-11 12:41:37 +01001# 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
17load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
18
19def linux_external(name, version):
20 sums = {
21 "5.4.7": "abc9b21d9146d95853dac35f4c4489a0199aff53ee6eee4b0563d1b37079fcc9",
Lorenz Brunfd166512020-04-01 17:29:45 +020022 "5.6": "e342b04a2aa63808ea0ef1baab28fc520bd031ef8cf93d9ee4a31d4058fcb622",
Lorenz Brun5999e922021-01-27 18:53:54 +010023 "5.10.4": "904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec",
Lorenz Brun531e2c22021-11-17 20:00:05 +010024 "5.15.2": "5634033a4981be42d3259f50d5371a2cdc9ace5d9860da67a2879630533ab175",
Lorenz Brunfc2d0d82022-03-31 14:36:17 +020025 "5.15.32": "1463cdfa223088610dd65d3eadeffa44ec49746091b8ae8ddac6f3070d17df86",
Lorenz Brun50d39372023-03-27 22:20:15 +020026 "5.15.104": "71c532ce09992e470f3259ffeb38d2b5bba990c243a559e4726a57412bd36b54",
Lorenz Brun78a538d2023-07-25 21:39:04 +020027 "5.15.122": "38755801cd1ce229a8c0a0536d29aa37acea8a8aa13fa438e19fbf9d6293342d",
Lorenz Brun1e963fe2023-08-09 18:24:02 +020028 "5.15.125": "150f3846b76cd23a6135f49cef71372bade5a06e851cb4f8558df8b862d8fec7",
Serge Bazanski2fb13a82020-02-11 12:41:37 +010029 }
30 http_archive(
31 name = name,
32 build_file = "//third_party/linux/external:BUILD.repo",
33 patch_args = ["-p1"],
34 patches = [
Mateusz Zalegab7f8e9a2021-10-20 13:41:41 +020035 "//third_party/linux/external:0001-block-partition-expose-PARTUUID-through-uevent.patch",
Lorenz Brun942f5e22022-01-27 15:03:10 +010036 "//third_party/linux/external:discard-gnu-note-section.patch",
Lorenz Brun333cb8b2023-04-20 23:10:39 +020037 "//third_party/linux/external:disable-static-ifs.patch",
Serge Bazanski2fb13a82020-02-11 12:41:37 +010038 ],
39 sha256 = sums[version],
40 strip_prefix = "linux-" + version,
41 urls = ["https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-%s.tar.xz" % version],
42 )