-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, erofs-utils was integrated into overlaybd by using the `mkfs.erofs` executable file. It's not optimial since raw data needs to be dumped first and output data needs to be write into overlaybd then. This commit introduces the I/O API in tarerofs, that the data stream of the: - output image - input tar file can be controlled by the I/O manager. This also adds block read/write cache support for IFile to improve the efficiency of making file system images. Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
- Loading branch information
Showing
7 changed files
with
753 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
erofs-utils | ||
GIT_REPOSITORY https://gitee.com/anolis/erofs-utils.git | ||
GIT_TAG overlaybd-dev-2 | ||
) | ||
|
||
FetchContent_MakeAvailable(erofs-utils) | ||
|
||
execute_process( | ||
COMMAND ./autogen.sh | ||
WORKING_DIRECTORY ${erofs-utils_SOURCE_DIR} | ||
) | ||
execute_process( | ||
COMMAND ./configure --disable-lz4 --without-liblzma | ||
WORKING_DIRECTORY ${erofs-utils_SOURCE_DIR} | ||
) | ||
execute_process( | ||
COMMAND make | ||
WORKING_DIRECTORY ${erofs-utils_SOURCE_DIR} | ||
) | ||
|
||
set(EROFS_LIB_INCLUDE_DIR "${erofs-utils_SOURCE_DIR}/include/" CACHE PATH "erofs-utils include path.") | ||
set(EROFS_CONFIG_FILE "${erofs-utils_SOURCE_DIR}/config.h" CACHE PATH "erofs-utils config file.") | ||
set(EROFS_LIB_STATIC "${erofs-utils_SOURCE_DIR}/lib/.libs/liberofs.a" CACHE PATH "erofs-utils static lib.") | ||
|
||
file(GLOB EROFS_SOURCE "*.cpp") | ||
|
||
add_library(erofs_lib STATIC ${EROFS_SOURCE}) | ||
|
||
target_include_directories(erofs_lib PRIVATE | ||
${PHOTON_INCLUDE_DIR} | ||
) | ||
|
||
target_include_directories(erofs_lib PRIVATE | ||
${EROFS_LIB_INCLUDE_DIR} | ||
) | ||
|
||
target_link_libraries(erofs_lib PRIVATE uuid) | ||
|
||
target_compile_options(erofs_lib PRIVATE "-include${EROFS_CONFIG_FILE}") | ||
target_link_libraries(erofs_lib PRIVATE ${EROFS_LIB_STATIC}) |
Oops, something went wrong.