mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-24 16:57:21 +00:00
Automated version generation for vboot firmware.
Review URL: http://codereview.chromium.org/2817025
This commit is contained in:
@@ -39,12 +39,22 @@ STUB_SRCS = \
|
||||
./stub/tlcl.c \
|
||||
./stub/utility_stub.c
|
||||
|
||||
ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS}
|
||||
ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} version.c
|
||||
|
||||
test : $(FWLIB)
|
||||
test : $(FWLIB) update-version
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out \
|
||||
$(TESTDIR)/main.c $(FWLIB)
|
||||
|
||||
# This is executed at every make, to see if anything has changed
|
||||
update-version :
|
||||
find \( -name '*.[ch]' -o -name 'Makefile*' \) -a \! -name version.c \
|
||||
| sort | xargs cat | md5sum | cut -c 25-32 > x.tmp
|
||||
echo "char* VbootVersion = \"VBOOv=$$(cat x.tmp)\";" > version.tmp
|
||||
cmp -s version.tmp version.c || \
|
||||
( echo "** Updating version.c **" && \
|
||||
cp version.tmp version.c )
|
||||
|
||||
|
||||
include ../common.mk
|
||||
|
||||
$(FWLIB) : $(ALL_OBJS)
|
||||
|
||||
1
firmware/version.c
Normal file
1
firmware/version.c
Normal file
@@ -0,0 +1 @@
|
||||
char* VbootVersion = "VBOOv=8078f71c";
|
||||
Reference in New Issue
Block a user