1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-891: move firmware_info template under flight directory

This commit is contained in:
Oleg Semyonov 2013-05-20 01:12:45 +03:00
parent a408d9748c
commit 0798d8e330
3 changed files with 21 additions and 27 deletions

View File

@ -44,15 +44,15 @@
*/ */
struct __attribute__((packed)) fw_version_info { struct __attribute__((packed)) fw_version_info {
uint8_t magic[4]; uint8_t magic[4];
uint32_t commit_hash_prefix; uint32_t commit_hash_prefix;
uint32_t timestamp; uint32_t timestamp;
uint8_t board_type; uint8_t board_type;
uint8_t board_revision; uint8_t board_revision;
uint8_t commit_tag_name[26]; uint8_t commit_tag_name[26];
uint8_t sha1sum[20]; uint8_t sha1sum[20];
uint8_t uavosha1[20]; uint8_t uavosha1[20];
uint8_t pad[20]; uint8_t pad[20];
}; };
#if (defined(__MACH__) && defined(__APPLE__)) #if (defined(__MACH__) && defined(__APPLE__))
@ -60,16 +60,12 @@ const struct fw_version_info fw_version_blob __attribute__((used)) __attribute__
#else #else
const struct fw_version_info fw_version_blob __attribute__((used)) __attribute__((__section__(".fw_version_blob"))) = { const struct fw_version_info fw_version_blob __attribute__((used)) __attribute__((__section__(".fw_version_blob"))) = {
#endif #endif
.magic = { 'O','p','F','w' }, .magic = { 'O','p','F','w' },
.commit_hash_prefix = 0x${HASH8}, .commit_hash_prefix = 0x${HASH8},
.timestamp = ${UNIXTIME}, .timestamp = ${UNIXTIME},
.board_type = ${BOARD_TYPE}, .board_type = ${BOARD_TYPE},
.board_revision = ${BOARD_REVISION}, .board_revision = ${BOARD_REVISION},
.commit_tag_name = "${FWTAG}", .commit_tag_name = "${FWTAG}",
.sha1sum = { ${SHA1} }, .sha1sum = { ${SHA1} },
.uavosha1 = { ${UAVOSHA1} }, .uavosha1 = { ${UAVOSHA1} },
}; };
/**
* @}
*/

4
make/.gitattributes vendored
View File

@ -6,8 +6,6 @@
*.py text eol=lf *.py text eol=lf
*.sh text eol=lf *.sh text eol=lf
/doxygen/*.cfg text eol=lf /doxygen/* text eol=lf
/templates/firmware_info.c.template text eol=lf
/templates/gcs_version_info.h.template text eol=crlf
/templates/*.txt text eol=crlf /templates/*.txt text eol=crlf
/uncrustify/*.cfg text eol=lf /uncrustify/*.cfg text eol=lf

View File

@ -133,10 +133,10 @@ endef
define OPFW_TEMPLATE define OPFW_TEMPLATE
FORCE: FORCE:
$(1).firmware_info.c: $(1) $(ROOT_DIR)/make/templates/firmware_info.c.template FORCE $(1).firmware_info.c: $(1) $(ROOT_DIR)/flight/templates/firmware_info.c.template FORCE
@$(ECHO) $(MSG_FWINFO) $$(call toprel, $$@) @$(ECHO) $(MSG_FWINFO) $$(call toprel, $$@)
$(V1) $(VERSION_INFO) \ $(V1) $(VERSION_INFO) \
--template=$(ROOT_DIR)/make/templates/firmware_info.c.template \ --template=$(ROOT_DIR)/flight/templates/firmware_info.c.template \
--outfile=$$@ \ --outfile=$$@ \
--image=$(1) \ --image=$(1) \
--type=$(2) \ --type=$(2) \