Fix kernel version generation
The generated version number in hex was incorrect and macros were failing. We also did not convert decimals to hex before we created the hex version number. Change-Id: Ic5b8d4a40d907f09cf4184e84f0ce89a4532a9b5 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
47f8088e26
commit
8ad4878e52
1 changed files with 9 additions and 4 deletions
13
Makefile
13
Makefile
|
@ -868,15 +868,20 @@ prepare: $(archprepare) FORCE
|
|||
# KERNELRELEASE can change from a few different places, meaning version.h
|
||||
# needs to be updated, so this check is forced on all builds
|
||||
|
||||
KERNEL_VERSION_HEX=0x$(VERSION_GENERATION)$(VERSION_MAJOR)$(VERSION_MINOR)$(VERSION_REVISION)
|
||||
KERNEL_CODE=40
|
||||
VERSION_GENERATION_HEX=$(shell echo "obase=16; ${VERSION_GENERATION}" | bc)
|
||||
VERSION_MAJOR_HEX=$(shell echo "obase=16; ${VERSION_MAJOR}" | bc)
|
||||
VERSION_MINOR_HEX=$(shell echo "obase=16; ${VERSION_MINOR}" | bc)
|
||||
VERSION_REVISION_HEX=$(shell echo "obase=16; ${VERSION_REVISION}" | bc)
|
||||
KERNEL_FLAGS=00
|
||||
VERSION_RESERVED_HEX=00
|
||||
KERNEL_VERSION_HEX=0x$(VERSION_GENERATION_HEX)$(VERSION_MAJOR_HEX)$(VERSION_MINOR_HEX)$(VERSION_REVISION_HEX)
|
||||
|
||||
define filechk_version.h
|
||||
(echo "#ifndef _KERNEL_VERSION_H_"; \
|
||||
echo "#define _KERNEL_VERSION_H_"; \
|
||||
echo ;\
|
||||
echo "#define KERNELVERSION \\"; \
|
||||
echo "$(KERNEL_VERSION_HEX)$(KERNEL_CODE)$(VERSION_RESERVED)"; \
|
||||
echo -n "#define KERNELVERSION "; \
|
||||
echo "$(KERNEL_VERSION_HEX)$(KERNEL_FLAGS)$(VERSION_RESERVED_HEX)"; \
|
||||
echo "#define KERNEL_VERSION_NUMBER $(KERNEL_VERSION_HEX)"; \
|
||||
echo "#define KERNEL_VERSION_GENERATION $(VERSION_GENERATION)"; \
|
||||
echo "#define KERNEL_VERSION_MAJOR $(VERSION_MAJOR)"; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue