mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
gxbb: change kernel version check
1 add kernel_release_full to print 2 enlarge Kernel log buffer to 1<<19 3 print full version info in dump stack or panic Change-Id: I3c840e6f72bc4b9e8dc202a76ccba96dccb9436e
This commit is contained in:
10
Makefile
10
Makefile
@@ -393,7 +393,8 @@ KBUILD_CFLAGS_MODULE := -DMODULE
|
||||
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|
||||
|
||||
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
|
||||
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
|
||||
KERNELRELEASE = $(shell head -1 include/config/kernel.release 2> /dev/null)
|
||||
KERNELRELEASE_FULL = $(shell tail -1 include/config/kernel.release 2> /dev/null)
|
||||
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
|
||||
|
||||
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
|
||||
@@ -852,8 +853,9 @@ endef
|
||||
|
||||
# Store (new) KERNELRELEASE string in include/config/kernel.release
|
||||
include/config/kernel.release: include/config/auto.conf FORCE
|
||||
$(call filechk,kernel.release)
|
||||
|
||||
$(Q)rm -f $@
|
||||
$(Q)echo "$(KERNELVERSION)" > $@
|
||||
$(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" >> $@
|
||||
|
||||
# Things we need to do before we recursively start building the kernel
|
||||
# or the modules are listed in "prepare".
|
||||
@@ -904,7 +906,7 @@ define filechk_utsrelease.h
|
||||
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
|
||||
(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; echo \#define UTS_RELEASE_FULL \"$(KERNELRELEASE_FULL)\";)
|
||||
endef
|
||||
|
||||
define filechk_version.h
|
||||
|
||||
@@ -5,6 +5,7 @@ CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=19
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_RD_BZIP2=y
|
||||
|
||||
@@ -41,7 +41,7 @@ EXPORT_SYMBOL_GPL(init_uts_ns);
|
||||
|
||||
/* FIXED STRINGS! Don't touch! */
|
||||
const char linux_banner[] =
|
||||
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
|
||||
"Linux version " UTS_RELEASE_FULL " (" LINUX_COMPILE_BY "@"
|
||||
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
|
||||
|
||||
const char linux_proc_banner[] =
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <linux/poll.h>
|
||||
#include <linux/irq_work.h>
|
||||
#include <linux/utsname.h>
|
||||
|
||||
#include <generated/utsrelease.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
@@ -2884,7 +2884,7 @@ void dump_stack_print_info(const char *log_lvl)
|
||||
{
|
||||
printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n",
|
||||
log_lvl, raw_smp_processor_id(), current->pid, current->comm,
|
||||
print_tainted(), init_utsname()->release,
|
||||
print_tainted(), UTS_RELEASE_FULL /*init_utsname()->release*/,
|
||||
(int)strcspn(init_utsname()->version, " "),
|
||||
init_utsname()->version);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user