162306a36Sopenharmony_ci#!/bin/sh 262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciUTS_MACHINE=$1 562306a36Sopenharmony_ciCC_VERSION="$2" 662306a36Sopenharmony_ciLD=$3 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciif test -z "$KBUILD_BUILD_USER"; then 962306a36Sopenharmony_ci LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/') 1062306a36Sopenharmony_cielse 1162306a36Sopenharmony_ci LINUX_COMPILE_BY=$KBUILD_BUILD_USER 1262306a36Sopenharmony_cifi 1362306a36Sopenharmony_ciif test -z "$KBUILD_BUILD_HOST"; then 1462306a36Sopenharmony_ci LINUX_COMPILE_HOST=`uname -n` 1562306a36Sopenharmony_cielse 1662306a36Sopenharmony_ci LINUX_COMPILE_HOST=$KBUILD_BUILD_HOST 1762306a36Sopenharmony_cifi 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciLD_VERSION=$(LC_ALL=C $LD -v | head -n1 | 2062306a36Sopenharmony_ci sed -e 's/(compatible with [^)]*)//' -e 's/[[:space:]]*$//') 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_cicat <<EOF 2362306a36Sopenharmony_ci#define UTS_MACHINE "${UTS_MACHINE}" 2462306a36Sopenharmony_ci#define LINUX_COMPILE_BY "${LINUX_COMPILE_BY}" 2562306a36Sopenharmony_ci#define LINUX_COMPILE_HOST "${LINUX_COMPILE_HOST}" 2662306a36Sopenharmony_ci#define LINUX_COMPILER "${CC_VERSION}, ${LD_VERSION}" 2762306a36Sopenharmony_ciEOF 28