blob: e8cb031ee7fc7569559dd8fa688dcf6a2a891e64 [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
ETYPE="sources"
EGIT_COMMIT="f8649a7408c63f53937e33b0e8379679b0434849"
SRC_URI="https://cos.googlesource.com/third_party/dump-capture-kernel/+archive/${EGIT_COMMIT}.tar.gz -> cos-dump-capture-kernel-${EGIT_COMMIT}.tar.gz"
KEYWORDS="*"
CHROMEOS_KERNEL_CONFIG="${FILESDIR}/base.config"
# This must be inherited *after* EGIT/CROS_WORKON variables defined
inherit kernel-2
BUILD_PARAMS="CC=${CC} CXX=${CXX}"
STRIP_MASK+=" /usr/src/${P}/build/vmlinux"
STRIP_MASK+=" *.ko"
DESCRIPTION="A dump capture kernel for kdump functionality"
HOMEPAGE="https://cloud.google.com/container-optimized-os"
S="${WORKDIR}"
src_unpack() {
unpack ${A}
}
src_install() {
dodir /boot/kdump
make INSTALL_PATH="${D}/boot/kdump" INSTALL_MOD_PATH="${D}" \
INSTALL_MOD_STRIP=1 install
local version
version=$(make -s --no-print-directory kernelrelease)
ln -sf "vmlinuz-${version}" "${D}/boot/kdump/vmlinuz" || die
# We also strips the symbol table /boot/kdump/System.map-* at:
# overlay-lakitu/scripts/board_specific_setup.sh
}