sys-kernel: remove 5.15 kernel package

BUG=b/353766553
TEST=presubmit, validation
RELEASE_NOTE=None

Change-Id: Ic9ef83bc0494dbf4302cae1186428761439693f0
Reviewed-on: https://cos-review.googlesource.com/c/cos/overlays/board-overlays/+/76800
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Oleksandr Tymoshenko <ovt@google.com>
diff --git a/project-lakitu/profiles/base/package.use b/project-lakitu/profiles/base/package.use
index b9309ee..1f58be6 100644
--- a/project-lakitu/profiles/base/package.use
+++ b/project-lakitu/profiles/base/package.use
@@ -74,9 +74,6 @@
 # Enable full lvm2 install.
 sys-fs/lvm2 -device-mapper-only
 
-# Enable virtio balloon driver.
-sys-kernel/lakitu-kernel-5_15 virtio_balloon
-
 # Out-of-tree kernel module should use the same compiler as kernel.
 sys-apps/loadpin-trigger clang
 
diff --git a/project-lakitu/sys-apps/tpu-drivers/files/tpu-drivers-5.10-include-fix.patch b/project-lakitu/sys-apps/tpu-drivers/files/tpu-drivers-5.10-include-fix.patch
deleted file mode 100644
index 2697e6d..0000000
--- a/project-lakitu/sys-apps/tpu-drivers/files/tpu-drivers-5.10-include-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/drivers/accel/accel.c b/drivers/accel/accel.c
-index afeabe1..6d1c75a 100644
---- a/drivers/accel/accel.c
-+++ b/drivers/accel/accel.c
-@@ -7,6 +7,7 @@
- #include <linux/kdev_t.h>
- #include <linux/slab.h>
- #include <linux/types.h>
-+#include <linux/genhd.h>
- #define ACCEL_MAX_DEVICES 512
- static bool accel_class_registered;
- static struct class accel_class;
diff --git a/project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117-r4.ebuild b/project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117-r5.ebuild
similarity index 100%
rename from project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117-r4.ebuild
rename to project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117-r5.ebuild
diff --git a/project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117.ebuild b/project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117.ebuild
index 412de14..b12a7dc 100644
--- a/project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117.ebuild
+++ b/project-lakitu/sys-apps/tpu-drivers/tpu-drivers-20220117.ebuild
@@ -23,7 +23,7 @@
 LICENSE="BSD-Google"
 SLOT="0"
 KEYWORDS="*"
-IUSE+=" kernel-5_15 kernel-6_1 kernel-6_6"
+IUSE+=" kernel-6_1 kernel-6_6"
 
 S="${WORKDIR}/tpu-${COS_PKG_COMMIT}/tools/driver/"
 
@@ -40,9 +40,6 @@
 	tpu_v4_lite(kernel/drivers/tpu_common:${S})"
 
 src_prepare() {
-	if use kernel-5_15; then
-		PATCHES+=( "${FILESDIR}"/${PN}-5.10-include-fix.patch )
-	fi
 	if use kernel-6_1; then
 		PATCHES+=( "${FILESDIR}"/${PN}-6.1-build-compatible.patch )
 	fi
diff --git a/project-lakitu/sys-kernel/lakitu-kernel-5_15/files/chromeos-version.sh b/project-lakitu/sys-kernel/lakitu-kernel-5_15/files/chromeos-version.sh
deleted file mode 100755
index 233f2e3..0000000
--- a/project-lakitu/sys-kernel/lakitu-kernel-5_15/files/chromeos-version.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# Copyright 2022 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# This script is given one argument: the base of the source directory of
-# the package, and it prints a string on stdout with the numerical version
-# number for said repo.
-
-if [ ! -d "$1" ] ; then
-    exit
-fi
-
-cd "$1" || exit
-
-# Strip any .0 fix level from the version string.
-make kernelversion | sed -Ee 's/([0-9]*\.[0-9]*)\.0/\1/' -e s/-/_/g
diff --git a/project-lakitu/sys-kernel/lakitu-kernel-5_15/files/x509.genkey b/project-lakitu/sys-kernel/lakitu-kernel-5_15/files/x509.genkey
deleted file mode 100644
index 056825f..0000000
--- a/project-lakitu/sys-kernel/lakitu-kernel-5_15/files/x509.genkey
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 3072
-distinguished_name = req_distinguished_name
-prompt = no
-string_mask = utf8only
-x509_extensions = myexts
-
-[ req_distinguished_name ]
-O = Google LLC
-CN = Container-Optimized OS kernel signing key
-
-[ myexts ]
-basicConstraints=critical,CA:FALSE
-keyUsage=digitalSignature
-subjectKeyIdentifier=hash
-authorityKeyIdentifier=keyid
diff --git a/project-lakitu/sys-kernel/lakitu-kernel-5_15/lakitu-kernel-5_15-5.15.102-r127.ebuild b/project-lakitu/sys-kernel/lakitu-kernel-5_15/lakitu-kernel-5_15-5.15.102-r127.ebuild
deleted file mode 100644
index 4167b5e..0000000
--- a/project-lakitu/sys-kernel/lakitu-kernel-5_15/lakitu-kernel-5_15-5.15.102-r127.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Copyright 2022 Google LLC
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# shellcheck disable=SC2034,SC2154
-
-EAPI=7
-
-CROS_WORKON_COMMIT="1765bb020472de8c6c13f4246dfe2bc867366426"
-CROS_WORKON_TREE="1a290e51ac7216f9b30aafe585d08e1279c5f572"
-CROS_WORKON_REPO="https://cos.googlesource.com"
-CROS_WORKON_PROJECT="third_party/kernel"
-CROS_WORKON_LOCALNAME="kernel/v5.15"
-
-# This must be inherited *after* EGIT/CROS_WORKON variables defined
-inherit cros-workon cos-kernel
-
-cos_kernel_config_arch() {
-	case ${ARCH} in
-	amd64) echo "x86";;
-	arm64) echo "arm64";;
-	*)     die "Unknown architecture: ${ARCH}";;
-	esac
-}
-
-STRIP_MASK+=" /usr/src/${P}/build/vmlinux"
-STRIP_MASK+=" *.ko"
-
-DESCRIPTION="COS Linux Kernel 5.15"
-HOMEPAGE="https://cloud.google.com/container-optimized-os"
-KEYWORDS="*"
-IUSE="module_sign lockdown gpu"
-
-COS_KERNEL_X509_GENKEY="${FILESDIR}/x509.genkey"
-# Use in-tree kernel config
-CHROMEOS_KERNEL_CONFIG="arch/$(cos_kernel_config_arch)/configs/lakitu_defconfig"
-
-src_configure() {
-	cos-kernel_src_configure
-}
-
-# Change for EAPI=6
-src_prepare() {
-	default
-	cos-kernel_src_prepare
-}
-
-src_install() {
-	cos-kernel_src_install
-
-}
-
-# Change the following (commented out) number to the next prime number
-# when you change base.config.  This workaround will force the
-# ChromeOS CQ to uprev sys-kernel/kernel-5_10 ebuild and pick up the
-# configuration changes.  In absence of this workaround the config changes
-# would not be picked up unless there was a code change in kernel source tree.
-#
-# NOTE: There's nothing magic keeping this number prime but you just need to
-# make _any_ change to this file.  ...so why not keep it prime?
-#
-# The coolest prime number is: 13
diff --git a/project-lakitu/sys-kernel/lakitu-kernel-5_15/lakitu-kernel-5_15-9999.ebuild b/project-lakitu/sys-kernel/lakitu-kernel-5_15/lakitu-kernel-5_15-9999.ebuild
deleted file mode 100644
index b53bedb..0000000
--- a/project-lakitu/sys-kernel/lakitu-kernel-5_15/lakitu-kernel-5_15-9999.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Copyright 2022 Google LLC
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# shellcheck disable=SC2034,SC2154
-
-EAPI=7
-
-CROS_WORKON_REPO="https://cos.googlesource.com"
-CROS_WORKON_PROJECT="third_party/kernel"
-CROS_WORKON_LOCALNAME="kernel/v5.15"
-
-# This must be inherited *after* EGIT/CROS_WORKON variables defined
-inherit cros-workon cos-kernel
-
-cos_kernel_config_arch() {
-	case ${ARCH} in
-	amd64) echo "x86";;
-	arm64) echo "arm64";;
-	*)     die "Unknown architecture: ${ARCH}";;
-	esac
-}
-
-STRIP_MASK+=" /usr/src/${P}/build/vmlinux"
-STRIP_MASK+=" *.ko"
-
-DESCRIPTION="COS Linux Kernel 5.15"
-HOMEPAGE="https://cloud.google.com/container-optimized-os"
-KEYWORDS="~*"
-IUSE="module_sign lockdown gpu"
-
-COS_KERNEL_X509_GENKEY="${FILESDIR}/x509.genkey"
-# Use in-tree kernel config
-CHROMEOS_KERNEL_CONFIG="arch/$(cos_kernel_config_arch)/configs/lakitu_defconfig"
-
-src_configure() {
-	cos-kernel_src_configure
-}
-
-# Change for EAPI=6
-src_prepare() {
-	default
-	cos-kernel_src_prepare
-}
-
-src_install() {
-	cos-kernel_src_install
-
-}
-
-# Change the following (commented out) number to the next prime number
-# when you change base.config.  This workaround will force the
-# ChromeOS CQ to uprev sys-kernel/kernel-5_10 ebuild and pick up the
-# configuration changes.  In absence of this workaround the config changes
-# would not be picked up unless there was a code change in kernel source tree.
-#
-# NOTE: There's nothing magic keeping this number prime but you just need to
-# make _any_ change to this file.  ...so why not keep it prime?
-#
-# The coolest prime number is: 13
diff --git a/project-lakitu/sys-kernel/lakitu-kernel-5_15/metadata.xml b/project-lakitu/sys-kernel/lakitu-kernel-5_15/metadata.xml
deleted file mode 100644
index e3b088a..0000000
--- a/project-lakitu/sys-kernel/lakitu-kernel-5_15/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<herd>kernel</herd>
-<upstream>
-  <remote-id type="cpe">cpe:/o:linux:linux_kernel</remote-id>
-</upstream>
-</pkgmetadata>
diff --git a/project-lakitu/virtual/linux-sources/linux-sources-1.5-r9.ebuild b/project-lakitu/virtual/linux-sources/linux-sources-1.5-r10.ebuild
similarity index 100%
rename from project-lakitu/virtual/linux-sources/linux-sources-1.5-r9.ebuild
rename to project-lakitu/virtual/linux-sources/linux-sources-1.5-r10.ebuild
diff --git a/project-lakitu/virtual/linux-sources/linux-sources-1.5.ebuild b/project-lakitu/virtual/linux-sources/linux-sources-1.5.ebuild
index 392cff2..2afdd07 100644
--- a/project-lakitu/virtual/linux-sources/linux-sources-1.5.ebuild
+++ b/project-lakitu/virtual/linux-sources/linux-sources-1.5.ebuild
@@ -15,7 +15,6 @@
 IUSE_KERNEL_VERS=(
 	kernel-6_6
 	kernel-6_1
-	kernel-5_15
 )
 IUSE="kernel_sources +base csql lakitu-nc ${IUSE_KERNEL_VERS[*]}"
 REQUIRED_USE="?? ( ${IUSE_KERNEL_VERS[*]} )"
@@ -26,7 +25,6 @@
 	!sys-kernel/lakitu-kernel
 	!sys-kernel/upstream-kernel-mainline
 	!sys-kernel/upstream-kernel-next
-	kernel-5_15? ( sys-kernel/lakitu-kernel-5_15[kernel_sources=] )
 	kernel-6_1? (
 		base? ( sys-kernel/lakitu-kernel-6_1[kernel_sources=] )
 		csql? ( sys-kernel/csql-kernel-6_1[kernel_sources=] )