1*3ab18a62SMasahiro Yamada#!/bin/sh 2*3ab18a62SMasahiro Yamada# SPDX-License-Identifier: GPL-2.0-only 3*3ab18a62SMasahiro Yamada 4*3ab18a62SMasahiro Yamada# Set up CROSS_COMPILE if we are cross-compiling, but not called from the 5*3ab18a62SMasahiro Yamada# kernel toplevel Makefile 6*3ab18a62SMasahiro Yamadaif [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUILD_ARCH}" ]; then 7*3ab18a62SMasahiro Yamada echo CROSS_COMPILE=${DEB_HOST_GNU_TYPE}- 8*3ab18a62SMasahiro Yamadafi 9*3ab18a62SMasahiro Yamada 10*3ab18a62SMasahiro Yamadaversion=$(dpkg-parsechangelog -S Version) 11*3ab18a62SMasahiro Yamadaversion_upstream="${version%-*}" 12*3ab18a62SMasahiro Yamadadebian_revision="${version#${version_upstream}}" 13*3ab18a62SMasahiro Yamadadebian_revision="${debian_revision#*-}" 14*3ab18a62SMasahiro Yamada 15*3ab18a62SMasahiro Yamadaecho KERNELRELEASE=${version_upstream} 16*3ab18a62SMasahiro Yamadaecho KBUILD_BUILD_VERSION=${debian_revision} 17