This commit adds support for reading and parsing binary descriptors.
It can be used for reading the descriptors of another image, or for
iterating over one's own descriptors.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Add a Kconfig symbol to limit the maximum size of a descriptor's
data, enforced by a build assertion.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Prior to this fix the descriptors end tag was placed in the binary
using LONG. This was wrong because the tag is of type short, and
the size of the descriptor (0), should have also been placed.
It so happened that on little endian machines the incorrect linker
script yielded correct results, as the extra zeros added to make
the value a long ended up as the correct byte sequence
(FF FF 00 00). On big endian machines however, the wrong sequence
is generated (00 00 FF FF).
This patch correct this issue.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
This patch adds bindesc support for the build version values for the
kernel and application - BUILD_VERSION and APP_BUILD_VERSION.
The kernel's BUILD_VERSION can be overridden at build time.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.
Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.
Updated the includes path of in-tree sources accordingly.
Most of the changes here are scripted, check the PR for more
info.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
With CONFIG_BINDESC_BUILD_TIME_ALWAYS_REBUILD a re-run was called for
the entire project.
This can result in issues with the zephyr linker mechanism.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
BINDESC can be used with any POSIX arch based target,
not just native_posix.
Fix the kconfig filter and the sample yaml filter.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use UTC time by default, and add the option to use local time.
Also, change the default formats to comply with ISO-8601.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Binary descriptors are data objects stored at a known location
of a binary image. They can be read by an external tool or image,
and are used mostly for build information: version, build time,
host information, etc.
This commit adds initial support for defining such descriptors.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>