Age | Commit message (Collapse) | Author |
|
musl requires limits.h for PATH_MAX
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
Attribute copyright to Intel and add MIT license headers
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
The contents of an existing database file can be extracted with the -E option.
By default the top level of the directory tree is rmc_db_dump, an alternative
path can be specified with the -o option. The file blobs corresponding
to a given record will be saved in a separate sub-directory. The sub-directory
name for each record is the hex representation of the signature corresponding to
the fingerprint for that record.
Example:
./src/rmc -E -d rmc.db -o output/directory/
Successfully extracted rmc.db
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
The contents of an existing fingerprint file can be read and output on
the command line with the following options:
rmc -E -f input_fingerprint_file
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
A debug version of the rmc binary can be built by using the debug
Makefile target. This will include debug symbols and will disable
compiler optimizations.
Example:
make debug
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
By default make will output the commands that are executed for each
target. Silent mode can be enabled with the '-s' option.
Example:
make -s
Signed-off-by: Todor Minchev <todor.minchev@linux.intel.com>
|
|
Test Images: Yocto core-image-minimal images
poky : 7c3a47ed8965c3a3eb90a9a4678d5caedbba6337
meta-intel : cb5025bfbb9fbf1638af4c0c979f77eade2dbefb + patches to:
update systemd-boot patches for rmc integration.
update rmc recipe to remove EFI_ARCH, EFI header path, also with a
local bbappend to update rmc revision to 5c25af1 on rmc-dev.
remove gnu-efi in meta-intel.
Tested on:
NUC 6i5SYH (64 bit)
Minnowmax (64 bit)
Broxton-M (64 bit)
ASUS T100TA (32 bit)
NUC D54250WYK (64 bit, negative test) Need to remove serial console
from kernel command line when testing "install" boot option. The
console setting from the default configuration in meta-intel steals
the installer I/O as a known issue.
|
|
Update README file to reflect some major changes in the project:
Introduce API and libraries
arch-agnostic EFI build
remove dependencies in EFI build
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
rmc works as a generic file-based solution now. There is no need
to keep a special case for kernel command line type which was
designed in early days.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
The current RMC_CFLAGS worked as an interface for outside .But it
should be better to use this variable to hold internal flags and
respect CFLAGS passed from outside.
Also remove -O2 flag.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
EFI Clients linked to rmc may or may not include standard header
files, and these definitions could be different too.
The existing macros like 'WORD' also bring ambiguity among
processor architectures, so we replace them with the new internal
data types.
This change takes whatever defined for types in user space since
we need standard header files anyway, but defines data types for
EFI context.
Everything inside rmc uses internal data types as consolidation.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
This is a major re-work in rmc with several key changes:
To query board-specific data in a rmc database, developers
now can take advantage of new defined APIs, either using
single-action APIs for a better performance of multiple
queries or simply calling a double-action API, which is
sufficient to perform a query in one step, to reduce the
footprint in code at client side. (Refer to inc/rmc_api.h.)
rmc tool itself is modified to use new APIs.
Memory map and allocated data can be released after use in user
space. In EFI context, rmc doesn't allocate memory for anything
returned.
In EFI build, necessary data types are defined in rmc in order
to get rid of dependency on any EFI implementation.
Miscellaneous fixes are also included when we move the pieces
around.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
The two were organized in different libraries from functionality
perspective. This change merges them into a single library to
simplify linking RMC into client. There should not be much extra
footprint on the binary size because they are very small and
always work together.
We move the code into a common directory lib/common with a RULE
readme file.
This change also includes miscellaneous amendments in Makefiles.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Add detection of current path for -I option, also update
type definitions for EFI compiling.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Test Images: core-image-minimal images from Yocto
meta-yocto-bsp = "master:a81b326933d15f08e06780f92d8dc0d4efb3cd23"
meta-intel = "master:99fa5a9466158e4847d7d1efd64ca1e0e002d495" +
patch "rmc: explicitly specify hash style for linker" which adds the
below line in rmc.bb in meta-intel to pass a special QA checker
in build:
EXTRA_OEMAKE='RMC_CFLAGS="-Wl,--hash-style=both"'
Tested on:
NUC 6i5SYH (64 bit)
NUC D54250WYK (64 bit, negative test)
ASUS T100TA (32 bit)
Broxton-M (64 bit)
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
The removed static linking was for a desire to make rmc run
on systems where c libraries are not provided.
But it is nothing wrong to dynamically link rmc with libraries.
We also don't have to hardcode the way of linking in Makefile
since people can specify it in RMC_CFLAGS passed to make command.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Update some sections with new information of workflow.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Test Images: core-image-minimal images from Yocto
meta-yocto-bsp = "master:a81b326933d15f08e06780f92d8dc0d4efb3cd23"
meta-intel = "master:5326759e90180523da3617becfab4a7e21d7ebde"
Tested on:
NUC 6i5SYH (64 bit)
NUC D54250WYK (64 bit, negative test)
ASUS T100TA (32 bit)
Broxton-M (64 bit)
|
|
Runtime test script failed on T100TA (32 bit) machine because
read_file() function in rmc.c gets a wrong value of st_size from
the buffer returned by stat(). We include rmc header files prior
to the rest of standard header files in rmc.c, so standard data
subsequently defined could be affected by "#pragma pack(1)" in rmc
header files.
We save and restore the previous pragma pack setting in rmc header
files to fix this issue.
Runtime test passes on T100TA and other two boards with this change.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Two test scripts cover basic functionality in both build and
runtime with some sample data of three boards.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
The existing code takes wrong field in 32 bit entry
table for total struct table length that specifies
the length of memory for mmap(). When actual mmap
length is smaller than the actual table size, rsmp
walks into area not mapped. The result is a segment
fault.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
The efi header files in gnu-efi includes stdint.h conditionally.
We don't want to add an include path just for this reason, so we
specify gnu90 to force gnu-efi use definitions provided by itself,
instead of trying to get a real stdint.h.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
So far the only usage of the stuff removed from installation
is rmc tool executable in user space. Libraries and headers
are installed with EFI build.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
() Provide Makefile.efi to split conventional build and UEFI
compiling. The later one doesn't rely on std lib and headers
() Libraries have new names as librsmpefi.a and librmclefi.a
() Provide basic C functions
() RMC_EFI is the config macro to tell build type
() change header installation path in EFI
() RMC_EFI_ARCH [ia32, x86_64] must be provided for EFI build:
eg:
make RMC_EFI_ARCH=x86_64 -f Makefile.efi
make RMC_EFI_ARCH=x86_64 -f Makefile.efi install
() RMC_EFI_HEADER_PREFIX to specify gnu-efi header file locations
() clean up memory allocation and free stubs
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Including std header files in libraries is moved to rmc_type.h
to make coming uefi build easier.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Append extra flags fed from RMC_CFLAGS so we can try out
gcc flags easily.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Create a dir "rmc" to hold all rmc header files.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
To make RMC more permissive for integration, we change
license type to MIT.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
This time we only install rmcl library and necessary header files
for rmcl.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Use implicit variable $(AR) in Makefile
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
This is a small step to support cross-compiling.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
By default, we don't need to output build info.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
This change replaces algorithm based on data of one finger
in the initial implementation.
The new algorithm is still not based on hash table. Refer
to comment in change for details.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
The gain of performance could be trivial for a small amount of
bytes being copied, but code looks nicer this way.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|
|
Basical test has been performed on two 64bit targets NUC Gen 6
and Lenovo X220. Refer to README for more information.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
|