2 ******************************************************************************
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011.
6 * @brief Firmware version info file autogenerated using template
9 * @see The GNU Public License (GPL) Version 3
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #include <pios_board_info.h>
31 * We have 100 bytes for the whole description.
34 * 4 bytes: header: "OpFw".
35 * 4 bytes: GIT commit tag (short version of SHA1).
36 * 4 bytes: Unix timestamp of compile time.
37 * 2 bytes: target platform. Should follow same rule as BOARD_TYPE and BOARD_REVISION in board define files.
38 * 26 bytes: commit tag if it is there, otherwise branch name. '-dirty' may be added if needed. Zero-padded.
39 * 20 bytes: SHA1 sum of the firmware.
40 * 20 bytes: SHA1 sum of the uavo definitions.
41 * 20 bytes: free for now.
45 #if (defined(__MACH__) && defined(__APPLE__))
46 const struct fw_version_info fw_version_blob __attribute__((used)) __attribute__((__section__("__TEXT,.fw_version_blob"))) = {
48 const struct fw_version_info fw_version_blob __attribute__((used)) __attribute__((__section__(".fw_version_blob"))) = {
50 .magic = { 'O','p','F','w' },
51 .commit_hash_prefix = 0x${HASH8},
52 .timestamp = ${UNIXTIME},
53 .board_type = ${BOARD_TYPE},
54 .board_revision = ${BOARD_REVISION},
55 .commit_tag_name = "${FWTAG}",
56 .sha1sum = { ${IMAGE_HASH_ARRAY} },
57 .uavosha1 = { ${UAVO_HASH_ARRAY} },