1# Copyright (c) 2023 Yonatan Schachter 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig BINDESC_DEFINE_BUILD_TIME 5 bool "Build Time binary descriptors" 6 help 7 Add the build time binary descriptors 8 9if BINDESC_DEFINE_BUILD_TIME 10 11config BINDESC_BUILD_TIME_USE_LOCAL_TIME 12 bool "Use local time" 13 help 14 If enabled, the build time used for the descriptors will express 15 the local time, rather than UTC. 16 17config BINDESC_BUILD_TIME_ALWAYS_REBUILD 18 bool "Always rebuild" 19 default y 20 help 21 If enabled, the file containing the build time definitions will 22 always be rebuilt. This results in the timestamp always being 23 accurate, but also in slightly longer build times. 24 25config BINDESC_BUILD_TIME_YEAR 26 bool "Year of build" 27 help 28 The year the image was compiled, such as 2023 29 30config BINDESC_BUILD_TIME_MONTH 31 bool "Month of build" 32 help 33 The month the image was compiled, such as 5 (May) 34 35config BINDESC_BUILD_TIME_DAY 36 bool "Day of build" 37 help 38 The day of the month the image was compiled, such as 9 39 40config BINDESC_BUILD_TIME_HOUR 41 bool "Hour of build" 42 help 43 The hour of the day the image was compiled, such as 13 in 13:34:52 44 45config BINDESC_BUILD_TIME_MINUTE 46 bool "Minute of build" 47 help 48 The minute the image was compiled, such as 34 in 13:34:52 49 50config BINDESC_BUILD_TIME_SECOND 51 bool "Second of build" 52 help 53 The second the image was compiled, such as 52 in 13:34:52 54 55config BINDESC_BUILD_TIME_UNIX 56 bool "Build time as UNIX time" 57 help 58 The UNIX time at which the image was compiled. This is an integer 59 counting the seconds since midnight of January 1st 1970 60 61config BINDESC_BUILD_DATE_TIME_STRING 62 bool "Build date and time as string" 63 help 64 The date and time of compilation as a string, such as "2023-09-29T17:43:14+0000" 65 66config BINDESC_BUILD_DATE_STRING 67 bool "Build date as string" 68 help 69 The date of compilation as a string, such as "2023-09-29" 70 71config BINDESC_BUILD_TIME_STRING 72 bool "Build time as string" 73 help 74 The time of compilation as a string, such as "T17:43:14+0000" 75 76config BINDESC_BUILD_DATE_TIME_STRING_FORMAT 77 depends on BINDESC_BUILD_DATE_TIME_STRING 78 string "Date-Time format" 79 default "%Y-%m-%dT%H:%M:%S%z" 80 help 81 Format of the build time string. This value is passed to cmake's string(TIMESTAMP ...) 82 function, so refer to string's documentation for more info on the different formats. 83 This can also be used to set a specific time, when trying to reproduce an image. For 84 example, setting the format to "2023-02-05T00:07:04+0000" will set it as the build time, 85 regardless of the actual build time. 86 If BINDESC_BUILD_TIME_USE_LOCAL_TIME is enabled, the time is the local time, else 87 it is UTC time. 88 Example of the default format: 2023-09-29T17:43:14+0000. 89 Note: the default format complies with ISO-8601. 90 91config BINDESC_BUILD_DATE_STRING_FORMAT 92 depends on BINDESC_BUILD_DATE_STRING 93 string "Date format" 94 default "%Y-%m-%d" 95 help 96 Format of the build date string. This value is passed to cmake's string(TIMESTAMP ...) 97 function, so refer to string's documentation for more info on the different formats. 98 This can also be used to set a specific time, when trying to reproduce an image. For 99 example, setting the format to "2023-02-05" will set it as the build time, 100 regardless of the actual build time. 101 Example of the default format: 2023-02-05 102 Note: the default format complies with ISO-8601. 103 104config BINDESC_BUILD_TIME_STRING_FORMAT 105 depends on BINDESC_BUILD_TIME_STRING 106 string "Time format" 107 default "T%H:%M:%S%z" 108 help 109 Format of the build time string. This value is passed to cmake's string(TIMESTAMP ...) 110 function, so refer to string's documentation for more info on the different formats. 111 This can also be used to set a specific time, when trying to reproduce an image. For 112 example, setting the format to "T00:07:04+0000" will set it as the build time, 113 regardless of the actual build time. 114 Example of the default format: T00:07:04+0000. 115 Note: the default format complies with ISO-8601. 116 117endif # BINDESC_DEFINE_BUILD_TIME 118