blob: 85f0206e8a84a1ec574bb0771ddd6838cb24e473 [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 = {
Lorenz Brun4811e702023-10-09 22:13:34 +020021 "6.1.56": "9edefdde32c2298389dcd19566402332b3c2016f5ada17e5820f500b908d478c",
Serge Bazanski2fb13a82020-02-11 12:41:37 +010022 }
23 http_archive(
24 name = name,
25 build_file = "//third_party/linux/external:BUILD.repo",
26 patch_args = ["-p1"],
27 patches = [
Mateusz Zalegab7f8e9a2021-10-20 13:41:41 +020028 "//third_party/linux/external:0001-block-partition-expose-PARTUUID-through-uevent.patch",
Lorenz Brun942f5e22022-01-27 15:03:10 +010029 "//third_party/linux/external:discard-gnu-note-section.patch",
Lorenz Brun333cb8b2023-04-20 23:10:39 +020030 "//third_party/linux/external:disable-static-ifs.patch",
Serge Bazanski2fb13a82020-02-11 12:41:37 +010031 ],
32 sha256 = sums[version],
33 strip_prefix = "linux-" + version,
Lorenz Brun4811e702023-10-09 22:13:34 +020034 urls = ["https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-%s.tar.xz" % version],
Serge Bazanski2fb13a82020-02-11 12:41:37 +010035 )