summaryrefslogtreecommitdiffstats
path: root/include/image-metadata.h
Commit message (Collapse)AuthorAgeFilesLines
* imd: add buildsystem version to metadataSteffen Trumtrar2020-09-281-0/+1
| | | | | | | | To have information about the exact state of a barebox binary from userspace, add the buildsystem version to the IMD. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spdx'Sascha Hauer2020-02-181-0/+1
|\
| * include: add SPDX GPL-2.0-only license tags for files without licensing ↵Roland Hieber2020-02-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | information According to our /README, GPL-2.0-only applies for the whole project except noted otherwise. Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imd: add support for checksum generation/verificationSteffen Trumtrar2020-02-101-1/+37
|/ | | | | | | | | | Add a new imd type "checksum". This type consists of the CRC32 checksum of the whole barebox image minus the checksum itself. The checksum can be written to the imd field with the bareboximd host-tool. It can be verified with said tool or with "imd" on the target. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imd: create new helper macro to add data from oftree to image meta dataUwe Kleine-König2019-02-251-0/+4
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imd: Make all pointers into image constSascha Hauer2018-01-301-10/+11
| | | | | | | The IMD code should be readonly and never modify any pointers. Make all pointers const so that const pointers can be passed in to IMD. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imd: Add function to read parametersSascha Hauer2016-04-011-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imd: export functionsSascha Hauer2016-04-011-0/+5
| | | | | | | To make the image metadata API usable for external users export some functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add support for metadata in barebox imagesSascha Hauer2014-08-071-0/+117
It's often useful to get some information about a barebox image before starting or flashing it. This patch introduces barebox Image MetaData (IMD). When enabled a barebox image will contain a list of tags containing the desired information. We have tags for: - the barebox release (2014.07.0-00160-g035de50-dirty) - the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014) - the board model the image is intended for - the device tree toplevel compatible property Also there is an additional generic key-value store which stores parameters for which no dedicated tag exists. In this patch it is used for the memory size an image supports. Since there is no fixed offset in a barebox image which can be used for storing the information, the metadata is stored somewhere in the image and found by iterating over the image. This works for most image types, but obviously not for SoC images which are encoded or encrypted in some way. There is a 'imd' tool compiled from the same sources for barebox, for the compile host and for the target, so the metadata information is available whereever needed. For device tree boards the model and of_compatible tags are automatically generated. Example output of the imd tool for a Phytec phyFLEX image: build: #889 Wed Jul 30 16:08:54 CEST 2014 release: 2014.07.0-00167-g6b2070d-dirty parameter: memsize=1024 of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>