Skip to content

Commit

Permalink
change to json-c library for smaller size
Browse files Browse the repository at this point in the history
  • Loading branch information
ReimuNotMoe committed Apr 23, 2023
1 parent 960e54a commit 0b9de25
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 24,634 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ project(sysfs_fw_loader)

set(CMAKE_CXX_STANDARD 17)

find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONC REQUIRED json-c)

add_executable(sysfs_fw_loader main.cpp)
target_link_libraries(sysfs_fw_loader ${JSONC_LIBRARIES})
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ Use an empty `file` field to indicate you want to instruct the kernel to skip lo

You can use the environment variable `SYSFS_FW_LOADER_CONFIG_DIR` to specify an alternative config directory.

This program will exit when all specified firmware files are loaded.
This program will exit when all specified firmware files are loaded. You can use the environment variable `SYSFS_FW_LOADER_TIMEOUT` to specify a timeout in seconds. It's 10 by default.

## Build
### Requirements
- CMake
- C++17 compatible compiler with std::filesystem
- json-c library

```shell
mkdir build
Expand All @@ -57,12 +58,8 @@ make

Or if you're in a hurry:
```shell
g++ -std=c++17 main.cpp -o sysfs_fw_loader
g++ -std=c++17 main.cpp -o sysfs_fw_loader -l json-c
```

## Credits
This program uses the following open source components:
- nlohmann/json

## License
AGPLv3
Loading

0 comments on commit 0b9de25

Please sign in to comment.