89 lines
3.4 KiB
Plaintext
89 lines
3.4 KiB
Plaintext
# defs.kver - build system
|
|
|
|
#
|
|
# Copyright (c) 2013-2014 Wind River Systems, Inc.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions are met:
|
|
#
|
|
# 1) Redistributions of source code must retain the above copyright notice,
|
|
# this list of conditions and the following disclaimer.
|
|
#
|
|
# 2) Redistributions in binary form must reproduce the above copyright notice,
|
|
# this list of conditions and the following disclaimer in the documentation
|
|
# and/or other materials provided with the distribution.
|
|
#
|
|
# 3) Neither the name of Wind River Systems nor the names of its contributors
|
|
# may be used to endorse or promote products derived from this software without
|
|
# specific prior written permission.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
|
|
#####
|
|
# VxMicro kernel version information
|
|
#
|
|
# This make fragment sets the version variables which are to be built into
|
|
# the kernel.
|
|
#
|
|
# The kernel version has the form 'w.x.y.z', where each field is a single nibble.
|
|
# The nibble 'w' represents the generation release number,
|
|
# 'x' represents the major release number,
|
|
# 'y' represents the minor release number, and
|
|
# 'z' represents the revision release number.
|
|
#
|
|
# The prefix is required as this macro will be combined with two other
|
|
# macros (KERNEL_VERSION_FLAGS and KERNEL_VERSION_RESERVED) to create the
|
|
# complete 32-bit kernel version value.
|
|
#####
|
|
|
|
# XXX - get rid of these checks (useless)
|
|
ifdef KERNEL_VERSION_GENERATION
|
|
$(error KERNEL_VERSION_GENERATION defined by user: not allowed!)
|
|
else ifdef KERNEL_VERSION_MAJOR
|
|
$(error KERNEL_VERSION_MAJOR defined by user: not allowed!)
|
|
else ifdef KERNEL_VERSION_MINOR
|
|
$(error KERNEL_VERSION_MINOR defined by user: not allowed!)
|
|
else ifdef KERNEL_VERSION_REVISION
|
|
$(error KERNEL_VERSION_REVISION defined by user: not allowed!)
|
|
endif
|
|
|
|
# decimal values
|
|
vKVER_GEN = 2
|
|
vKVER_MAJ = 2
|
|
vKVER_MIN = 3
|
|
vKVER_REV = 0
|
|
|
|
# XXX - get rid of these
|
|
KERNEL_VERSION_GENERATION = ${vKVER_GEN}
|
|
KERNEL_VERSION_MAJOR = ${vKVER_MAJ}
|
|
KERNEL_VERSION_MINOR = ${vKVER_MIN}
|
|
KERNEL_VERSION_REVISION = ${vKVER_REV}
|
|
|
|
# string
|
|
vKVER_STR = "${vKVER_GEN}.${vKVER_MAJ}.${vKVER_MIN}.${vKVER_REV}"
|
|
|
|
ifndef vHOSTTOOLS
|
|
# Matching hexadecimal values
|
|
# NOTE: using ':=' since this is invoking the shell
|
|
|
|
vKVER_GEN_HEX := $(shell ${HOS_DEC2HEX} ${KERNEL_VERSION_GENERATION})
|
|
vKVER_MAJ_HEX := $(shell ${HOS_DEC2HEX} ${KERNEL_VERSION_MAJOR})
|
|
vKVER_MIN_HEX := $(shell ${HOS_DEC2HEX} ${KERNEL_VERSION_MINOR})
|
|
vKVER_REV_HEX := $(shell ${HOS_DEC2HEX} ${KERNEL_VERSION_REVISION})
|
|
|
|
vKVER_NUMBER = 0x$(vKVER_GEN_HEX)$(vKVER_MAJ_HEX)$(vKVER_MIN_HEX)$(vKVER_REV_HEX)
|
|
# XXX - get rid of this
|
|
KERNEL_VERSION_NUMBER = ${vKVER_NUMBER}
|
|
endif
|