mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
Build the hardware version string from the register definitions, so I no longer forget to update it. Check it at runtime against the build version registers. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=On the console command line, type "version" and see the following string: "Chip: g cr50 A1 20141203_224409" Change-Id: I6d902780d42f2dd18a57ccc08fd4ba4fee5ebc7c Reviewed-on: https://chromium-review.googlesource.com/233582 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
21 lines
784 B
Makefile
21 lines
784 B
Makefile
# -*- makefile -*-
|
|
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
|
|
CORE:=cortex-m
|
|
CFLAGS_CPU+=-march=armv7-m -mcpu=cortex-m3
|
|
|
|
# Extract the hardware version we are building against
|
|
ver_defs := GC___MAJOR_REV__ GC___MINOR_REV__
|
|
bld_defs := GC_SWDP_BUILD_DATE_DEFAULT GC_SWDP_BUILD_TIME_DEFAULT
|
|
ver_params := $(shell echo "$(ver_defs) $(bld_defs)" | $(CPP) $(CPPFLAGS) -P \
|
|
-imacros chip/g/gc_regdefs.h | sed -e "s/__REV\([A-Z]\)__/\1/")
|
|
ver_str := $(shell printf "%s%s %d_%d" $(ver_params))
|
|
CPPFLAGS+= -DGC_REVISION="$(ver_str)"
|
|
|
|
# Required chip modules
|
|
chip-y=clock.o gpio.o hwtimer.o jtag.o system.o uart.o
|
|
chip-$(CONFIG_WATCHDOG)+=watchdog.o
|