mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
Generate the protobuf files at build time (#219)
Improve the build reliability by ensuring protobuf files are generated at build time.
This commit is contained in:
parent
30367bfad1
commit
5cc299facd
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -10,3 +10,6 @@
|
||||
[submodule "libopencm3"]
|
||||
path = vendor/libopencm3
|
||||
url = https://github.com/libopencm3/libopencm3.git
|
||||
[submodule "vendor/nanopb"]
|
||||
path = vendor/nanopb
|
||||
url = https://github.com/nanopb/nanopb.git
|
||||
|
@ -8,4 +8,5 @@ RUN apt-get update
|
||||
|
||||
# install build tools and dependencies
|
||||
|
||||
RUN apt-get install -y build-essential git python python-ecdsa gcc-arm-none-eabi
|
||||
RUN apt-get install -y build-essential git python python-ecdsa gcc-arm-none-eabi protobuf-compiler \
|
||||
libprotobuf-dev python-protobuf python3-protobuf
|
||||
|
@ -13,6 +13,8 @@ docker run -t -v $(pwd)/build:/build:z $IMAGE /bin/sh -c "\
|
||||
git checkout $TAG && \
|
||||
git submodule update --init && \
|
||||
make -C vendor/libopencm3 && \
|
||||
make -C vendor/nanopb/generator/proto && \
|
||||
make -C firmware/protob && \
|
||||
make && \
|
||||
make -C firmware sign && \
|
||||
cp firmware/trezor.bin /$BINFILE && \
|
||||
|
@ -1,7 +1,7 @@
|
||||
all: messages.pb.c storage.pb.c types.pb.c messages_map.h
|
||||
|
||||
%.pb.c: %.pb %.options
|
||||
nanopb_generator.py $< -L '#include "%s"' -T
|
||||
../../vendor/nanopb/generator/nanopb_generator.py $< -L '#include "%s"' -T
|
||||
|
||||
%.pb: %.proto
|
||||
protoc -I/usr/include -I. $< -o $@
|
||||
|
1
vendor/nanopb
vendored
Submodule
1
vendor/nanopb
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 54c34a9fda152937d4cd0c7fd85c067fca23af75
|
Loading…
Reference in New Issue
Block a user