Skip to main content

kernel name in uname source

cd /usr/src/linux/

nano init/version.c

---------------------------------------------------------------------------------------------------------------
 #include <generated/compile.h>
#include <linux/build-salt.h>
#include <linux/elfnote-lto.h>
#include <linux/export.h>
#include <linux/uts.h>
#include <linux/utsname.h>
#include <generated/utsrelease.h>
#include <linux/version.h>
#include <linux/proc_ns.h>

struct uts_namespace init_uts_ns = {
        .ns.count = REFCOUNT_INIT(2),
        .name = {
                .sysname        = UTS_SYSNAME,         /* Operating system name (e.g., "Linux") */
                .nodename    = UTS_NODENAME,       /* Name within communications network to which the node is attached, if any */

                .release        = UTS_RELEASE,              /* Operating system releas   (e.g., "2.6.28") */            
                .version        = UTS_VERSION,             /* Operating system version */
                .machine        = UTS_MACHINE,           /* Hardware type identifier */
                .domainname     = UTS_DOMAINNAME,   /* NIS or YP domain name */
        },

  .user_ns = &init_user_ns,
        .ns.inum = PROC_UTS_INIT_INO,    

#ifdef CONFIG_UTS_NS
        .ns.ops = &utsns_operations,
#endif
}; 

EXPORT_SYMBOL_GPL(init_uts_ns);

/* FIXED STRINGS! Don't touch! */
const char linux_banner[] =
        "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
        LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";

const char linux_proc_banner[] =
        "%s version %s"
        " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
        " (" LINUX_COMPILER ") %s\n";

BUILD_SALT;
BUILD_LTO_INFO;

--------------------------------------------------------------------------------------------------------------------------------------

nano include/generated/compile.h

--------------------------------------------------------------------------------------------------------------------------------------

 /* This file is auto generated, version 3 */
/* SMP */
#define UTS_MACHINE "x86_64"
#define UTS_VERSION "#3 SMP Wed Jan 18 06:19:25 +0545 2023"
#define LINUX_COMPILE_BY "root"
#define LINUX_COMPILE_HOST "me"
#define LINUX_COMPILER "gcc (Gentoo Hardened 11.3.1_p20221209 p3) 11.3.1 20221209, GNU ld (Gentoo 2.39 p5) 2.39.0"

--------------------------------------------------------------------------------------------------------------------------------------

 nano include/generated/utsrelease.h 

--------------------------------------------------------------------------------------------------------------------------------------

#define UTS_RELEASE "5.15.80-gentoo"

--------------------------------------------------------------------------------------------------------------------------------------

nano include/linux/uts.h

--------------------------------------------------------------------------------------------------------------------------------------

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_UTS_H
#define _LINUX_UTS_H

/*
 * Defines for what uname() should return
 */
#ifndef UTS_SYSNAME
#define UTS_SYSNAME "Linux"
#endif

#ifndef UTS_NODENAME
#define UTS_NODENAME CONFIG_DEFAULT_HOSTNAME /* set by sethostname() */
#endif

#ifndef UTS_DOMAINNAME
#define UTS_DOMAINNAME "(none)" /* set by setdomainname() */
#endif

#endif 

--------------------------------------------------------------------------------------------------------------------------------------

nano scripts/setlocalversion

--------------------------------------------------------------------------------------------------------------------------------------

 


#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# This scripts adds local version information from the version
# control systems git, mercurial (hg) and subversion (svn).
#
# If something goes wrong, send a mail the kernel build mailinglist
# (see MAINTAINERS) and CC Nico Schottelius
# <nico-linuxsetlocalversion -at- schottelius.org>.
#
#

usage() {
    echo "Usage: $0 [--save-scmversion] [srctree]" >&2
        exit 1
}

scm_only=false
srctree=.
if test "$1" = "--save-scmversion"; then
        scm_only=true
        shift
fi
if test $# -gt 0; then
        srctree=$1
        shift
fi
if test $# -gt 0 -o ! -d "$srctree"; then
        usage
fi

scm_version()
{
        local short
        short=false

        cd "$srctree"
        if test -e .scmversion; then
                cat .scmversion
                return
        fi
        if test "$1" = "--short"; then
                short=true
        fi

        # Check for git and a git repo.
        if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
           head=$(git rev-parse --verify HEAD 2>/dev/null); then

                # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
                # it, because this version is defined in the top level Makefile.
                if [ -z "$(git describe --exact-match 2>/dev/null)" ]; then

                        # If only the short version is requested, don't bother
                        # running further git commands
                        if $short; then
                                echo "+"
                                return
                        fi
                        # If we are past a tagged commit (like
                        # "v2.6.30-rc5-302-g72357d5"), we pretty print it.
                        if atag="$(git describe 2>/dev/null)"; then
                                echo "$atag" | awk -F- '{printf("-%05d", $(NF-1))}'
                        fi

                        # Add -g and exactly 12 hex chars.
                        printf '%s%s' -g "$(echo $head | cut -c1-12)"
                fi

    # Check for uncommitted changes.
                # This script must avoid any write attempt to the source tree,
                # which might be read-only.
                # You cannot use 'git describe --dirty' because it tries to
                # create .git/index.lock .
                # First, with git-status, but --no-optional-locks is only
                # supported in git >= 2.14, so fall back to git-diff-index if
                # it fails. Note that git-diff-index does not refresh the
                # index, so it may give misleading results. See
                # git-update-index(1), git-diff-index(1), and git-status(1).
                if {
                        git --no-optional-locks status -uno --porcelain 2>/dev/null ||
                        git diff-index --name-only HEAD
                } | read dummy; then
                        printf '%s' -dirty
                fi
        fi
}

collect_files()
{
        local file res=

        for file; do
                case "$file" in
                *\~*)
                        continue
                        ;;
                esac
                if test -e "$file"; then
                        res="$res$(cat "$file")"
                fi
        done
        echo "$res"
}

if $scm_only; then
        if test ! -e .scmversion; then
                res=$(scm_version)
                echo "$res" >.scmversion
        fi
        exit
fi

if test -e include/config/auto.conf; then
        . include/config/auto.conf
else
        echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
        exit 1
fi

# localversion* files in the build and source directory
res="$(collect_files localversion*)"
if test ! "$srctree" -ef .; then
        res="$res$(collect_files "$srctree"/localversion*)"
fi

# CONFIG_LOCALVERSION and LOCALVERSION (if set)
res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"

# scm version string if not at a tagged commit
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
           # full scm version string
        res="$res$(scm_version)"
elif [ "${LOCALVERSION+set}" != "set" ]; then
           # If the variable LOCALVERSION is not set, append a plus
           # sign if the repository is not in a clean annotated or
           # signed tagged state (as git describe only looks at signed
           # or annotated tags - git tag -a/-s).
           #
           # If the variable LOCALVERSION is set (including being set
           # to an empty string), we don't want to append a plus sign.
        scm=$(scm_version --short)
        res="$res${scm:++}"
fi

echo "$res"

--------------------------------------------------------------------------------------------------------------------------------------

 

  /proc/sys/kernel/{ostype,hostname,osrelease,version, domainname}

 

--------------------------------------------------------------------------------------------------------------------------------------

nano Makefile

VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 80
EXTRAVERSION = -gentoo
NAME = Trick or Treat

 

--------------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

src 

man 2 uname 

https://unix.stackexchange.com/questions/136959/where-does-uname-get-its-information-from

Comments

Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone https://git.suckless.org/dwm xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim config.mk # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points Ahmia.fi - Clearnet search engine for Tor Hidden Services (allows you

download office 2021 and activate

get office from here  https://tb.rg-adguard.net/public.php open powershell as admin (win+x and a ) type cmd  goto insall dir 1.         cd /d %ProgramFiles(x86)%\Microsoft Office\Office16 2.           cd /d %ProgramFiles%\Microsoft Office\Office16 try 1 or 2 depending on installation  install volume license  for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x" activate using kms cscript ospp.vbs /setprt:1688 cscript ospp.vbs /unpkey:6F7TH >nul cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH cscript ospp.vbs /sethst:s8.uk.to cscript ospp.vbs /act Automatic script (windefender may block it) ------------------------------------------------------------------------------------------------------------------- @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - MSGuides.com&cls&echo =====================================================================================&