Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/linux/printk.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

extern const char linux_banner[];
extern const char linux_proc_banner[];
extern const char linux_commitid_banner[];

extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */

Expand Down
2 changes: 1 addition & 1 deletion init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ void start_kernel(void)
*/
boot_cpu_init();
page_address_init();
pr_notice("%s", linux_banner);
pr_notice("%s", linux_commitid_banner);
early_security_init();
setup_arch(&command_line);
setup_boot_config();
Expand Down
4 changes: 4 additions & 0 deletions init/version-timestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ struct uts_namespace init_uts_ns = {
const char linux_banner[] =
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";

const char linux_commitid_banner[] =
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") (" GIT_COMMITID ") " UTS_VERSION "\n";
1 change: 1 addition & 0 deletions init/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ BUILD_LTO_INFO;

struct uts_namespace init_uts_ns __weak;
const char linux_banner[] __weak;
const char linux_commitid_banner[] __weak;

#include "version-timestamp.c"

Expand Down
3 changes: 3 additions & 0 deletions scripts/mkcompile_h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ fi
LD_VERSION=$(LC_ALL=C $LD -v | head -n1 |
sed -e 's/(compatible with [^)]*)//' -e 's/[[:space:]]*$//')

GIT_COMMITID=$(git log -1 --pretty=format:%h 2>/dev/null)

cat <<EOF
#define UTS_MACHINE "${UTS_MACHINE}"
#define LINUX_COMPILE_BY "${LINUX_COMPILE_BY}"
#define LINUX_COMPILE_HOST "${LINUX_COMPILE_HOST}"
#define LINUX_COMPILER "${CC_VERSION}, ${LD_VERSION}"
#define GIT_COMMITID "${GIT_COMMITID}"
EOF
1 change: 1 addition & 0 deletions scripts/package/mkdebian
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ cat <<EOF > debian/changelog
$sourcename ($packageversion) $distribution; urgency=low

* Custom built Linux kernel.
* Git:$(git symbolic-ref --short HEAD 2>/dev/null || true) $(git rev-parse --short HEAD) $(git diff --quiet HEAD || echo "dirty")

-- $maintainer $(date -R)
EOF
Expand Down