Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: version: option to enable GNU build ID #51532

Closed

Commits on Jan 8, 2023

  1. linker: add Kconfig option to enable --build-id

    Adds a Kconfig option to enable the generation of the GNU build ID from
    the final `zephyr.elf` file. This build ID can be used to uniquely
    identify a firmware image.
    
    The `--build-id` option is available for the `ld` and `ldd` linkers,
    which are used by all in-tree compilers except `arcmwdt` and `armclang`.
    
    Inspired by the following blog post:
      https://interrupt.memfault.com/blog/gnu-build-id-for-firmware
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Jan 8, 2023
    Configuration menu
    Copy the full SHA
    153d522 View commit details
    Browse the repository at this point in the history
  2. kernel: version: helper to extract GNU build ID

    Adds a helper to `zephyr/kernel_version.h` to retrieve the GNU build ID.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Jan 8, 2023
    Configuration menu
    Copy the full SHA
    65362fa View commit details
    Browse the repository at this point in the history
  3. tests: kernel: test sys_gnu_build_id_get

    Test that `sys_gnu_build_id_get` returns a valid pointer, and the entire
    hash is not 0. The expected structure of the .elf note is validated by
    an assert inside the function implementation.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Jan 8, 2023
    Configuration menu
    Copy the full SHA
    b7f72f3 View commit details
    Browse the repository at this point in the history