blob: 1a356f5493e8531447690ab323d817bca24474e1 [file] [log] [blame]
Thomas Gleixner457c8992019-05-19 13:08:55 +01001// SPDX-License-Identifier: GPL-2.0-only
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
3 * linux/init/version.c
4 *
5 * Copyright (C) 1992 Theodore Ts'o
6 *
7 * May be freely distributed as part of Linux.
8 */
9
Sam Ravnborg92045952009-10-18 00:36:47 +020010#include <generated/compile.h>
Laura Abbott9afb7192018-07-05 17:49:37 -070011#include <linux/build-salt.h>
Yonghong Song1fdd7432021-04-01 16:27:23 -070012#include <linux/elfnote-lto.h>
Masahiro Yamadae4f02fd2017-11-17 15:29:10 -080013#include <linux/export.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070014#include <linux/uts.h>
15#include <linux/utsname.h>
Sam Ravnborg273b2812009-10-18 00:52:28 +020016#include <generated/utsrelease.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <linux/version.h>
David Howells0bb80f22013-04-12 01:50:06 +010018#include <linux/proc_ns.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
Serge E. Hallyn4865ecf2006-10-02 02:18:14 -070020struct uts_namespace init_uts_ns = {
Kirill Tkhai9a564932020-08-03 13:16:21 +030021 .ns.count = REFCOUNT_INIT(2),
Serge E. Hallyn4865ecf2006-10-02 02:18:14 -070022 .name = {
23 .sysname = UTS_SYSNAME,
24 .nodename = UTS_NODENAME,
25 .release = UTS_RELEASE,
26 .version = UTS_VERSION,
27 .machine = UTS_MACHINE,
28 .domainname = UTS_DOMAINNAME,
29 },
Serge E. Hallyn59607db2011-03-23 16:43:16 -070030 .user_ns = &init_user_ns,
Al Viro435d5f42014-10-31 22:56:04 -040031 .ns.inum = PROC_UTS_INIT_INO,
Al Viro33c42942014-11-01 02:32:53 -040032#ifdef CONFIG_UTS_NS
33 .ns.ops = &utsns_operations,
34#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070035};
Serge E. Hallyn4865ecf2006-10-02 02:18:14 -070036EXPORT_SYMBOL_GPL(init_uts_ns);
Roman Zippel3eb3c742007-01-10 14:45:28 +010037
Linus Torvaldsc71551a2007-01-11 18:18:04 -080038/* FIXED STRINGS! Don't touch! */
39const char linux_banner[] =
Roman Zippel3eb3c742007-01-10 14:45:28 +010040 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
41 LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
42
43const char linux_proc_banner[] =
44 "%s version %s"
45 " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
46 " (" LINUX_COMPILER ") %s\n";
Laura Abbott9afb7192018-07-05 17:49:37 -070047
48BUILD_SALT;
Yonghong Song1fdd7432021-04-01 16:27:23 -070049BUILD_LTO_INFO;