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 string "Date-Time format" 78 default "%Y-%m-%dT%H:%M:%S%z" 79 help 80 Format of the build time string. This value is passed to cmake's string(TIMESTAMP ...) 81 function, so refer to string's documentation for more info on the different formats. 82 This can also be used to set a specific time, when trying to reproduce an image. For 83 example, setting the format to "2023-02-05T00:07:04+0000" will set it as the build time, 84 regardless of the actual build time. 85 If BINDESC_BUILD_TIME_USE_LOCAL_TIME is enabled, the time is the local time, else 86 it is UTC time. 87 Example of the default format: 2023-09-29T17:43:14+0000. 88 Note: the default format complies with ISO-8601. 89 90config BINDESC_BUILD_DATE_STRING_FORMAT 91 string "Date format" 92 default "%Y-%m-%d" 93 help 94 Format of the build date string. This value is passed to cmake's string(TIMESTAMP ...) 95 function, so refer to string's documentation for more info on the different formats. 96 This can also be used to set a specific time, when trying to reproduce an image. For 97 example, setting the format to "2023-02-05" will set it as the build time, 98 regardless of the actual build time. 99 Example of the default format: 2023-02-05 100 Note: the default format complies with ISO-8601. 101 102config BINDESC_BUILD_TIME_STRING_FORMAT 103 string "Time format" 104 default "T%H:%M:%S%z" 105 help 106 Format of the build time string. This value is passed to cmake's string(TIMESTAMP ...) 107 function, so refer to string's documentation for more info on the different formats. 108 This can also be used to set a specific time, when trying to reproduce an image. For 109 example, setting the format to "T00:07:04+0000" will set it as the build time, 110 regardless of the actual build time. 111 Example of the default format: T00:07:04+0000. 112 Note: the default format complies with ISO-8601. 113 114endif # BINDESC_DEFINE_BUILD_TIME 115