Rebrand to flashprog and update URLs
Mostly automated `sed` work. As of now, URLs to the old wiki are broken
either way, so changing them shouldn't hurt. Other URLs (e.g. to mailing
list archives) were hopefully filtered correctly.
Change-Id: I9d43bfd0e675eff2fcbad05f304b9ce9f5006b08
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashrom-stable/+/21
diff --git a/.gitignore b/.gitignore
index dedcfa1..63ad6b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,12 +5,12 @@
/.dependencies
/.libdeps
/build_details.txt
-/flashrom
-/flashrom-*
-/flashrom.exe
-/flashrom.8
-/libflashrom.a
-/libflashrom-doc/
+/flashprog
+/flashprog-*
+/flashprog.exe
+/flashprog.8
+/libflashprog.a
+/libflashprog-doc/
/versioninfo.inc
/util/ich_descriptors_tool/ich_descriptors_tool
diff --git a/Documentation/building_meson.md b/Documentation/building_meson.md
index 74dc65b..e0c39a0 100644
--- a/Documentation/building_meson.md
+++ b/Documentation/building_meson.md
@@ -28,7 +28,7 @@
```
meson builddir -D<your_options>
```
-- __builddir__ is the directory in which flashrom will be build
+- __builddir__ is the directory in which flashprog will be build
- for all available options see `meson_options.txt`
## Compile
@@ -59,7 +59,7 @@
### NixOS / Nixpkgs
```
-nix-shell <flashrom_source>/util/shell.nix
+nix-shell <flashprog_source>/util/shell.nix
```
or
```
diff --git a/Documentation/mysteries_intel.txt b/Documentation/mysteries_intel.txt
index 60ad21a..6d38135 100644
--- a/Documentation/mysteries_intel.txt
+++ b/Documentation/mysteries_intel.txt
@@ -13,10 +13,10 @@
When enabled, the SPI flash can only be written when the system is operating in
in System Management Mode (SMM). In other words, only certain code that was
installed by the BIOS can write to the flash chip. Programs that run in OS
-context such as flashrom can still read the flash chip, but cannot write to the
+context such as flashprog can still read the flash chip, but cannot write to the
flash chip.
-Flashrom will attempt to detect this and print a warning such as the following:
+Flashprog will attempt to detect this and print a warning such as the following:
"Warning: BIOS region SMM protection is enabled!"
Many vendor-supplied firmware update utilities do not actually write to the ROM;
@@ -31,7 +31,7 @@
the whole flash chip, but some boards ship with a different configuration.
It seems that in descriptor mode all addresses outside the used regions can not
be accessed whatsoever. This is not specified anywhere publicly as far as we
- could tell. flashrom does not handle this explicitly yet. It will just fail
+ could tell. flashprog does not handle this explicitly yet. It will just fail
when trying to touch an address outside of any region.
See also http://www.flashrom.org/pipermail/flashrom/2011-August/007606.html
@@ -85,7 +85,7 @@
datasheets. The actually communication is documented in a whitepaper [DCMI] and
an outdated as well as a current Linux kernel implementation (currently in
staging/ exist [KERNEL]. There exists a patch that re-implements this in user
- space (as part of flashrom).
+ space (as part of flashprog).
== Problems ==
The problem is that only very few higher level protocols are documented publicly,
diff --git a/Documentation/serprog-protocol.txt b/Documentation/serprog-protocol.txt
index 6b7e7e3..e486763 100644
--- a/Documentation/serprog-protocol.txt
+++ b/Documentation/serprog-protocol.txt
@@ -16,7 +16,7 @@
0x02 Query supported commands bitmap none ACK + 32 bytes (256 bits) of supported cmds flags
0x03 Query programmer name none ACK + 16 bytes string (null padding) / NAK
0x04 Query serial buffer size none ACK + 16bit size / NAK
-0x05 Query supported bustypes none ACK + 8-bit flags (as per flashrom) / NAK
+0x05 Query supported bustypes none ACK + 8-bit flags / NAK
0x06 Query connected address lines none ACK + 8bit line count / NAK
0x07 Query operation buffer size none ACK + 16bit size / NAK
0x08 Query maximum write-n length none ACK + 24bit length (0==2^24) / NAK
@@ -92,7 +92,7 @@
About mandatory commands:
The only truly mandatory commands for any device are 0x00, 0x01, 0x02 and 0x10,
but one can't really do anything with these commands.
- Support for the following commands is necessary for flashrom to operate properly:
+ Support for the following commands is necessary for flashprog to operate properly:
S_CMD_Q_SERBUF, S_CMD_Q_OPBUF, S_CMD_Q_WRNMAXLEN, S_CMD_R_BYTE,
S_CMD_R_NBYTES, S_CMD_O_INIT, S_CMD_O_WRITEB, S_CMD_O_WRITEN,
S_CMD_O_DELAY, S_CMD_O_EXEC.
diff --git a/Doxyfile b/Doxyfile
index 6906cc8..5fdf5e8 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = "libflashrom"
+PROJECT_NAME = "libflashprog"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
@@ -58,7 +58,7 @@
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = "libflashrom-doc"
+OUTPUT_DIRECTORY = "libflashprog-doc"
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -780,9 +780,9 @@
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = libflashrom.c \
- libflashrom.h \
- flashrom.c \
+INPUT = libflashprog.c \
+ libflashprog.h \
+ flashprog.c \
layout.c \
# This tag can be used to specify the character encoding of the source files
diff --git a/Makefile b/Makefile
index 388f3c8..e51fa25 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@
# GNU General Public License for more details.
#
-PROGRAM = flashrom
+PROGRAM = flashprog
###############################################################################
# Defaults for the toolchain.
@@ -37,20 +37,20 @@
BUILD_DETAILS_FILE ?= build_details.txt
# The following parameter changes the default programmer that will be used if there is no -p/--programmer
-# argument given when running flashrom. The predefined setting does not enable any default so that every
+# argument given when running flashprog. The predefined setting does not enable any default so that every
# user has to declare the programmer he wants to use on every run. The rationale for this to be not set
# (to e.g. the internal programmer) is that forgetting to specify this when working with another programmer
# easily puts the system attached to the default programmer at risk (e.g. you want to flash coreboot to another
# system attached to an external programmer while the default programmer is set to the internal programmer, and
# you forget to use the -p parameter. This would (try to) overwrite the existing firmware of the computer
-# running flashrom). Please do not enable this without thinking about the possible consequences. Possible
-# values can be found when running 'flashrom --list-supported' under the 'Supported programmers' section.
+# running flashprog). Please do not enable this without thinking about the possible consequences. Possible
+# values can be found when running 'flashprog --list-supported' under the 'Supported programmers' section.
CONFIG_DEFAULT_PROGRAMMER_NAME ?=
# The following adds a default parameter for the default programmer set above (only).
CONFIG_DEFAULT_PROGRAMMER_ARGS ?=
# Example: compiling with
# make CONFIG_DEFAULT_PROGRAMMER_NAME=serprog CONFIG_DEFAULT_PROGRAMMER_ARGS="dev=/dev/ttyUSB0:1500000"
-# would make executing './flashrom' (almost) equivialent to './flashrom -p serprog:dev=/dev/ttyUSB0:1500000'.
+# would make executing './flashprog' (almost) equivialent to './flashprog -p serprog:dev=/dev/ttyUSB0:1500000'.
# The user can provide CPP, C and LDFLAGS and the Makefile will extend these
override CPPFLAGS := $(CPPFLAGS)
@@ -294,10 +294,10 @@
# FIXME: Should we check for Cygwin/MSVC as well?
ifeq ($(TARGET_OS), MinGW)
# MinGW doesn't have the ffs() function, but we can use gcc's __builtin_ffs().
-FLASHROM_CFLAGS += -Dffs=__builtin_ffs
+FLASHPROG_CFLAGS += -Dffs=__builtin_ffs
# Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that
# for MinGW. See http://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/ */
-FLASHROM_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
+FLASHPROG_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
# For now we disable all PCI-based programmers on Windows/MinGW (no libpci).
$(call mark_unsupported,$(DEPENDS_ON_LIBPCI))
@@ -311,8 +311,8 @@
ifeq ($(TARGET_OS), libpayload)
ifeq ($(MAKECMDGOALS),)
-.DEFAULT_GOAL := libflashrom.a
-$(info Setting default goal to libflashrom.a)
+.DEFAULT_GOAL := libflashprog.a
+$(info Setting default goal to libflashprog.a)
endif
$(call mark_unsupported,CONFIG_DUMMY)
# libpayload does not provide the romsize field in struct pci_dev that the atapromise code requires.
@@ -360,10 +360,10 @@
endif
ifeq ($(ENDIAN), little)
-FEATURE_FLAGS += -D'__FLASHROM_LITTLE_ENDIAN__=1'
+FEATURE_FLAGS += -D'__FLASHPROG_LITTLE_ENDIAN__=1'
endif
ifeq ($(ENDIAN), big)
-FEATURE_FLAGS += -D'__FLASHROM_BIG_ENDIAN__=1'
+FEATURE_FLAGS += -D'__FLASHPROG_BIG_ENDIAN__=1'
endif
# PCI port I/O support is unimplemented on PPC/MIPS/SPARC and unavailable on ARM.
@@ -392,7 +392,7 @@
###############################################################################
# Library code.
-LIB_OBJS = libflashrom.o layout.o flashrom.o udelay.o parallel.o programmer.o programmer_table.o \
+LIB_OBJS = libflashprog.o layout.o flashprog.o udelay.o parallel.o programmer.o programmer_table.o \
helpers.o helpers_fileio.o ich_descriptors.o fmap.o platform/endian_$(ENDIAN).o platform/memaccess.o
@@ -403,11 +403,11 @@
# By default version information will be fetched from Git if available.
# Otherwise, versioninfo.inc stores the metadata required to build a
-# packaged flashrom. It is generated by the export, tag and branch rules.
+# packaged flashprog. It is generated by the export, tag and branch rules.
VERSION := $(shell ./util/getversion.sh --version)
MAN_DATE := $(shell ./util/getversion.sh --man-date)
-SCMDEF := -D'FLASHROM_VERSION="$(VERSION)"'
+SCMDEF := -D'FLASHPROG_VERSION="$(VERSION)"'
# Inform user of the version string
ifeq ($(filter branch tag,$(MAKECMDGOALS)), )
@@ -837,7 +837,7 @@
USE_X86_PORT_IO := $(if $(call filter_deps,$(DEPENDS_ON_X86_PORT_IO)),yes,no)
ifeq ($(USE_X86_PORT_IO), yes)
-FEATURE_FLAGS += -D'__FLASHROM_HAVE_OUTB__=1'
+FEATURE_FLAGS += -D'__FLASHPROG_HAVE_OUTB__=1'
PROGRAMMER_OBJS += hwaccess_x86_io.o
endif
@@ -924,7 +924,7 @@
endif
config:
- @echo Building flashrom version $(VERSION)
+ @echo Building flashprog version $(VERSION)
@echo -n "C compiler found: "
@if [ $(CC_WORKING) = yes ]; \
then $(CC) --version 2>/dev/null | head -1; \
@@ -995,12 +995,12 @@
fi
%.o: %.c | config
- $(CC) -MMD $(CFLAGS) $(CPPFLAGS) $(FLASHROM_CFLAGS) $(FEATURE_FLAGS) $(SCMDEF) -o $@ -c $<
+ $(CC) -MMD $(CFLAGS) $(CPPFLAGS) $(FLASHPROG_CFLAGS) $(FEATURE_FLAGS) $(SCMDEF) -o $@ -c $<
-$(PROGRAM)$(EXEC_SUFFIX): $(CLI_OBJS) libflashrom.a
+$(PROGRAM)$(EXEC_SUFFIX): $(CLI_OBJS) libflashprog.a
$(CC) -o $@ $^ $(LDFLAGS)
-libflashrom.a: $(OBJS)
+libflashprog.a: $(OBJS)
$(AR) rcs $@ $^
$(RANLIB) $@
@@ -1009,16 +1009,16 @@
$(PROGRAM).8: $(PROGRAM).8.tmpl
@# Add the man page change date and version to the man page
- @sed -e 's#.TH FLASHROM 8 .*#.TH FLASHROM 8 "$(MAN_DATE)" "flashrom-stable-$(VERSION)" "$(MAN_DATE)"#' <$< >$@
+ @sed -e 's#.TH FLASHPROG 8 .*#.TH FLASHPROG 8 "$(MAN_DATE)" "flashprog-$(VERSION)" "$(MAN_DATE)"#' <$< >$@
strip: $(PROGRAM)$(EXEC_SUFFIX)
$(STRIP) $(STRIP_ARGS) $(PROGRAM)$(EXEC_SUFFIX)
# Make sure to add all names of generated binaries here.
-# This includes all frontends and libflashrom.
+# This includes all frontends and libflashprog.
# We don't use EXEC_SUFFIX here because we want to clean everything.
clean:
- rm -f $(PROGRAM) $(PROGRAM).exe libflashrom.a $(filter-out Makefile.d, $(wildcard *.d *.o platform/*.d platform/*.o)) \
+ rm -f $(PROGRAM) $(PROGRAM).exe libflashprog.a $(filter-out Makefile.d, $(wildcard *.d *.o platform/*.d platform/*.o)) \
$(PROGRAM).8 $(PROGRAM).8.html $(BUILD_DETAILS_FILE)
@+$(MAKE) -C util/ich_descriptors_tool/ clean
@@ -1028,11 +1028,11 @@
$(INSTALL) -m 0755 $(PROGRAM)$(EXEC_SUFFIX) $(DESTDIR)$(PREFIX)/sbin
$(INSTALL) -m 0644 $(PROGRAM).8 $(DESTDIR)$(MANDIR)/man8
-libinstall: libflashrom.a include/libflashrom.h
+libinstall: libflashprog.a include/libflashprog.h
mkdir -p $(DESTDIR)$(PREFIX)/lib
- $(INSTALL) -m 0644 libflashrom.a $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) -m 0644 libflashprog.a $(DESTDIR)$(PREFIX)/lib
mkdir -p $(DESTDIR)$(PREFIX)/include
- $(INSTALL) -m 0644 include/libflashrom.h $(DESTDIR)$(PREFIX)/include
+ $(INSTALL) -m 0644 include/libflashprog.h $(DESTDIR)$(PREFIX)/include
versioninfo:
# Generate versioninfo.inc containing metadata that would not be available in exported sources otherwise.
@@ -1051,7 +1051,7 @@
@git tag -s $(RELEASE)
# No spaces in release names unless set explicitly
-RELEASENAME ?= flashrom-stable-$(shell echo "$(VERSION)" | sed -e 's/ /_/')
+RELEASENAME ?= flashprog-$(shell echo "$(VERSION)" | sed -e 's/ /_/')
_export: EXPORT_VERSIONINFO := $(EXPORTDIR)/$(RELEASENAME)/versioninfo.inc
_export: $(PROGRAM).8
diff --git a/Makefile.d/arch_test.h b/Makefile.d/arch_test.h
index 04aa121..4ca2ca5 100644
--- a/Makefile.d/arch_test.h
+++ b/Makefile.d/arch_test.h
@@ -19,37 +19,37 @@
*/
#if defined (__i386__) || defined (__x86_64__) || defined(__amd64__)
- #define __FLASHROM_ARCH__ "x86"
+ #define __FLASHPROG_ARCH__ "x86"
#elif defined (__mips) || defined (__mips__) || defined (__MIPS__) || defined (mips)
- #define __FLASHROM_ARCH__ "mips"
+ #define __FLASHPROG_ARCH__ "mips"
#elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__) || defined(__POWERPC__) || \
defined(__ppc__) || defined(__ppc64__) || defined(_M_PPC) || defined(_ARCH_PPC) || \
defined(_ARCH_PPC64) || defined(__ppc)
- #define __FLASHROM_ARCH__ "ppc"
+ #define __FLASHPROG_ARCH__ "ppc"
#elif defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_ARM) || defined(_M_ARM) || defined(__arm) || \
defined(__aarch64__)
- #define __FLASHROM_ARCH__ "arm"
+ #define __FLASHPROG_ARCH__ "arm"
#elif defined (__sparc__) || defined (__sparc)
- #define __FLASHROM_ARCH__ "sparc"
+ #define __FLASHPROG_ARCH__ "sparc"
#elif defined (__alpha__)
- #define __FLASHROM_ARCH__ "alpha"
+ #define __FLASHPROG_ARCH__ "alpha"
#elif defined (__hppa__) || defined (__hppa)
- #define __FLASHROM_ARCH__ "hppa"
+ #define __FLASHPROG_ARCH__ "hppa"
#elif defined (__m68k__)
- #define __FLASHROM_ARCH__ "m68k"
+ #define __FLASHPROG_ARCH__ "m68k"
#elif defined (__riscv)
- #define __FLASHROM_ARCH__ "riscv"
+ #define __FLASHPROG_ARCH__ "riscv"
#elif defined (__sh__)
- #define __FLASHROM_ARCH__ "sh"
+ #define __FLASHPROG_ARCH__ "sh"
#elif defined(__s390__) || defined(__s390x__) || defined(__zarch__)
- #define __FLASHROM_ARCH__ "s390"
+ #define __FLASHPROG_ARCH__ "s390"
#elif defined(__arc__)
- #define __FLASHROM_ARCH__ "arc"
+ #define __FLASHPROG_ARCH__ "arc"
#elif defined(__ARC64__)
- #define __FLASHROM_ARCH__ "arc64"
+ #define __FLASHPROG_ARCH__ "arc64"
#elif defined(__e2k__)
- #define __FLASHROM_ARCH__ "e2k"
+ #define __FLASHPROG_ARCH__ "e2k"
#else
- #define __FLASHROM_ARCH__ "unknown"
+ #define __FLASHPROG_ARCH__ "unknown"
#endif
-__FLASHROM_ARCH__
+__FLASHPROG_ARCH__
diff --git a/Makefile.d/os_test.h b/Makefile.d/os_test.h
index 2cf6be0..eacd284 100644
--- a/Makefile.d/os_test.h
+++ b/Makefile.d/os_test.h
@@ -19,49 +19,49 @@
// Solaris
#if defined (__sun) && (defined(__i386) || defined(__amd64))
-#define __FLASHROM_OS__ "SunOS"
+#define __FLASHPROG_OS__ "SunOS"
// OS X
#elif defined(__MACH__) && defined(__APPLE__)
-#define __FLASHROM_OS__ "Darwin"
+#define __FLASHPROG_OS__ "Darwin"
// FreeBSD
#elif defined(__FreeBSD__)
-#define __FLASHROM_OS__ "FreeBSD"
+#define __FLASHPROG_OS__ "FreeBSD"
// FreeBSD with glibc-based userspace (e.g. Debian/kFreeBSD)
#elif defined(__FreeBSD_kernel__) && defined(__GLIBC__)
-#define __FLASHROM_OS__ "FreeBSD-glibc"
+#define __FLASHPROG_OS__ "FreeBSD-glibc"
// DragonFlyBSD
#elif defined(__DragonFly__)
-#define __FLASHROM_OS__ "DragonFlyBSD"
+#define __FLASHPROG_OS__ "DragonFlyBSD"
// NetBSD
#elif defined(__NetBSD__)
-#define __FLASHROM_OS__ "NetBSD"
+#define __FLASHPROG_OS__ "NetBSD"
// OpenBSD
#elif defined(__OpenBSD__)
-#define __FLASHROM_OS__ "OpenBSD"
+#define __FLASHPROG_OS__ "OpenBSD"
// DJGPP
#elif defined(__DJGPP__)
-#define __FLASHROM_OS__ "DOS"
+#define __FLASHPROG_OS__ "DOS"
// MinGW (always has _WIN32 available)
#elif defined(__MINGW32__)
-#define __FLASHROM_OS__ "MinGW"
+#define __FLASHPROG_OS__ "MinGW"
// Cygwin (usually without _WIN32)
#elif defined( __CYGWIN__)
-#define __FLASHROM_OS__ "Cygwin"
+#define __FLASHPROG_OS__ "Cygwin"
// libpayload
#elif defined(__LIBPAYLOAD__)
-#define __FLASHROM_OS__ "libpayload"
+#define __FLASHPROG_OS__ "libpayload"
// GNU Hurd
#elif defined(__gnu_hurd__)
-#define __FLASHROM_OS__ "Hurd"
+#define __FLASHPROG_OS__ "Hurd"
// Linux
#elif defined(__linux__)
// There are various flags in use on Android apparently. __ANDROID__ seems to be the most trustworthy.
#if defined(__ANDROID__)
- #define __FLASHROM_OS__ "Android"
+ #define __FLASHPROG_OS__ "Android"
#else
- #define __FLASHROM_OS__ "Linux"
+ #define __FLASHPROG_OS__ "Linux"
#endif
#else
-#define __FLASHROM_OS__ "unknown"
+#define __FLASHPROG_OS__ "unknown"
#endif
-__FLASHROM_OS__
+__FLASHPROG_OS__
diff --git a/README b/README
index b9857ad..e993a60 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
-------------------------------------------------------------------------------
-flashrom README
+flashprog README
-------------------------------------------------------------------------------
-flashrom is a utility for detecting, reading, writing, verifying and erasing
+flashprog is a utility for detecting, reading, writing, verifying and erasing
flash chips. It is often used to flash BIOS/EFI/coreboot/firmware images
in-system using a supported mainboard, but it also supports flashing of network
cards (NICs), SATA controller cards, and other external devices which can
@@ -12,25 +12,25 @@
SOIC16, WSON8, PLCC32, DIP32, TSOP32, and TSOP40 packages), which use various
protocols such as LPC, FWH, parallel flash, or SPI.
-Do not use flashrom on laptops (yet)! The embedded controller (EC) present in
+Do not use flashprog on laptops (yet)! The embedded controller (EC) present in
many laptops might interact badly with any attempts to communicate with the
flash chip and may brick your laptop.
Please make a backup of your flash chip before writing to it.
-Please see the flashrom(8) manpage.
+Please see the flashprog(8) manpage.
Packaging
---------
-To package flashrom and remove dependencies on Git, either use
+To package flashprog and remove dependencies on Git, either use
make export
or
make tarball
-'make export' will export all flashrom files from the Git repository at
-revision HEAD into a directory named "$EXPORTDIR/flashrom-$RELEASENAME"
+'make export' will export all flashprog files from the Git repository at
+revision HEAD into a directory named "$EXPORTDIR/flashprog-$RELEASENAME"
and will additionally add a "versioninfo.inc" file in that directory to
contain the Git revision of the exported tree and a date for the manual
page.
@@ -45,7 +45,7 @@
Build Instructions
------------------
-To build flashrom you need to install the following software:
+To build flashprog you need to install the following software:
* pciutils+libpci (if you want support for mainboard or PCI device flashing)
* libusb (if you want FT2232, Dediprog or USB-Blaster support)
@@ -111,24 +111,24 @@
You will need the libpci and libgetopt library source trees and
their compiled static libraries and header files installed in some
directory say libpci-libgetopt/, which will be later specified with
- LIBS_BASE parameter during flashrom compilation. Easiest way to
- handle it is to put pciutils, libgetopt and flashrom directories
+ LIBS_BASE parameter during flashprog compilation. Easiest way to
+ handle it is to put pciutils, libgetopt and flashprog directories
in one subdirectory. There will be an extra subdirectory libpci-libgetopt
created, which will contain compiled libpci and libgetopt.
- Download pciutils 3.5.6 and apply http://flashrom.org/File:Pciutils-3.5.6.patch.gz
+ Download pciutils 3.5.6 and apply http://flashprog.org/File:Pciutils-3.5.6.patch.gz
Compile pciutils, using following command line:
make ZLIB=no DNS=no HOST=i386-djgpp-djgpp CROSS_COMPILE=i586-pc-msdosdjgpp- \
PREFIX=/ DESTDIR=$PWD/../libpci-libgetopt \
STRIP="--strip-program=i586-pc-msdosdjgpp-strip -s" install install-lib
- Download and compile with 'make' http://flashrom.org/File:Libgetopt.tar.gz
+ Download and compile with 'make' http://flashprog.org/File:Libgetopt.tar.gz
Copy the libgetopt.a to ../libpci-libgetopt/lib and
getopt.h to ../libpci-libgetopt/include
- Enter the flashrom directory.
+ Enter the flashprog directory.
make CC=i586-pc-msdosdjgpp-gcc STRIP=i586-pc-msdosdjgpp-strip \
LIBS_BASE=../libpci-libgetopt/ HAS_LIBPCI=yes CONFIG_LIBPCI_LDFLAGS=-lpci \
@@ -136,9 +136,9 @@
If you like, you can compress the resulting executable with UPX:
- upx -9 flashrom.exe
+ upx -9 flashprog.exe
- To run flashrom.exe, download http://flashrom.org/File:Csdpmi7b.zip and
+ To run flashprog.exe, download http://flashprog.org/File:Csdpmi7b.zip and
unpack CWSDPMI.EXE into the current directory or one in PATH.
To cross-compile on Linux for Windows:
@@ -167,7 +167,7 @@
Installation
------------
-In order to install flashrom and the manpage into /usr/local, type:
+In order to install flashprog and the manpage into /usr/local, type:
make install
@@ -182,10 +182,10 @@
Contact
-------
-The official flashrom website is:
+The official flashprog website is:
- http://www.flashrom.org/
+ http://www.flashprog.org/
Available contact methods are
- https://www.flashrom.org/Contact
+ https://www.flashprog.org/Contact
diff --git a/amd_imc.c b/amd_imc.c
index 2095eb5..71a7889 100644
--- a/amd_imc.c
+++ b/amd_imc.c
@@ -184,7 +184,7 @@
if (!amd_imc_force)
programmer_may_write = false;
msg_pinfo("Writes have been disabled for safety reasons because the presence of the IMC\n"
- "was detected and it could interfere with accessing flash memory. Flashrom will\n"
+ "was detected and it could interfere with accessing flash memory. Flashprog will\n"
"try to disable it temporarily but even then this might not be safe:\n"
"when it is re-enabled and after a reboot it expects to find working code\n"
"in the flash and it is unpredictable what happens if there is none.\n"
diff --git a/amd_spi100.c b/amd_spi100.c
index fab16e3..14096ec 100644
--- a/amd_spi100.c
+++ b/amd_spi100.c
@@ -140,7 +140,7 @@
static int spi100_read(struct flashctx *const flash, uint8_t *buf, unsigned int start, unsigned int len)
{
const struct spi100 *const spi100 = flash->mst->spi.data;
- const chipsize_t chip_size = flashrom_flash_getsize(flash);
+ const chipsize_t chip_size = flashprog_flash_getsize(flash);
/* Don't consider memory mapping at all
if 4BA chips are not mapped as expected. */
diff --git a/at45db.c b/at45db.c
index 5f949bb..463442c 100644
--- a/at45db.c
+++ b/at45db.c
@@ -215,7 +215,7 @@
return 1;
}
-/* In case of non-power-of-two page sizes we need to convert the address flashrom uses to the address the
+/* In case of non-power-of-two page sizes we need to convert the address flashprog uses to the address the
* DataFlash chips use. The latter uses a segmented address space where the page address is encoded in the
* more significant bits and the offset within the page is encoded in the less significant bits. The exact
* partition depends on the page size.
diff --git a/atapromise.c b/atapromise.c
index 083239d..a6e2d12 100644
--- a/atapromise.c
+++ b/atapromise.c
@@ -36,7 +36,7 @@
* thus limiting the the programmer on this card to 32 kB. Without other controllers to test this programmer on,
* this is currently a hard limit. Note that ROM files for these controllers are 16 kB only.
*
- * Since flashrom does not support accessing flash chips larger than the size limit of the programmer (the
+ * Since flashprog does not support accessing flash chips larger than the size limit of the programmer (the
* tested Ultra100 uses a 128 kB MX29F001T chip), the chip size is hackishly adjusted in atapromise_limit_chip.
*/
diff --git a/bitbang_spi.c b/bitbang_spi.c
index 76f2642..610dc28 100644
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -105,8 +105,8 @@
(master->request_bus && !master->release_bus) ||
(!master->request_bus && master->release_bus)) {
msg_perr("Incomplete SPI bitbang master setting!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n");
- return ERROR_FLASHROM_BUG;
+ "Please report a bug at flashprog@flashprog.org\n");
+ return ERROR_FLASHPROG_BUG;
}
struct bitbang_spi_master_data *data = calloc(1, sizeof(struct bitbang_spi_master_data));
diff --git a/board_enable.c b/board_enable.c
index 76fbe8a..dc0dda2 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -622,8 +622,8 @@
/* The data sheet contradicts itself about max size. */
max_rom_decode.parallel = 1024 * 1024;
msg_pinfo("IT8705F with very unusual settings.\n"
- "Please send the output of \"flashrom -V -p internal\" to\n"
- "flashrom-stable@flashrom.org with \"IT8705: your board name: flashrom -V\"\n"
+ "Please send the output of \"flashprog -V -p internal\" to\n"
+ "flashprog@flashprog.org with \"IT8705: your board name: flashprog -V\"\n"
"as the subject to help us finish support for your Super I/O. Thanks.\n");
ret = 1;
} else if (tmp & 0x08) {
@@ -2317,7 +2317,7 @@
/*
* Below is the list of boards which need a special "board enable" code in
- * flashrom before their ROM chip can be accessed/written to.
+ * flashprog before their ROM chip can be accessed/written to.
*
* NOTE: Please add boards that _don't_ need such enables or don't work yet
* to the respective tables in print.c. Thanks!
@@ -2553,7 +2553,7 @@
const struct board_match *b = &board_matches[i];
if (b->vendor_name == NULL || b->board_name == NULL) {
msg_gerr("ERROR: Board enable #%d does not define a vendor and board name.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n", i);
+ "Please report a bug at flashprog@flashprog.org\n", i);
ret = 1;
continue;
}
@@ -2562,7 +2562,7 @@
((b->lb_vendor == NULL) ^ (b->lb_part == NULL)) ||
(b->max_rom_decode_parallel == 0 && b->enable == NULL)) {
msg_gerr("ERROR: Board enable for %s %s is misdefined.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
b->vendor_name, b->board_name);
ret = 1;
}
@@ -2631,7 +2631,7 @@
if (partmatch) {
/* More than one entry has a matching name. */
msg_perr("Board name \"%s\":\"%s\" and PCI IDs matched more than one board enable\n"
- "entry. Please report a bug at flashrom-stable@flashrom.org\n", vendor, model);
+ "entry. Please report a bug at flashprog@flashprog.org\n", vendor, model);
return NULL;
}
partmatch = board;
@@ -2714,7 +2714,7 @@
return 1;
}
msg_pwarn("NOTE: Running an untested board enable procedure.\n"
- "Please report success/failure to flashrom-stable@flashrom.org.\n");
+ "Please report success/failure to flashprog@flashprog.org.\n");
return 0;
}
diff --git a/buspirate_spi.c b/buspirate_spi.c
index 2909a3e..27bca8a 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -245,7 +245,7 @@
dev = NULL;
}
if (!dev) {
- msg_perr("No serial device given. Use flashrom -p buspirate_spi:dev=/dev/ttyUSB0\n");
+ msg_perr("No serial device given. Use flashprog -p buspirate_spi:dev=/dev/ttyUSB0\n");
return 1;
}
@@ -326,7 +326,7 @@
bp_data->commbufsize = bp_commbufsize;
/* This is the brute force version, but it should work.
- * It is likely to fail if a previous flashrom run was aborted during a write with the new SPI commands
+ * It is likely to fail if a previous flashprog run was aborted during a write with the new SPI commands
* in firmware v5.5 because that firmware may wait for up to 4096 bytes of input before responding to
* 0x00 again. The obvious workaround (sending 4096 bytes of \0) may cause significant startup delays.
*/
diff --git a/ch341a_spi.c b/ch341a_spi.c
index 9b07ef0..2b6413b 100644
--- a/ch341a_spi.c
+++ b/ch341a_spi.c
@@ -388,7 +388,7 @@
static const struct spi_master spi_master_ch341a_spi = {
.features = SPI_MASTER_4BA,
- /* flashrom's current maximum is 256 B. CH341A was tested on Linux and Windows to accept at least
+ /* flashprog's current maximum is 256 B. CH341A was tested on Linux and Windows to accept at least
* 128 kB. Basically there should be no hard limit because transfers are broken up into USB packets
* sent to the device and most of their payload streamed via SPI. */
.max_data_read = 4 * 1024,
@@ -424,7 +424,7 @@
static int ch341a_spi_init(void)
{
if (handle != NULL) {
- msg_cerr("%s: handle already set! Please report a bug at flashrom-stable@flashrom.org\n",
+ msg_cerr("%s: handle already set! Please report a bug at flashprog@flashprog.org\n",
__func__);
return -1;
}
diff --git a/chipset_enable.c b/chipset_enable.c
index 5a0e826..7327317 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -282,7 +282,7 @@
* what other SPI-capable chipsets have at DCh. Others like Bay Trail use a memmapped register.
* The Tunnel Creek datasheet contains a lot of details about the SPI controller, among other things it
* mentions that the prefetching and caching does only happen for direct memory reads.
- * Therefore - at least for Tunnel Creek - it should not matter to flashrom because we use the
+ * Therefore - at least for Tunnel Creek - it should not matter to flashprog because we use the
* programmed access only and not memory mapping. */
case CHIPSET_TUNNEL_CREEK:
case CHIPSET_POULSBO:
@@ -1187,7 +1187,7 @@
internal_buses_supported &= BUS_PARALLEL;
/* Decode 0x000E0000-0x000FFFFF (128 kB), not just 64 kB, and
* decode 0xFF000000-0xFFFFFFFF (16 MB), not just 256 kB.
- * FIXME: Should we really touch the low mapping below 1 MB? Flashrom
+ * FIXME: Should we really touch the low mapping below 1 MB? Flashprog
* ignores that region completely.
* Make the configured ROM areas writable.
*/
@@ -1685,8 +1685,8 @@
/* Should not happen. */
internal_buses_supported = BUS_NONE;
msg_pwarn("Flash bus type is unknown (none)\n");
- msg_pinfo("Please send the log files created by \"flashrom -p internal -o logfile\" to\n"
- "flashrom-stable@flashrom.org with \"your board name: flashrom -V\" as the subject\n"
+ msg_pinfo("Please send the log files created by \"flashprog -p internal -o logfile\" to\n"
+ "flashprog@flashprog.org with \"your board name: flashprog -V\" as the subject\n"
"to help us finish support for your chipset. Thanks.\n");
return ERROR_NONFATAL;
}
@@ -1855,7 +1855,7 @@
/* 10de:0361 is present in Tyan S2915 OEM systems, but not connected to
* the flash chip. Instead, 10de:0364 is connected to the flash chip.
* Until we have PCI device class matching or some fallback mechanism,
- * this is needed to get flashrom working on Tyan S2915 and maybe other
+ * this is needed to get flashprog working on Tyan S2915 and maybe other
* dual-MCP55 boards.
*/
#if 0
@@ -2242,7 +2242,7 @@
msg_pwarn("Warning: unexpected second chipset match: "
"\"%s %s\"\n"
"ignoring, please report lspci and board URL "
- "to flashrom-stable@flashrom.org\n"
+ "to flashprog@flashprog.org\n"
"with \'CHIPSET: your board name\' in the "
"subject line.\n",
chipset_enables[i].vendor_name,
@@ -2264,10 +2264,10 @@
if (chipset_enables[i].status == NT) {
msg_pinfo("This chipset is marked as untested. If "
"you are using an up-to-date version\nof "
- "flashrom *and* were (not) able to "
+ "flashprog *and* were (not) able to "
"successfully update your firmware with it,\n"
"then please email a report to "
- "flashrom-stable@flashrom.org including a\n"
+ "flashprog@flashprog.org including a\n"
"verbose (-V) log.\nThank you!\n");
}
if (!(chipset_enables[i].buses & (internal_buses_supported | BUS_SPI))) {
diff --git a/cli_classic.c b/cli_classic.c
index ad2de6f..1ffe4dd 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -28,7 +28,7 @@
#include "flashchips.h"
#include "fmap.h"
#include "programmer.h"
-#include "libflashrom.h"
+#include "libflashprog.h"
static void cli_classic_usage(const char *name)
{
@@ -77,14 +77,14 @@
"-z, "
#endif
"-E, -r, -w, -v or no operation.\n"
- "If no operation is specified, flashrom will only probe for flash chips.\n");
+ "If no operation is specified, flashprog will only probe for flash chips.\n");
}
static void cli_classic_abort_usage(const char *msg)
{
if (msg)
fprintf(stderr, "%s", msg);
- printf("Please run \"flashrom --help\" for usage info.\n");
+ printf("Please run \"flashprog --help\" for usage info.\n");
exit(1);
}
@@ -121,14 +121,14 @@
{
int ret;
- unsigned long size = flashrom_flash_getsize(flash);
+ unsigned long size = flashprog_flash_getsize(flash);
unsigned char *buf = calloc(size, sizeof(unsigned char));
if (!buf) {
msg_gerr("Memory allocation failed!\n");
return 1;
}
- ret = flashrom_image_read(flash, buf, size);
+ ret = flashprog_image_read(flash, buf, size);
if (ret > 0)
goto free_out;
@@ -141,7 +141,7 @@
static int do_write(struct flashctx *const flash, const char *const filename, const char *const referencefile)
{
- const size_t flash_size = flashrom_flash_getsize(flash);
+ const size_t flash_size = flashprog_flash_getsize(flash);
int ret = 1;
uint8_t *const newcontents = malloc(flash_size);
@@ -160,7 +160,7 @@
goto _free_ret;
}
- ret = flashrom_image_write(flash, newcontents, flash_size, refcontents);
+ ret = flashprog_image_write(flash, newcontents, flash_size, refcontents);
_free_ret:
free(refcontents);
@@ -170,7 +170,7 @@
static int do_verify(struct flashctx *const flash, const char *const filename)
{
- const size_t flash_size = flashrom_flash_getsize(flash);
+ const size_t flash_size = flashprog_flash_getsize(flash);
int ret = 1;
uint8_t *const newcontents = malloc(flash_size);
@@ -182,7 +182,7 @@
if (read_buf_from_file(newcontents, flash_size, filename))
goto _free_ret;
- ret = flashrom_image_verify(flash, newcontents, flash_size);
+ ret = flashprog_image_verify(flash, newcontents, flash_size);
_free_ret:
free(newcontents);
@@ -251,7 +251,7 @@
bool read_it = false, write_it = false, erase_it = false, verify_it = false;
bool dont_verify_it = false, dont_verify_all = false;
bool list_supported = false;
- struct flashrom_layout *layout = NULL;
+ struct flashprog_layout *layout = NULL;
static const struct programmer_entry *prog = NULL;
enum {
OPTION_IFD = 0x0100,
@@ -304,20 +304,20 @@
/*
* Safety-guard against a user who has (mistakenly) closed
- * stdout or stderr before exec'ing flashrom. We disable
+ * stdout or stderr before exec'ing flashprog. We disable
* logging in this case to prevent writing log data to a flash
* chip when a flash device gets opened with fd 1 or 2.
*/
if (check_file(stdout) && check_file(stderr)) {
- flashrom_set_log_callback(
- (flashrom_log_callback *)&flashrom_print_cb);
+ flashprog_set_log_callback(
+ (flashprog_log_callback *)&flashprog_print_cb);
}
print_version();
print_banner();
/* FIXME: Delay calibration should happen in programmer code. */
- if (flashrom_init(1))
+ if (flashprog_init(1))
exit(1);
setbuf(stdout, NULL);
@@ -360,7 +360,7 @@
break;
case 'V':
verbose_screen++;
- if (verbose_screen > FLASHROM_MSG_DEBUG2)
+ if (verbose_screen > FLASHPROG_MSG_DEBUG2)
verbose_logfile = verbose_screen;
break;
case 'E':
@@ -565,7 +565,7 @@
break;
if (!chip || !chip->name) {
msg_cerr("Error: Unknown chip '%s' specified.\n", chip_to_probe);
- msg_gerr("Run flashrom -L to view the hardware supported in this flashrom version.\n");
+ msg_gerr("Run flashprog -L to view the hardware supported in this flashprog version.\n");
ret = 1;
goto out;
}
@@ -625,7 +625,7 @@
} else if (!chipcount) {
msg_cinfo("No EEPROM/flash device found.\n");
if (!force || !chip_to_probe) {
- msg_cinfo("Note: flashrom can never write if the flash chip isn't found "
+ msg_cinfo("Note: flashprog can never write if the flash chip isn't found "
"automatically.\n");
}
if (force && read_it && chip_to_probe) {
@@ -660,7 +660,7 @@
goto out_shutdown;
}
msg_cinfo("Please note that forced reads most likely contain garbage.\n");
- flashrom_flag_set(&flashes[0], FLASHROM_FLAG_FORCE, force);
+ flashprog_flag_set(&flashes[0], FLASHPROG_FLAG_FORCE, force);
ret = do_read(&flashes[0], filename);
free(flashes[0].chip);
goto out_shutdown;
@@ -712,11 +712,11 @@
}
if (flash_size) {
- printf("%zu\n", flashrom_flash_getsize(fill_flash));
+ printf("%zu\n", flashprog_flash_getsize(fill_flash));
goto out_shutdown;
}
- if (ifd && (flashrom_layout_read_from_ifd(&layout, fill_flash, NULL, 0) ||
+ if (ifd && (flashprog_layout_read_from_ifd(&layout, fill_flash, NULL, 0) ||
process_include_args(layout, include_args))) {
ret = 1;
goto out_shutdown;
@@ -741,26 +741,26 @@
goto out_shutdown;
}
- if (flashrom_layout_read_fmap_from_buffer(&layout, fill_flash, fmapfile_buffer, fmapfile_size) ||
+ if (flashprog_layout_read_fmap_from_buffer(&layout, fill_flash, fmapfile_buffer, fmapfile_size) ||
process_include_args(layout, include_args)) {
ret = 1;
free(fmapfile_buffer);
goto out_shutdown;
}
free(fmapfile_buffer);
- } else if (fmap && (flashrom_layout_read_fmap_from_rom(&layout, fill_flash, 0,
- flashrom_flash_getsize(fill_flash)) || process_include_args(layout, include_args))) {
+ } else if (fmap && (flashprog_layout_read_fmap_from_rom(&layout, fill_flash, 0,
+ flashprog_flash_getsize(fill_flash)) || process_include_args(layout, include_args))) {
ret = 1;
goto out_shutdown;
}
- flashrom_layout_set(fill_flash, layout);
- flashrom_flag_set(fill_flash, FLASHROM_FLAG_FORCE, force);
+ flashprog_layout_set(fill_flash, layout);
+ flashprog_flag_set(fill_flash, FLASHPROG_FLAG_FORCE, force);
#if CONFIG_INTERNAL == 1
- flashrom_flag_set(fill_flash, FLASHROM_FLAG_FORCE_BOARDMISMATCH, force_boardmismatch);
+ flashprog_flag_set(fill_flash, FLASHPROG_FLAG_FORCE_BOARDMISMATCH, force_boardmismatch);
#endif
- flashrom_flag_set(fill_flash, FLASHROM_FLAG_VERIFY_AFTER_WRITE, !dont_verify_it);
- flashrom_flag_set(fill_flash, FLASHROM_FLAG_VERIFY_WHOLE_CHIP, !dont_verify_all);
+ flashprog_flag_set(fill_flash, FLASHPROG_FLAG_VERIFY_AFTER_WRITE, !dont_verify_it);
+ flashprog_flag_set(fill_flash, FLASHPROG_FLAG_VERIFY_WHOLE_CHIP, !dont_verify_all);
/* FIXME: We should issue an unconditional chip reset here. This can be
* done once we have a .reset function in struct flashchip.
@@ -770,7 +770,7 @@
if (read_it)
ret = do_read(fill_flash, filename);
else if (erase_it) {
- ret = flashrom_flash_erase(fill_flash);
+ ret = flashprog_flash_erase(fill_flash);
/*
* FIXME: Do we really want the scary warning if erase failed?
* After all, after erase the chip is either blank or partially
@@ -786,13 +786,13 @@
else if (verify_it)
ret = do_verify(fill_flash, filename);
- flashrom_layout_release(layout);
+ flashprog_layout_release(layout);
out_shutdown:
- flashrom_programmer_shutdown(NULL);
+ flashprog_programmer_shutdown(NULL);
out:
for (i = 0; i < chipcount; i++) {
- flashrom_layout_release(flashes[i].default_layout);
+ flashprog_layout_release(flashes[i].default_layout);
free(flashes[i].chip);
}
diff --git a/cli_common.c b/cli_common.c
index 8cc1eda..cf3c7ae 100644
--- a/cli_common.c
+++ b/cli_common.c
@@ -23,7 +23,7 @@
void print_chip_support_status(const struct flashchip *chip)
{
if (chip->feature_bits & FEATURE_OTP) {
- msg_cdbg("This chip may contain one-time programmable memory. flashrom cannot read\n"
+ msg_cdbg("This chip may contain one-time programmable memory. flashprog cannot read\n"
"and may never be able to write it, hence it may not be able to completely\n"
"clone the contents of this chip (see man page for details).\n");
}
@@ -68,10 +68,10 @@
msg_cinfo("\n");
}
msg_cinfo("The test status of this chip may have been updated in the latest development\n"
- "version of flashrom. If you are running the latest development version,\n"
- "please email a report to flashrom-stable@flashrom.org if any of the above\n"
+ "version of flashprog. If you are running the latest development version,\n"
+ "please email a report to flashprog@flashprog.org if any of the above\n"
"operations work correctly for you with this flash chip. Please include the\n"
- "flashrom log file for all operations you tested (see the man page for details),\n"
+ "flashprog log file for all operations you tested (see the man page for details),\n"
"and mention which mainboard or programmer you tested in the subject line.\n"
"Thanks for your help!\n");
}
diff --git a/cli_output.c b/cli_output.c
index 629db67..2108e92 100644
--- a/cli_output.c
+++ b/cli_output.c
@@ -21,8 +21,8 @@
#include <errno.h>
#include "flash.h"
-enum flashrom_log_level verbose_screen = FLASHROM_MSG_INFO;
-enum flashrom_log_level verbose_logfile = FLASHROM_MSG_DEBUG2;
+enum flashprog_log_level verbose_screen = FLASHPROG_MSG_INFO;
+enum flashprog_log_level verbose_logfile = FLASHPROG_MSG_DEBUG2;
static FILE *logfile = NULL;
@@ -56,16 +56,16 @@
void start_logging(void)
{
- enum flashrom_log_level oldverbose_screen = verbose_screen;
+ enum flashprog_log_level oldverbose_screen = verbose_screen;
/* Shut up the console. */
- verbose_screen = FLASHROM_MSG_ERROR;
+ verbose_screen = FLASHPROG_MSG_ERROR;
print_version();
verbose_screen = oldverbose_screen;
}
/* Please note that level is the verbosity, not the importance of the message. */
-int flashrom_print_cb(enum flashrom_log_level level, const char *fmt, va_list ap)
+int flashprog_print_cb(enum flashprog_log_level level, const char *fmt, va_list ap)
{
int ret = 0;
FILE *output_type = stdout;
@@ -73,20 +73,20 @@
va_list logfile_args;
va_copy(logfile_args, ap);
- if (level < FLASHROM_MSG_INFO)
+ if (level < FLASHPROG_MSG_INFO)
output_type = stderr;
if (level <= verbose_screen) {
ret = vfprintf(output_type, fmt, ap);
/* msg_*spew often happens inside chip accessors in possibly
* time-critical operations. Don't slow them down by flushing. */
- if (level != FLASHROM_MSG_SPEW)
+ if (level != FLASHPROG_MSG_SPEW)
fflush(output_type);
}
if ((level <= verbose_logfile) && logfile) {
ret = vfprintf(logfile, fmt, logfile_args);
- if (level != FLASHROM_MSG_SPEW)
+ if (level != FLASHPROG_MSG_SPEW)
fflush(logfile);
}
diff --git a/dediprog.c b/dediprog.c
index dfbb949..866d628 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -136,7 +136,7 @@
};
/*
- * These are not official designations; they are for use in flashrom only.
+ * These are not official designations; they are for use in flashprog only.
* Order must be preserved so that comparison operators work.
*/
enum protocol {
@@ -374,7 +374,7 @@
if (count >= 1 << 16) {
msg_perr("%s: Unsupported transfer length of %u blocks!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__, count);
return 1;
}
@@ -458,7 +458,7 @@
if ((start % chunksize) || (len % chunksize)) {
msg_perr("%s: Unaligned start=%i, len=%i!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__, start, len);
return 1;
}
@@ -608,14 +608,14 @@
*/
if (chunksize != 256) {
msg_perr("%s: Chunk sizes other than 256 bytes are unsupported, chunksize=%u!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__, chunksize);
return 1;
}
if ((start % chunksize) || (len % chunksize)) {
msg_perr("%s: Unaligned start=%i, len=%i!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__, start, len);
return 1;
}
@@ -1231,7 +1231,7 @@
* libusb_set_configuration() and
* libusb_claim_interface(). When searching by id and
* either configuration or claim fails (usually the
- * device is in use by another instance of flashrom),
+ * device is in use by another instance of flashprog),
* the device is skipped and the next device is tried.
*/
found_id = dediprog_read_id(dp_data->handle);
diff --git a/digilent_spi.c b/digilent_spi.c
index 20f3b1e..f563bdc 100644
--- a/digilent_spi.c
+++ b/digilent_spi.c
@@ -379,7 +379,7 @@
if (handle != NULL) {
msg_cerr("%s: handle already set!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__);
return -1;
}
diff --git a/flashchips.c b/flashchips.c
index 182ff06..31bed4f 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -26,10 +26,10 @@
* List of supported flash chips.
*
* Temporarily, this file is sorted alphabetically by vendor and name to
- * assist with merging the Chromium fork of flashrom.
+ * assist with merging the Chromium fork of flashprog.
*
* The usual intention is that that this list is sorted by vendor, then chip
- * family and chip density, which is useful for the output of 'flashrom -L'.
+ * family and chip density, which is useful for the output of 'flashprog -L'.
*/
const struct flashchip flashchips[] = {
@@ -1103,7 +1103,7 @@
/* The A25L40P{T,U} chips are distinguished by their
* erase block layouts, but without any distinction in RDID.
* This inexplicable quirk was verified by Rudolf Marek
- * and discussed on the flashrom mailing list on 2010-07-12.
+ * and discussed on the flashprog mailing list on 2010-07-12.
*/
{
.vendor = "AMIC",
diff --git a/flashrom.8.tmpl b/flashprog.8.tmpl
similarity index 84%
rename from flashrom.8.tmpl
rename to flashprog.8.tmpl
index 4ac3fd8..826da48 100644
--- a/flashrom.8.tmpl
+++ b/flashprog.8.tmpl
@@ -40,11 +40,11 @@
. \}
. \}
..
-.TH FLASHROM 8 "@MAN_DATE@" "flashrom-stable-@VERSION@" "@MAN_DATE@"
+.TH FLASHPROG 8 "@MAN_DATE@" "flashprog-@VERSION@" "@MAN_DATE@"
.SH NAME
-flashrom \- detect, read, write, verify and erase flash chips
+flashprog \- detect, read, write, verify and erase flash chips
.SH SYNOPSIS
-.B flashrom \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR|
+.B flashprog \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR|
\fB\-p\fR <programmername>[:<parameters>] [\fB\-c\fR <chipname>]
(\fB\-\-flash\-name\fR|\fB\-\-flash\-size\fR|
[\fB\-E\fR|\fB\-r\fR <file>|\fB\-w\fR <file>|\fB\-v\fR <file>]
@@ -53,7 +53,7 @@
[\fB\-n\fR] [\fB\-N\fR] [\fB\-f\fR])]
[\fB\-V\fR[\fBV\fR[\fBV\fR]]] [\fB-o\fR <logfile>]
.SH DESCRIPTION
-.B flashrom
+.B flashprog
is a utility for detecting, reading, writing, verifying and erasing flash
chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system
using a supported mainboard. However, it also supports various external
@@ -68,8 +68,8 @@
You can specify one of
.BR \-h ", " \-R ", " \-L ", " \-z ", " \-E ", " \-r ", " \-w ", " \-v
or no operation.
-If no operation is specified, flashrom will only probe for flash chips. It is
-recommended that if you try flashrom the first time on a system, you run it
+If no operation is specified, flashprog will only probe for flash chips. It is
+recommended that if you try flashprog the first time on a system, you run it
in probe-only mode and check the output. Also you are advised to make a
backup of your current ROM contents with
.B \-r
@@ -106,7 +106,7 @@
feel that the time for verification takes too long.
.sp
Typical usage is:
-.B "flashrom \-p prog \-n \-w <file>"
+.B "flashprog \-p prog \-n \-w <file>"
.sp
This option is only useful in combination with
.BR \-\-write .
@@ -117,7 +117,7 @@
You should only use this option if you are sure that communication with
the flash chip is reliable (e.g. when using the
.BR internal
-programmer). Even if flashrom is instructed not to touch parts of the
+programmer). Even if flashprog is instructed not to touch parts of the
flash chip, their contents could be damaged (e.g. due to misunderstood
erase commands).
.sp
@@ -145,7 +145,7 @@
.B "\-c, \-\-chip" <chipname>
Probe only for the specified flash ROM chip. This option takes the chip name as
printed by
-.B "flashrom \-L"
+.B "flashprog \-L"
without the vendor name as parameter. Please note that the chip name is
case sensitive.
.TP
@@ -165,7 +165,7 @@
Read ROM layout from
.BR <file> .
.sp
-flashrom supports ROM layouts. This allows you to flash certain parts of
+flashprog supports ROM layouts. This allows you to flash certain parts of
the flash chip only. A ROM layout file contains multiple lines with the
following syntax:
.sp
@@ -187,19 +187,19 @@
If you only want to update the image named
.BR "normal " "in a ROM based on the layout above, run"
.sp
-.B " flashrom \-p prog \-\-layout rom.layout \-\-image normal \-w some.rom"
+.B " flashprog \-p prog \-\-layout rom.layout \-\-image normal \-w some.rom"
.sp
To update only the images named
.BR "normal " "and " "fallback" ", run:"
.sp
-.B " flashrom \-p prog \-l rom.layout \-i normal -i fallback \-w some.rom"
+.B " flashprog \-p prog \-l rom.layout \-i normal -i fallback \-w some.rom"
.sp
Overlapping sections are not supported.
.TP
.B "\-\-fmap"
Read layout from fmap in flash chip.
.sp
-flashrom supports the fmap binary format which is commonly used by coreboot
+flashprog supports the fmap binary format which is commonly used by coreboot
for partitioning a flash chip. The on-chip fmap will be read and used to generate
the layout.
.sp
@@ -207,14 +207,14 @@
.BR "COREBOOT"
region defined in the fmap, run
.sp
-.B " flashrom -p prog \-\-fmap \-\-image COREBOOT \-w some.rom"
+.B " flashprog -p prog \-\-fmap \-\-image COREBOOT \-w some.rom"
.TP
.B "\-\-fmap-file <file>"
Read layout from a
.BR <file>
containing binary fmap (e.g. coreboot roms).
.sp
-flashrom supports the fmap binary format which is commonly used by coreboot
+flashprog supports the fmap binary format which is commonly used by coreboot
for partitioning a flash chip. The fmap in the specified file will be read and
used to generate the layout.
.sp
@@ -222,12 +222,12 @@
.BR "COREBOOT"
region defined in the binary fmap file, run
.sp
-.B " flashrom \-p prog \-\-fmap-file some.rom \-\-image COREBOOT \-w some.rom"
+.B " flashprog \-p prog \-\-fmap-file some.rom \-\-image COREBOOT \-w some.rom"
.TP
.B "\-\-ifd"
Read ROM layout from Intel Firmware Descriptor.
.sp
-flashrom supports ROM layouts given by an Intel Firmware Descriptor
+flashprog supports ROM layouts given by an Intel Firmware Descriptor
(IFD). The on-chip descriptor will be read and used to generate the
layout. If you need to change the layout, you have to update the IFD
only first.
@@ -261,10 +261,10 @@
.B "\-L, \-\-list\-supported"
List the flash chips, chipsets, mainboards, and external programmers
(including PCI, USB, parallel port, and serial port based devices)
-supported by flashrom.
+supported by flashprog.
.sp
There are many unlisted boards which will work out of the box, without
-special support in flashrom. Please let us know if you can verify that
+special support in flashprog. Please let us know if you can verify that
other boards work or do not work out of the box.
.sp
.B IMPORTANT:
@@ -277,7 +277,7 @@
.BR \-\-list\-supported ,
but outputs the supported hardware in MediaWiki syntax, so that it can be
easily pasted into the
-.URLB https://flashrom.org/Supported_hardware "supported hardware wiki page" .
+.URLB https://flashprog.org/Supported_hardware "supported hardware wiki page" .
Please note that MediaWiki output is not compiled in by default.
.TP
.B "\-p, \-\-programmer <name>[:parameter[,parameter[,parameter]]]"
@@ -286,7 +286,7 @@
.sp
.BR "* internal" " (for in-system flashing in the mainboard)"
.sp
-.BR "* dummy" " (virtual programmer for testing flashrom)"
+.BR "* dummy" " (virtual programmer for testing flashprog)"
.sp
.BR "* nic3com" " (for flash ROMs on 3COM network cards)"
.sp
@@ -363,7 +363,7 @@
in detail in the
.B PROGRAMMER-SPECIFIC INFORMATION
section. Support for some programmers can be disabled at compile time.
-.B "flashrom \-h"
+.B "flashprog \-h"
lists all supported programmers.
.TP
.B "\-h, \-\-help"
@@ -373,7 +373,7 @@
Save the full debug log to
.BR <logfile> .
If the file already exists, it will be overwritten. This is the recommended
-way to gather logs from flashrom because they will be verbose even if the
+way to gather logs from flashprog because they will be verbose even if the
on-screen messages are not verbose and don't require output redirection.
.TP
.B "\-R, \-\-version"
@@ -399,33 +399,33 @@
identify the mainboard (which is the exception), or if you want to override
the detected mainboard model, you can specify the mainboard using the
.sp
-.B " flashrom \-p internal:mainboard=<vendor>:<board>"
+.B " flashprog \-p internal:mainboard=<vendor>:<board>"
syntax.
.sp
See the 'Known boards' or 'Known laptops' section in the output
-of 'flashrom \-L' for a list of boards which require the specification of
+of 'flashprog \-L' for a list of boards which require the specification of
the board name, if no coreboot table is found.
.sp
Some of these board-specific flash enabling functions (called
.BR "board enables" )
-in flashrom have not yet been tested. If your mainboard is detected needing
+in flashprog have not yet been tested. If your mainboard is detected needing
an untested board enable function, a warning message is printed and the
board enable is not executed, because a wrong board enable function might
cause the system to behave erratically, as board enable functions touch the
low-level internals of a mainboard. Not executing a board enable function
(if one is needed) might cause detection or erasing failure. If your board
protects only part of the flash (commonly the top end, called boot block),
-flashrom might encounter an error only after erasing the unprotected part,
+flashprog might encounter an error only after erasing the unprotected part,
so running without the board-enable function might be dangerous for erase
and write (which includes erase).
.sp
The suggested procedure for a mainboard with untested board specific code is
-to first try to probe the ROM (just invoke flashrom and check that it
+to first try to probe the ROM (just invoke flashprog and check that it
detects your flash chip type) without running the board enable code (i.e.
without any parameters). If it finds your chip, fine. Otherwise, retry
probing your chip with the board-enable code running, using
.sp
-.B " flashrom \-p internal:boardenable=force"
+.B " flashprog \-p internal:boardenable=force"
.sp
If your chip is still not detected, the board enable code seems to be broken
or the flash chip unsupported. Otherwise, make a backup of your current ROM
@@ -438,17 +438,17 @@
You should enable the board enable code in any case now, as it
has been written because it is known that writing/erasing without the board
enable is going to fail. In any case (success or failure), please report to
-the flashrom mailing list, see below.
+the flashprog mailing list, see below.
.sp
.TP
.B Coreboot
.sp
-On systems running coreboot, flashrom checks whether the desired image matches
+On systems running coreboot, flashprog checks whether the desired image matches
your mainboard. This needs some special board ID to be present in the image.
-If flashrom detects that the image you want to write and the current board
+If flashprog detects that the image you want to write and the current board
do not match, it will refuse to write the image unless you specify
.sp
-.B " flashrom \-p internal:boardmismatch=force"
+.B " flashprog \-p internal:boardmismatch=force"
.TP
.B ITE IT87 Super I/O
.sp
@@ -456,7 +456,7 @@
ITE IT87 series Super I/O to switch between the two flash chips. Only one of them can be accessed at a time
and you can manually select which one to use with the
.sp
-.B " flashrom \-p internal:dualbiosindex=chip"
+.B " flashprog \-p internal:dualbiosindex=chip"
.sp
syntax where
.B chip
@@ -466,16 +466,16 @@
parameter.
.sp
If your mainboard uses an ITE IT87 series Super I/O for LPC<->SPI flash bus
-translation, flashrom should autodetect that configuration. If you want to
+translation, flashprog should autodetect that configuration. If you want to
set the I/O base port of the IT87 series SPI controller manually instead of
using the value provided by the BIOS, use the
.sp
-.B " flashrom \-p internal:it87spiport=portnum"
+.B " flashprog \-p internal:it87spiport=portnum"
.sp
syntax where
.B portnum
is the I/O port number (must be a multiple of 8). In the unlikely case
-flashrom doesn't detect an active IT87 LPC<->SPI bridge, please send a bug
+flashprog doesn't detect an active IT87 LPC<->SPI bridge, please send a bug
report so we can diagnose the problem.
.sp
.TP
@@ -483,13 +483,13 @@
.sp
Beginning with the SB700 chipset there is an integrated microcontroller (IMC) based on the 8051 embedded in
every AMD southbridge. Its firmware resides in the same flash chip as the host's which makes writing to the
-flash risky if the IMC is active. Flashrom tries to temporarily disable the IMC but even then changing the
+flash risky if the IMC is active. Flashprog tries to temporarily disable the IMC but even then changing the
contents of the flash can have unwanted effects: when the IMC continues (at the latest after a reboot) it will
continue executing code from the flash. If the code was removed or changed in an unfortunate way it is
-unpredictable what the IMC will do. Therefore, if flashrom detects an active IMC it will disable write support
+unpredictable what the IMC will do. Therefore, if flashprog detects an active IMC it will disable write support
unless the user forces it with the
.sp
-.B " flashrom \-p internal:amd_imc_force=yes"
+.B " flashprog \-p internal:amd_imc_force=yes"
.sp
syntax. The user is responsible for supplying a suitable image or leaving out the IMC region with the help of
a layout file. This limitation might be removed in the future when we understand the details better and have
@@ -501,7 +501,7 @@
directly attached to the chipset).
Syntax is
.sp
-.B " flashrom \-p internal:spispeed=frequency"
+.B " flashprog \-p internal:spispeed=frequency"
.sp
where
.B frequency
@@ -528,7 +528,7 @@
but does not allow the software to choose the SPI commands to be sent.
You can use the
.sp
-.B " flashrom \-p internal:ich_spi_mode=value"
+.B " flashprog \-p internal:ich_spi_mode=value"
.sp
syntax where
.BR "value " "can be"
@@ -552,7 +552,7 @@
to set specific IDSEL values for a non-default flash chip or an embedded
controller (EC), you can use the
.sp
-.B " flashrom \-p internal:fwh_idsel=value"
+.B " flashprog \-p internal:fwh_idsel=value"
.sp
syntax where
.B value
@@ -565,28 +565,28 @@
settings. The default value for ICH7 is given in the example below.
.sp
Example:
-.B "flashrom \-p internal:fwh_idsel=0x001122334567"
+.B "flashprog \-p internal:fwh_idsel=0x001122334567"
.TP
.B Laptops
.sp
-Using flashrom on older laptops that don't boot from the SPI bus is
+Using flashprog on older laptops that don't boot from the SPI bus is
dangerous and may easily make your hardware unusable (see also the
.B BUGS
section). The embedded controller (EC) in some
machines may interact badly with flashing.
More information is
-.URLB https://flashrom.org/Laptops "in the wiki" .
+.URLB https://flashprog.org/Laptops "in the wiki" .
Problems occur when the flash chip is shared between BIOS
-and EC firmware, and the latter does not expect flashrom
-to access the chip. While flashrom tries to change the contents of
+and EC firmware, and the latter does not expect flashprog
+to access the chip. While flashprog tries to change the contents of
that memory the EC might need to fetch new instructions or data from it and
could stop working correctly. Probing for and reading from the chip may also
irritate your EC and cause fan failure, backlight failure, sudden poweroff, and
-other nasty effects. flashrom will attempt to detect if it is running on such a
+other nasty effects. flashprog will attempt to detect if it is running on such a
laptop and limit probing to SPI buses. If you want to probe the LPC bus
anyway at your own risk, use
.sp
-.B " flashrom \-p internal:laptop=force_I_want_a_brick"
+.B " flashprog \-p internal:laptop=force_I_want_a_brick"
.sp
We will not help you if you force flashing on a laptop because this is a really
dumb idea.
@@ -595,24 +595,24 @@
.sp
Currently we rely on the chassis type encoded in the DMI/SMBIOS data to detect
laptops. Some vendors did not implement those bits correctly or set them to
-generic and/or dummy values. flashrom will then issue a warning and restrict
+generic and/or dummy values. flashprog will then issue a warning and restrict
buses like above. In this case you can use
.sp
-.B " flashrom \-p internal:laptop=this_is_not_a_laptop"
+.B " flashprog \-p internal:laptop=this_is_not_a_laptop"
.sp
-to tell flashrom (at your own risk) that it is not running on a laptop.
+to tell flashprog (at your own risk) that it is not running on a laptop.
.SS
.BR "dummy " programmer
.IP
The dummy programmer operates on a buffer in memory only. It provides a safe and fast way to test various
-aspects of flashrom and is mainly used in development and while debugging.
+aspects of flashprog and is mainly used in development and while debugging.
It is able to emulate some chips to a certain degree (basic
identify/read/erase/write operations work).
.sp
An optional parameter specifies the bus types it
should support. For that you have to use the
.sp
-.B " flashrom \-p dummy:bus=[type[+type[+type]]]"
+.B " flashprog \-p dummy:bus=[type[+type[+type]]]"
.sp
syntax where
.B type
@@ -622,12 +622,12 @@
If you do not specify bus, all buses will be enabled.
.sp
Example:
-.B "flashrom \-p dummy:bus=lpc+fwh"
+.B "flashprog \-p dummy:bus=lpc+fwh"
.sp
The dummy programmer supports flash chip emulation for automated self-tests
without hardware access. If you want to emulate a flash chip, use the
.sp
-.B " flashrom \-p dummy:emulate=chip"
+.B " flashprog \-p dummy:emulate=chip"
.sp
syntax where
.B chip
@@ -647,22 +647,22 @@
.RB "* Spansion " S25FL128L " SPI flash chip (16384 kB, RDID)"
.sp
Example:
-.B "flashrom -p dummy:emulate=SST25VF040.REMS"
+.B "flashprog -p dummy:emulate=SST25VF040.REMS"
.TP
.B Persistent images
.sp
If you use flash chip emulation, flash image persistence is available as well
by using the
.sp
-.B " flashrom \-p dummy:emulate=chip,image=image.rom"
+.B " flashprog \-p dummy:emulate=chip,image=image.rom"
.sp
syntax where
.B image.rom
-is the file where the simulated chip contents are read on flashrom startup and
-where the chip contents on flashrom shutdown are written to.
+is the file where the simulated chip contents are read on flashprog startup and
+where the chip contents on flashprog shutdown are written to.
.sp
Example:
-.B "flashrom -p dummy:emulate=M25P10.RES,image=dummy.bin"
+.B "flashprog -p dummy:emulate=M25P10.RES,image=dummy.bin"
.TP
.B SPI write chunk size
.sp
@@ -670,7 +670,7 @@
with the default opcode, you can set the maximum allowed write chunk size with
the
.sp
-.B " flashrom \-p dummy:emulate=chip,spi_write_256_chunksize=size"
+.B " flashprog \-p dummy:emulate=chip,spi_write_256_chunksize=size"
.sp
syntax where
.B size
@@ -678,22 +678,22 @@
.sp
Example:
.sp
-.B " flashrom -p dummy:emulate=M25P10.RES,spi_write_256_chunksize=5"
+.B " flashprog -p dummy:emulate=M25P10.RES,spi_write_256_chunksize=5"
.TP
.B SPI blacklist
.sp
To simulate a programmer which refuses to send certain SPI commands to the
flash chip, you can specify a blacklist of SPI commands with the
.sp
-.B " flashrom -p dummy:spi_blacklist=commandlist"
+.B " flashprog -p dummy:spi_blacklist=commandlist"
.sp
syntax where
.B commandlist
is a list of two-digit hexadecimal representations of
-SPI commands. If commandlist is e.g.\& 0302, flashrom will behave as if the SPI
+SPI commands. If commandlist is e.g.\& 0302, flashprog will behave as if the SPI
controller refuses to run command 0x03 (READ) and command 0x02 (WRITE).
commandlist may be up to 512 characters (256 commands) long.
-Implementation note: flashrom will detect an error during command execution.
+Implementation note: flashprog will detect an error during command execution.
.sp
.TP
.B SPI ignorelist
@@ -701,7 +701,7 @@
To simulate a flash chip which ignores (doesn't support) certain SPI commands,
you can specify an ignorelist of SPI commands with the
.sp
-.B " flashrom -p dummy:spi_ignorelist=commandlist"
+.B " flashprog -p dummy:spi_ignorelist=commandlist"
.sp
syntax where
.B commandlist
@@ -709,14 +709,14 @@
SPI commands. If commandlist is e.g.\& 0302, the emulated flash chip will ignore
command 0x03 (READ) and command 0x02 (WRITE). commandlist may be up to 512
characters (256 commands) long.
-Implementation note: flashrom won't detect an error during command execution.
+Implementation note: flashprog won't detect an error during command execution.
.sp
.TP
.B SPI status register
.sp
You can specify the initial content of the chip's status register with the
.sp
-.B " flashrom -p dummy:spi_status=content"
+.B " flashprog -p dummy:spi_status=content"
.sp
syntax where
.B content
@@ -732,7 +732,7 @@
.sp
You can simulate state of hardware protection pin (WP) with the
.sp
-.B " flashrom -p dummy:hwwp=state"
+.B " flashprog -p dummy:hwwp=state"
.sp
syntax where
.B state
@@ -748,7 +748,7 @@
your want to use, which must be specified if more than one card supported
by the selected programmer is installed in your system. The syntax is
.sp
-.BR " flashrom \-p xxxx:pci=bb:dd.f" ,
+.BR " flashprog \-p xxxx:pci=bb:dd.f" ,
.sp
where
.B xxxx
@@ -761,19 +761,19 @@
is the PCI function number of the desired device.
.sp
Example:
-.B "flashrom \-p nic3com:pci=05:04.0"
+.B "flashprog \-p nic3com:pci=05:04.0"
.SS
.BR "atavia " programmer
.IP
Due to the mysterious address handling of the VIA VT6421A controller the user can specify an offset with the
.sp
-.B " flashrom \-p atavia:offset=addr"
+.B " flashprog \-p atavia:offset=addr"
.sp
syntax where
.B addr
will be interpreted as usual (leading 0x (0) for hexadecimal (octal) values, or else decimal).
For more information please see
-.URLB https://flashrom.org/VT6421A "its wiki page" .
+.URLB https://flashprog.org/VT6421A "its wiki page" .
.SS
.BR "atapromise " programmer
.IP
@@ -784,10 +784,10 @@
.SS
.BR "nicintel_eeprom " programmer
.IP
-This is the first programmer module in flashrom that does not provide access to NOR flash chips but EEPROMs
+This is the first programmer module in flashprog that does not provide access to NOR flash chips but EEPROMs
mounted on gigabit Ethernet cards based on Intel's 82580 NIC. Because EEPROMs normally do not announce their
size nor allow themselves to be identified, the controller relies on correct size values written to predefined
-addresses within the chip. Flashrom follows this scheme but assumes the minimum size of 16 kB (128 kb) if an
+addresses within the chip. Flashprog follows this scheme but assumes the minimum size of 16 kB (128 kb) if an
unprogrammed EEPROM/card is detected. Intel specifies following EEPROMs to be compatible:
Atmel AT25128, AT25256, Micron (ST) M95128, M95256 and OnSemi (Catalyst) CAT25CS128.
.SS
@@ -802,7 +802,7 @@
An optional parameter specifies the controller
type, channel/interface/port it should support. For that you have to use the
.sp
-.B " flashrom \-p ft2232_spi:type=model,port=interface"
+.B " flashprog \-p ft2232_spi:type=model,port=interface"
.sp
syntax where
.B model
@@ -823,7 +823,7 @@
If there is more than one ft2232_spi-compatible device connected, you can select which one should be used by
specifying its serial number with the
.sp
-.B " flashrom \-p ft2232_spi:serial=number"
+.B " flashprog \-p ft2232_spi:serial=number"
.sp
syntax where
.B number
@@ -838,7 +838,7 @@
.B divisor
parameter with the
.sp
-.B " flashrom \-p ft2232_spi:divisor=div"
+.B " flashprog \-p ft2232_spi:divisor=div"
.sp
syntax.
.sp
@@ -847,7 +847,7 @@
an additional CS# pin can be chosen, where the value can be a number between 0 and 3, denoting GPIOL0-GPIOL3
correspondingly. Example:
.sp
-.B " flashrom \-p ft2232_spi:csgpiol=3"
+.B " flashprog \-p ft2232_spi:csgpiol=3"
.sp
The parameter
.B gpiolX=[HLC]
@@ -875,7 +875,7 @@
.sp
.B Example:
.sp
-.B " flashrom \-p ft2232_spi:gpiol0=H"
+.B " flashprog \-p ft2232_spi:gpiol0=H"
.sp
.B Note
that not all GPIOL pins are freely usable with all programmers as some have special functionality.
@@ -892,12 +892,12 @@
and separate the optional baud rate with a colon.
For example
.sp
-.B " flashrom \-p serprog:dev=/dev/ttyS0:115200"
+.B " flashprog \-p serprog:dev=/dev/ttyS0:115200"
.sp
If no baud rate is given the default values by the operating system/hardware will be used.
For IP connections you have to use the
.sp
-.B " flashrom \-p serprog:ip=ipaddr:port"
+.B " flashprog \-p serprog:ip=ipaddr:port"
.sp
syntax.
In case the device supports it, you can set the SPI clock frequency with the optional
@@ -907,7 +907,7 @@
suffix is given, then megahertz or kilohertz are used respectively.
Example that sets the frequency to 2 MHz:
.sp
-.B " flashrom \-p serprog:dev=/dev/device:baud,spispeed=2M"
+.B " flashprog \-p serprog:dev=/dev/device:baud,spispeed=2M"
.sp
More information about serprog is available in
.B serprog-protocol.txt
@@ -922,7 +922,7 @@
parameter specifies the frequency of the SPI bus. The parameter
delimiter is a comma. Syntax is
.sp
-.B " flashrom \-p buspirate_spi:dev=/dev/device,spispeed=frequency"
+.B " flashprog \-p buspirate_spi:dev=/dev/device,spispeed=frequency"
.sp
where
.B frequency
@@ -934,7 +934,7 @@
.B serialspeed
parameter. Syntax is
.sp
-.B " flashrom -p buspirate_spi:serialspeed=baud
+.B " flashprog -p buspirate_spi:serialspeed=baud
.sp
where
.B baud
@@ -945,7 +945,7 @@
An optional pullups parameter specifies the use of the Bus Pirate internal pull-up resistors. This may be
needed if you are working with a flash ROM chip that you have physically removed from the board. Syntax is
.sp
-.B " flashrom -p buspirate_spi:pullups=state"
+.B " flashprog -p buspirate_spi:pullups=state"
.sp
where
.B state
@@ -959,7 +959,7 @@
.B psus
parameter. Syntax is
.sp
-.B " flashrom -p buspirate_spi:psus=state"
+.B " flashprog -p buspirate_spi:psus=state"
.sp
where
.B state
@@ -979,7 +979,7 @@
.BR mV ", " millivolt ", " V " or " Volt
as unit specifier. Syntax is
.sp
-.B " flashrom \-p pickit2_spi:voltage=value"
+.B " flashprog \-p pickit2_spi:voltage=value"
.sp
where
.B value
@@ -991,7 +991,7 @@
.B spispeed
parameter specifies the frequency of the SPI bus. Syntax is
.sp
-.B " flashrom \-p pickit2_spi:spispeed=frequency"
+.B " flashprog \-p pickit2_spi:spispeed=frequency"
.sp
where
.B frequency
@@ -1008,7 +1008,7 @@
.BR mV ", " milliVolt ", " V " or " Volt
as unit specifier. Syntax is
.sp
-.B " flashrom \-p dediprog:voltage=value"
+.B " flashprog \-p dediprog:voltage=value"
.sp
where
.B value
@@ -1023,14 +1023,14 @@
at 0.
Usage example to select the second device:
.sp
-.B " flashrom \-p dediprog:device=1"
+.B " flashprog \-p dediprog:device=1"
.sp
An optional
.B spispeed
parameter specifies the frequency of the SPI bus. The firmware on the device needs to be 5.0.0 or newer.
Syntax is
.sp
-.B " flashrom \-p dediprog:spispeed=frequency"
+.B " flashprog \-p dediprog:spispeed=frequency"
.sp
where
.B frequency
@@ -1042,7 +1042,7 @@
.B target
parameter specifies which target chip should be used. Syntax is
.sp
-.B " flashrom \-p dediprog:target=value"
+.B " flashprog \-p dediprog:target=value"
.sp
where
.B value
@@ -1057,7 +1057,7 @@
.B iobase
parameter to specify an alternate base I/O address with the
.sp
-.B " flashrom \-p rayer_spi:iobase=baseaddr"
+.B " flashprog \-p rayer_spi:iobase=baseaddr"
.sp
syntax where
.B baseaddr
@@ -1068,7 +1068,7 @@
.B type
parameter to specify the cable type with the
.sp
-.B " flashrom \-p rayer_spi:type=model"
+.B " flashprog \-p rayer_spi:type=model"
.sp
syntax where
.B model
@@ -1101,9 +1101,9 @@
Information about the SI-Prog adapter can be found at
.URLB "http://www.lancos.com/siprogsch.html" "its website" .
.sp
-An example call to flashrom is
+An example call to flashprog is
.sp
-.B " flashrom \-p pony_spi:dev=/dev/ttyS0,type=serbang"
+.B " flashprog \-p pony_spi:dev=/dev/ttyS0,type=serbang"
.sp
Please note that while USB-to-serial adapters work under certain circumstances,
this slows down operation considerably.
@@ -1114,7 +1114,7 @@
.B rom
parameter.
.sp
-.B " flashrom \-p ogp_spi:rom=name"
+.B " flashprog \-p ogp_spi:rom=name"
.sp
Where
.B name
@@ -1139,11 +1139,11 @@
Either the GPIO device node or the chip number as well as the GPIO numbers
of the SPI lines must be specified like in the following examples:
.sp
-.B " flashrom \-p linux_gpio_spi:dev=/dev/gpiochip0,cs=8,sck=11,mosi=10,miso=9"
+.B " flashprog \-p linux_gpio_spi:dev=/dev/gpiochip0,cs=8,sck=11,mosi=10,miso=9"
.sp
or
.sp
-.B " flashrom \-p linux_gpio_spi:gpiochip=0,cs=8,sck=11,mosi=10,miso=9"
+.B " flashprog \-p linux_gpio_spi:gpiochip=0,cs=8,sck=11,mosi=10,miso=9"
.sp
Here,
.B gpiochip=0
@@ -1166,7 +1166,7 @@
.IP
You may specify the MTD device to use with the
.sp
-.B " flashrom \-p linux_mtd:dev=/dev/mtdX"
+.B " flashprog \-p linux_mtd:dev=/dev/mtdX"
.sp
syntax where
.B /dev/mtdX
@@ -1179,7 +1179,7 @@
.IP
You have to specify the SPI controller to use with the
.sp
-.B " flashrom \-p linux_spi:dev=/dev/spidevX.Y"
+.B " flashprog \-p linux_spi:dev=/dev/spidevX.Y"
.sp
syntax where
.B /dev/spidevX.Y
@@ -1190,7 +1190,7 @@
parameter. The frequency is parsed as kilohertz.
Example that sets the frequency to 8 MHz:
.sp
-.B " flashrom \-p linux_spi:dev=/dev/spidevX.Y,spispeed=8000"
+.B " flashprog \-p linux_spi:dev=/dev/spidevX.Y,spispeed=8000"
.sp
Please note that the linux_spi driver only works on Linux.
.SS
@@ -1201,19 +1201,19 @@
through EDID (at I2C address 0x50) and sending commands to the display using the DDC/CI protocol (at address
0x37). On displays driven by MSTAR SoCs, it is also possible to access the SoC firmware flash (connected to
the Soc through another SPI bus) using an In-System Programming (ISP) port, usually at address 0x49.
-This flashrom module allows the latter via Linux's I2C driver.
+This flashprog module allows the latter via Linux's I2C driver.
.sp
.B IMPORTANT:
Before using this programmer, the display
.B MUST
-be in standby mode, and only connected to the computer that will run flashrom using a VGA cable, to an
+be in standby mode, and only connected to the computer that will run flashprog using a VGA cable, to an
inactive VGA output. It absolutely
.B MUST NOT
be used as a display during the procedure!
.sp
You have to specify the DDC/I2C controller and I2C address to use with the
.sp
-.B " flashrom \-p mstarddc_spi:dev=/dev/i2c-X:YY"
+.B " flashprog \-p mstarddc_spi:dev=/dev/i2c-X:YY"
.sp
syntax where
.B /dev/i2c-X
@@ -1222,18 +1222,18 @@
is the (hexadecimal) address of the MSTAR ISP port (address 0x49 is usually used).
Example that uses I2C controller /dev/i2c-1 and address 0x49:
.sp
-.B " flashrom \-p mstarddc_spi:dev=/dev/i2c-1:49
+.B " flashprog \-p mstarddc_spi:dev=/dev/i2c-1:49
.sp
-It is also possible to inhibit the reset command that is normally sent to the display once the flashrom
+It is also possible to inhibit the reset command that is normally sent to the display once the flashprog
operation is completed using the optional
.B noreset
-parameter. A value of 1 prevents flashrom from sending the reset command.
+parameter. A value of 1 prevents flashprog from sending the reset command.
Example that does not reset the display at the end of the operation:
.sp
-.B " flashrom \-p mstarddc_spi:dev=/dev/i2c-1:49,noreset=1
+.B " flashprog \-p mstarddc_spi:dev=/dev/i2c-1:49,noreset=1
.sp
Please note that sending the reset command is also inhibited if an error occurred during the operation.
-To send the reset command afterwards, you can simply run flashrom once more, in chip probe mode (not specifying
+To send the reset command afterwards, you can simply run flashprog once more, in chip probe mode (not specifying
an operation), without the
.B noreset
parameter, once the flash read/write operation you intended to perform has completed successfully.
@@ -1253,7 +1253,7 @@
parameter specifies the frequency of the SPI bus.
Syntax is
.sp
-.B " flashrom \-p ch347_spi:spispeed=frequency"
+.B " flashprog \-p ch347_spi:spispeed=frequency"
.sp
where
.B frequency
@@ -1273,7 +1273,7 @@
as unit specifier.
Syntax is
.sp
-.B " flashrom \-p ni845x_spi:voltage=value"
+.B " flashprog \-p ni845x_spi:voltage=value"
.sp
where
.B value
@@ -1282,13 +1282,13 @@
or the equivalent in mV.
.sp
In the case if none of the programmer's supported IO voltage is within the supported voltage range of
-the detected flash chip the flashrom will abort the operation (to prevent damaging the flash chip).
+the detected flash chip the flashprog will abort the operation (to prevent damaging the flash chip).
You can override this behaviour by passing "yes" to the
.B ignore_io_voltage_limits
parameter (for e.g. if you are using an external voltage translator circuit).
Syntax is
.sp
-.B " flashrom \-p ni845x_spi:ignore_io_voltage_limits=yes"
+.B " flashprog \-p ni845x_spi:ignore_io_voltage_limits=yes"
.sp
You can use the
.B serial
@@ -1296,14 +1296,14 @@
You should use your device's 7 digit hexadecimal serial number.
Usage example to select the device with 1230A12 serial number:
.sp
-.B " flashrom \-p ni845x_spi:serial=1230A12"
+.B " flashprog \-p ni845x_spi:serial=1230A12"
.sp
An optional
.B spispeed
parameter specifies the frequency of the SPI bus.
Syntax is
.sp
-.B " flashrom \-p ni845x_spi:spispeed=frequency"
+.B " flashprog \-p ni845x_spi:spispeed=frequency"
.sp
where
.B frequency
@@ -1317,7 +1317,7 @@
.B cs
parameter specifies which target chip select line should be used. Syntax is
.sp
-.B " flashrom \-p ni845x_spi:csnumber=value"
+.B " flashprog \-p ni845x_spi:csnumber=value"
.sp
where
.B value
@@ -1332,7 +1332,7 @@
parameter specifies the frequency of the SPI bus.
Syntax is
.sp
-.B " flashrom \-p digilent_spi:spispeed=frequency"
+.B " flashprog \-p digilent_spi:spispeed=frequency"
.sp
where
.B frequency
@@ -1347,7 +1347,7 @@
parameter specifies the frequency of the SPI bus.
Syntax is
.sp
-.B " flashrom \-p dirtyjtag_spi:spispeed=frequency"
+.B " flashprog \-p dirtyjtag_spi:spispeed=frequency"
.sp
where
.B frequency
@@ -1363,7 +1363,7 @@
The chip select (\fBCS\fP) signal of the flash chip can be attached to
different pins of the programmer which can be selected with the
.sp
-.B " flashrom \-p jlink_spi:cs=pin"
+.B " flashprog \-p jlink_spi:cs=pin"
.sp
syntax where \fBpin\fP can be either \fBTRST\fP or \fBRESET\fP.
The default pin for chip select is \fBRESET\fP.
@@ -1393,7 +1393,7 @@
If there is more than one compatible device connected, you can select which one
should be used by specifying its serial number with the
.sp
-.B " flashrom \-p jlink_spi:serial=number"
+.B " flashprog \-p jlink_spi:serial=number"
.sp
syntax where
.B number
@@ -1402,7 +1402,7 @@
.sp
The SPI speed can be selected by using the
.sp
-.B " flashrom \-p jlink_spi:spispeed=frequency"
+.B " flashprog \-p jlink_spi:spispeed=frequency"
.sp
syntax where \fBfrequency\fP is the SPI clock frequency in kHz.
The maximum speed depends on the device in use.
@@ -1415,12 +1415,12 @@
This module supports SPI flash programming through the STMicroelectronics
STLINK V3 programmer/debugger's SPI bridge interface
.sp
-.B " flashrom \-p stlinkv3_spi"
+.B " flashprog \-p stlinkv3_spi"
.sp
If there is more than one compatible device connected, you can select which one
should be used by specifying its serial number with the
.sp
-.B " flashrom \-p stlinkv3_spi:serial=number"
+.B " flashprog \-p stlinkv3_spi:serial=number"
.sp
syntax where
.B number
@@ -1429,7 +1429,7 @@
.sp
The SPI speed can be selected by using the
.sp
-.B " flashrom \-p stlinkv3_spi:spispeed=frequency"
+.B " flashprog \-p stlinkv3_spi:spispeed=frequency"
.sp
syntax where \fBfrequency\fP is the SPI clock frequency in kHz.
If the passed frequency is not supported by the adapter the nearest lower
@@ -1439,26 +1439,26 @@
.SH EXAMPLES
To back up and update your BIOS, run
.sp
-.B flashrom -p internal -r backup.rom -o backuplog.txt
+.B flashprog -p internal -r backup.rom -o backuplog.txt
.br
-.B flashrom -p internal -w newbios.rom -o writelog.txt
+.B flashprog -p internal -w newbios.rom -o writelog.txt
.sp
Please make sure to copy backup.rom to some external media before you try
to write. That makes offline recovery easier.
.br
-If writing fails and flashrom complains about the chip being in an unknown
+If writing fails and flashprog complains about the chip being in an unknown
state, you can try to restore the backup by running
.sp
-.B flashrom -p internal -w backup.rom -o restorelog.txt
+.B flashprog -p internal -w backup.rom -o restorelog.txt
.sp
If you encounter any problems, please contact us and supply
backuplog.txt, writelog.txt and restorelog.txt. See section
.B BUGS
for contact info.
.SH EXIT STATUS
-flashrom exits with 0 on success, 1 on most failures but with 3 if a call to mmap() fails.
+flashprog exits with 0 on success, 1 on most failures but with 3 if a call to mmap() fails.
.SH REQUIREMENTS
-flashrom needs different access permissions for different programmers.
+flashprog needs different access permissions for different programmers.
.sp
.B internal
needs raw memory access, PCI configuration space access, raw I/O port
@@ -1521,7 +1521,7 @@
.SH BUGS
You can report bugs, ask us questions or send success reports
via our communication channels listed here:
-.URLB "https://www.flashrom.org/Contact" "" .
+.URLB "https://www.flashprog.org/Contact" "" .
.sp
Also, we provide a
.URLB https://paste.flashrom.org "pastebin service"
@@ -1529,23 +1529,23 @@
.SS
.B Laptops
.sp
-Using flashrom on older laptops is dangerous and may easily make your hardware
-unusable. flashrom will attempt to detect if it is running on a susceptible
+Using flashprog on older laptops is dangerous and may easily make your hardware
+unusable. flashprog will attempt to detect if it is running on a susceptible
laptop and restrict flash-chip probing for safety reasons. Please see the
-detailed discussion of this topic and associated flashrom options in the
+detailed discussion of this topic and associated flashprog options in the
.B Laptops
paragraph in the
.B internal programmer
subsection of the
.B PROGRAMMER-SPECIFIC INFORMATION
section and the information
-.URLB "https://flashrom.org/Laptops" "in our wiki" .
+.URLB "https://flashprog.org/Laptops" "in our wiki" .
.SS
One-time programmable (OTP) memory and unique IDs
.sp
Some flash chips contain OTP memory often denoted as "security registers".
They usually have a capacity in the range of some bytes to a few hundred
-bytes and can be used to give devices unique IDs etc. flashrom is not able
+bytes and can be used to give devices unique IDs etc. flashprog is not able
to read or write these memories and may therefore not be able to duplicate a
chip completely. For chip types known to include OTP memories a warning is
printed when they are detected.
@@ -1553,7 +1553,7 @@
Similar to OTP memories are unique, factory programmed, unforgeable IDs.
They are not modifiable by the user at all.
.SH LICENSE
-.B flashrom
+.B flashprog
is covered by the GNU General Public License (GPL), version 2. Some files are
additionally available under any later version of the GPL.
.SH COPYRIGHT
@@ -1638,10 +1638,10 @@
.br
Yinghai Lu
.br
-some others, please see the flashrom git history for details.
+some others, please see the flashprog git history for details.
.br
Active maintainers can be reached via
-.MTOB "flashrom-stable@flashrom.org" "the mailing list" .
+.MTOB "flashprog@flashprog.org" "the mailing list" .
.PP
This manual page was written by
.MTOB "uwe@hermann-uwe.de" "Uwe Hermann" ,
diff --git a/flashrom.c b/flashprog.c
similarity index 95%
rename from flashrom.c
rename to flashprog.c
index 50e0a86..096453e 100644
--- a/flashrom.c
+++ b/flashprog.c
@@ -34,7 +34,7 @@
#include "hwaccess_physmap.h"
#include "chipdrivers.h"
-const char flashrom_version[] = FLASHROM_VERSION;
+const char flashprog_version[] = FLASHPROG_VERSION;
const char *chip_to_probe = NULL;
static const struct programmer_entry *programmer = NULL;
@@ -261,7 +261,7 @@
needlelen = strlen(needle);
if (!needlelen) {
msg_gerr("%s: empty needle! Please report a bug at "
- "flashrom-stable@flashrom.org\n", __func__);
+ "flashprog@flashprog.org\n", __func__);
return NULL;
}
/* No programmer parameters given. */
@@ -478,7 +478,7 @@
return need_erase_gran_bytes(have, want, len, stride, erased_value);
}
msg_cerr("%s: Unsupported granularity! Please report a bug at "
- "flashrom-stable@flashrom.org\n", __func__);
+ "flashprog@flashprog.org\n", __func__);
return 0;
}
}
@@ -516,7 +516,7 @@
const size_t stride = gran_to_bytes(gran);
if (!stride) {
msg_cerr("%s: Unsupported granularity! Please report a bug at "
- "flashrom-stable@flashrom.org\n", __func__);
+ "flashprog@flashprog.org\n", __func__);
/* Claim that no write was needed. A write with unknown
* granularity is too dangerous to try.
*/
@@ -637,10 +637,10 @@
static int init_default_layout(struct flashctx *flash)
{
/* Fill default layout covering the whole chip. */
- if (flashrom_layout_new(&flash->default_layout) ||
- flashrom_layout_add_region(flash->default_layout,
+ if (flashprog_layout_new(&flash->default_layout) ||
+ flashprog_layout_add_region(flash->default_layout,
0, flash->chip->total_size * 1024 - 1, "complete flash") ||
- flashrom_layout_include_region(flash->default_layout, "complete flash"))
+ flashprog_layout_include_region(flash->default_layout, "complete flash"))
return -1;
return 0;
}
@@ -662,7 +662,7 @@
continue;
msg_gdbg("Probing for %s %s, %d kB: ", chip->vendor, chip->name, chip->total_size);
if (!chip->probe && !force) {
- msg_gdbg("failed! flashrom has no probe function for this flash chip.\n");
+ msg_gdbg("failed! flashprog has no probe function for this flash chip.\n");
continue;
}
@@ -697,7 +697,7 @@
if (startchip == 0 && flash->chip->model_id == SFDP_DEVICE_ID) {
msg_cinfo("===\n"
"SFDP has autodetected a flash chip which is "
- "not natively supported by flashrom yet.\n");
+ "not natively supported by flashprog yet.\n");
if (count_usable_erasers(flash) == 0)
msg_cinfo("The standard operations read and "
"verify should work, but to support "
@@ -711,8 +711,8 @@
msg_cinfo(" we need to add them manually.\n"
"You can help us by mailing us the output of the following command to "
- "flashrom-stable@flashrom.org:\n"
- "'flashrom -VV [plus the -p/--programmer parameter]'\n"
+ "flashprog@flashprog.org:\n"
+ "'flashprog -VV [plus the -p/--programmer parameter]'\n"
"Thanks for your help!\n"
"===\n");
}
@@ -778,7 +778,7 @@
if (eraser.eraseblocks[i].count &&
!eraser.eraseblocks[i].size) {
msg_gerr("ERROR: Flash chip %s erase function %i region %i has size 0.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
chip->name, k, i);
ret = 1;
}
@@ -786,7 +786,7 @@
if (!eraser.eraseblocks[i].count &&
eraser.eraseblocks[i].size) {
msg_gerr("ERROR: Flash chip %s erase function %i region %i has count 0.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
chip->name, k, i);
ret = 1;
}
@@ -804,7 +804,7 @@
msg_gerr("ERROR: Flash chip %s erase function %i "
"region walking resulted in 0x%06x bytes total,"
" expected 0x%06x bytes.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
chip->name, k, done, chip->total_size * 1024);
ret = 1;
}
@@ -818,7 +818,7 @@
if (eraser.block_erase ==
chip->block_erasers[j].block_erase) {
msg_gerr("ERROR: Flash chip %s erase function %i and %i are identical.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
chip->name, k, j);
ret = 1;
}
@@ -826,7 +826,7 @@
if(curr_eraseblock_count > prev_eraseblock_count)
{
msg_gerr("ERROR: Flash chip %s erase function %i is not in order.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
chip->name, k);
ret = 1;
}
@@ -886,7 +886,7 @@
*/
static int read_by_layout(struct flashctx *const flashctx, uint8_t *const buffer)
{
- const struct flashrom_layout *const layout = get_layout(flashctx);
+ const struct flashprog_layout *const layout = get_layout(flashctx);
const struct romentry *entry = NULL;
while ((entry = layout_next_included(layout, entry))) {
@@ -1194,7 +1194,7 @@
const per_blockfn_t per_blockfn)
{
const bool do_erase = explicit_erase(info) || !(flashctx->chip->feature_bits & FEATURE_NO_ERASE);
- const struct flashrom_layout *const layout = get_layout(flashctx);
+ const struct flashprog_layout *const layout = get_layout(flashctx);
struct erase_layout *erase_layouts = NULL;
const struct romentry *entry = NULL;
int ret = 0, layout_count = 0;
@@ -1374,7 +1374,7 @@
*/
static int verify_by_layout(
struct flashctx *const flashctx,
- const struct flashrom_layout *const layout,
+ const struct flashprog_layout *const layout,
void *const curcontents, const uint8_t *const newcontents)
{
const struct romentry *entry = NULL;
@@ -1398,16 +1398,16 @@
#if CONFIG_INTERNAL == 1
if (programmer == &programmer_internal)
msg_gerr("This means we have to add special support for your board, programmer or flash\n"
- "chip. Please report this to the mailing list at flashrom-stable@flashrom.org or\n"
- "on IRC (see https://www.flashrom.org/Contact for details), thanks!\n"
+ "chip. Please report this to the mailing list at flashprog@flashprog.org or\n"
+ "on IRC (see https://www.flashprog.org/Contact for details), thanks!\n"
"-------------------------------------------------------------------------------\n"
"You may now reboot or simply leave the machine running.\n");
else
#endif
msg_gerr("Please check the connections (especially those to write protection pins) between\n"
- "the programmer and the flash chip. If you think the error is caused by flashrom\n"
- "please report this to the mailing list at flashrom-stable@flashrom.org or on IRC\n"
- "(see https://www.flashrom.org/Contact for details), thanks!\n");
+ "the programmer and the flash chip. If you think the error is caused by flashprog\n"
+ "please report this to the mailing list at flashprog@flashprog.org or on IRC\n"
+ "(see https://www.flashprog.org/Contact for details), thanks!\n");
}
void emergency_help_message(void)
@@ -1415,14 +1415,14 @@
msg_gerr("Your flash chip is in an unknown state.\n");
#if CONFIG_INTERNAL == 1
if (programmer == &programmer_internal)
- msg_gerr("Get help on IRC (see https://www.flashrom.org/Contact) or mail\n"
- "flashrom-stable@flashrom.org with the subject \"FAILED: <your board name>\"!\n"
+ msg_gerr("Get help on IRC (see https://www.flashprog.org/Contact) or mail\n"
+ "flashprog@flashprog.org with the subject \"FAILED: <your board name>\"!\n"
"-------------------------------------------------------------------------------\n"
"DO NOT REBOOT OR POWEROFF!\n");
else
#endif
- msg_gerr("Please report this to the mailing list at flashrom-stable@flashrom.org\n"
- "or on IRC (see https://www.flashrom.org/Contact for details), thanks!\n");
+ msg_gerr("Please report this to the mailing list at flashprog@flashprog.org\n"
+ "or on IRC (see https://www.flashprog.org/Contact for details), thanks!\n");
}
void list_programmers_linebreak(int startcol, int cols, int paren)
@@ -1521,7 +1521,7 @@
if (chip->vendor == NULL || chip->name == NULL || chip->bustype == BUS_NONE) {
ret = 1;
msg_gerr("ERROR: Some field of flash chip #%d (%s) is misconfigured.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n", i,
+ "Please report a bug at flashprog@flashprog.org\n", i,
chip->name == NULL ? "unnamed" : chip->name);
}
if (selfcheck_eraseblocks(chip)) {
@@ -1566,7 +1566,7 @@
msg_cerr("Continuing anyway.\n");
}
if (!chip->read) {
- msg_cerr("flashrom has no read function for this "
+ msg_cerr("flashprog has no read function for this "
"flash chip.\n");
return 1;
}
@@ -1584,7 +1584,7 @@
msg_cerr("Continuing anyway.\n");
}
if(count_usable_erasers(flash) == 0) {
- msg_cerr("flashrom has no erase function for this "
+ msg_cerr("flashprog has no erase function for this "
"flash chip.\n");
return 1;
}
@@ -1601,7 +1601,7 @@
msg_cerr("Continuing anyway.\n");
}
if (!chip->write) {
- msg_cerr("flashrom has no write function for this "
+ msg_cerr("flashprog has no write function for this "
"flash chip.\n");
return 1;
}
@@ -1670,7 +1670,7 @@
}
/**
- * @addtogroup flashrom-flash
+ * @addtogroup flashprog-flash
* @{
*/
@@ -1683,7 +1683,7 @@
* @param flashctx The context of the flash chip to erase.
* @return 0 on success.
*/
-int flashrom_flash_erase(struct flashctx *const flashctx)
+int flashprog_flash_erase(struct flashctx *const flashctx)
{
if (prepare_flash_access(flashctx, false, false, true, false))
return 1;
@@ -1695,10 +1695,10 @@
return ret;
}
-/** @} */ /* end flashrom-flash */
+/** @} */ /* end flashprog-flash */
/**
- * @defgroup flashrom-ops Operations
+ * @defgroup flashprog-ops Operations
* @{
*/
@@ -1715,7 +1715,7 @@
* 2 if buffer_len is too short for the flash chip's contents,
* or 1 on any other failure.
*/
-int flashrom_image_read(struct flashctx *const flashctx, void *const buffer, const size_t buffer_len)
+int flashprog_image_read(struct flashctx *const flashctx, void *const buffer, const size_t buffer_len)
{
const size_t flash_size = flashctx->chip->total_size * 1024;
@@ -1744,7 +1744,7 @@
static void combine_image_by_layout(const struct flashctx *const flashctx,
uint8_t *const newcontents, const uint8_t *const oldcontents)
{
- const struct flashrom_layout *const layout = get_layout(flashctx);
+ const struct flashprog_layout *const layout = get_layout(flashctx);
const struct romentry *included;
chipoff_t start = 0;
@@ -1780,13 +1780,13 @@
* 2 if write failed and flash contents changed,
* or 1 on any other failure.
*/
-int flashrom_image_write(struct flashctx *const flashctx, void *const buffer, const size_t buffer_len,
+int flashprog_image_write(struct flashctx *const flashctx, void *const buffer, const size_t buffer_len,
const void *const refbuffer)
{
const size_t flash_size = flashctx->chip->total_size * 1024;
const bool verify_all = flashctx->flags.verify_whole_chip;
const bool verify = flashctx->flags.verify_after_write;
- const struct flashrom_layout *const verify_layout =
+ const struct flashprog_layout *const verify_layout =
verify_all ? get_default_layout(flashctx) : get_layout(flashctx);
if (buffer_len != flash_size)
@@ -1917,9 +1917,9 @@
* 2 if buffer_len doesn't match the size of the flash chip,
* or 1 on any other failure.
*/
-int flashrom_image_verify(struct flashctx *const flashctx, const void *const buffer, const size_t buffer_len)
+int flashprog_image_verify(struct flashctx *const flashctx, const void *const buffer, const size_t buffer_len)
{
- const struct flashrom_layout *const layout = get_layout(flashctx);
+ const struct flashprog_layout *const layout = get_layout(flashctx);
const size_t flash_size = flashctx->chip->total_size * 1024;
if (buffer_len != flash_size)
@@ -1948,4 +1948,4 @@
return ret;
}
-/** @} */ /* end flashrom-ops */
+/** @} */ /* end flashprog-ops */
diff --git a/fmap.c b/fmap.c
index 69824ea..0eb5bf9 100644
--- a/fmap.c
+++ b/fmap.c
@@ -324,7 +324,7 @@
* speed benefit of using bsearch at which point we need to use brute-
* force instead.
*
- * TODO: Since flashrom is often used with high-latency external
+ * TODO: Since flashprog is often used with high-latency external
* programmers we should not be overly aggressive with bsearch.
*/
ret = fmap_bsearch_rom(fmap_out, flashctx, rom_offset, len, 256);
diff --git a/ft2232_spi.c b/ft2232_spi.c
index 246956e..4f9fbeb 100644
--- a/ft2232_spi.c
+++ b/ft2232_spi.c
@@ -26,7 +26,7 @@
#include <ftdi.h>
/* This is not defined in libftdi.h <0.20 (c7e4c09e68cfa6f5e112334aa1b3bb23401c8dc7 to be exact).
- * Some tests indicate that this is the only change that it is needed to support the FT232H in flashrom. */
+ * Some tests indicate that this is the only change that it is needed to support the FT232H in flashprog. */
#if !defined(HAVE_FT232H)
#define TYPE_232H 6
#endif
diff --git a/hwaccess_physmap.c b/hwaccess_physmap.c
index 5f18f8e..8d7ddf2 100644
--- a/hwaccess_physmap.c
+++ b/hwaccess_physmap.c
@@ -320,7 +320,7 @@
/* No need to check for zero size, such mappings would have yielded ERROR_PTR. */
if (virt_addr == ERROR_PTR) {
msg_perr("Trying to unmap a nonexisting mapping!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n");
+ "Please report a bug at flashprog@flashprog.org\n");
return;
}
@@ -334,7 +334,7 @@
/* No need to check for zero size, such mappings would have yielded ERROR_PTR. */
if (virt_addr == ERROR_PTR) {
msg_perr("Trying to unmap a nonexisting mapping!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n");
+ "Please report a bug at flashprog@flashprog.org\n");
return;
}
tmp = (uintptr_t)virt_addr;
diff --git a/ich_descriptors.c b/ich_descriptors.c
index 4ea2727..f939389 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -1066,7 +1066,7 @@
msg_pwarn("\nThe flash descriptor looks like a Skylake/Sunrise Point descriptor.\n"
"However, the read frequency isn't set to 17MHz (the only valid value).\n"
"Please report this message, the output of `ich_descriptors_tool` for\n"
- "your descriptor and the output of `lspci -nn` to flashrom-stable@flashrom.org\n\n");
+ "your descriptor and the output of `lspci -nn` to flashprog@flashprog.org\n\n");
}
break;
default:
@@ -1074,7 +1074,7 @@
msg_pwarn("\nThe flash descriptor has the read frequency set to 17MHz. However,\n"
"it doesn't look like a Skylake/Sunrise Point compatible descriptor.\n"
"Please report this message, the output of `ich_descriptors_tool` for\n"
- "your descriptor and the output of `lspci -nn` to flashrom-stable@flashrom.org\n\n");
+ "your descriptor and the output of `lspci -nn` to flashprog@flashprog.org\n\n");
}
}
return guess;
@@ -1339,7 +1339,7 @@
* 2 when out of memory.
*/
int layout_from_ich_descriptors(
- struct flashrom_layout **const layout,
+ struct flashprog_layout **const layout,
const void *const dump, const size_t len)
{
static const char *const regions[] = {
@@ -1352,7 +1352,7 @@
if (read_ich_descriptors_from_dump(dump, len, &cs, &desc))
return 1;
- if (flashrom_layout_new(layout))
+ if (flashprog_layout_new(layout))
return 2;
ssize_t i;
@@ -1362,8 +1362,8 @@
const chipoff_t limit = ICH_FREG_LIMIT(desc.region.FLREGs[i]);
if (limit <= base)
continue;
- if (flashrom_layout_add_region(*layout, base, limit, regions[i])) {
- flashrom_layout_release(*layout);
+ if (flashprog_layout_add_region(*layout, base, limit, regions[i])) {
+ flashprog_layout_release(*layout);
*layout = NULL;
return 2;
}
diff --git a/ichspi.c b/ichspi.c
index afedaf2..b4555b9 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1905,9 +1905,9 @@
for (i = 0; i < num_freg; i++)
ich_spi_rw_restricted |= ich9_handle_frap(tmp, i);
if (ich_spi_rw_restricted)
- msg_pinfo("Not all flash regions are freely accessible by flashrom. This is "
+ msg_pinfo("Not all flash regions are freely accessible by flashprog. This is "
"most likely\ndue to an active ME. Please see "
- "https://flashrom.org/ME for details.\n");
+ "https://flashprog.org/ME for details.\n");
}
/* Handle PR registers */
@@ -1975,17 +1975,17 @@
tmp = mmio_readl(ich_spibar + ICH8_REG_VSCC);
msg_pdbg("0x%x: 0x%08x (VSCC)\n", ICH8_REG_VSCC, tmp);
msg_pdbg("VSCC: ");
- prettyprint_ich_reg_vscc(tmp, FLASHROM_MSG_DEBUG, true);
+ prettyprint_ich_reg_vscc(tmp, FLASHPROG_MSG_DEBUG, true);
} else {
tmp = mmio_readl(ich_spibar + ICH9_REG_LVSCC);
msg_pdbg("0x%x: 0x%08x (LVSCC)\n", ICH9_REG_LVSCC, tmp);
msg_pdbg("LVSCC: ");
- prettyprint_ich_reg_vscc(tmp, FLASHROM_MSG_DEBUG, true);
+ prettyprint_ich_reg_vscc(tmp, FLASHPROG_MSG_DEBUG, true);
tmp = mmio_readl(ich_spibar + ICH9_REG_UVSCC);
msg_pdbg("0x%x: 0x%08x (UVSCC)\n", ICH9_REG_UVSCC, tmp);
msg_pdbg("UVSCC: ");
- prettyprint_ich_reg_vscc(tmp, FLASHROM_MSG_DEBUG, false);
+ prettyprint_ich_reg_vscc(tmp, FLASHPROG_MSG_DEBUG, false);
}
switch (ich_gen) {
diff --git a/include/flash.h b/include/flash.h
index db19566..bb31731 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -32,7 +32,7 @@
#undef max
#endif
-#include "libflashrom.h"
+#include "libflashprog.h"
#include "layout.h"
#include "writeprotect.h"
@@ -178,8 +178,8 @@
#define TEST_BAD_PREW (struct tested){ .probe = BAD, .read = BAD, .erase = BAD, .write = BAD, .wp = NT }
#define TEST_BAD_PREWB (struct tested){ .probe = BAD, .read = BAD, .erase = BAD, .write = BAD, .wp = BAD }
-struct flashrom_flashctx;
-#define flashctx flashrom_flashctx /* TODO: Agree on a name and convert all occurrences. */
+struct flashprog_flashctx;
+#define flashctx flashprog_flashctx /* TODO: Agree on a name and convert all occurrences. */
typedef int (erasefunc_t)(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
enum flash_reg {
@@ -230,7 +230,7 @@
unsigned int page_size;
int feature_bits;
- /* Indicate how well flashrom supports different operations of this flash chip. */
+ /* Indicate how well flashprog supports different operations of this flash chip. */
struct tested {
enum test_state probe;
enum test_state read;
@@ -327,20 +327,20 @@
typedef int (*chip_restore_fn_cb_t)(struct flashctx *flash, uint8_t status);
-struct flashrom_flashctx {
+struct flashprog_flashctx {
struct flashchip *chip;
/* FIXME: The memory mappings should be saved in a more structured way. */
/* The physical_* fields store the respective addresses in the physical address space of the CPU. */
uintptr_t physical_memory;
- /* The virtual_* fields store where the respective physical address is mapped into flashrom's address
+ /* The virtual_* fields store where the respective physical address is mapped into flashprog's address
* space. A value equivalent to (chipaddr)ERROR_PTR indicates an invalid mapping (or none at all). */
chipaddr virtual_memory;
/* Some flash devices have an additional register space; semantics are like above. */
uintptr_t physical_registers;
chipaddr virtual_registers;
struct registered_master *mst;
- const struct flashrom_layout *layout;
- struct flashrom_layout *default_layout;
+ const struct flashprog_layout *layout;
+ struct flashprog_layout *default_layout;
struct {
bool force;
bool force_boardmismatch;
@@ -412,8 +412,8 @@
size_t strnlen(const char *str, size_t n);
#endif
-/* flashrom.c */
-extern const char flashrom_version[];
+/* flashprog.c */
+extern const char flashprog_version[];
extern const char *chip_to_probe;
char *flashbuses_to_text(enum chipbustype bustype);
int map_flash(struct flashctx *flash);
@@ -436,26 +436,26 @@
/* Something happened that shouldn't happen, we'll abort. */
#define ERROR_FATAL -0xee
-#define ERROR_FLASHROM_BUG -200
-/* We reached one of the hardcoded limits of flashrom. This can be fixed by
+#define ERROR_FLASHPROG_BUG -200
+/* We reached one of the hardcoded limits of flashprog. This can be fixed by
* increasing the limit of a compile-time allocation or by switching to dynamic
* allocation.
* Note: If this warning is triggered, check first for runaway registrations.
*/
-#define ERROR_FLASHROM_LIMIT -201
+#define ERROR_FLASHPROG_LIMIT -201
/* cli_common.c */
void print_chip_support_status(const struct flashchip *chip);
/* cli_output.c */
-extern enum flashrom_log_level verbose_screen;
-extern enum flashrom_log_level verbose_logfile;
+extern enum flashprog_log_level verbose_screen;
+extern enum flashprog_log_level verbose_logfile;
int open_logfile(const char * const filename);
int close_logfile(void);
void start_logging(void);
-int flashrom_print_cb(enum flashrom_log_level level, const char *fmt, va_list ap);
+int flashprog_print_cb(enum flashprog_log_level level, const char *fmt, va_list ap);
/* Let gcc and clang check for correct printf-style format strings. */
-int print(enum flashrom_log_level level, const char *fmt, ...)
+int print(enum flashprog_log_level level, const char *fmt, ...)
#ifdef __MINGW32__
# ifndef __MINGW_PRINTF_FORMAT
# define __MINGW_PRINTF_FORMAT gnu_printf
@@ -464,24 +464,24 @@
#else
__attribute__((format(printf, 2, 3)));
#endif
-#define msg_gerr(...) print(FLASHROM_MSG_ERROR, __VA_ARGS__) /* general errors */
-#define msg_perr(...) print(FLASHROM_MSG_ERROR, __VA_ARGS__) /* programmer errors */
-#define msg_cerr(...) print(FLASHROM_MSG_ERROR, __VA_ARGS__) /* chip errors */
-#define msg_gwarn(...) print(FLASHROM_MSG_WARN, __VA_ARGS__) /* general warnings */
-#define msg_pwarn(...) print(FLASHROM_MSG_WARN, __VA_ARGS__) /* programmer warnings */
-#define msg_cwarn(...) print(FLASHROM_MSG_WARN, __VA_ARGS__) /* chip warnings */
-#define msg_ginfo(...) print(FLASHROM_MSG_INFO, __VA_ARGS__) /* general info */
-#define msg_pinfo(...) print(FLASHROM_MSG_INFO, __VA_ARGS__) /* programmer info */
-#define msg_cinfo(...) print(FLASHROM_MSG_INFO, __VA_ARGS__) /* chip info */
-#define msg_gdbg(...) print(FLASHROM_MSG_DEBUG, __VA_ARGS__) /* general debug */
-#define msg_pdbg(...) print(FLASHROM_MSG_DEBUG, __VA_ARGS__) /* programmer debug */
-#define msg_cdbg(...) print(FLASHROM_MSG_DEBUG, __VA_ARGS__) /* chip debug */
-#define msg_gdbg2(...) print(FLASHROM_MSG_DEBUG2, __VA_ARGS__) /* general debug2 */
-#define msg_pdbg2(...) print(FLASHROM_MSG_DEBUG2, __VA_ARGS__) /* programmer debug2 */
-#define msg_cdbg2(...) print(FLASHROM_MSG_DEBUG2, __VA_ARGS__) /* chip debug2 */
-#define msg_gspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* general debug spew */
-#define msg_pspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* programmer debug spew */
-#define msg_cspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* chip debug spew */
+#define msg_gerr(...) print(FLASHPROG_MSG_ERROR, __VA_ARGS__) /* general errors */
+#define msg_perr(...) print(FLASHPROG_MSG_ERROR, __VA_ARGS__) /* programmer errors */
+#define msg_cerr(...) print(FLASHPROG_MSG_ERROR, __VA_ARGS__) /* chip errors */
+#define msg_gwarn(...) print(FLASHPROG_MSG_WARN, __VA_ARGS__) /* general warnings */
+#define msg_pwarn(...) print(FLASHPROG_MSG_WARN, __VA_ARGS__) /* programmer warnings */
+#define msg_cwarn(...) print(FLASHPROG_MSG_WARN, __VA_ARGS__) /* chip warnings */
+#define msg_ginfo(...) print(FLASHPROG_MSG_INFO, __VA_ARGS__) /* general info */
+#define msg_pinfo(...) print(FLASHPROG_MSG_INFO, __VA_ARGS__) /* programmer info */
+#define msg_cinfo(...) print(FLASHPROG_MSG_INFO, __VA_ARGS__) /* chip info */
+#define msg_gdbg(...) print(FLASHPROG_MSG_DEBUG, __VA_ARGS__) /* general debug */
+#define msg_pdbg(...) print(FLASHPROG_MSG_DEBUG, __VA_ARGS__) /* programmer debug */
+#define msg_cdbg(...) print(FLASHPROG_MSG_DEBUG, __VA_ARGS__) /* chip debug */
+#define msg_gdbg2(...) print(FLASHPROG_MSG_DEBUG2, __VA_ARGS__) /* general debug2 */
+#define msg_pdbg2(...) print(FLASHPROG_MSG_DEBUG2, __VA_ARGS__) /* programmer debug2 */
+#define msg_cdbg2(...) print(FLASHPROG_MSG_DEBUG2, __VA_ARGS__) /* chip debug2 */
+#define msg_gspew(...) print(FLASHPROG_MSG_SPEW, __VA_ARGS__) /* general debug spew */
+#define msg_pspew(...) print(FLASHPROG_MSG_SPEW, __VA_ARGS__) /* programmer debug spew */
+#define msg_cspew(...) print(FLASHPROG_MSG_SPEW, __VA_ARGS__) /* chip debug spew */
/* spi.c */
struct spi_command {
diff --git a/include/ich_descriptors.h b/include/ich_descriptors.h
index 5a6cdf1..7e123f3 100644
--- a/include/ich_descriptors.h
+++ b/include/ich_descriptors.h
@@ -591,6 +591,6 @@
int read_ich_descriptors_via_fdo(enum ich_chipset cs, void *spibar, struct ich_descriptors *desc);
int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors *desc, uint8_t idx);
-int layout_from_ich_descriptors(struct flashrom_layout **, const void *dump, size_t len);
+int layout_from_ich_descriptors(struct flashprog_layout **, const void *dump, size_t len);
#endif /* __ICH_DESCRIPTORS_H__ */
diff --git a/include/layout.h b/include/layout.h
index 91a6d6e..356ca25 100644
--- a/include/layout.h
+++ b/include/layout.h
@@ -44,23 +44,23 @@
char *name;
};
-struct flashrom_layout;
+struct flashprog_layout;
struct layout_include_args;
-struct flashrom_flashctx;
-const struct flashrom_layout *get_default_layout(const struct flashrom_flashctx *);
-const struct flashrom_layout *get_layout(const struct flashrom_flashctx *);
+struct flashprog_flashctx;
+const struct flashprog_layout *get_default_layout(const struct flashprog_flashctx *);
+const struct flashprog_layout *get_layout(const struct flashprog_flashctx *);
-int layout_from_file(struct flashrom_layout **, const char *name);
+int layout_from_file(struct flashprog_layout **, const char *name);
int register_include_arg(struct layout_include_args **, char *arg);
-int process_include_args(struct flashrom_layout *, const struct layout_include_args *);
+int process_include_args(struct flashprog_layout *, const struct layout_include_args *);
void cleanup_include_args(struct layout_include_args **);
-const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t);
-const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *);
-const struct romentry *layout_next(const struct flashrom_layout *, const struct romentry *);
-int layout_sanity_checks(const struct flashrom_flashctx *, bool write_it);
+const struct romentry *layout_next_included_region(const struct flashprog_layout *, chipoff_t);
+const struct romentry *layout_next_included(const struct flashprog_layout *, const struct romentry *);
+const struct romentry *layout_next(const struct flashprog_layout *, const struct romentry *);
+int layout_sanity_checks(const struct flashprog_flashctx *, bool write_it);
#endif /* !__LAYOUT_H__ */
diff --git a/include/libflashprog.h b/include/libflashprog.h
new file mode 100644
index 0000000..9c39f5f
--- /dev/null
+++ b/include/libflashprog.h
@@ -0,0 +1,118 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2010 Google Inc.
+ * Copyright (C) 2012 secunet Security Networks AG
+ * (Written by Nico Huber <nico.huber@secunet.com> for secunet)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __LIBFLASHPROG_H__
+#define __LIBFLASHPROG_H__ 1
+
+#include <sys/types.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdarg.h>
+
+int flashprog_init(int perform_selfcheck);
+int flashprog_shutdown(void);
+/** @ingroup flashprog-general */
+enum flashprog_log_level {
+ FLASHPROG_MSG_ERROR = 0,
+ FLASHPROG_MSG_WARN = 1,
+ FLASHPROG_MSG_INFO = 2,
+ FLASHPROG_MSG_DEBUG = 3,
+ FLASHPROG_MSG_DEBUG2 = 4,
+ FLASHPROG_MSG_SPEW = 5,
+};
+/** @ingroup flashprog-general */
+typedef int(flashprog_log_callback)(enum flashprog_log_level, const char *format, va_list);
+void flashprog_set_log_callback(flashprog_log_callback *);
+
+/** @ingroup flashprog-prog */
+struct flashprog_programmer;
+int flashprog_programmer_init(struct flashprog_programmer **, const char *prog_name, const char *prog_params);
+int flashprog_programmer_shutdown(struct flashprog_programmer *);
+
+struct flashprog_flashctx;
+int flashprog_flash_probe(struct flashprog_flashctx **, const struct flashprog_programmer *, const char *chip_name);
+size_t flashprog_flash_getsize(const struct flashprog_flashctx *);
+int flashprog_flash_erase(struct flashprog_flashctx *);
+void flashprog_flash_release(struct flashprog_flashctx *);
+
+/** @ingroup flashprog-flash */
+enum flashprog_flag {
+ FLASHPROG_FLAG_FORCE,
+ FLASHPROG_FLAG_FORCE_BOARDMISMATCH,
+ FLASHPROG_FLAG_VERIFY_AFTER_WRITE,
+ FLASHPROG_FLAG_VERIFY_WHOLE_CHIP,
+};
+void flashprog_flag_set(struct flashprog_flashctx *, enum flashprog_flag, bool value);
+bool flashprog_flag_get(const struct flashprog_flashctx *, enum flashprog_flag);
+
+int flashprog_image_read(struct flashprog_flashctx *, void *buffer, size_t buffer_len);
+int flashprog_image_write(struct flashprog_flashctx *, void *buffer, size_t buffer_len, const void *refbuffer);
+int flashprog_image_verify(struct flashprog_flashctx *, const void *buffer, size_t buffer_len);
+
+struct flashprog_layout;
+int flashprog_layout_new(struct flashprog_layout **);
+int flashprog_layout_read_from_ifd(struct flashprog_layout **, struct flashprog_flashctx *, const void *dump, size_t len);
+int flashprog_layout_read_fmap_from_rom(struct flashprog_layout **,
+ struct flashprog_flashctx *, size_t offset, size_t length);
+int flashprog_layout_read_fmap_from_buffer(struct flashprog_layout **layout,
+ struct flashprog_flashctx *, const uint8_t *buf, size_t len);
+int flashprog_layout_add_region(struct flashprog_layout *, size_t start, size_t end, const char *name);
+int flashprog_layout_include_region(struct flashprog_layout *, const char *name);
+void flashprog_layout_release(struct flashprog_layout *);
+void flashprog_layout_set(struct flashprog_flashctx *, const struct flashprog_layout *);
+
+/** @ingroup flashprog-wp */
+enum flashprog_wp_result {
+ FLASHPROG_WP_OK = 0,
+ FLASHPROG_WP_ERR_CHIP_UNSUPPORTED = 1,
+ FLASHPROG_WP_ERR_OTHER = 2,
+ FLASHPROG_WP_ERR_READ_FAILED = 3,
+ FLASHPROG_WP_ERR_WRITE_FAILED = 4,
+ FLASHPROG_WP_ERR_VERIFY_FAILED = 5,
+ FLASHPROG_WP_ERR_RANGE_UNSUPPORTED = 6,
+ FLASHPROG_WP_ERR_MODE_UNSUPPORTED = 7,
+ FLASHPROG_WP_ERR_RANGE_LIST_UNAVAILABLE = 8,
+ FLASHPROG_WP_ERR_UNSUPPORTED_STATE = 9,
+};
+
+enum flashprog_wp_mode {
+ FLASHPROG_WP_MODE_DISABLED,
+ FLASHPROG_WP_MODE_HARDWARE,
+ FLASHPROG_WP_MODE_POWER_CYCLE,
+ FLASHPROG_WP_MODE_PERMANENT
+};
+struct flashprog_wp_cfg;
+struct flashprog_wp_ranges;
+
+enum flashprog_wp_result flashprog_wp_cfg_new(struct flashprog_wp_cfg **);
+void flashprog_wp_cfg_release(struct flashprog_wp_cfg *);
+void flashprog_wp_set_mode(struct flashprog_wp_cfg *, enum flashprog_wp_mode);
+enum flashprog_wp_mode flashprog_wp_get_mode(const struct flashprog_wp_cfg *);
+void flashprog_wp_set_range(struct flashprog_wp_cfg *, size_t start, size_t len);
+void flashprog_wp_get_range(size_t *start, size_t *len, const struct flashprog_wp_cfg *);
+
+enum flashprog_wp_result flashprog_wp_read_cfg(struct flashprog_wp_cfg *, struct flashprog_flashctx *);
+enum flashprog_wp_result flashprog_wp_write_cfg(struct flashprog_flashctx *, const struct flashprog_wp_cfg *);
+
+enum flashprog_wp_result flashprog_wp_get_available_ranges(struct flashprog_wp_ranges **, struct flashprog_flashctx *);
+size_t flashprog_wp_ranges_get_count(const struct flashprog_wp_ranges *);
+enum flashprog_wp_result flashprog_wp_ranges_get_range(size_t *start, size_t *len, const struct flashprog_wp_ranges *, unsigned int index);
+void flashprog_wp_ranges_release(struct flashprog_wp_ranges *);
+
+#endif /* !__LIBFLASHPROG_H__ */
diff --git a/include/libflashrom.h b/include/libflashrom.h
deleted file mode 100644
index 9f503a2..0000000
--- a/include/libflashrom.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * This file is part of the flashrom project.
- *
- * Copyright (C) 2010 Google Inc.
- * Copyright (C) 2012 secunet Security Networks AG
- * (Written by Nico Huber <nico.huber@secunet.com> for secunet)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __LIBFLASHROM_H__
-#define __LIBFLASHROM_H__ 1
-
-#include <sys/types.h>
-#include <stddef.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdarg.h>
-
-int flashrom_init(int perform_selfcheck);
-int flashrom_shutdown(void);
-/** @ingroup flashrom-general */
-enum flashrom_log_level {
- FLASHROM_MSG_ERROR = 0,
- FLASHROM_MSG_WARN = 1,
- FLASHROM_MSG_INFO = 2,
- FLASHROM_MSG_DEBUG = 3,
- FLASHROM_MSG_DEBUG2 = 4,
- FLASHROM_MSG_SPEW = 5,
-};
-/** @ingroup flashrom-general */
-typedef int(flashrom_log_callback)(enum flashrom_log_level, const char *format, va_list);
-void flashrom_set_log_callback(flashrom_log_callback *);
-
-/** @ingroup flashrom-prog */
-struct flashrom_programmer;
-int flashrom_programmer_init(struct flashrom_programmer **, const char *prog_name, const char *prog_params);
-int flashrom_programmer_shutdown(struct flashrom_programmer *);
-
-struct flashrom_flashctx;
-int flashrom_flash_probe(struct flashrom_flashctx **, const struct flashrom_programmer *, const char *chip_name);
-size_t flashrom_flash_getsize(const struct flashrom_flashctx *);
-int flashrom_flash_erase(struct flashrom_flashctx *);
-void flashrom_flash_release(struct flashrom_flashctx *);
-
-/** @ingroup flashrom-flash */
-enum flashrom_flag {
- FLASHROM_FLAG_FORCE,
- FLASHROM_FLAG_FORCE_BOARDMISMATCH,
- FLASHROM_FLAG_VERIFY_AFTER_WRITE,
- FLASHROM_FLAG_VERIFY_WHOLE_CHIP,
-};
-void flashrom_flag_set(struct flashrom_flashctx *, enum flashrom_flag, bool value);
-bool flashrom_flag_get(const struct flashrom_flashctx *, enum flashrom_flag);
-
-int flashrom_image_read(struct flashrom_flashctx *, void *buffer, size_t buffer_len);
-int flashrom_image_write(struct flashrom_flashctx *, void *buffer, size_t buffer_len, const void *refbuffer);
-int flashrom_image_verify(struct flashrom_flashctx *, const void *buffer, size_t buffer_len);
-
-struct flashrom_layout;
-int flashrom_layout_new(struct flashrom_layout **);
-int flashrom_layout_read_from_ifd(struct flashrom_layout **, struct flashrom_flashctx *, const void *dump, size_t len);
-int flashrom_layout_read_fmap_from_rom(struct flashrom_layout **,
- struct flashrom_flashctx *, size_t offset, size_t length);
-int flashrom_layout_read_fmap_from_buffer(struct flashrom_layout **layout,
- struct flashrom_flashctx *, const uint8_t *buf, size_t len);
-int flashrom_layout_add_region(struct flashrom_layout *, size_t start, size_t end, const char *name);
-int flashrom_layout_include_region(struct flashrom_layout *, const char *name);
-void flashrom_layout_release(struct flashrom_layout *);
-void flashrom_layout_set(struct flashrom_flashctx *, const struct flashrom_layout *);
-
-/** @ingroup flashrom-wp */
-enum flashrom_wp_result {
- FLASHROM_WP_OK = 0,
- FLASHROM_WP_ERR_CHIP_UNSUPPORTED = 1,
- FLASHROM_WP_ERR_OTHER = 2,
- FLASHROM_WP_ERR_READ_FAILED = 3,
- FLASHROM_WP_ERR_WRITE_FAILED = 4,
- FLASHROM_WP_ERR_VERIFY_FAILED = 5,
- FLASHROM_WP_ERR_RANGE_UNSUPPORTED = 6,
- FLASHROM_WP_ERR_MODE_UNSUPPORTED = 7,
- FLASHROM_WP_ERR_RANGE_LIST_UNAVAILABLE = 8,
- FLASHROM_WP_ERR_UNSUPPORTED_STATE = 9,
-};
-
-enum flashrom_wp_mode {
- FLASHROM_WP_MODE_DISABLED,
- FLASHROM_WP_MODE_HARDWARE,
- FLASHROM_WP_MODE_POWER_CYCLE,
- FLASHROM_WP_MODE_PERMANENT
-};
-struct flashrom_wp_cfg;
-struct flashrom_wp_ranges;
-
-enum flashrom_wp_result flashrom_wp_cfg_new(struct flashrom_wp_cfg **);
-void flashrom_wp_cfg_release(struct flashrom_wp_cfg *);
-void flashrom_wp_set_mode(struct flashrom_wp_cfg *, enum flashrom_wp_mode);
-enum flashrom_wp_mode flashrom_wp_get_mode(const struct flashrom_wp_cfg *);
-void flashrom_wp_set_range(struct flashrom_wp_cfg *, size_t start, size_t len);
-void flashrom_wp_get_range(size_t *start, size_t *len, const struct flashrom_wp_cfg *);
-
-enum flashrom_wp_result flashrom_wp_read_cfg(struct flashrom_wp_cfg *, struct flashrom_flashctx *);
-enum flashrom_wp_result flashrom_wp_write_cfg(struct flashrom_flashctx *, const struct flashrom_wp_cfg *);
-
-enum flashrom_wp_result flashrom_wp_get_available_ranges(struct flashrom_wp_ranges **, struct flashrom_flashctx *);
-size_t flashrom_wp_ranges_get_count(const struct flashrom_wp_ranges *);
-enum flashrom_wp_result flashrom_wp_ranges_get_range(size_t *start, size_t *len, const struct flashrom_wp_ranges *, unsigned int index);
-void flashrom_wp_ranges_release(struct flashrom_wp_ranges *);
-
-#endif /* !__LIBFLASHROM_H__ */
diff --git a/include/programmer.h b/include/programmer.h
index a4e2be6..4fee2ef 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -277,7 +277,7 @@
int register_spi_bitbang_master(const struct bitbang_spi_master *master, void *spi_data);
-/* flashrom.c */
+/* flashprog.c */
struct decode_sizes {
uint32_t parallel;
uint32_t lpc;
diff --git a/include/spi.h b/include/spi.h
index 4c6ff3e..dc09b8e 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -211,7 +211,7 @@
#define SPI_INVALID_OPCODE -2
#define SPI_INVALID_ADDRESS -3
#define SPI_INVALID_LENGTH -4
-#define SPI_FLASHROM_BUG -5
+#define SPI_FLASHPROG_BUG -5
#define SPI_PROGRAMMER_ERROR -6
#endif /* !__SPI_H__ */
diff --git a/include/writeprotect.h b/include/writeprotect.h
index e27403d..0e5a86e 100644
--- a/include/writeprotect.h
+++ b/include/writeprotect.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <stddef.h>
-#include "libflashrom.h"
+#include "libflashprog.h"
#define MAX_BP_BITS 4
@@ -32,13 +32,13 @@
};
/* Generic description of a chip's write protection configuration. */
-struct flashrom_wp_cfg {
- enum flashrom_wp_mode mode;
+struct flashprog_wp_cfg {
+ enum flashprog_wp_mode mode;
struct wp_range range;
};
/* Collection of multiple write protection ranges. */
-struct flashrom_wp_ranges {
+struct flashprog_wp_ranges {
struct wp_range *ranges;
size_t count;
};
@@ -75,15 +75,15 @@
uint8_t bp[MAX_BP_BITS];
};
-struct flashrom_flashctx;
+struct flashprog_flashctx;
/* Write WP configuration to the chip */
-enum flashrom_wp_result wp_write_cfg(struct flashrom_flashctx *, const struct flashrom_wp_cfg *);
+enum flashprog_wp_result wp_write_cfg(struct flashprog_flashctx *, const struct flashprog_wp_cfg *);
/* Read WP configuration from the chip */
-enum flashrom_wp_result wp_read_cfg(struct flashrom_wp_cfg *, struct flashrom_flashctx *);
+enum flashprog_wp_result wp_read_cfg(struct flashprog_wp_cfg *, struct flashprog_flashctx *);
/* Get a list of protection ranges supported by the chip */
-enum flashrom_wp_result wp_get_available_ranges(struct flashrom_wp_ranges **, struct flashrom_flashctx *);
+enum flashprog_wp_result wp_get_available_ranges(struct flashprog_wp_ranges **, struct flashprog_flashctx *);
#endif /* !__WRITEPROTECT_H__ */
diff --git a/internal.c b/internal.c
index 9ddcff9..f8de4a7 100644
--- a/internal.c
+++ b/internal.c
@@ -282,10 +282,10 @@
if (is_laptop && !laptop_ok) {
msg_pinfo("========================================================================\n");
if (is_laptop == 1) {
- msg_pinfo("You seem to be running flashrom on an unknown laptop. Some\n"
+ msg_pinfo("You seem to be running flashprog on an unknown laptop. Some\n"
"internal buses have been disabled for safety reasons.\n\n");
} else {
- msg_pinfo("You may be running flashrom on an unknown laptop. We could not\n"
+ msg_pinfo("You may be running flashprog on an unknown laptop. We could not\n"
"detect this for sure because your vendor has not set up the SMBIOS\n"
"tables correctly. Some internal buses have been disabled for\n"
"safety reasons. You can enforce using all buses by adding\n"
@@ -296,7 +296,7 @@
msg_perr("Laptops, notebooks and netbooks are difficult to support and we\n"
"recommend to use the vendor flashing utility. The embedded controller\n"
"(EC) in these machines often interacts badly with flashing.\n"
- "See the manpage and https://flashrom.org/Laptops for details.\n\n"
+ "See the manpage and https://flashprog.org/Laptops for details.\n\n"
"If flash is shared with the EC, erase is guaranteed to brick your laptop\n"
"and write may brick your laptop.\n"
"Read and probe may irritate your EC and cause fan failure, backlight\n"
diff --git a/jedec.c b/jedec.c
index 280eed7..a8b734b 100644
--- a/jedec.c
+++ b/jedec.c
@@ -649,7 +649,7 @@
/* Only allow changes to known read/write/lockdown bits */
if (((cur ^ new) & ~REG2_MASK) != 0) {
msg_cerr("Invalid lock change from 0x%02x to 0x%02x requested at 0x%0*" PRIxPTR "!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
cur, new, PRIxPTR_WIDTH, lockreg);
return -1;
}
diff --git a/known_boards.c b/known_boards.c
index afc6992..135f45e 100644
--- a/known_boards.c
+++ b/known_boards.c
@@ -72,7 +72,7 @@
B("ASRock", "960GM-GS3 FX", OK, "http://www.asrock.com/mb/overview.asp?Model=960GM-GS3%20FX", NULL),
B("ASRock", "A330GC", OK, "http://www.asrock.com/mb/overview.asp?Model=A330GC", NULL),
B("ASRock", "A770CrossFire", OK, "http://www.asrock.com/mb/overview.asp?Model=A770CrossFire", NULL),
- B("ASRock", "A780FullHD", OK, "http://www.asrock.com/mb/overview.asp?Model=A780FullHD", "While flashrom is working correctly, there might be problems with the firmware images themselves. Please see https://flashrom.org/pipermail/flashrom/2012-July/009600.html for details."),
+ B("ASRock", "A780FullHD", OK, "http://www.asrock.com/mb/overview.asp?Model=A780FullHD", "While flashprog is working correctly, there might be problems with the firmware images themselves. Please see https://flashrom.org/pipermail/flashrom/2012-July/009600.html for details."),
B("ASRock", "ALiveNF6G-DVI", OK, "http://www.asrock.com/mb/overview.asp?Model=ALiveNF6G-DVI", NULL),
B("ASRock", "AM2NF6G-VSTA", OK, "http://www.asrock.com/mb/overview.asp?Model=AM2NF6G-VSTA", NULL),
B("ASRock", "AMCP7AION-HT", OK, "http://www.asrock.com/nettop/NVIDIA/ION%20330HT/", "Used in ION 330HT(-BD) barebones."),
@@ -163,7 +163,7 @@
B("ASUS", "M4N68T V2", OK, "https://www.asus.com/Motherboards/AMD_AM3/M4N68T_V2/", NULL),
B("ASUS", "M4N78 PRO", OK, "https://www.asus.com/Motherboards/AMD_AM2Plus/M4N78_PRO/", NULL),
B("ASUS", "M4N78 SE", OK, "https://www.asus.com/Motherboards/AMD_AM2Plus/M4N78_SE/", NULL),
- B("ASUS", "M5A78L-M LX", OK, "https://www.asus.com/Motherboards/AMD_AM3Plus/M5A78LM_LX/", "The MAC address of the onboard LAN NIC is stored in flash, hence overwritten by flashrom; see https://flashrom.org/pipermail/flashrom/2012-May/009200.html"),
+ B("ASUS", "M5A78L-M LX", OK, "https://www.asus.com/Motherboards/AMD_AM3Plus/M5A78LM_LX/", "The MAC address of the onboard LAN NIC is stored in flash, hence overwritten by flashprog; see https://flashrom.org/pipermail/flashrom/2012-May/009200.html"),
B("ASUS", "M5A97 (rev. 1.0)", OK, "https://www.asus.com/Motherboard/M5A97/", NULL),
B("ASUS", "M5A99X EVO", OK, "https://www.asus.com/Motherboards/AMD_AM3Plus/M5A99X_EVO/", NULL),
B("ASUS", "Maximus IV Extreme", BAD, "https://www.asus.com/Motherboards/Intel_Socket_1155/Maximus_IV_Extreme/", "Probing works (Macronix MX25L3205, 4096 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."),
@@ -202,7 +202,7 @@
B("ASUS", "P5BV-R", OK, "https://www.asus.com/Server_Workstation/Servers/RS120E5PA2/", "Used in RS120-E5/PA2 servers."),
B("ASUS", "P5GC-MX/1333", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5GCMX1333/", NULL),
B("ASUS", "P5GD1 Pro", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5GD1_PRO/", NULL),
- B("ASUS", "P5GD1-VM/S", OK, NULL, "This is an OEM board from FSC. Although flashrom supports it and can probably not distinguish it from the P5GD1-VM, please note that the P5GD1-VM BIOS does not support the FSC variants completely."),
+ B("ASUS", "P5GD1-VM/S", OK, NULL, "This is an OEM board from FSC. Although flashprog supports it and can probably not distinguish it from the P5GD1-VM, please note that the P5GD1-VM BIOS does not support the FSC variants completely."),
B("ASUS", "P5GD1(-VM)", NT, NULL, "Untested board enable."),
B("ASUS", "P5GD2 Premium", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5GD2_Premium/", NULL),
B("ASUS", "P5GD2-X", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5GD2X/", NULL),
@@ -233,13 +233,13 @@
B("ASUS", "P5PE-VM", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5PEVM/", NULL),
B("ASUS", "P5QPL-AM", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5QPLAM/", NULL),
B("ASUS", "P5VD1-X", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5VD1X/", NULL),
- B("ASUS", "P5VD2-MX", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5VD2MX/", "The MAC address of the onboard LAN NIC is stored in flash, hence overwritten by flashrom; see https://flashrom.org/pipermail/flashrom/2012-March/009014.html"),
+ B("ASUS", "P5VD2-MX", OK, "https://www.asus.com/Motherboards/Intel_Socket_775/P5VD2MX/", "The MAC address of the onboard LAN NIC is stored in flash, hence overwritten by flashprog; see https://flashrom.org/pipermail/flashrom/2012-March/009014.html"),
B("ASUS", "P5W DH Deluxe", OK, "https://www.asus.com/SupportOnly/P5W_DH_Deluxe/HelpDesk_Knowledge/", NULL),
B("ASUS", "P6T SE", OK, "https://www.asus.com/Motherboards/Intel_Socket_1366/P6T_SE/", NULL),
B("ASUS", "P6T Deluxe", OK, "https://www.asus.com/Motherboards/Intel_Socket_1366/P6T_Deluxe/", NULL),
B("ASUS", "P6T Deluxe V2", OK, "https://www.asus.com/Motherboards/Intel_Socket_1366/P6T_Deluxe_V2/", NULL),
B("ASUS", "P7H57D-V EVO", OK, "https://www.asus.com/Motherboards/Intel_Socket_1156/P7H57DV_EVO/", NULL),
- B("ASUS", "P7H55-M LX", BAD, NULL, "flashrom works correctly, but GbE LAN is nonworking (probably due to a missing/bogus MAC address; see https://flashrom.org/pipermail/flashrom/2011-July/007432.html and http://ubuntuforums.org/showthread.php?t=1534389 for a possible workaround)"),
+ B("ASUS", "P7H55-M LX", BAD, NULL, "flashprog works correctly, but GbE LAN is nonworking (probably due to a missing/bogus MAC address; see https://flashrom.org/pipermail/flashrom/2011-July/007432.html and http://ubuntuforums.org/showthread.php?t=1534389 for a possible workaround)"),
B("ASUS", "P8B-E/4L", BAD, NULL, "Probing works (Winbond W25Q64, 8192 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."),
B("ASUS", "P8B WS", BAD, NULL, "Probing works (Winbond W25Q32, 4096 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."),
B("ASUS", "P8B75-M LE", BAD, NULL, "Probing works (2x 8192 kB via hwseq), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."),
@@ -484,11 +484,11 @@
B("MSI", "MS-7250 (K9N SLI (rev 2.1))", OK, "http://www.msi.com/product/mb/K9N--SLI.html", NULL),
B("MSI", "MS-7253 (K9VGM-V)", OK, "http://www.msi.com/product/mb/K9VGM-V.html", NULL),
B("MSI", "MS-7255 (P4M890M)", OK, "http://www.msi.com/product/mb/P4M890M-L-IL.html", NULL),
- B("MSI", "MS-7260 (K9N Neo PCB 1.0)", BAD, "http://www.msi.com/product/mb/K9N-Neo--PCB-1-0-.html", "Interestingly flashrom does not work when the vendor BIOS is booted, but it ''does'' work flawlessly when the machine is booted with coreboot. Owned by Uwe Hermann <uwe@hermann-uwe.de>."),
+ B("MSI", "MS-7260 (K9N Neo PCB 1.0)", BAD, "http://www.msi.com/product/mb/K9N-Neo--PCB-1-0-.html", "Interestingly flashprog does not work when the vendor BIOS is booted, but it ''does'' work flawlessly when the machine is booted with coreboot. Owned by Uwe Hermann <uwe@hermann-uwe.de>."),
B("MSI", "MS-7309 (K9N6SGM-V)", BAD, "http://www.msi.com/product/mb/K9N6SGM-V---K9N6PGM-FI---K9N6PGM-F.html", "Uses Fintek F71882F/F71883F/F71887 SPI-to-LPC translation."),
B("MSI", "MS-7309 (K9N6PGM2-V2)", OK, "http://www.msi.com/product/mb/K9N6PGM2-V2.html", NULL),
B("MSI", "MS-7312 (K9MM-V)", OK, "http://www.msi.com/product/mb/K9MM-V.html", NULL),
- B("MSI", "MS-7336", OK, NULL, "Some non-essential DMI data (e.g. serial numbers) is overwritten when using flashrom. This is an OEM board used by HP (e.g. dx2300 Microtower)."),
+ B("MSI", "MS-7336", OK, NULL, "Some non-essential DMI data (e.g. serial numbers) is overwritten when using flashprog. This is an OEM board used by HP (e.g. dx2300 Microtower)."),
B("MSI", "MS-7345 (P35 Neo2-FIR)", OK, "http://www.msi.com/product/mb/P35-Neo2-FR---FIR.html", NULL),
B("MSI", "MS-7357 (G33M)", OK, "http://www.msi.com/product/mb/G33M.html", NULL),
B("MSI", "MS-7368 (K9AG Neo2-Digital)", OK, "http://www.msi.com/product/mb/K9AG-Neo2-Digital.html", NULL),
@@ -675,7 +675,7 @@
B("Fujitsu", "Amilo Xi 3650", OK, NULL, NULL),
B("HP/Compaq", "EliteBook 8560p", BAD, NULL, "SPI lock down, SMM protection, PR in BIOS region, read-only descriptor, locked ME region."),
B("HP/Compaq", "nx9005", BAD, "http://h18000.www1.hp.com/products/quickspecs/11602_na/11602_na.HTML", "Shuts down when probing for a chip. https://flashrom.org/pipermail/flashrom/2010-May/003321.html"),
- B("HP/Compaq", "nx9010", BAD, "http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c00348514", "Hangs upon '''flashrom -V''' (needs hard power-cycle then)."),
+ B("HP/Compaq", "nx9010", BAD, "http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c00348514", "Hangs upon '''flashprog -V''' (needs hard power-cycle then)."),
B("IBM/Lenovo", "ThinkPad T40p", BAD, "http://www.thinkwiki.org/wiki/Category:T40p", NULL),
B("IBM/Lenovo", "ThinkPad T410s", BAD, "http://www.thinkwiki.org/wiki/Category:T410s", "Probing works (Winbond W25X64, 8192 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs) and ME is locked. Also, a Protected Range is locking the top range of the BIOS region (presumably the boot block)."),
B("IBM/Lenovo", "ThinkPad T420", BAD, "http://www.thinkwiki.org/wiki/Category:T420", "Probing works (Macronix MX25L6405, 8192 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs) and ME is locked. Also, a Protected Range is locking the top range of the BIOS region (presumably the boot block)."),
diff --git a/layout.c b/layout.c
index 4a5c276..5ae8f95 100644
--- a/layout.c
+++ b/layout.c
@@ -24,7 +24,7 @@
#include "programmer.h"
#include "layout.h"
-struct flashrom_layout {
+struct flashprog_layout {
struct romentry *head;
};
@@ -33,12 +33,12 @@
struct layout_include_args *next;
};
-const struct flashrom_layout *get_default_layout(const struct flashrom_flashctx *const flashctx)
+const struct flashprog_layout *get_default_layout(const struct flashprog_flashctx *const flashctx)
{
return flashctx->default_layout;
}
-const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx)
+const struct flashprog_layout *get_layout(const struct flashprog_flashctx *const flashctx)
{
if (flashctx->layout)
return flashctx->layout;
@@ -47,19 +47,19 @@
}
static struct romentry *mutable_layout_next(
- const struct flashrom_layout *const layout, struct romentry *iterator)
+ const struct flashprog_layout *const layout, struct romentry *iterator)
{
return iterator ? iterator->next : layout->head;
}
#ifndef __LIBPAYLOAD__
-int layout_from_file(struct flashrom_layout **layout, const char *name)
+int layout_from_file(struct flashprog_layout **layout, const char *name)
{
FILE *romlayout;
char tempstr[256], tempname[256];
int ret = 1;
- if (flashrom_layout_new(layout))
+ if (flashprog_layout_new(layout))
return 1;
romlayout = fopen(name, "r");
@@ -87,7 +87,7 @@
msg_gerr("Error parsing layout file. Offending string: \"%s\"\n", tempstr);
goto _close_ret;
}
- if (flashrom_layout_add_region(*layout,
+ if (flashprog_layout_add_region(*layout,
strtol(tstr1, NULL, 16), strtol(tstr2, NULL, 16), tempname))
goto _close_ret;
}
@@ -131,13 +131,13 @@
}
/* returns -1 if an entry is not found, 0 if found. */
-static int find_romentry(struct flashrom_layout *const l, char *name)
+static int find_romentry(struct flashprog_layout *const l, char *name)
{
if (!l->head)
return -1;
msg_gspew("Looking for region \"%s\"... ", name);
- if (flashrom_layout_include_region(l, name)) {
+ if (flashprog_layout_include_region(l, name)) {
msg_gspew("not found.\n");
return -1;
}
@@ -148,7 +148,7 @@
/* process -i arguments
* returns 0 to indicate success, >0 to indicate failure
*/
-int process_include_args(struct flashrom_layout *l, const struct layout_include_args *const args)
+int process_include_args(struct flashprog_layout *l, const struct layout_include_args *const args)
{
unsigned int found = 0;
const struct layout_include_args *tmp;
@@ -197,9 +197,9 @@
}
}
-int layout_sanity_checks(const struct flashrom_flashctx *const flash, const bool write_it)
+int layout_sanity_checks(const struct flashprog_flashctx *const flash, const bool write_it)
{
- const struct flashrom_layout *const layout = get_layout(flash);
+ const struct flashprog_layout *const layout = get_layout(flash);
const chipsize_t total_size = flash->chip->total_size * 1024;
const size_t gran = gran_to_bytes(flash->chip->gran);
int ret = 0;
@@ -228,7 +228,7 @@
}
const struct romentry *layout_next_included_region(
- const struct flashrom_layout *const l, const chipoff_t where)
+ const struct flashprog_layout *const l, const chipoff_t where)
{
const struct romentry *entry = NULL, *lowest = NULL;
@@ -245,7 +245,7 @@
}
const struct romentry *layout_next_included(
- const struct flashrom_layout *const layout, const struct romentry *iterator)
+ const struct flashprog_layout *const layout, const struct romentry *iterator)
{
while ((iterator = layout_next(layout, iterator))) {
if (iterator->included)
@@ -255,13 +255,13 @@
}
const struct romentry *layout_next(
- const struct flashrom_layout *const layout, const struct romentry *iterator)
+ const struct flashprog_layout *const layout, const struct romentry *iterator)
{
return iterator ? iterator->next : layout->head;
}
/**
- * @addtogroup flashrom-layout
+ * @addtogroup flashprog-layout
* @{
*/
@@ -273,7 +273,7 @@
* @return 0 on success,
* 1 if out of memory.
*/
-int flashrom_layout_new(struct flashrom_layout **const layout)
+int flashprog_layout_new(struct flashprog_layout **const layout)
{
*layout = malloc(sizeof(**layout));
if (!*layout) {
@@ -281,7 +281,7 @@
return 1;
}
- const struct flashrom_layout tmp = { 0 };
+ const struct flashprog_layout tmp = { 0 };
**layout = tmp;
return 0;
}
@@ -297,8 +297,8 @@
* @return 0 on success,
* 1 if out of memory.
*/
-int flashrom_layout_add_region(
- struct flashrom_layout *const layout,
+int flashprog_layout_add_region(
+ struct flashprog_layout *const layout,
const size_t start, const size_t end, const char *const name)
{
struct romentry *const entry = malloc(sizeof(*entry));
@@ -335,7 +335,7 @@
* @return 0 on success,
* 1 if the given name can't be found.
*/
-int flashrom_layout_include_region(struct flashrom_layout *const layout, const char *name)
+int flashprog_layout_include_region(struct flashprog_layout *const layout, const char *name)
{
struct romentry *entry = NULL;
while ((entry = mutable_layout_next(layout, entry))) {
@@ -352,7 +352,7 @@
*
* @param layout Layout to free.
*/
-void flashrom_layout_release(struct flashrom_layout *const layout)
+void flashprog_layout_release(struct flashprog_layout *const layout)
{
if (!layout)
return;
@@ -366,4 +366,4 @@
free(layout);
}
-/** @} */ /* end flashrom-layout */
+/** @} */ /* end flashprog-layout */
diff --git a/libflashrom.c b/libflashprog.c
similarity index 69%
rename from libflashrom.c
rename to libflashprog.c
index 3408faf..ea1142d 100644
--- a/libflashrom.c
+++ b/libflashprog.c
@@ -30,24 +30,24 @@
#include "programmer.h"
#include "layout.h"
#include "ich_descriptors.h"
-#include "libflashrom.h"
+#include "libflashprog.h"
#include "writeprotect.h"
/**
- * @defgroup flashrom-general General
+ * @defgroup flashprog-general General
* @{
*/
/** Pointer to log callback function. */
-static flashrom_log_callback *global_log_callback = NULL;
+static flashprog_log_callback *global_log_callback = NULL;
/**
- * @brief Initialize libflashrom.
+ * @brief Initialize libflashprog.
*
* @param perform_selfcheck If not zero, perform a self check.
* @return 0 on success
*/
-int flashrom_init(const int perform_selfcheck)
+int flashprog_init(const int perform_selfcheck)
{
if (perform_selfcheck && selfcheck())
return 1;
@@ -56,33 +56,33 @@
}
/**
- * @brief Shut down libflashrom.
+ * @brief Shut down libflashprog.
* @return 0 on success
*/
-int flashrom_shutdown(void)
+int flashprog_shutdown(void)
{
return 0; /* TODO: nothing to do? */
}
-/* TODO: flashrom_set_loglevel()? do we need it?
+/* TODO: flashprog_set_loglevel()? do we need it?
For now, let the user decide in their callback. */
/**
* @brief Set the log callback function.
*
- * Set a callback function which will be invoked whenever libflashrom wants
+ * Set a callback function which will be invoked whenever libflashprog wants
* to output messages. This allows frontends to do whatever they see fit with
* such messages, e.g. write them to syslog, or to file, or print them in a
* GUI window, etc.
*
* @param log_callback Pointer to the new log callback function.
*/
-void flashrom_set_log_callback(flashrom_log_callback *const log_callback)
+void flashprog_set_log_callback(flashprog_log_callback *const log_callback)
{
global_log_callback = log_callback;
}
/** @private */
-int print(const enum flashrom_log_level level, const char *const fmt, ...)
+int print(const enum flashprog_log_level level, const char *const fmt, ...)
{
if (global_log_callback) {
int ret;
@@ -95,23 +95,23 @@
return 0;
}
-/** @} */ /* end flashrom-general */
+/** @} */ /* end flashprog-general */
/**
- * @defgroup flashrom-query Querying
+ * @defgroup flashprog-query Querying
* @{
*/
/* TBD */
-/** @} */ /* end flashrom-query */
+/** @} */ /* end flashprog-query */
/**
- * @defgroup flashrom-prog Programmers
+ * @defgroup flashprog-prog Programmers
* @{
*/
@@ -120,15 +120,15 @@
*
* Currently, only one programmer may be initialized at a time.
*
- * @param[out] flashprog Points to a pointer of type struct flashrom_programmer
+ * @param[out] flashprog Points to a pointer of type struct flashprog_programmer
* that will be set if programmer initialization succeeds.
* *flashprog has to be shutdown by the caller with @ref
- * flashrom_programmer_shutdown.
+ * flashprog_programmer_shutdown.
* @param[in] prog_name Name of the programmer to initialize.
* @param[in] prog_param Pointer to programmer specific parameters.
* @return 0 on success
*/
-int flashrom_programmer_init(struct flashrom_programmer **const flashprog,
+int flashprog_programmer_init(struct flashprog_programmer **const flashprog,
const char *const prog_name, const char *const prog_param)
{
unsigned prog;
@@ -152,19 +152,19 @@
* @param flashprog The programmer to shut down.
* @return 0 on success
*/
-int flashrom_programmer_shutdown(struct flashrom_programmer *const flashprog)
+int flashprog_programmer_shutdown(struct flashprog_programmer *const flashprog)
{
return programmer_shutdown();
}
-/* TODO: flashrom_programmer_capabilities()? */
+/* TODO: flashprog_programmer_capabilities()? */
-/** @} */ /* end flashrom-prog */
+/** @} */ /* end flashprog-prog */
/**
- * @defgroup flashrom-flash Flash chips
+ * @defgroup flashprog-flash Flash chips
* @{
*/
@@ -172,12 +172,12 @@
* @brief Probe for a flash chip.
*
* Probes for a flash chip and returns a flash context, that can be used
- * later with flash chip and @ref flashrom-ops "image operations", if
+ * later with flash chip and @ref flashprog-ops "image operations", if
* exactly one matching chip is found.
*
- * @param[out] flashctx Points to a pointer of type struct flashrom_flashctx
+ * @param[out] flashctx Points to a pointer of type struct flashprog_flashctx
* that will be set if exactly one chip is found. *flashctx
- * has to be freed by the caller with @ref flashrom_flash_release.
+ * has to be freed by the caller with @ref flashprog_flash_release.
* @param[in] flashprog The flash programmer used to access the chip.
* @param[in] chip_name Name of a chip to probe for, or NULL to probe for
* all known chips.
@@ -186,14 +186,14 @@
* 2 if no chip was found,
* or 1 on any other error.
*/
-int flashrom_flash_probe(struct flashrom_flashctx **const flashctx,
- const struct flashrom_programmer *const flashprog,
+int flashprog_flash_probe(struct flashprog_flashctx **const flashctx,
+ const struct flashprog_programmer *const flashprog,
const char *const chip_name)
{
int i, ret = 2;
- struct flashrom_flashctx second_flashctx = { 0, };
+ struct flashprog_flashctx second_flashctx = { 0, };
- chip_to_probe = chip_name; /* chip_to_probe is global in flashrom.c */
+ chip_to_probe = chip_name; /* chip_to_probe is global in flashprog.c */
*flashctx = malloc(sizeof(**flashctx));
if (!*flashctx)
@@ -206,7 +206,7 @@
ret = 0;
/* We found one chip, now check that there is no second match. */
if (probe_flash(®istered_masters[i], flash_idx + 1, &second_flashctx, 0) != -1) {
- flashrom_layout_release(second_flashctx.default_layout);
+ flashprog_layout_release(second_flashctx.default_layout);
free(second_flashctx.chip);
ret = 3;
break;
@@ -214,7 +214,7 @@
}
}
if (ret) {
- flashrom_flash_release(*flashctx);
+ flashprog_flash_release(*flashctx);
*flashctx = NULL;
}
return ret;
@@ -226,7 +226,7 @@
* @param flashctx The queried flash context.
* @return Size of flash chip in bytes.
*/
-size_t flashrom_flash_getsize(const struct flashrom_flashctx *const flashctx)
+size_t flashprog_flash_getsize(const struct flashprog_flashctx *const flashctx)
{
return flashctx->chip->total_size * 1024;
}
@@ -236,12 +236,12 @@
*
* @param flashctx Flash context to free.
*/
-void flashrom_flash_release(struct flashrom_flashctx *const flashctx)
+void flashprog_flash_release(struct flashprog_flashctx *const flashctx)
{
if (!flashctx)
return;
- flashrom_layout_release(flashctx->default_layout);
+ flashprog_layout_release(flashctx->default_layout);
free(flashctx->chip);
free(flashctx);
}
@@ -253,14 +253,14 @@
* @param flag Flag that is to be set / cleared.
* @param value Value to set.
*/
-void flashrom_flag_set(struct flashrom_flashctx *const flashctx,
- const enum flashrom_flag flag, const bool value)
+void flashprog_flag_set(struct flashprog_flashctx *const flashctx,
+ const enum flashprog_flag flag, const bool value)
{
switch (flag) {
- case FLASHROM_FLAG_FORCE: flashctx->flags.force = value; break;
- case FLASHROM_FLAG_FORCE_BOARDMISMATCH: flashctx->flags.force_boardmismatch = value; break;
- case FLASHROM_FLAG_VERIFY_AFTER_WRITE: flashctx->flags.verify_after_write = value; break;
- case FLASHROM_FLAG_VERIFY_WHOLE_CHIP: flashctx->flags.verify_whole_chip = value; break;
+ case FLASHPROG_FLAG_FORCE: flashctx->flags.force = value; break;
+ case FLASHPROG_FLAG_FORCE_BOARDMISMATCH: flashctx->flags.force_boardmismatch = value; break;
+ case FLASHPROG_FLAG_VERIFY_AFTER_WRITE: flashctx->flags.verify_after_write = value; break;
+ case FLASHPROG_FLAG_VERIFY_WHOLE_CHIP: flashctx->flags.verify_whole_chip = value; break;
}
}
@@ -271,23 +271,23 @@
* @param flag Flag to be read.
* @return Current value of the flag.
*/
-bool flashrom_flag_get(const struct flashrom_flashctx *const flashctx, const enum flashrom_flag flag)
+bool flashprog_flag_get(const struct flashprog_flashctx *const flashctx, const enum flashprog_flag flag)
{
switch (flag) {
- case FLASHROM_FLAG_FORCE: return flashctx->flags.force;
- case FLASHROM_FLAG_FORCE_BOARDMISMATCH: return flashctx->flags.force_boardmismatch;
- case FLASHROM_FLAG_VERIFY_AFTER_WRITE: return flashctx->flags.verify_after_write;
- case FLASHROM_FLAG_VERIFY_WHOLE_CHIP: return flashctx->flags.verify_whole_chip;
- default: return false;
+ case FLASHPROG_FLAG_FORCE: return flashctx->flags.force;
+ case FLASHPROG_FLAG_FORCE_BOARDMISMATCH: return flashctx->flags.force_boardmismatch;
+ case FLASHPROG_FLAG_VERIFY_AFTER_WRITE: return flashctx->flags.verify_after_write;
+ case FLASHPROG_FLAG_VERIFY_WHOLE_CHIP: return flashctx->flags.verify_whole_chip;
+ default: return false;
}
}
-/** @} */ /* end flashrom-flash */
+/** @} */ /* end flashprog-flash */
/**
- * @defgroup flashrom-layout Layout handling
+ * @defgroup flashprog-layout Layout handling
* @{
*/
@@ -297,7 +297,7 @@
* Optionally verify that the layout matches the one in the given
* descriptor dump.
*
- * @param[out] layout Points to a struct flashrom_layout pointer that
+ * @param[out] layout Points to a struct flashprog_layout pointer that
* gets set if the descriptor is read and parsed
* successfully.
* @param[in] flashctx Flash context to read the descriptor from flash.
@@ -312,13 +312,13 @@
* 2 if the descriptor on flash couldn't be read,
* 1 on any other error.
*/
-int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct flashctx *const flashctx,
+int flashprog_layout_read_from_ifd(struct flashprog_layout **const layout, struct flashctx *const flashctx,
const void *const dump, const size_t len)
{
-#ifndef __FLASHROM_LITTLE_ENDIAN__
+#ifndef __FLASHPROG_LITTLE_ENDIAN__
return 6;
#else
- struct flashrom_layout *dump_layout = NULL, *chip_layout = NULL;
+ struct flashprog_layout *dump_layout = NULL, *chip_layout = NULL;
int ret = 1;
void *const desc = malloc(0x1000);
@@ -353,7 +353,7 @@
chip_entry = layout_next(chip_layout, chip_entry);
dump_entry = layout_next(dump_layout, dump_entry);
}
- flashrom_layout_release(dump_layout);
+ flashprog_layout_release(dump_layout);
if (chip_entry || dump_entry) {
msg_cerr("Descriptors don't match!\n");
ret = 5;
@@ -361,35 +361,35 @@
}
}
- *layout = (struct flashrom_layout *)chip_layout;
+ *layout = (struct flashprog_layout *)chip_layout;
ret = 0;
_finalize_ret:
finalize_flash_access(flashctx);
_free_ret:
if (ret)
- flashrom_layout_release(chip_layout);
+ flashprog_layout_release(chip_layout);
free(desc);
return ret;
#endif
}
-#ifdef __FLASHROM_LITTLE_ENDIAN__
-static int flashrom_layout_parse_fmap(struct flashrom_layout **layout,
+#ifdef __FLASHPROG_LITTLE_ENDIAN__
+static int flashprog_layout_parse_fmap(struct flashprog_layout **layout,
struct flashctx *const flashctx, const struct fmap *const fmap)
{
int i;
char name[FMAP_STRLEN + 1];
const struct fmap_area *area;
- struct flashrom_layout *l;
+ struct flashprog_layout *l;
- if (!fmap || flashrom_layout_new(&l))
+ if (!fmap || flashprog_layout_new(&l))
return 1;
for (i = 0, area = fmap->areas; i < fmap->nareas; i++, area++) {
snprintf(name, sizeof(name), "%s", area->name);
- if (flashrom_layout_add_region(l, area->offset, area->offset + area->size - 1, name)) {
- flashrom_layout_release(l);
+ if (flashprog_layout_add_region(l, area->offset, area->offset + area->size - 1, name)) {
+ flashprog_layout_release(l);
return 1;
}
}
@@ -397,12 +397,12 @@
*layout = l;
return 0;
}
-#endif /* __FLASHROM_LITTLE_ENDIAN__ */
+#endif /* __FLASHPROG_LITTLE_ENDIAN__ */
/**
* @brief Read a layout by searching the flash chip for fmap.
*
- * @param[out] layout Points to a struct flashrom_layout pointer that
+ * @param[out] layout Points to a struct flashprog_layout pointer that
* gets set if the fmap is read and parsed successfully.
* @param[in] flashctx Flash context
* @param[in] offset Offset to begin searching for fmap.
@@ -413,10 +413,10 @@
* 2 if the fmap couldn't be read,
* 1 on any other error.
*/
-int flashrom_layout_read_fmap_from_rom(struct flashrom_layout **const layout,
+int flashprog_layout_read_fmap_from_rom(struct flashprog_layout **const layout,
struct flashctx *const flashctx, size_t offset, size_t len)
{
-#ifndef __FLASHROM_LITTLE_ENDIAN__
+#ifndef __FLASHPROG_LITTLE_ENDIAN__
return 3;
#else
struct fmap *fmap = NULL;
@@ -429,7 +429,7 @@
}
msg_gdbg("Adding fmap layout to global layout.\n");
- if (flashrom_layout_parse_fmap(layout, flashctx, fmap)) {
+ if (flashprog_layout_parse_fmap(layout, flashctx, fmap)) {
msg_gerr("Failed to add fmap regions to layout.\n");
ret = 1;
}
@@ -442,7 +442,7 @@
/**
* @brief Read a layout by searching buffer for fmap.
*
- * @param[out] layout Points to a struct flashrom_layout pointer that
+ * @param[out] layout Points to a struct flashprog_layout pointer that
* gets set if the fmap is read and parsed successfully.
* @param[in] flashctx Flash context
* @param[in] buffer Buffer to search in
@@ -453,10 +453,10 @@
* 2 if the fmap couldn't be read,
* 1 on any other error.
*/
-int flashrom_layout_read_fmap_from_buffer(struct flashrom_layout **const layout,
+int flashprog_layout_read_fmap_from_buffer(struct flashprog_layout **const layout,
struct flashctx *const flashctx, const uint8_t *const buf, size_t size)
{
-#ifndef __FLASHROM_LITTLE_ENDIAN__
+#ifndef __FLASHPROG_LITTLE_ENDIAN__
return 3;
#else
struct fmap *fmap = NULL;
@@ -472,7 +472,7 @@
}
msg_gdbg("Adding fmap layout to global layout.\n");
- if (flashrom_layout_parse_fmap(layout, flashctx, fmap)) {
+ if (flashprog_layout_parse_fmap(layout, flashctx, fmap)) {
msg_gerr("Failed to add fmap regions to layout.\n");
goto _free_ret;
}
@@ -494,40 +494,40 @@
* @param flashctx Flash context whose layout will be set.
* @param layout Layout to bet set.
*/
-void flashrom_layout_set(struct flashrom_flashctx *const flashctx, const struct flashrom_layout *const layout)
+void flashprog_layout_set(struct flashprog_flashctx *const flashctx, const struct flashprog_layout *const layout)
{
flashctx->layout = layout;
}
-/** @} */ /* end flashrom-layout */
+/** @} */ /* end flashprog-layout */
/**
- * @defgroup flashrom-wp
+ * @defgroup flashprog-wp
* @{
*/
/**
* @brief Create a new empty WP configuration.
*
- * @param[out] cfg Points to a pointer of type struct flashrom_wp_cfg that will
+ * @param[out] cfg Points to a pointer of type struct flashprog_wp_cfg that will
* be set if creation succeeds. *cfg has to be freed by the
- * caller with @ref flashrom_wp_cfg_release.
+ * caller with @ref flashprog_wp_cfg_release.
* @return 0 on success
* >0 on failure
*/
-enum flashrom_wp_result flashrom_wp_cfg_new(struct flashrom_wp_cfg **cfg)
+enum flashprog_wp_result flashprog_wp_cfg_new(struct flashprog_wp_cfg **cfg)
{
*cfg = calloc(1, sizeof(**cfg));
- return *cfg ? 0 : FLASHROM_WP_ERR_OTHER;
+ return *cfg ? 0 : FLASHPROG_WP_ERR_OTHER;
}
/**
* @brief Free a WP configuration.
*
- * @param[out] cfg Pointer to the flashrom_wp_cfg to free.
+ * @param[out] cfg Pointer to the flashprog_wp_cfg to free.
*/
-void flashrom_wp_cfg_release(struct flashrom_wp_cfg *cfg)
+void flashprog_wp_cfg_release(struct flashprog_wp_cfg *cfg)
{
free(cfg);
}
@@ -536,9 +536,9 @@
* @brief Set the protection mode for a WP configuration.
*
* @param[in] mode The protection mode to set.
- * @param[out] cfg Pointer to the flashrom_wp_cfg structure to modify.
+ * @param[out] cfg Pointer to the flashprog_wp_cfg structure to modify.
*/
-void flashrom_wp_set_mode(struct flashrom_wp_cfg *cfg, enum flashrom_wp_mode mode)
+void flashprog_wp_set_mode(struct flashprog_wp_cfg *cfg, enum flashprog_wp_mode mode)
{
cfg->mode = mode;
}
@@ -549,7 +549,7 @@
* @param[in] cfg The WP configuration to get the protection mode from.
* @return The configuration's protection mode.
*/
-enum flashrom_wp_mode flashrom_wp_get_mode(const struct flashrom_wp_cfg *cfg)
+enum flashprog_wp_mode flashprog_wp_get_mode(const struct flashprog_wp_cfg *cfg)
{
return cfg->mode;
}
@@ -557,11 +557,11 @@
/**
* @brief Set the protection range for a WP configuration.
*
- * @param[out] cfg Pointer to the flashrom_wp_cfg structure to modify.
+ * @param[out] cfg Pointer to the flashprog_wp_cfg structure to modify.
* @param[in] start The range's start address.
* @param[in] len The range's length.
*/
-void flashrom_wp_set_range(struct flashrom_wp_cfg *cfg, size_t start, size_t len)
+void flashprog_wp_set_range(struct flashprog_wp_cfg *cfg, size_t start, size_t len)
{
cfg->range.start = start;
cfg->range.len = len;
@@ -574,7 +574,7 @@
* @param[out] len Points to a size_t to write the range length to.
* @param[in] cfg The WP configuration to get the range from.
*/
-void flashrom_wp_get_range(size_t *start, size_t *len, const struct flashrom_wp_cfg *cfg)
+void flashprog_wp_get_range(size_t *start, size_t *len, const struct flashprog_wp_cfg *cfg)
{
*start = cfg->range.start;
*len = cfg->range.len;
@@ -588,7 +588,7 @@
* @return 0 on success
* >0 on failure
*/
-enum flashrom_wp_result flashrom_wp_write_cfg(struct flashctx *flash, const struct flashrom_wp_cfg *cfg)
+enum flashprog_wp_result flashprog_wp_write_cfg(struct flashctx *flash, const struct flashprog_wp_cfg *cfg)
{
/*
* TODO: Call custom implementation if the programmer is opaque, as
@@ -598,19 +598,19 @@
if (flash->mst->buses_supported & BUS_SPI)
return wp_write_cfg(flash, cfg);
- return FLASHROM_WP_ERR_OTHER;
+ return FLASHPROG_WP_ERR_OTHER;
}
/**
* @brief Read the current WP configuration from a flash chip.
*
- * @param[out] cfg Pointer to a struct flashrom_wp_cfg to store the chip's
+ * @param[out] cfg Pointer to a struct flashprog_wp_cfg to store the chip's
* configuration in.
* @param[in] flash The flash context used to access the chip.
* @return 0 on success
* >0 on failure
*/
-enum flashrom_wp_result flashrom_wp_read_cfg(struct flashrom_wp_cfg *cfg, struct flashctx *flash)
+enum flashprog_wp_result flashprog_wp_read_cfg(struct flashprog_wp_cfg *cfg, struct flashctx *flash)
{
/*
* TODO: Call custom implementation if the programmer is opaque, as
@@ -620,22 +620,22 @@
if (flash->mst->buses_supported & BUS_SPI)
return wp_read_cfg(cfg, flash);
- return FLASHROM_WP_ERR_OTHER;
+ return FLASHPROG_WP_ERR_OTHER;
}
/**
* @brief Get a list of protection ranges supported by the flash chip.
*
- * @param[out] ranges Points to a pointer of type struct flashrom_wp_ranges
+ * @param[out] ranges Points to a pointer of type struct flashprog_wp_ranges
* that will be set if available ranges are found. Finding
* available ranges may not always be possible, even if the
* chip's protection range can be read or modified. *ranges
- * must be freed using @ref flashrom_wp_ranges_free.
+ * must be freed using @ref flashprog_wp_ranges_free.
* @param[in] flash The flash context used to access the chip.
* @return 0 on success
* >0 on failure
*/
-enum flashrom_wp_result flashrom_wp_get_available_ranges(struct flashrom_wp_ranges **list, struct flashrom_flashctx *flash)
+enum flashprog_wp_result flashprog_wp_get_available_ranges(struct flashprog_wp_ranges **list, struct flashprog_flashctx *flash)
{
/*
* TODO: Call custom implementation if the programmer is opaque, as
@@ -646,7 +646,7 @@
if (flash->mst->buses_supported & BUS_SPI)
return wp_get_available_ranges(list, flash);
- return FLASHROM_WP_ERR_OTHER;
+ return FLASHPROG_WP_ERR_OTHER;
}
/**
@@ -655,7 +655,7 @@
* @param[in] ranges The range list to get the count from.
* @return Number of ranges in the list.
*/
-size_t flashrom_wp_ranges_get_count(const struct flashrom_wp_ranges *list)
+size_t flashprog_wp_ranges_get_count(const struct flashprog_wp_ranges *list)
{
return list->count;
}
@@ -670,10 +670,10 @@
* @return 0 on success
* >0 on failure
*/
-enum flashrom_wp_result flashrom_wp_ranges_get_range(size_t *start, size_t *len, const struct flashrom_wp_ranges *list, unsigned int index)
+enum flashprog_wp_result flashprog_wp_ranges_get_range(size_t *start, size_t *len, const struct flashprog_wp_ranges *list, unsigned int index)
{
if (index >= list->count)
- return FLASHROM_WP_ERR_OTHER;
+ return FLASHPROG_WP_ERR_OTHER;
*start = list->ranges[index].start;
*len = list->ranges[index].len;
@@ -684,9 +684,9 @@
/**
* @brief Free a WP range list.
*
- * @param[out] cfg Pointer to the flashrom_wp_ranges to free.
+ * @param[out] cfg Pointer to the flashprog_wp_ranges to free.
*/
-void flashrom_wp_ranges_release(struct flashrom_wp_ranges *list)
+void flashprog_wp_ranges_release(struct flashprog_wp_ranges *list)
{
if (!list)
return;
@@ -696,4 +696,4 @@
}
-/** @} */ /* end flashrom-wp */
+/** @} */ /* end flashprog-wp */
diff --git a/libflashprog.map b/libflashprog.map
new file mode 100644
index 0000000..5294d96
--- /dev/null
+++ b/libflashprog.map
@@ -0,0 +1,38 @@
+LIBFLASHPROG_1.0 {
+ global:
+ flashprog_flag_get;
+ flashprog_flag_set;
+ flashprog_flash_erase;
+ flashprog_flash_getsize;
+ flashprog_flash_probe;
+ flashprog_flash_release;
+ flashprog_image_read;
+ flashprog_image_verify;
+ flashprog_image_write;
+ flashprog_init;
+ flashprog_layout_add_region;
+ flashprog_layout_include_region;
+ flashprog_layout_new;
+ flashprog_layout_read_fmap_from_buffer;
+ flashprog_layout_read_fmap_from_rom;
+ flashprog_layout_read_from_ifd;
+ flashprog_layout_release;
+ flashprog_layout_set;
+ flashprog_programmer_init;
+ flashprog_programmer_shutdown;
+ flashprog_set_log_callback;
+ flashprog_shutdown;
+ flashprog_wp_cfg_new;
+ flashprog_wp_cfg_release;
+ flashprog_wp_get_available_ranges;
+ flashprog_wp_get_mode;
+ flashprog_wp_get_range;
+ flashprog_wp_ranges_get_count;
+ flashprog_wp_ranges_get_range;
+ flashprog_wp_ranges_release;
+ flashprog_wp_read_cfg;
+ flashprog_wp_set_mode;
+ flashprog_wp_set_range;
+ flashprog_wp_write_cfg;
+ local: *;
+};
diff --git a/libflashrom.map b/libflashrom.map
deleted file mode 100644
index ba4b39c..0000000
--- a/libflashrom.map
+++ /dev/null
@@ -1,38 +0,0 @@
-LIBFLASHROM_1.0 {
- global:
- flashrom_flag_get;
- flashrom_flag_set;
- flashrom_flash_erase;
- flashrom_flash_getsize;
- flashrom_flash_probe;
- flashrom_flash_release;
- flashrom_image_read;
- flashrom_image_verify;
- flashrom_image_write;
- flashrom_init;
- flashrom_layout_add_region;
- flashrom_layout_include_region;
- flashrom_layout_new;
- flashrom_layout_read_fmap_from_buffer;
- flashrom_layout_read_fmap_from_rom;
- flashrom_layout_read_from_ifd;
- flashrom_layout_release;
- flashrom_layout_set;
- flashrom_programmer_init;
- flashrom_programmer_shutdown;
- flashrom_set_log_callback;
- flashrom_shutdown;
- flashrom_wp_cfg_new;
- flashrom_wp_cfg_release;
- flashrom_wp_get_available_ranges;
- flashrom_wp_get_mode;
- flashrom_wp_get_range;
- flashrom_wp_ranges_get_count;
- flashrom_wp_ranges_get_range;
- flashrom_wp_ranges_release;
- flashrom_wp_read_cfg;
- flashrom_wp_set_mode;
- flashrom_wp_set_range;
- flashrom_wp_write_cfg;
- local: *;
-};
diff --git a/linux_gpio_spi.c b/linux_gpio_spi.c
index 0103d19..1e95c16 100644
--- a/linux_gpio_spi.c
+++ b/linux_gpio_spi.c
@@ -23,7 +23,7 @@
#include "spi.h"
#include "flash.h"
-#define CONSUMER "flashrom"
+#define CONSUMER "flashprog"
struct linux_gpio_spi {
struct gpiod_chip *chip;
diff --git a/linux_mtd.c b/linux_mtd.c
index f7cd82b..0960025 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -270,7 +270,7 @@
if (data->no_erase) {
msg_perr("%s: device does not support erasing.\n"
- "Please file a bug report at flashrom-stable@flashrom.org\n",
+ "Please file a bug report at flashprog@flashprog.org\n",
__func__);
return 1;
}
@@ -387,7 +387,7 @@
dev_num = strtol(param, &endptr, 0);
if ((*endptr != '\0') || (dev_num < 0)) {
- msg_perr("Invalid device number %s. Use flashrom -p "
+ msg_perr("Invalid device number %s. Use flashprog -p "
"linux_mtd:dev=N where N is a valid MTD\n"
"device number.\n", param);
goto linux_mtd_init_exit;
diff --git a/linux_spi.c b/linux_spi.c
index 4be6eaa..e8353d5 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -141,7 +141,7 @@
dev = extract_programmer_param("dev");
if (!dev || !strlen(dev)) {
- msg_perr("No SPI device given. Use flashrom -p "
+ msg_perr("No SPI device given. Use flashprog -p "
"linux_spi:dev=/dev/spidevX.Y\n");
free(dev);
return 1;
diff --git a/meson.build b/meson.build
index 1be1d60..c14ab4b 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('flashromutils', 'c',
+project('flashprogutils', 'c',
version : run_command('util/getversion.sh', '--version', check : true).stdout().strip(),
license : 'GPL-2.0',
meson_version : '>=0.53.0',
@@ -37,7 +37,7 @@
add_project_arguments('-D__XSI_VISIBLE', language : 'c') # required for gettimeofday() on FreeBSD
add_project_arguments('-D_NETBSD_SOURCE', language : 'c') # required for indirect include of strings.h on NetBSD
add_project_arguments('-D_DARWIN_C_SOURCE', language : 'c') # required for indirect include of strings.h on MacOS
-add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', language : 'c')
+add_project_arguments('-DFLASHPROG_VERSION="' + meson.project_version() + '"', language : 'c')
# get defaults from configure
config_print_wiki = get_option('classic_cli_print_wiki')
@@ -53,14 +53,14 @@
'edi.c',
'en29lv640b.c',
'flashchips.c',
- 'flashrom.c',
+ 'flashprog.c',
'fmap.c',
'helpers.c',
'helpers_fileio.c',
'ich_descriptors.c',
'jedec.c',
'layout.c',
- 'libflashrom.c',
+ 'libflashprog.c',
'opaque.c',
'parallel.c',
'print.c',
@@ -522,20 +522,20 @@
cargs += '-DCONFIG_DEFAULT_PROGRAMMER_ARGS="' + config_default_programmer_args + '"'
install_headers([
- 'include/libflashrom.h',
+ 'include/libflashprog.h',
],
)
include_dir = include_directories('include')
-mapfile = 'libflashrom.map'
+mapfile = 'libflashprog.map'
if host_machine.system() == 'darwin'
vflag = ''
else
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
endif
-libflashrom = both_libraries(
- 'flashrom',
+libflashprog = both_libraries(
+ 'flashprog',
sources : [
srcs,
],
@@ -564,19 +564,19 @@
pkgg = import('pkgconfig')
pkgg.generate(
- libraries : libflashrom,
+ libraries : libflashprog,
version : version,
- name : 'flashrom',
- filebase : 'flashrom',
- description : 'library to interact with flashrom',
+ name : 'flashprog',
+ filebase : 'flashprog',
+ description : 'library to interact with flashprog',
)
config_manfile = configuration_data()
config_manfile.set('VERSION', version)
config_manfile.set('MAN_DATE', run_command('util/getversion.sh', '--man-date', check : true).stdout().strip())
configure_file(
- input : 'flashrom.8.tmpl',
- output : 'flashrom.8',
+ input : 'flashprog.8.tmpl',
+ output : 'flashprog.8',
configuration : config_manfile,
install: true,
install_dir: join_paths(get_option('mandir'), 'man8'),
@@ -584,7 +584,7 @@
if get_option('classic_cli').auto() or get_option('classic_cli').enabled()
executable(
- 'flashrom',
+ 'flashprog',
files(
'cli_classic.c',
'cli_common.c',
@@ -594,7 +594,7 @@
include_directories : include_dir,
install : true,
install_dir : get_option('sbindir'),
- link_with : libflashrom.get_static_lib(), # flashrom needs internal symbols of libflashrom
+ link_with : libflashprog.get_static_lib(), # flashprog needs internal symbols of libflashprog
)
endif
diff --git a/meson_options.txt b/meson_options.txt
index 616a9f4..2143705 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,4 @@
-option('classic_cli', type : 'feature', value : 'enabled', description : 'classic flashrom cli binary')
+option('classic_cli', type : 'feature', value : 'enabled', description : 'classic flashprog cli binary')
option('classic_cli_print_wiki', type : 'feature', value : 'disabled', description : 'Print Wiki')
option('default_programmer_name', type : 'string', description : 'default programmer')
option('default_programmer_args', type : 'string', description : 'default programmer arguments')
diff --git a/mstarddc_spi.c b/mstarddc_spi.c
index 4de3c04..911c450 100644
--- a/mstarddc_spi.c
+++ b/mstarddc_spi.c
@@ -80,14 +80,14 @@
}
if (i2c_address == NULL || strlen(i2c_address) == 0) {
msg_perr("Error: no address specified.\n"
- "Use flashrom -p mstarddc_spi:dev=/dev/device:address.\n");
+ "Use flashprog -p mstarddc_spi:dev=/dev/device:address.\n");
ret = -1;
goto out;
}
mstarddc_addr = strtol(i2c_address, NULL, 16); // FIXME: error handling
} else {
msg_perr("Error: no device specified.\n"
- "Use flashrom -p mstarddc_spi:dev=/dev/device:address.\n");
+ "Use flashprog -p mstarddc_spi:dev=/dev/device:address.\n");
ret = -1;
goto out;
}
diff --git a/ni845x_spi.c b/ni845x_spi.c
index 699c087..0e71e21 100644
--- a/ni845x_spi.c
+++ b/ni845x_spi.c
@@ -163,7 +163,7 @@
// malformed resource string detected
msg_pwarn("Warning: Unable to parse the %s NI-845x resource string.\n",
resource_name);
- msg_pwarn("Please report a bug at flashrom-stable@flashrom.org\n");
+ msg_pwarn("Please report a bug at flashprog@flashprog.org\n");
continue;
}
diff --git a/ogp_spi.c b/ogp_spi.c
index aa4f422..5a1b969 100644
--- a/ogp_spi.c
+++ b/ogp_spi.c
@@ -101,7 +101,7 @@
type = extract_programmer_param("rom");
if (!type) {
- msg_perr("Please use flashrom -p ogp_spi:rom=... to specify "
+ msg_perr("Please use flashprog -p ogp_spi:rom=... to specify "
"which flashchip you want to access.\n");
return 1;
} else if (!strcasecmp(type, "bprom") || !strcasecmp(type, "bios")) {
diff --git a/opaque.c b/opaque.c
index d83e3bc..f12c7d9 100644
--- a/opaque.c
+++ b/opaque.c
@@ -59,9 +59,9 @@
if (!mst->probe || !mst->read || !mst->write || !mst->erase) {
msg_perr("%s called with incomplete master definition.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__);
- return ERROR_FLASHROM_BUG;
+ return ERROR_FLASHPROG_BUG;
}
rmst.buses_supported = BUS_PROG;
rmst.opaque = *mst;
diff --git a/parallel.c b/parallel.c
index 84692fd..3fb25b4 100644
--- a/parallel.c
+++ b/parallel.c
@@ -80,9 +80,9 @@
!mst->chip_writen || !mst->chip_readb || !mst->chip_readw ||
!mst->chip_readl || !mst->chip_readn) {
msg_perr("%s called with incomplete master definition.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__);
- return ERROR_FLASHROM_BUG;
+ return ERROR_FLASHPROG_BUG;
}
rmst.buses_supported = buses;
diff --git a/pcidev.c b/pcidev.c
index 4425c80..e2dceb4 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -121,13 +121,13 @@
break;
case TYPE_IOBAR:
msg_pdbg("I/O\n");
-#if __FLASHROM_HAVE_OUTB__
+#if __FLASHPROG_HAVE_OUTB__
if (!(supported_cycles & PCI_COMMAND_IO)) {
msg_perr("I/O BAR access requested, but device has I/O space accesses disabled.\n");
/* TODO: Abort here? */
}
#else
- msg_perr("I/O BAR access requested, but flashrom does not support I/O BAR access on this "
+ msg_perr("I/O BAR access requested, but flashprog does not support I/O BAR access on this "
"platform (yet).\n");
#endif
addr &= PCI_BASE_ADDRESS_IO_MASK;
@@ -142,7 +142,7 @@
addr &= PCI_ROM_ADDRESS_MASK;
break;
case TYPE_UNKNOWN:
- msg_perr("BAR type unknown, please report a bug at flashrom-stable@flashrom.org\n");
+ msg_perr("BAR type unknown, please report a bug at flashprog@flashprog.org\n");
}
return (uintptr_t)addr;
@@ -213,7 +213,7 @@
{
if (pacc == NULL) {
msg_perr("%s: Tried to cleanup an invalid PCI context!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__);
return 1;
}
@@ -226,7 +226,7 @@
{
if (pacc != NULL) {
msg_perr("%s: Tried to allocate a new PCI context, but there is still an old one!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n", __func__);
+ "Please report a bug at flashprog@flashprog.org\n", __func__);
return 1;
}
pacc = pci_alloc(); /* Get the pci_access structure */
@@ -282,9 +282,9 @@
devs[i].device_name, dev->vendor_id, dev->device_id, dev->bus, dev->dev,
dev->func);
if (devs[i].status == NT)
- msg_pinfo("===\nThis PCI device is UNTESTED. Please report the 'flashrom -p "
+ msg_pinfo("===\nThis PCI device is UNTESTED. Please report the 'flashprog -p "
"xxxx' output\n"
- "to flashrom-stable@flashrom.org if it works for you. Please add "
+ "to flashprog@flashprog.org if it works for you. Please add "
"the name of your\n"
"PCI device to the subject. Thank you for your help!\n===\n");
@@ -303,7 +303,7 @@
msg_perr("Error: No supported PCI device found.\n");
return NULL;
} else if (found > 1) {
- msg_perr("Error: Multiple supported PCI devices found. Use 'flashrom -p xxxx:pci=bb:dd.f'\n"
+ msg_perr("Error: Multiple supported PCI devices found. Use 'flashprog -p xxxx:pci=bb:dd.f'\n"
"to explicitly select the card with the given BDF (PCI bus, device, function).\n");
return NULL;
}
@@ -333,7 +333,7 @@
struct undo_pci_write_data *data = p;
if (pacc == NULL || data->dev == NULL) {
msg_perr("%s: Tried to undo PCI writes without a valid PCI %s!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__, data->dev == NULL ? "device" : "context");
return 1;
}
diff --git a/platform/meson.build b/platform/meson.build
index 42e85ee..fcd32f8 100644
--- a/platform/meson.build
+++ b/platform/meson.build
@@ -4,10 +4,10 @@
)
if host_machine.endian() == 'little'
- add_project_arguments('-D__FLASHROM_LITTLE_ENDIAN__=1', language : 'c')
+ add_project_arguments('-D__FLASHPROG_LITTLE_ENDIAN__=1', language : 'c')
endif
if host_machine.endian() == 'big'
- add_project_arguments('-D__FLASHROM_BIG_ENDIAN__=1', language : 'c')
+ add_project_arguments('-D__FLASHPROG_BIG_ENDIAN__=1', language : 'c')
endif
# OpenBSD requires libi386 or libamd64 for I/O port handling
diff --git a/pony_spi.c b/pony_spi.c
index 9096201..2d423ef 100644
--- a/pony_spi.c
+++ b/pony_spi.c
@@ -138,7 +138,7 @@
if (!have_device) {
msg_perr("Error: No valid device specified.\n"
- "Use flashrom -p pony_spi:dev=/dev/device[,type=name]\n");
+ "Use flashprog -p pony_spi:dev=/dev/device[,type=name]\n");
return 1;
}
diff --git a/print.c b/print.c
index b8d62a6..79d585b 100644
--- a/print.c
+++ b/print.c
@@ -71,7 +71,7 @@
void print_buildinfo(void)
{
- msg_gdbg("flashrom was built with");
+ msg_gdbg("flashprog was built with");
#ifdef __clang__
msg_gdbg(" LLVM Clang");
#ifdef __clang_version__
@@ -89,9 +89,9 @@
#else
msg_gdbg(" unknown compiler,");
#endif
-#if defined (__FLASHROM_LITTLE_ENDIAN__)
+#if defined (__FLASHPROG_LITTLE_ENDIAN__)
msg_gdbg(" little endian");
-#elif defined (__FLASHROM_BIG_ENDIAN__)
+#elif defined (__FLASHPROG_BIG_ENDIAN__)
msg_gdbg(" big endian");
#else
#error Endianness could not be determined
@@ -101,15 +101,15 @@
void print_version(void)
{
- msg_ginfo("flashrom-stable %s", flashrom_version);
+ msg_ginfo("flashprog %s", flashprog_version);
print_sysinfo();
msg_ginfo("\n");
}
void print_banner(void)
{
- msg_ginfo("flashrom is free software, get the source code at "
- "https://flashrom.org\n");
+ msg_ginfo("flashprog is free software, get the source code at "
+ "https://flashprog.org\n");
msg_ginfo("\n");
}
@@ -588,7 +588,7 @@
break;
default:
msg_gerr("\n%s: %s: Uninitialized programmer type!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__, prog->name);
break;
}
diff --git a/print_wiki.c b/print_wiki.c
index 2c8c109..5c36588 100644
--- a/print_wiki.c
+++ b/print_wiki.c
@@ -27,20 +27,20 @@
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
background-color:#eeeeee; text-align:left; border:1px solid #aabbcc;\">\
<small>\n\
-'''Last update:''' %s (generated by flashrom %s)<br />\n\
-The tables below are generated from flashrom's source by copying the output of '''flashrom -z'''.<br /><br />\n\
+'''Last update:''' %s (generated by flashprog %s)<br />\n\
+The tables below are generated from flashprog's source by copying the output of '''flashprog -z'''.<br /><br />\n\
A short explanation of the cells representing the support state follows:<br />\n\
{| border=\"0\" valign=\"top\"\n\
! style=\"text-align:left;\" |\n\
! style=\"text-align:left;\" |\n\
|-\n\
|{{OK}}\n\
-| The feature was '''tested and should work''' in general unless there is a bug in flashrom or another component in \
+| The feature was '''tested and should work''' in general unless there is a bug in flashprog or another component in \
the system prohibits some functionality.\n\
|-\n\
|{{Dep}}\n\
| '''Configuration-dependent'''. The feature was tested and should work in general but there are common \
-configurations that drastically limit flashrom's capabilities or make it completely stop working.\n\
+configurations that drastically limit flashprog's capabilities or make it completely stop working.\n\
|-\n\
|{{?3}}\n\
| The feature is '''untested''' but believed to be working.\n\
@@ -72,10 +72,10 @@
static const char board_intro[] = "\
\n== Supported mainboards ==\n\n\
-In general, it is very likely that flashrom works out of the box even if your \
+In general, it is very likely that flashprog works out of the box even if your \
mainboard is not listed below.\n\nThis is a list of mainboards where we have \
verified that they either do or do not need any special initialization to \
-make flashrom work (given flashrom supports the respective chipset and flash \
+make flashprog work (given flashprog supports the respective chipset and flash \
chip), or that they do not yet work at all. If they do not work, support may \
or may not be added later.\n\n\
Mainboards (or individual revisions) which don't appear in the list may or may \
@@ -96,13 +96,13 @@
static const char chip_intro[] = "\
\n== Supported flash chips ==\n\n\
-The list below contains all chips that have some kind of explicit support added to flashrom and their last \
+The list below contains all chips that have some kind of explicit support added to flashprog and their last \
known test status. Newer SPI flash chips might work even without explicit support if they implement SFDP ([\
http://www.jedec.org/standards-documents/docs/jesd216 Serial Flash Discoverable Parameters - JESD216]). \
-Flashrom will detect this automatically and inform you about it.\n\n\
+Flashprog will detect this automatically and inform you about it.\n\n\
The names used below are designed to be as concise as possible and hence contain only the characters \
-describing properties that are relevant to flashrom. Irrelevant characters specify attributes flashrom can not \
-use or even detect by itself (e.g. the physical package) and have no effect on flashrom's operation. They are \
+describing properties that are relevant to flashprog. Irrelevant characters specify attributes flashprog can not \
+use or even detect by itself (e.g. the physical package) and have no effect on flashprog's operation. They are \
replaced by dots ('.') functioning as wildcards (like in Regular Expressions) or are completely omitted at the \
end of a name.\n";
@@ -132,11 +132,11 @@
static const char laptop_intro[] = "\n== Supported mobile devices (laptops, tablets etc.) ==\n\n\
In general, flashing mobile devices is more difficult because they\n\n\
* often use the flash chip for stuff besides the BIOS,\n\
-* often have special protection stuff which has to be handled by flashrom,\n\
-* often use flash translation circuits which need drivers in flashrom.\n\n\
+* often have special protection stuff which has to be handled by flashprog,\n\
+* often use flash translation circuits which need drivers in flashprog.\n\n\
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
background-color:#ff6666; align:right; border:1px solid #000000;\">\n\
-'''IMPORTANT:''' At this point we recommend to '''not''' use flashrom on \
+'''IMPORTANT:''' At this point we recommend to '''not''' use flashprog on \
untested mobile devices unless you have a means to recover from a flashing that goes \
wrong (a working backup flash chip and/or good soldering skills).\n</div>\n";
@@ -396,7 +396,7 @@
}
printf("\n== PCI Devices ==\n\n"
- "Total amount of supported PCI devices flashrom can use as a programmer: '''%d'''\n\n"
+ "Total amount of supported PCI devices flashprog can use as a programmer: '''%d'''\n\n"
"{%s%s", pci_count, th_start, programmer_th);
for (i = 0; i < programmer_table_size; i++) {
@@ -408,7 +408,7 @@
printf("\n|}\n\n|}\n");
printf("\n== USB Devices ==\n\n"
- "Total amount of supported USB devices flashrom can use as a programmer: '''%d'''\n\n"
+ "Total amount of supported USB devices flashprog can use as a programmer: '''%d'''\n\n"
"{%s%s", usb_count, th_start, programmer_th);
for (i = 0; i < programmer_table_size; i++) {
@@ -442,7 +442,7 @@
char buf[sizeof("1986-02-28T12:37:42Z")];
strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", gmtime(&t));
- printf(wiki_header, buf, flashrom_version);
+ printf(wiki_header, buf, flashprog_version);
print_supported_chips_wiki(2);
#if CONFIG_INTERNAL == 1
print_supported_chipsets_wiki(3);
diff --git a/programmer.c b/programmer.c
index 2b960e6..e72eaf1 100644
--- a/programmer.c
+++ b/programmer.c
@@ -91,7 +91,7 @@
if (registered_master_count >= MASTERS_MAX) {
msg_perr("Tried to register more than %i master "
"interfaces.\n", MASTERS_MAX);
- return ERROR_FLASHROM_LIMIT;
+ return ERROR_FLASHPROG_LIMIT;
}
registered_masters[registered_master_count] = *mst;
registered_master_count++;
diff --git a/sb600spi.c b/sb600spi.c
index 8d071be..ba7bd3e 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -113,7 +113,7 @@
} else {
msg_pwarn("SB device found but SMBus revision 0x%02x does not match known values.\n"
"Assuming SB8xx/SB9xx/Hudson-1.\n"
- "Please send a log to flashrom-stable@flashrom.org\n",
+ "Please send a log to flashprog@flashprog.org\n",
rev);
amd_gen = CHIPSET_SB89XX;
}
@@ -134,7 +134,7 @@
msg_pdbg("Yangtze detected.\n");
} else {
msg_pwarn("FCH device found but SMBus revision 0x%02x does not match known values.\n"
- "Please report this to flashrom-stable@flashrom.org and include this\n"
+ "Please report this to flashprog@flashprog.org and include this\n"
"log and the output of lspci -nnvx, thanks!.\n", rev);
}
} else if (dev->device_id == 0x790e) {
@@ -149,14 +149,14 @@
msg_pdbg("Promontory detected.\n");
} else {
msg_pwarn("FCH device found but SMBus revision 0x%02x does not match known values.\n"
- "Please report this to flashrom-stable@flashrom.org and include this\n"
+ "Please report this to flashprog@flashprog.org and include this\n"
"log and the output of lspci -nnvx, thanks!.\n", rev);
}
} else
msg_pwarn("%s: Unknown LPC device %" PRIx16 ":%" PRIx16 ".\n"
- "Please report this to flashrom-stable@flashrom.org and include this\n"
+ "Please report this to flashprog@flashprog.org and include this\n"
"log and the output of lspci -nnvx, thanks!\n",
__func__, dev->vendor_id, dev->device_id);
if (amd_gen == CHIPSET_AMD_UNKNOWN) {
diff --git a/serprog.c b/serprog.c
index e047d6d..0416570 100644
--- a/serprog.c
+++ b/serprog.c
@@ -395,7 +395,7 @@
#if !IS_WINDOWS
if (device && !strlen(device)) {
msg_perr("Error: No device specified.\n"
- "Use flashrom -p serprog:dev=/dev/device[:baud]\n");
+ "Use flashprog -p serprog:dev=/dev/device[:baud]\n");
free(device);
return 1;
}
@@ -417,7 +417,7 @@
}
if (!port || !strlen(port)) {
msg_perr("Error: No port specified.\n"
- "Use flashrom -p serprog:ip=ipaddr:port\n");
+ "Use flashprog -p serprog:ip=ipaddr:port\n");
free(device);
return 1;
}
@@ -432,7 +432,7 @@
}
if (device && !strlen(device)) {
msg_perr("Error: No host specified.\n"
- "Use flashrom -p serprog:ip=ipaddr:port\n");
+ "Use flashprog -p serprog:ip=ipaddr:port\n");
free(device);
return 1;
}
@@ -442,11 +442,11 @@
if (!have_device) {
#if IS_WINDOWS
msg_perr("Error: No device specified.\n"
- "Use flashrom -p serprog:dev=comN[:baud]\n");
+ "Use flashprog -p serprog:dev=comN[:baud]\n");
#else
msg_perr("Error: Neither host nor device specified.\n"
- "Use flashrom -p serprog:dev=/dev/device:baud or "
- "flashrom -p serprog:ip=ipaddr:port\n");
+ "Use flashprog -p serprog:dev=/dev/device:baud or "
+ "flashprog -p serprog:ip=ipaddr:port\n");
#endif
return 1;
}
@@ -480,7 +480,7 @@
sp_check_avail_automatic = 1;
/* FIXME: This assumes that serprog device bustypes are always
- * identical with flashrom bustype enums and that they all fit
+ * identical with flashprog bustype enums and that they all fit
* in a single byte.
*/
if (sp_docommand(S_CMD_Q_BUSTYPE, 0, NULL, 1, &c)) {
@@ -712,7 +712,7 @@
return 1;
}
-/* Move an in flashrom buffer existing write-n operation to the on-device operation buffer. */
+/* Move an in flashprog buffer existing write-n operation to the on-device operation buffer. */
static int sp_pass_writen(void)
{
unsigned char header[7];
@@ -965,7 +965,7 @@
/* Serprog transmits 24 bits only and assumes the underlying implementation handles any remaining bits
* correctly (usually setting them to one either in software (for FWH/LPC) or relying on the fact that
* the hardware observes a subset of the address bits only). Combined with the standard mapping of
- * flashrom this creates a 16 MB-wide window just below the 4 GB boundary where serprog can operate (as
+ * flashprog this creates a 16 MB-wide window just below the 4 GB boundary where serprog can operate (as
* needed for non-SPI chips). Below we make sure that the requested range is within this window. */
if ((phys_addr & 0xFF000000) == 0xFF000000) {
return (void*)phys_addr;
diff --git a/sfdp.c b/sfdp.c
index 6867185..e33f7fe 100644
--- a/sfdp.c
+++ b/sfdp.c
@@ -86,7 +86,7 @@
if (erasefn == NULL || total_size == 0 || block_size == 0 ||
total_size % block_size != 0) {
msg_cdbg("%s: invalid input, please report to "
- "flashrom-stable@flashrom.org\n", __func__);
+ "flashprog@flashprog.org\n", __func__);
return 1;
}
@@ -116,7 +116,7 @@
return 0;
}
msg_cinfo("%s: Not enough space to store another eraser (i=%d).\n"
- "Please report this at flashrom-stable@flashrom.org\n",
+ "Please report this at flashprog@flashprog.org\n",
__func__, i);
return 1;
}
@@ -149,7 +149,7 @@
break;
case 0x2:
msg_cdbg(" 4-Byte only addressing (not supported by "
- "flashrom).\n");
+ "flashprog).\n");
return 1;
default:
msg_cdbg(" Required addressing mode (0x%x) not supported.\n",
@@ -236,7 +236,7 @@
}
if (tmp8 >= 31) {
msg_cdbg2(" Block size of erase Sector Type %d (2^%d) "
- "is too big for flashrom.\n", j, tmp8);
+ "is too big for flashprog.\n", j, tmp8);
continue;
}
block_size = 1 << (tmp8); /* block_size = 2 ^ field */
diff --git a/spi.c b/spi.c
index bb6f976..6e61f53 100644
--- a/spi.c
+++ b/spi.c
@@ -77,7 +77,7 @@
unsigned int max_data = flash->mst->spi.max_data_read;
if (max_data == MAX_DATA_UNSPECIFIED) {
msg_perr("%s called, but SPI read chunk size not defined on this hardware.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n", __func__);
+ "Please report a bug at flashprog@flashprog.org\n", __func__);
return 1;
}
return spi_read_chunked(flash, buf, start, len, max_data);
@@ -88,7 +88,7 @@
unsigned int max_data = flash->mst->spi.max_data_write;
if (max_data == MAX_DATA_UNSPECIFIED) {
msg_perr("%s called, but SPI write chunk size not defined on this hardware.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n", __func__);
+ "Please report a bug at flashprog@flashprog.org\n", __func__);
return 1;
}
return spi_write_chunked(flash, buf, start, len, max_data);
@@ -152,9 +152,9 @@
((mst->command == default_spi_send_command) &&
(mst->multicommand == default_spi_send_multicommand))) {
msg_perr("%s called with incomplete master definition.\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__);
- return ERROR_FLASHROM_BUG;
+ return ERROR_FLASHPROG_BUG;
}
@@ -206,6 +206,6 @@
return function_opcode_list[i].opcode;
}
msg_cinfo("%s: unknown erase function (0x%p). Please report "
- "this at flashrom-stable@flashrom.org\n", __func__, func);
+ "this at flashprog@flashprog.org\n", __func__, func);
return NULL;
}
diff --git a/spi25.c b/spi25.c
index 6f17481..e4efd1c 100644
--- a/spi25.c
+++ b/spi25.c
@@ -629,7 +629,7 @@
return spi25_function_opcode_list[i].func;
}
msg_cinfo("%s: unknown erase opcode (0x%02x). Please report "
- "this at flashrom-stable@flashrom.org\n", __func__, opcode);
+ "this at flashprog@flashprog.org\n", __func__, opcode);
return NULL;
}
@@ -750,7 +750,7 @@
/* The data sheet requires a start address with the low bit cleared. */
if (start % 2) {
msg_cerr("%s: start address not even!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__);
if (spi_chip_write_1(flash, buf, start, start % 2))
return SPI_GENERIC_ERROR;
@@ -761,7 +761,7 @@
/* The data sheet requires total AAI write length to be even. */
if (len % 2) {
msg_cerr("%s: total write length not even!\n"
- "Please report a bug at flashrom-stable@flashrom.org\n",
+ "Please report a bug at flashprog@flashprog.org\n",
__func__);
/* Do not return an error for now. */
//return SPI_GENERIC_ERROR;
diff --git a/stm50.c b/stm50.c
index 37e560c..d03d6dc 100644
--- a/stm50.c
+++ b/stm50.c
@@ -45,7 +45,7 @@
/* Some ST M50* chips do support erasing of sectors. This function will derive the erase function to use from
* the length of the of the block. For calls that apparently do not address a sector (but a block) we just call
* the block erase function instead. FIXME: This duplicates the behavior of the remaining erasers for blocks and
- * might be fixed when flashrom supports multiple functions per eraser or erasers that do erase parts of the
+ * might be fixed when flashprog supports multiple functions per eraser or erasers that do erase parts of the
* chip only. */
int erase_sector_stm50(struct flashctx *flash, unsigned int addr, unsigned int len)
{
diff --git a/test_build.sh b/test_build.sh
index 9852952..7fabe6b 100755
--- a/test_build.sh
+++ b/test_build.sh
@@ -7,22 +7,22 @@
if command -v meson >/dev/null 2>&1; then
meson setup --buildtype release ${TEMP_DIR}/build
ninja ${CPUS:+-j${CPUS}} -C ${TEMP_DIR}/build
- FLASHROM=${TEMP_DIR}/build/flashrom
+ FLASHPROG=${TEMP_DIR}/build/flashprog
else
${MAKECMD:-make} clean
${MAKECMD:-make} -j${CPUS:-$(nproc)} CC="${CC:-ccache cc}" CONFIG_EVERYTHING=yes
- FLASHROM=./flashrom
+ FLASHPROG=./flashprog
fi
dd bs=128K count=1 </dev/urandom >${TEMP_DIR}/rand
-${FLASHROM} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -w ${TEMP_DIR}/rand
-${FLASHROM} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -r ${TEMP_DIR}/bak
+${FLASHPROG} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -w ${TEMP_DIR}/rand
+${FLASHPROG} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -r ${TEMP_DIR}/bak
cmp ${TEMP_DIR}/rand ${TEMP_DIR}/bak
dd bs=128K count=1 </dev/urandom >${TEMP_DIR}/rand
-${FLASHROM} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -w ${TEMP_DIR}/rand
-${FLASHROM} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -v ${TEMP_DIR}/rand
+${FLASHPROG} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -w ${TEMP_DIR}/rand
+${FLASHPROG} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -v ${TEMP_DIR}/rand
dd bs=128K count=1 </dev/zero | tr '\000' '\377' >${TEMP_DIR}/empty
-${FLASHROM} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -E
-${FLASHROM} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -v ${TEMP_DIR}/empty
+${FLASHPROG} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -E
+${FLASHPROG} -p dummy:emulate=M25P10.RES,image=${TEMP_DIR}/image -c M25P10 -v ${TEMP_DIR}/empty
diff --git a/util/flashrom_partial_write_test.sh b/util/flashprog_partial_write_test.sh
similarity index 81%
rename from util/flashrom_partial_write_test.sh
rename to util/flashprog_partial_write_test.sh
index 8e30fc6..ea1f35f 100755
--- a/util/flashrom_partial_write_test.sh
+++ b/util/flashprog_partial_write_test.sh
@@ -13,7 +13,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-# This script attempts to test Flashrom partial write capability by writing
+# This script attempts to test Flashprog partial write capability by writing
# patterns of 0xff and 0x00 bytes to the lowest 128kB of flash. 128kB is chosen
# since 64kB is usually the largest possible block size, so we will try to
# cover at least two blocks with this test.
@@ -21,18 +21,18 @@
EXIT_SUCCESS=0
EXIT_FAILURE=1
-# The copy of flashrom to test. If unset, we'll assume the user wants to test
-# a newly built flashrom binary in the parent directory (this script should
-# reside in flashrom/util).
-if [ -z "$FLASHROM" ] ; then
- FLASHROM="../flashrom"
+# The copy of flashprog to test. If unset, we'll assume the user wants to test
+# a newly built flashprog binary in the parent directory (this script should
+# reside in flashprog/util).
+if [ -z "$FLASHPROG" ] ; then
+ FLASHPROG="../flashprog"
fi
-echo "testing flashrom binary: ${FLASHROM}"
+echo "testing flashprog binary: ${FLASHPROG}"
OLDDIR=$(pwd)
# test data location
-TMPDIR=$(mktemp -d -t flashrom_test.XXXXXXXXXX)
+TMPDIR=$(mktemp -d -t flashprog_test.XXXXXXXXXX)
if [ "$?" != "0" ] ; then
echo "Could not create temporary directory"
exit $EXIT_FAILURE
@@ -50,16 +50,16 @@
exit $EXIT_FAILURE
fi
-which flashrom > /dev/null
+which flashprog > /dev/null
if [ "$?" != "0" ] ; then
- echo "Please install a stable version of flashrom in your path."
- echo "This will be used to compare the test flashrom binary and "
+ echo "Please install a stable version of flashprog in your path."
+ echo "This will be used to compare the test flashprog binary and "
echo "restore your firmware image at the end of the test."
exit $EXIT_FAILURE
fi
-# Keep a copy of flashrom with the test data
-cp "$FLASHROM" "${TMPDIR}/"
+# Keep a copy of flashprog with the test data
+cp "$FLASHPROG" "${TMPDIR}/"
cd "$TMPDIR"
echo "Running test in ${TMPDIR}"
@@ -83,7 +83,7 @@
echo "Reading BIOS image"
BIOS="bios.bin"
-flashrom ${FLASHROM_PARAM} -r "$BIOS" > /dev/null
+flashprog ${FLASHPROG_PARAM} -r "$BIOS" > /dev/null
echo "Original image saved as ${BIOS}"
# $1: exit code
@@ -94,8 +94,8 @@
echo "Result: PASSED"
fi
- echo "restoring original bios image using system's flashrom"
- flashrom ${FLASHROM_PARAM} -w "$BIOS"
+ echo "restoring original bios image using system's flashprog"
+ flashprog ${FLASHPROG_PARAM} -w "$BIOS"
echo "test files remain in ${TMPDIR}"
cd "$OLDDIR"
exit "$1"
@@ -166,15 +166,15 @@
dd if=${ZERO_4K} of=${TESTFILE} bs=1 conv=notrunc seek=${offset} 2> /dev/null
dd if=${FF_4K} of=${TESTFILE} bs=1 conv=notrunc seek=$((${offset} + 4096)) 2> /dev/null
- ./flashrom ${FLASHROM_PARAM} -l layout_4k_aligned.txt -i 00_${i} -i ff_${i} -w "$TESTFILE" > /dev/null
+ ./flashprog ${FLASHPROG_PARAM} -l layout_4k_aligned.txt -i 00_${i} -i ff_${i} -w "$TESTFILE" > /dev/null
if [ "$?" != "0" ] ; then
echo "failed to flash region"
do_exit "$EXIT_FAILURE"
fi
# download the entire ROM image and use diff to compare to ensure
- # flashrom logic does not violate user-specified regions
- flashrom ${FLASHROM_PARAM} -r difftest.bin > /dev/null
+ # flashprog logic does not violate user-specified regions
+ flashprog ${FLASHPROG_PARAM} -r difftest.bin > /dev/null
diff -q difftest.bin "$TESTFILE"
if [ "$?" != "0" ] ; then
echo "failed diff test"
@@ -247,7 +247,7 @@
" > layout_unaligned.txt
# reset the test file and ROM to the original state
-flashrom ${FLASHROM_PARAM} -w "$BIOS" > /dev/null
+flashprog ${FLASHPROG_PARAM} -w "$BIOS" > /dev/null
cp "$BIOS" "$TESTFILE"
i=0
@@ -266,15 +266,15 @@
dd if=${ZERO_4K} of=${TESTFILE} bs=1 conv=notrunc seek=${offset} 2> /dev/null
dd if=${FF_4K} of=${TESTFILE} bs=1 conv=notrunc seek=$((${offset} + 4096)) count=writelen 2> /dev/null
- ./flashrom ${FLASHROM_PARAM} -l layout_unaligned.txt -i 00_${i} -i ff_${i} -w "$TESTFILE" > /dev/null
+ ./flashprog ${FLASHPROG_PARAM} -l layout_unaligned.txt -i 00_${i} -i ff_${i} -w "$TESTFILE" > /dev/null
if [ "$?" != "0" ] ; then
echo "failed to flash region"
do_exit "$EXIT_FAILURE"
fi
# download the entire ROM image and use diff to compare to ensure
- # flashrom logic does not violate user-specified regions
- flashrom ${FLASHROM_PARAM} -r difftest.bin > /dev/null
+ # flashprog logic does not violate user-specified regions
+ flashprog ${FLASHPROG_PARAM} -r difftest.bin > /dev/null
diff -q difftest.bin "$TESTFILE"
if [ "$?" != "0" ] ; then
echo "failed diff test"
diff --git a/util/getversion.sh b/util/getversion.sh
index 6733af0..038adcd 100755
--- a/util/getversion.sh
+++ b/util/getversion.sh
@@ -33,8 +33,8 @@
mandate() {
d='unknown'
- if ${GETREVISION} -c flashrom.8.tmpl; then
- tmp=$(${GETREVISION} --date flashrom.8.tmpl)
+ if ${GETREVISION} -c flashprog.8.tmpl; then
+ tmp=$(${GETREVISION} --date flashprog.8.tmpl)
if [ $? -eq 0 ]; then
d="${tmp}"
fi
@@ -55,7 +55,7 @@
-h or --help
this message
-v or --version
- return current/release flashrom version
+ return current/release flashprog version
-m or --man-date
return current/release date of the manual page
"
diff --git a/util/git-hooks/commit-msg b/util/git-hooks/commit-msg
index d43eb45..fa250f3 100755
--- a/util/git-hooks/commit-msg
+++ b/util/git-hooks/commit-msg
@@ -28,7 +28,7 @@
CHANGE_ID_AFTER="Bug|Depends-On|Issue|Test|Feature|Fixes|Fixed|Staging-ID"
MSG="$1"
-DEV_GUIDELINES_URL="https://www.flashrom.org/Development_Guidelines"
+DEV_GUIDELINES_URL="https://www.flashprog.org/Development_Guidelines"
# Check for, and add if missing, a unique Change-Id
#
diff --git a/util/git-hooks/pre-push b/util/git-hooks/pre-push
index b5f4620..f6e04ec 100755
--- a/util/git-hooks/pre-push
+++ b/util/git-hooks/pre-push
@@ -21,7 +21,7 @@
zero=0000000000000000000000000000000000000000
-upstream_pattern="github\.com.flashrom/flashrom(\.git)?|flashrom\.org.git/flashrom(\.git)?"
+upstream_pattern="github\.com.flashprog/flashprog(\.git)?|flashprog\.org.git/flashprog(\.git)?"
# Only care about the upstream repositories
if echo "$url" | grep -q -v -E "$upstream_pattern" ; then
diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile
index 0891599..14e6d2f 100644
--- a/util/ich_descriptors_tool/Makefile
+++ b/util/ich_descriptors_tool/Makefile
@@ -2,7 +2,7 @@
# This file is part of the flashrom project.
#
# This Makefile works standalone, but it is usually called from the main
-# Makefile in the flashrom directory.
+# Makefile in the flashprog directory.
include ../../Makefile.include
@@ -35,14 +35,14 @@
ifeq ($(TARGET_OS), DOS)
EXEC_SUFFIX := .exe
# DJGPP has odd uint*_t definitions which cause lots of format string warnings.
-FLASHROM_CFLAGS += -Wno-format
+FLASHPROG_CFLAGS += -Wno-format
endif
ifeq ($(TARGET_OS), MinGW)
EXEC_SUFFIX := .exe
# Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that
# for MinGW. See http://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/
-FLASHROM_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
+FLASHPROG_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
endif
ifeq ($(WARNERROR), yes)
@@ -50,10 +50,10 @@
endif
-FLASHROM_CFLAGS += -MMD -MP -MF $(DEPPATH)/$(@F).d
+FLASHPROG_CFLAGS += -MMD -MP -MF $(DEPPATH)/$(@F).d
# enables functions that populate the descriptor structs from plain binary dumps
-FLASHROM_CFLAGS += -D ICH_DESCRIPTORS_FROM_DUMP_ONLY
-FLASHROM_CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+FLASHPROG_CFLAGS += -D ICH_DESCRIPTORS_FROM_DUMP_ONLY
+FLASHPROG_CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
OBJ = $(OBJATH)/$(SRC:%.c=%.o)
@@ -62,12 +62,12 @@
all:$(PROGRAM)$(EXEC_SUFFIX)
$(OBJ): $(OBJATH)/%.o : %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) $(FLASHROM_CFLAGS) -o $@ -c $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(FLASHPROG_CFLAGS) -o $@ -c $<
# this enables us to share source files without simultaneously sharing .o files
-# with flashrom, which would lead to unexpected results (w/o running make clean)
+# with flashprog, which would lead to unexpected results (w/o running make clean)
$(SHAREDOBJ): $(OBJATH)/%.o : $(SHAREDSRCDIR)/%.c
- $(CC) $(CFLAGS) $(CPPFLAGS) $(FLASHROM_CFLAGS) -o $@ -c $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(FLASHPROG_CFLAGS) -o $@ -c $<
$(PROGRAM)$(EXEC_SUFFIX): $(OBJ) $(SHAREDOBJ)
$(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJ) $(SHAREDOBJ)
diff --git a/util/manibuilder/Dockerfile.almalinux b/util/manibuilder/Dockerfile.almalinux
index 5904f45..8f3502d 100644
--- a/util/manibuilder/Dockerfile.almalinux
+++ b/util/manibuilder/Dockerfile.almalinux
@@ -19,10 +19,10 @@
ENV GIT_SSL_NO_VERIFY=1
USER mani
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN \
cd && \
- git clone ${ORIGIN} flashrom
+ git clone ${ORIGIN} flashprog
ENV DEVSHELL /bin/bash
COPY mani-wrapper.sh /home/mani/
diff --git a/util/manibuilder/Dockerfile.alpine b/util/manibuilder/Dockerfile.alpine
index 227eb91..585275b 100644
--- a/util/manibuilder/Dockerfile.alpine
+++ b/util/manibuilder/Dockerfile.alpine
@@ -23,11 +23,11 @@
ENV GIT_SSL_NO_VERIFY=1
USER mani
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN \
cd && \
mkdir .ccache && chown mani:mani .ccache && \
- git clone ${ORIGIN} flashrom
+ git clone ${ORIGIN} flashprog
ARG IDENT=mani
ARG CCACHE_MAX=32M
diff --git a/util/manibuilder/Dockerfile.anita b/util/manibuilder/Dockerfile.anita
index b90311f..c8dfae8 100644
--- a/util/manibuilder/Dockerfile.anita
+++ b/util/manibuilder/Dockerfile.anita
@@ -25,7 +25,7 @@
ARG EXTRA_PKG=""
ARG RUNTIME_MEM=128M
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
ARG PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.1/All
RUN cd && anita --persist --memory-size=${RUNTIME_MEM} --run \
"echo 'dhcpcd' >init && \
@@ -35,7 +35,7 @@
pciutils libusb1 libusb-compat libftdi \
${EXTRA_PKG} && \
git config --global --add http.sslVerify false && \
- git clone ${ORIGIN} flashrom" \
+ git clone ${ORIGIN} flashprog" \
boot ${INST_IMG}
RUN cd && dd if=/dev/zero bs=1M count=64 of=cache.img && \
@@ -56,7 +56,7 @@
echo 'manitest() {' >>init && \
echo ' fsck -y -t ffs /dev/'\${bdev} >>init && \
echo ' mount /dev/'\${bdev}' ~/.ccache' >>init && \
- echo ' (cd ~/flashrom && eval \" \$*\")' >>init && \
+ echo ' (cd ~/flashprog && eval \" \$*\")' >>init && \
echo ' ret=\$?' >>init && \
echo ' umount ~/.ccache' >>init && \
echo ' return \$ret' >>init && \
diff --git a/util/manibuilder/Dockerfile.centos b/util/manibuilder/Dockerfile.centos
index 6ca5214..72c7472 100644
--- a/util/manibuilder/Dockerfile.centos
+++ b/util/manibuilder/Dockerfile.centos
@@ -11,11 +11,11 @@
ENV GIT_SSL_NO_VERIFY=1
USER mani
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN \
cd && \
mkdir .ccache && chown mani:mani .ccache && \
- git clone ${ORIGIN} flashrom
+ git clone ${ORIGIN} flashprog
ENV DEVSHELL /bin/bash
COPY mani-wrapper.sh /home/mani/
diff --git a/util/manibuilder/Dockerfile.debian b/util/manibuilder/Dockerfile.debian
index 8eeb4ea..ada61d4 100644
--- a/util/manibuilder/Dockerfile.debian
+++ b/util/manibuilder/Dockerfile.debian
@@ -14,11 +14,11 @@
ENV GIT_SSL_NO_VERIFY=1
USER mani
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN \
cd && \
mkdir .ccache && chown mani:mani .ccache && \
- git clone ${ORIGIN} flashrom
+ git clone ${ORIGIN} flashprog
ARG IDENT=mani
ARG CCACHE_MAX=32M
diff --git a/util/manibuilder/Dockerfile.djgpp b/util/manibuilder/Dockerfile.djgpp
index 36cabfe..7547798 100644
--- a/util/manibuilder/Dockerfile.djgpp
+++ b/util/manibuilder/Dockerfile.djgpp
@@ -11,21 +11,21 @@
ENV GIT_SSL_NO_VERIFY=1
USER mani
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN cd && \
mkdir .ccache && chown mani:users .ccache && \
- git clone ${ORIGIN} flashrom && \
+ git clone ${ORIGIN} flashprog && \
git clone https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git && \
cd pciutils && \
git checkout v3.5.6 && \
- curl --insecure https://flashrom.org/images/6/6a/Pciutils-3.5.6.patch.gz | zcat | git apply && \
+ curl --insecure https://flashprog.org/images/6/6a/Pciutils-3.5.6.patch.gz | zcat | git apply && \
make ZLIB=no DNS=no HOST=i386-djgpp-djgpp \
CROSS_COMPILE=i586-pc-msdosdjgpp- \
PREFIX=/ DESTDIR=$PWD/../ \
STRIP="--strip-program=i586-pc-msdosdjgpp-strip -s" \
install install-lib && \
cd ../ && \
- curl --insecure https://flashrom.org/images/3/3d/Libgetopt.tar.gz | zcat | tar x && \
+ curl --insecure https://flashprog.org/images/3/3d/Libgetopt.tar.gz | zcat | tar x && \
cd libgetopt && \
make && cp libgetopt.a ../lib/ && cp getopt.h ../include/
diff --git a/util/manibuilder/Dockerfile.fedora b/util/manibuilder/Dockerfile.fedora
index 82a1e21..ccce010 100644
--- a/util/manibuilder/Dockerfile.fedora
+++ b/util/manibuilder/Dockerfile.fedora
@@ -12,11 +12,11 @@
ENV GIT_SSL_NO_VERIFY=1
USER mani
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN \
cd && \
mkdir .ccache && chown mani:mani .ccache && \
- git clone ${ORIGIN} flashrom
+ git clone ${ORIGIN} flashprog
ARG IDENT=mani
ARG CCACHE_MAX=32M
diff --git a/util/manibuilder/Dockerfile.git b/util/manibuilder/Dockerfile.git
index 92549a3..10d7aa6 100644
--- a/util/manibuilder/Dockerfile.git
+++ b/util/manibuilder/Dockerfile.git
@@ -2,5 +2,5 @@
RUN apk add git-daemon
EXPOSE 9418
-VOLUME ["/git/flashrom.git"]
-CMD ["daemon", "--reuseaddr", "--export-all", "--base-path=/git", "/git/flashrom.git"]
+VOLUME ["/git/flashprog.git"]
+CMD ["daemon", "--reuseaddr", "--export-all", "--base-path=/git", "/git/flashprog.git"]
diff --git a/util/manibuilder/Dockerfile.ubuntu b/util/manibuilder/Dockerfile.ubuntu
index 1762506..b9b818f 100644
--- a/util/manibuilder/Dockerfile.ubuntu
+++ b/util/manibuilder/Dockerfile.ubuntu
@@ -27,11 +27,11 @@
ENV GIT_SSL_NO_VERIFY=1
USER mani
-ARG ORIGIN=https://review.coreboot.org/flashrom-stable.git
+ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
RUN \
cd && \
mkdir .ccache && chown mani:mani .ccache && \
- git clone ${ORIGIN} flashrom
+ git clone ${ORIGIN} flashprog
ARG IDENT=mani
ARG CCACHE_MAX=32M
diff --git a/util/manibuilder/Makefile b/util/manibuilder/Makefile
index 3ae1e15..47e3415 100644
--- a/util/manibuilder/Makefile
+++ b/util/manibuilder/Makefile
@@ -48,7 +48,7 @@
$(ALL_TAGS): export QUIET_SETUP=$(QUIET_TEST)
$(ALL_TAGS): export TEST_REMOTE?=$(if $(TEST_LOCAL),\
- git://mani-git/flashrom.git,\
+ git://mani-git/flashprog.git,\
origin)
$(ALL_TAGS): export TEST_REVISION?=$(if $(TEST_LOCAL),HEAD,main)
$(ALL_TAGS): %: %-check-build mani-net $(if $(TEST_LOCAL),local-git)
@@ -127,7 +127,7 @@
fi; \
docker run --rm --detach \
--name mani-git \
- --volume=$(TEST_LOCAL_GIT):/git/flashrom.git:ro \
+ --volume=$(TEST_LOCAL_GIT):/git/flashprog.git:ro \
--network=manibuilder \
mani/git $(if $(QUIET_SETUP),>/dev/null)
diff --git a/util/manibuilder/README.md b/util/manibuilder/README.md
index ece2317..adbdfe7 100644
--- a/util/manibuilder/README.md
+++ b/util/manibuilder/README.md
@@ -15,7 +15,7 @@
target, for instance `alpine:amd64-v3.7`. These targets will
automatically check for existence of their respective *Docker*
images (sub target <tag>-check-build), and build them if necessary
-(<tag>-build). Finally, flashrom revision `$(TEST_REVISION)` is
+(<tag>-build). Finally, flashprog revision `$(TEST_REVISION)` is
fetched and build tested.
The results will be kept by *Docker* as stopped containers and
@@ -62,12 +62,12 @@
$ make debian-debootstrap:mips-sid-shell
[...]
- mani@63536fc102a5:~/flashrom$ make
+ mani@63536fc102a5:~/flashprog$ make
[...]
- cc -MMD -Os -Wall -Wshadow -Werror -I/usr/include/libusb-1.0 -D'CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="''"' -D'CONFIG_SERPROG=1' -D'CONFIG_PONY_SPI=1' -D'CONFIG_BITBANG_SPI=1' -D'CONFIG_GFXNVIDIA=1' -D'CONFIG_SATASII=1' -D'CONFIG_ATAVIA=1' -D'CONFIG_IT8212=1' -D'CONFIG_FT2232_SPI=1' -D'CONFIG_USBBLASTER_SPI=1' -D'CONFIG_PICKIT2_SPI=1' -D'HAVE_FT232H=1' -D'CONFIG_DUMMY=1' -D'CONFIG_DRKAISER=1' -D'CONFIG_NICINTEL=1' -D'CONFIG_NICINTEL_SPI=1' -D'CONFIG_NICINTEL_EEPROM=1' -D'CONFIG_OGP_SPI=1' -D'CONFIG_BUSPIRATE_SPI=1' -D'CONFIG_DEDIPROG=1' -D'CONFIG_DEVELOPERBOX_SPI=1' -D'CONFIG_LINUX_MTD=1' -D'CONFIG_LINUX_SPI=1' -D'CONFIG_CH341A_SPI=1' -D'CONFIG_DIGILENT_SPI=1' -D'NEED_PCI=1' -D'NEED_RAW_ACCESS=1' -D'NEED_LIBUSB0=1' -D'NEED_LIBUSB1=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="p1.0-141-g9cecc7e"' -o libflashrom.o -c libflashrom.c
- libflashrom.c:386:12: error: 'flashrom_layout_parse_fmap' defined but not used [-Werror=unused-function]
- static int flashrom_layout_parse_fmap(struct flashrom_layout **layout,
+ cc -MMD -Os -Wall -Wshadow -Werror -I/usr/include/libusb-1.0 -D'CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="''"' -D'CONFIG_SERPROG=1' -D'CONFIG_PONY_SPI=1' -D'CONFIG_BITBANG_SPI=1' -D'CONFIG_GFXNVIDIA=1' -D'CONFIG_SATASII=1' -D'CONFIG_ATAVIA=1' -D'CONFIG_IT8212=1' -D'CONFIG_FT2232_SPI=1' -D'CONFIG_USBBLASTER_SPI=1' -D'CONFIG_PICKIT2_SPI=1' -D'HAVE_FT232H=1' -D'CONFIG_DUMMY=1' -D'CONFIG_DRKAISER=1' -D'CONFIG_NICINTEL=1' -D'CONFIG_NICINTEL_SPI=1' -D'CONFIG_NICINTEL_EEPROM=1' -D'CONFIG_OGP_SPI=1' -D'CONFIG_BUSPIRATE_SPI=1' -D'CONFIG_DEDIPROG=1' -D'CONFIG_DEVELOPERBOX_SPI=1' -D'CONFIG_LINUX_MTD=1' -D'CONFIG_LINUX_SPI=1' -D'CONFIG_CH341A_SPI=1' -D'CONFIG_DIGILENT_SPI=1' -D'NEED_PCI=1' -D'NEED_RAW_ACCESS=1' -D'NEED_LIBUSB0=1' -D'NEED_LIBUSB1=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHPROG_VERSION="p1.0-141-g9cecc7e"' -o libflashprog.o -c libflashprog.c
+ libflashprog.c:386:12: error: 'flashprog_layout_parse_fmap' defined but not used [-Werror=unused-function]
+ static int flashprog_layout_parse_fmap(struct flashprog_layout **layout,
^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
- make: *** [Makefile:1075: libflashrom.o] Error 1
+ make: *** [Makefile:1075: libflashprog.o] Error 1
$ # uh-huh, might be a problem with big-endian #if foo
diff --git a/util/manibuilder/mani-wrapper.sh b/util/manibuilder/mani-wrapper.sh
index c3f5834..b2de31f 100644
--- a/util/manibuilder/mani-wrapper.sh
+++ b/util/manibuilder/mani-wrapper.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-cd /home/mani/flashrom/
+cd /home/mani/flashprog/
if [ $# -eq 0 ]; then
exec "${DEVSHELL}"
diff --git a/util/shell.nix b/util/shell.nix
index 3c983fe..0389a5f 100644
--- a/util/shell.nix
+++ b/util/shell.nix
@@ -1,7 +1,7 @@
with import <nixpkgs> {};
stdenv.mkDerivation {
- name = "flashrom";
+ name = "flashprog";
buildInputs = [
gcc
diff --git a/util/z60_flashrom.rules b/util/z60_flashprog.rules
similarity index 96%
rename from util/z60_flashrom.rules
rename to util/z60_flashprog.rules
index 9fd3330..4651e1e 100644
--- a/util/z60_flashrom.rules
+++ b/util/z60_flashprog.rules
@@ -25,8 +25,8 @@
## suitable for your respective distribution.
##
-ACTION!="add|change", GOTO="flashrom_rules_end"
-SUBSYSTEM!="usb|usb_device", GOTO="flashrom_rules_end"
+ACTION!="add|change", GOTO="flashprog_rules_end"
+SUBSYSTEM!="usb|usb_device", GOTO="flashprog_rules_end"
# Amontec JTAGkey(2)
# http://www.amontec.com/jtagkey.shtml
@@ -93,4 +93,4 @@
# Winchiphead (WCH) CH341a based programmer
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="664", GROUP="plugdev"
-LABEL="flashrom_rules_end"
+LABEL="flashprog_rules_end"
diff --git a/w29ee011.c b/w29ee011.c
index a570bd6..e6e25f2 100644
--- a/w29ee011.c
+++ b/w29ee011.c
@@ -29,7 +29,7 @@
if (!chip_to_probe || strcmp(chip_to_probe, flash->chip->name)) {
msg_cdbg("Old Winbond W29* probe method disabled because "
"the probing sequence puts the AMIC A49LF040A in "
- "a funky state. Use 'flashrom -c %s' if you "
+ "a funky state. Use 'flashprog -c %s' if you "
"have a board with such a chip.\n", flash->chip->name);
return 0;
}
diff --git a/wbsio_spi.c b/wbsio_spi.c
index d0029ec..02c4a04 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -157,9 +157,9 @@
}
mode = 0x60 | (writearr[1] & 0x0f);
} else if (5 == writecnt && 4 == readcnt) {
- /* XXX: TODO not supported by flashrom infrastructure!
+ /* XXX: TODO not supported by flashprog infrastructure!
* This mode, 7, discards the fifth byte in writecnt,
- * but since we can not express that in flashrom, fail
+ * but since we can not express that in flashprog, fail
* the operation for now.
*/
;
diff --git a/writeprotect.c b/writeprotect.c
index a3c9ce2..b91f3e8 100644
--- a/writeprotect.c
+++ b/writeprotect.c
@@ -20,28 +20,28 @@
#include <string.h>
#include "flash.h"
-#include "libflashrom.h"
+#include "libflashprog.h"
#include "chipdrivers.h"
#include "writeprotect.h"
/** Read and extract a single bit from the chip's registers */
-static enum flashrom_wp_result read_bit(uint8_t *value, bool *present, struct flashctx *flash, struct reg_bit_info bit)
+static enum flashprog_wp_result read_bit(uint8_t *value, bool *present, struct flashctx *flash, struct reg_bit_info bit)
{
*present = bit.reg != INVALID_REG;
if (*present) {
if (spi_read_register(flash, bit.reg, value))
- return FLASHROM_WP_ERR_READ_FAILED;
+ return FLASHPROG_WP_ERR_READ_FAILED;
*value = (*value >> bit.bit_index) & 1;
} else {
/* Zero bit, it may be used by compare_ranges(). */
*value = 0;
}
- return FLASHROM_WP_OK;
+ return FLASHPROG_WP_OK;
}
/** Read all WP configuration bits from the chip's registers. */
-static enum flashrom_wp_result read_wp_bits(struct wp_bits *bits, struct flashctx *flash)
+static enum flashprog_wp_result read_wp_bits(struct wp_bits *bits, struct flashctx *flash)
{
/*
* For each WP bit that is included in the chip's register layout, read
@@ -51,7 +51,7 @@
const struct reg_bit_map *bit_map = &flash->chip->reg_bits;
bool ignored;
size_t i;
- enum flashrom_wp_result ret;
+ enum flashprog_wp_result ret;
/*
* Write protection select bit (WPS) controls kind of write protection
@@ -65,31 +65,31 @@
uint8_t wps;
ret = read_bit(&wps, &wps_bit_present, flash, bit_map->wps);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
if (wps_bit_present && wps)
- return FLASHROM_WP_ERR_UNSUPPORTED_STATE;
+ return FLASHPROG_WP_ERR_UNSUPPORTED_STATE;
}
ret = read_bit(&bits->tb, &bits->tb_bit_present, flash, bit_map->tb);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
ret = read_bit(&bits->sec, &bits->sec_bit_present, flash, bit_map->sec);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
ret = read_bit(&bits->cmp, &bits->cmp_bit_present, flash, bit_map->cmp);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
ret = read_bit(&bits->srp, &bits->srp_bit_present, flash, bit_map->srp);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
ret = read_bit(&bits->srl, &bits->srl_bit_present, flash, bit_map->srl);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
for (i = 0; i < ARRAY_SIZE(bits->bp); i++) {
@@ -98,7 +98,7 @@
bits->bp_bit_count = i + 1;
ret = read_bit(&bits->bp[i], &ignored, flash, bit_map->bp[i]);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
}
@@ -144,7 +144,7 @@
}
/** Write WP configuration bits to the flash's registers. */
-static enum flashrom_wp_result write_wp_bits(struct flashctx *flash, struct wp_bits bits)
+static enum flashprog_wp_result write_wp_bits(struct flashctx *flash, struct wp_bits bits)
{
enum flash_reg reg;
uint8_t reg_values[MAX_REGISTERS];
@@ -159,7 +159,7 @@
uint8_t value;
if (spi_read_register(flash, reg, &value))
- return FLASHROM_WP_ERR_READ_FAILED;
+ return FLASHPROG_WP_ERR_READ_FAILED;
/* Skip unnecessary register writes */
uint8_t actual = value & write_masks[reg];
@@ -170,10 +170,10 @@
value = (value & ~write_masks[reg]) | expected;
if (spi_write_register(flash, reg, value))
- return FLASHROM_WP_ERR_WRITE_FAILED;
+ return FLASHPROG_WP_ERR_WRITE_FAILED;
}
- enum flashrom_wp_result ret = FLASHROM_WP_OK;
+ enum flashprog_wp_result ret = FLASHPROG_WP_OK;
/* Verify each register even if write to it was skipped */
for (reg = STATUS1; reg < MAX_REGISTERS; reg++) {
if (!bit_masks[reg])
@@ -181,7 +181,7 @@
uint8_t value;
if (spi_read_register(flash, reg, &value))
- return FLASHROM_WP_ERR_READ_FAILED;
+ return FLASHPROG_WP_ERR_READ_FAILED;
msg_cdbg2("%s: wp_verify reg:%u value:0x%x\n", __func__, reg, value);
uint8_t actual = value & bit_masks[reg];
@@ -190,7 +190,7 @@
if (actual != expected) {
msg_cdbg("%s: wp_verify failed: reg:%u actual:0x%x expected:0x%x\n",
__func__, reg, actual, expected);
- ret = FLASHROM_WP_ERR_VERIFY_FAILED;
+ ret = FLASHPROG_WP_ERR_VERIFY_FAILED;
}
}
@@ -198,11 +198,11 @@
}
/** Get the range selected by a WP configuration. */
-static enum flashrom_wp_result get_wp_range(struct wp_range *range, struct flashctx *flash, const struct wp_bits *bits)
+static enum flashprog_wp_result get_wp_range(struct wp_range *range, struct flashctx *flash, const struct wp_bits *bits)
{
- flash->chip->decode_range(&range->start, &range->len, bits, flashrom_flash_getsize(flash));
+ flash->chip->decode_range(&range->start, &range->len, bits, flashprog_flash_getsize(flash));
- return FLASHROM_WP_OK;
+ return FLASHPROG_WP_OK;
}
/** Write protect bit values and the range they will activate. */
@@ -267,7 +267,7 @@
*
* Allocates a buffer that must be freed by the caller with free().
*/
-static enum flashrom_wp_result get_ranges_and_wp_bits(struct flashctx *flash, struct wp_bits bits, struct wp_range_and_bits **ranges, size_t *count)
+static enum flashprog_wp_result get_ranges_and_wp_bits(struct flashctx *flash, struct wp_bits bits, struct wp_range_and_bits **ranges, size_t *count)
{
const struct reg_bit_map *reg_bits = &flash->chip->reg_bits;
size_t i;
@@ -317,8 +317,8 @@
struct wp_range_and_bits *output = &(*ranges)[range_index];
output->bits = bits;
- enum flashrom_wp_result ret = get_wp_range(&output->range, flash, &bits);
- if (ret != FLASHROM_WP_OK) {
+ enum flashprog_wp_result ret = get_wp_range(&output->range, flash, &bits);
+ if (ret != FLASHPROG_WP_OK) {
free(*ranges);
return ret;
}
@@ -363,7 +363,7 @@
/* Reduce count to only include non-duplicate ranges */
*count = output_index;
- return FLASHROM_WP_OK;
+ return FLASHPROG_WP_OK;
}
static bool ranges_equal(struct wp_range a, struct wp_range b)
@@ -381,12 +381,12 @@
size_t count;
size_t i;
- enum flashrom_wp_result ret = get_ranges_and_wp_bits(flash, *bits, &ranges, &count);
- if (ret != FLASHROM_WP_OK)
+ enum flashprog_wp_result ret = get_ranges_and_wp_bits(flash, *bits, &ranges, &count);
+ if (ret != FLASHPROG_WP_OK)
return ret;
/* Search for matching range */
- ret = FLASHROM_WP_ERR_RANGE_UNSUPPORTED;
+ ret = FLASHPROG_WP_ERR_RANGE_UNSUPPORTED;
for (i = 0; i < count; i++) {
if (ranges_equal(ranges[i].range, range)) {
@@ -402,42 +402,42 @@
}
/** Get the mode selected by a WP configuration. */
-static int get_wp_mode(enum flashrom_wp_mode *mode, const struct wp_bits *bits)
+static int get_wp_mode(enum flashprog_wp_mode *mode, const struct wp_bits *bits)
{
- const enum flashrom_wp_mode wp_modes[2][2] = {
+ const enum flashprog_wp_mode wp_modes[2][2] = {
{
- FLASHROM_WP_MODE_DISABLED, /* srl=0, srp=0 */
- FLASHROM_WP_MODE_HARDWARE, /* srl=0, srp=1 */
+ FLASHPROG_WP_MODE_DISABLED, /* srl=0, srp=0 */
+ FLASHPROG_WP_MODE_HARDWARE, /* srl=0, srp=1 */
}, {
- FLASHROM_WP_MODE_POWER_CYCLE, /* srl=1, srp=0 */
- FLASHROM_WP_MODE_PERMANENT, /* srl=1, srp=1 */
+ FLASHPROG_WP_MODE_POWER_CYCLE, /* srl=1, srp=0 */
+ FLASHPROG_WP_MODE_PERMANENT, /* srl=1, srp=1 */
},
};
*mode = wp_modes[bits->srl][bits->srp];
- return FLASHROM_WP_OK;
+ return FLASHPROG_WP_OK;
}
/** Modify a wp_bits structure such that it will select a specified protection mode. */
-static int set_wp_mode(struct wp_bits *bits, const enum flashrom_wp_mode mode)
+static int set_wp_mode(struct wp_bits *bits, const enum flashprog_wp_mode mode)
{
switch (mode) {
- case FLASHROM_WP_MODE_DISABLED:
+ case FLASHPROG_WP_MODE_DISABLED:
bits->srl = 0;
bits->srp = 0;
- return FLASHROM_WP_OK;
+ return FLASHPROG_WP_OK;
- case FLASHROM_WP_MODE_HARDWARE:
+ case FLASHPROG_WP_MODE_HARDWARE:
if (!bits->srp_bit_present)
- return FLASHROM_WP_ERR_CHIP_UNSUPPORTED;
+ return FLASHPROG_WP_ERR_CHIP_UNSUPPORTED;
bits->srl = 0;
bits->srp = 1;
- return FLASHROM_WP_OK;
+ return FLASHPROG_WP_OK;
- case FLASHROM_WP_MODE_POWER_CYCLE:
- case FLASHROM_WP_MODE_PERMANENT:
+ case FLASHPROG_WP_MODE_POWER_CYCLE:
+ case FLASHPROG_WP_MODE_PERMANENT:
default:
/*
* Don't try to enable power cycle or permanent protection for
@@ -445,7 +445,7 @@
* but they are usually unavailable by default or require special
* commands to activate.
*/
- return FLASHROM_WP_ERR_MODE_UNSUPPORTED;
+ return FLASHPROG_WP_ERR_MODE_UNSUPPORTED;
}
}
@@ -454,53 +454,53 @@
return (flash->chip != NULL) && (flash->chip->decode_range != NULL);
}
-enum flashrom_wp_result wp_read_cfg(struct flashrom_wp_cfg *cfg, struct flashctx *flash)
+enum flashprog_wp_result wp_read_cfg(struct flashprog_wp_cfg *cfg, struct flashctx *flash)
{
struct wp_bits bits;
- enum flashrom_wp_result ret = FLASHROM_WP_OK;
+ enum flashprog_wp_result ret = FLASHPROG_WP_OK;
if (!chip_supported(flash))
- ret = FLASHROM_WP_ERR_CHIP_UNSUPPORTED;
+ ret = FLASHPROG_WP_ERR_CHIP_UNSUPPORTED;
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = read_wp_bits(&bits, flash);
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = get_wp_range(&cfg->range, flash, &bits);
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = get_wp_mode(&cfg->mode, &bits);
return ret;
}
-enum flashrom_wp_result wp_write_cfg(struct flashctx *flash, const struct flashrom_wp_cfg *cfg)
+enum flashprog_wp_result wp_write_cfg(struct flashctx *flash, const struct flashprog_wp_cfg *cfg)
{
struct wp_bits bits;
- enum flashrom_wp_result ret = FLASHROM_WP_OK;
+ enum flashprog_wp_result ret = FLASHPROG_WP_OK;
if (!chip_supported(flash))
- ret = FLASHROM_WP_ERR_CHIP_UNSUPPORTED;
+ ret = FLASHPROG_WP_ERR_CHIP_UNSUPPORTED;
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = read_wp_bits(&bits, flash);
/* Set protection range */
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = set_wp_range(&bits, flash, cfg->range);
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = write_wp_bits(flash, bits);
/* Set protection mode */
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = set_wp_mode(&bits, cfg->mode);
- if (ret == FLASHROM_WP_OK)
+ if (ret == FLASHPROG_WP_OK)
ret = write_wp_bits(flash, bits);
return ret;
}
-enum flashrom_wp_result wp_get_available_ranges(struct flashrom_wp_ranges **list, struct flashrom_flashctx *flash)
+enum flashprog_wp_result wp_get_available_ranges(struct flashprog_wp_ranges **list, struct flashprog_flashctx *flash)
{
struct wp_bits bits;
struct wp_range_and_bits *range_pairs = NULL;
@@ -508,23 +508,23 @@
size_t i;
if (!chip_supported(flash))
- return FLASHROM_WP_ERR_CHIP_UNSUPPORTED;
+ return FLASHPROG_WP_ERR_CHIP_UNSUPPORTED;
- enum flashrom_wp_result ret = read_wp_bits(&bits, flash);
- if (ret != FLASHROM_WP_OK)
+ enum flashprog_wp_result ret = read_wp_bits(&bits, flash);
+ if (ret != FLASHPROG_WP_OK)
return ret;
ret = get_ranges_and_wp_bits(flash, bits, &range_pairs, &count);
- if (ret != FLASHROM_WP_OK)
+ if (ret != FLASHPROG_WP_OK)
return ret;
- *list = calloc(1, sizeof(struct flashrom_wp_ranges));
+ *list = calloc(1, sizeof(struct flashprog_wp_ranges));
struct wp_range *ranges = calloc(count, sizeof(struct wp_range));
if (!(*list) || !ranges) {
free(*list);
free(ranges);
- ret = FLASHROM_WP_ERR_OTHER;
+ ret = FLASHPROG_WP_ERR_OTHER;
goto out;
}
(*list)->count = count;
@@ -538,4 +538,4 @@
return ret;
}
-/** @} */ /* end flashrom-wp */
+/** @} */ /* end flashprog-wp */