diff options
author | Jacek Kryszyn <j.kryszyn@samsung.com> | 2023-09-21 12:59:44 +0200 |
---|---|---|
committer | Jacek Kryszyn <j.kryszyn@samsung.com> | 2023-09-21 12:59:44 +0200 |
commit | c2b1f05d6fa469855da5000ff5e5261e87a08447 (patch) | |
tree | cd9577449fbf4b23d850a0ce9459250a6059f274 | |
parent | 164d453343bc52e99359b51dea3c10dc2aa9bcd3 (diff) | |
download | dynpart-tools-c2b1f05d6fa469855da5000ff5e5261e87a08447.tar.gz dynpart-tools-c2b1f05d6fa469855da5000ff5e5261e87a08447.tar.bz2 dynpart-tools-c2b1f05d6fa469855da5000ff5e5261e87a08447.zip |
README.md updated
-rwxr-xr-x | README.md | 42 | ||||
-rwxr-xr-x | make.sh | 2 |
2 files changed, 31 insertions, 13 deletions
@@ -2,29 +2,47 @@ Original project: https://github.com/LonelyFool/lpunpack_and_lpmake Copied from commit 7ec860cfa95ed83dec579ab0459aad1c35ad48e4 # lpunpack and lpmake -To compile x86_64 you need: -- clang (sudo apt install clang) -- zlib (sudo apt install zlib1g-dev) -To cross-compile you need: -- Ubuntu 22.04: `crossbuild-essential-arm64`/`crossbuild-essential-armel`/`crossbuild-essential-armhf` (sudo apt install $package). -- Ubuntu 20.04: `sudo apt install gcc-10-aarch64-linux-gnu` and `sudo apt install g++-aarch64-linux-gnu` +It is not possible to build this project on Ubuntu 20.04 using gcc 9.x due to an internal compiler error: -On Ubuntu 20.04 `crossbuild-essential-arm64`` uses gcc 9.x which gives an internal error during build. This is why gcc-10 version has to be installed explicitly. +``` +In file included from $project_path/lib/base/logging.cpp:64: +$project_path/lib/base/logging_splitters.h: In lambda function: +$project_path/lib/base/logging_splitters.h:82:79: internal compiler error: in expand_expr_real_1, at expr.c:10014 + 82 | en = snprintf(logd_chunk + chunk_position, sizeof(logd_chunk) - chunk_position, + | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ + +0x7f07e29ab082 __libc_start_main + ../csu/libc-start.c:308 +``` -`` -build: +This is why it is advised to use clang or gcc-10 on Ubuntu 20.04. + +## How to build + +CMake support was added to this project. You can build partition tools using ``` mkdir build cd build cmake ../ make +``` +or you can use the original make script: ``` +./make.sh +``` + This requires: +- clang (sudo apt install clang) +- zlib (sudo apt install zlib1g-dev) -or you can use original makefile: +## Cross-building +It is possible to cross-build using CMake. Simply invoke cmake with `-DCMAKE_TOOLCHAIN_FILE`: ``` -make -```
\ No newline at end of file +mkdir build && cd build +cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.make ../ +``` + +The project contains an exemplary `toolchain.make` file which uses `aarch64-linux-gnu-gcc` and `aarch64-linux-gnu-g++` to build for arm.
\ No newline at end of file @@ -546,4 +546,4 @@ $STRIP bin/lpmake $STRIP bin/lpadd $STRIP bin/lpflash $STRIP bin/lpunpack -$STRIP bin/lpdump
\ No newline at end of file +$STRIP bin/lpdump |