c3566b67f6
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> |
||
---|---|---|
.. | ||
accessors | ||
cli | ||
.gitignore | ||
COPYING | ||
ChangeLog | ||
DISCLAIMER | ||
Makefile | ||
Makefile.inc | ||
README | ||
cbfs.c | ||
cbfs.h | ||
cmos_lowlevel.c | ||
cmos_lowlevel.h | ||
cmos_ops.c | ||
cmos_ops.h | ||
common.c | ||
common.h | ||
compute_ip_checksum.c | ||
coreboot_tables.h | ||
description.md | ||
hexdump.c | ||
hexdump.h | ||
input_file.c | ||
input_file.h | ||
ip_checksum.h | ||
layout.c | ||
layout.h | ||
lbtable.c | ||
lbtable.h | ||
nvramtool.spec | ||
reg_expr.c | ||
reg_expr.h | ||
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.