Skip to content

Commit

Permalink
Add README & LICENSE Files.
Browse files Browse the repository at this point in the history
Also add missing author in main.c
  • Loading branch information
sunflower2333 committed Nov 7, 2024
1 parent 8b9363e commit 7cc90a8
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 - 2025 woa-msmnile authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# XCReader

## Introduction

QC starts using a new format of XBL config since 8450 platforms. The new format designed for it is to store some
important configurations like `XBL DTB`, `CPR`, and `DCB`.
This tool is aim to extract those files from the XBL config.
:::tip
This tool only works on SM8450 and subsequent platforms.
:::

## How to use

- Just run it in a terminal will be fine.
- xbl_config.img is also acceptable.

```
Usage: <Path to xbl_config.elf> <Output Directory>
```

## Build
- Need cmake and C toolchain.
```
git clone https://github.com/woa-msmnile/XBLConfigReader --depth=1
cd XBLConfigReader
mkdir build && cd build
cmake -S .. && cmake --build .
```
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Entry
int main(int argc, char *argv[]) {
printf("XBLConfigParser Version %s\n", PARSER_VERSION);
printf("Copyright (c) 2024-2025 \n\n");
printf("Copyright (c) 2024-2025 woa-msmnile authors\n\n");

// Check args
if (argc != 3) {
Expand Down Expand Up @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) {

// Print ELF header info
printf("ELF Header Information:\n");
printf("ELF Magic: 0x%016llx 0x%016llx\n", *(uint64_t *) hdr->e_ident, *(uint64_t *) (hdr->e_ident + 8));
printf("ELF Magic: 0x%016llx 0x%016llx\n", (uint64_t) hdr->e_ident, (uint64_t) (hdr->e_ident + 8));
printf("Program Header Offset: 0x0%llx\n", hdr->e_phoff);
printf("Program Header Numbers: 0x%x\n", hdr->e_phnum);
printf("Program Header Size: 0x%x\n", hdr->e_phentsize);
Expand Down

0 comments on commit 7cc90a8

Please sign in to comment.