coreboot-kgpe-d16/util/nvramtool
Evgeny Zinoviev c3566b67f6 nvramtool: Fix building on Linux systems with musl libc
Current implementation only supports glibc (by looking for __GLIBC__)
and fails to build on systems with alternative libc implementations,
such as musl; sys/io.h is never included, there are no outb/inb
functions which results in undefined references at linking stage.

Using __linux__ instead of __GLIBC__ to test whether the system is Linux
seems to be a more proper way to detect Linux and it also fixes
nvramtool compilation on musl systems.

Tested on Gentoo Linux with musl 1.2.2 (builds and works fine) and Void
Linux with glibc (still builds and works fine).

Change-Id: Idcdc3a033b40f16a6053209813f1e06209ee459a
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48757
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-06-23 12:19:52 +00:00
..
accessors nvramtool: Fix building on Linux systems with musl libc 2022-06-23 12:19:52 +00:00
cli util: Use SPDX headers 2020-05-11 19:38:40 +00:00
.gitignore .gitignore: Ignore .test/.dependencies globally 2020-10-31 18:21:36 +00:00
COPYING
ChangeLog
DISCLAIMER util/nvramtool: Remove license boiler plate from DISCLAIMER file, too 2020-05-11 19:40:01 +00:00
Makefile util: Allow overriding gcc as default host compiler 2020-06-04 08:11:48 +00:00
Makefile.inc util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
README
cbfs.c util/nvramtool: Remove "this file is part of" lines 2020-05-11 17:11:06 +00:00
cbfs.h cbfs: Rename TYPE_FIT to TYPE_FIT_PAYLOAD 2022-06-01 19:45:08 +00:00
cmos_lowlevel.c util: Use SPDX headers 2020-05-11 19:38:40 +00:00
cmos_lowlevel.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
cmos_ops.c util: Use SPDX headers 2020-05-11 19:38:40 +00:00
cmos_ops.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
common.c util: Use SPDX headers 2020-05-11 19:38:40 +00:00
common.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
compute_ip_checksum.c
coreboot_tables.h coreboot_tables: Replace 'struct lb_uint64' with lb_uint64_t 2022-04-14 22:27:50 +00:00
description.md
hexdump.c util: Use SPDX headers 2020-05-11 19:38:40 +00:00
hexdump.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
input_file.c util: Use SPDX headers 2020-05-11 19:38:40 +00:00
input_file.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
ip_checksum.h
layout.c util: Use SPDX headers 2020-05-11 19:38:40 +00:00
layout.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
lbtable.c coreboot_tables: Replace 'struct lb_uint64' with lb_uint64_t 2022-04-14 22:27:50 +00:00
lbtable.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
nvramtool.spec
reg_expr.c util: Use SPDX headers 2020-05-11 19:38:40 +00:00
reg_expr.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
win32mmap.c

README

Summary of Operation
--------------------
nvramtool is a utility for reading/writing coreboot parameters and
displaying information from the coreboot table.  It is intended for x86-based
systems (both 32-bit and 64-bit) that use coreboot.

The coreboot table resides in low physical memory, and may be accessed
through the /dev/mem interface.  It is created at boot time by coreboot, and
contains various system information such as the type of mainboard in use.  It
specifies locations in the CMOS (nonvolatile RAM) where the coreboot
parameters are stored.

For information about coreboot, see https://www.coreboot.org/.

Ideas for Future Improvements
-----------------------------
1.  Move the core functionality of this program into a shared library.
2.  Consider adding options for displaying other BIOS-provided information
    such as the MP table, ACPI table, PCI IRQ routing table, etc.