1457c8996SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only 21da177e4SLinus Torvalds /* 31da177e4SLinus Torvalds * linux/init/version.c 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds * Copyright (C) 1992 Theodore Ts'o 61da177e4SLinus Torvalds * 71da177e4SLinus Torvalds * May be freely distributed as part of Linux. 81da177e4SLinus Torvalds */ 91da177e4SLinus Torvalds 1092045954SSam Ravnborg #include <generated/compile.h> 119afb719eSLaura Abbott #include <linux/build-salt.h> 12e4f02fdaSMasahiro Yamada #include <linux/export.h> 131da177e4SLinus Torvalds #include <linux/uts.h> 141da177e4SLinus Torvalds #include <linux/utsname.h> 15273b281fSSam Ravnborg #include <generated/utsrelease.h> 161da177e4SLinus Torvalds #include <linux/version.h> 170bb80f24SDavid Howells #include <linux/proc_ns.h> 181da177e4SLinus Torvalds 19197dcffcSDaniel Guilak #ifndef CONFIG_KALLSYMS 201da177e4SLinus Torvalds #define version(a) Version_ ## a 211da177e4SLinus Torvalds #define version_string(a) version(a) 221da177e4SLinus Torvalds 23277e2c69SDaniel Guilak extern int version_string(LINUX_VERSION_CODE); 241da177e4SLinus Torvalds int version_string(LINUX_VERSION_CODE); 25197dcffcSDaniel Guilak #endif 261da177e4SLinus Torvalds 274865ecf1SSerge E. Hallyn struct uts_namespace init_uts_ns = { 281e24edcaSPeter Zijlstra .kref = KREF_INIT(2), 294865ecf1SSerge E. Hallyn .name = { 301da177e4SLinus Torvalds .sysname = UTS_SYSNAME, 311da177e4SLinus Torvalds .nodename = UTS_NODENAME, 321da177e4SLinus Torvalds .release = UTS_RELEASE, 331da177e4SLinus Torvalds .version = UTS_VERSION, 341da177e4SLinus Torvalds .machine = UTS_MACHINE, 351da177e4SLinus Torvalds .domainname = UTS_DOMAINNAME, 364865ecf1SSerge E. Hallyn }, 3759607db3SSerge E. Hallyn .user_ns = &init_user_ns, 38435d5f4bSAl Viro .ns.inum = PROC_UTS_INIT_INO, 3933c42940SAl Viro #ifdef CONFIG_UTS_NS 4033c42940SAl Viro .ns.ops = &utsns_operations, 4133c42940SAl Viro #endif 421da177e4SLinus Torvalds }; 434865ecf1SSerge E. Hallyn EXPORT_SYMBOL_GPL(init_uts_ns); 443eb3c740SRoman Zippel 45c71551adSLinus Torvalds /* FIXED STRINGS! Don't touch! */ 46c71551adSLinus Torvalds const char linux_banner[] = 473eb3c740SRoman Zippel "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" 483eb3c740SRoman Zippel LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; 493eb3c740SRoman Zippel 503eb3c740SRoman Zippel const char linux_proc_banner[] = 513eb3c740SRoman Zippel "%s version %s" 523eb3c740SRoman Zippel " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")" 533eb3c740SRoman Zippel " (" LINUX_COMPILER ") %s\n"; 549afb719eSLaura Abbott 559afb719eSLaura Abbott BUILD_SALT; 56