Code Monkey home page Code Monkey logo

lpunpack_and_lpmake's People

Contributors

3arthur6 avatar flygoat avatar lonelyfool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lpunpack_and_lpmake's Issues

lpdump crashes on startup

lpdump, when built on Ubuntu 20.04, crashes immediately on startup:

$ ./bin/lpdump 
Segmentation fault

Partition must have a valid size.

Thanks for making this available.

When using the example from the documentation at https://android.googlesource.com/platform/system/extras/+/master/partition_tools/README.md
of

lpmake --device-size 10240000000 \
       --metadata-size 65536     \
       --metadata-slots 2        \
       -o /tmp/super.img         \
       -p "cache:2da85788-f0e1-4fda-9ee7-e5177eab184b:none:67108864" \
       -i "cache=out/target/hikey960/cache.img"

I get "Partition must have a valid size." error

--device-size=auto does not help

Can you provide a working example please?

failure

  • mkdir -p lib/lib bin
  • CC=clang
  • CPP=clang++
  • AR=ar
  • STRIP=strip
  • CFLAGS=-static
  • cd lib
  • cd liblog
  • case "$OSTYPE" in
  • src=event_tag_map.cpp
  • clang -std=c++17 -I../include -Iinclude -I../base/include -DLIBLOG_LOG_TAG=1006 -DSNET_EVENT_LOG_TAG=1397638484 -static -c log_event_list.cpp log_event_write.cpp logger_name.cpp logger_read.cpp logger_write.cpp logprint.cpp properties.cpp event_tag_map.cpp
    logger_name.cpp:25:3: warning: array designators are a C99 extension [-Wc99-designator]
    [LOG_ID_MAIN] = "main",
    ^~~~~~~~~~~~~
    1 warning generated.
  • ar rcs ../lib/liblog.a event_tag_map.o log_event_list.o log_event_write.o logger_name.o logger_read.o logger_write.o logprint.o properties.o
  • rm -r event_tag_map.o log_event_list.o log_event_write.o logger_name.o logger_read.o logger_write.o logprint.o properties.o
  • unset src
  • cd ../zlib
  • clang -I. -O3 -DHAVE_HIDDEN -DZLIB_CONST -static -c adler32.c compress.c cpu_features.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inflate.c inftrees.c inffast.c trees.c uncompr.c zutil.c
  • ar rcs ../lib/libz.a adler32.o compress.o cpu_features.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
  • rm -r adler32.o compress.o cpu_features.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
  • cd ../base
  • case "$OSTYPE" in
  • src=errors_unix.cpp
  • clang -std=c++17 -I../include -static -c abi_compatibility.cpp chrono_utils.cpp file.cpp liblog_symbols.cpp logging.cpp mapped_file.cpp parsebool.cpp parsenetaddress.cpp process.cpp properties.cpp stringprintf.cpp strings.cpp threads.cpp test_utils.cpp errors_unix.cpp
    logging.cpp:242:7: warning: array designators are a C99 extension [-Wc99-designator]
    [android::base::VERBOSE] = 7, // KERN_DEBUG (there is no verbose kernel log
    ^~~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
  • ar rcs ../lib/libbase.a abi_compatibility.o chrono_utils.o errors_unix.o file.o liblog_symbols.o logging.o mapped_file.o parsebool.o parsenetaddress.o process.o properties.o stringprintf.o strings.o test_utils.o threads.o
  • rm -r abi_compatibility.o chrono_utils.o errors_unix.o file.o liblog_symbols.o logging.o mapped_file.o parsebool.o parsenetaddress.o process.o properties.o stringprintf.o strings.o test_utils.o threads.o
  • unset src
  • cd ../libsparse
  • clang -std=c++17 -I../include -static -c backed_block.cpp output_file.cpp sparse.cpp sparse_crc32.cpp sparse_err.cpp sparse_read.cpp
    output_file.cpp:31:10: fatal error: 'zlib.h' file not found
    #include <zlib.h>
    ^~~~~~~~
    1 error generated.

Build Failure (void linux)

+ clang++ -std=c++17 -stdlib=libc++ -I../lib/include -static -D_FILE_OFFSET_BITS=64 -o ../bin/lpmake lpmake.cc ../lib/lib/liblp.a ../lib/lib/libsparse.a ../lib/lib/libext4_utils.a ../lib/lib/libz.a ../lib/lib/libbase.a ../lib/lib/fmtlib.a ../lib/lib/liblog.a ../lib/lib/libcrypto_utils.a ../lib/lib/libcrypto.a -lpthread /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_GetGR':
(.text+0x2340): multiple definition of _Unwind_GetGR'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_GetGR+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_SetGR':
(.text+0x2390): multiple definition of _Unwind_SetGR'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_SetGR+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_GetIP':
(.text+0x23e0): multiple definition of _Unwind_GetIP'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_GetIP+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_SetIP':
(.text+0x2410): multiple definition of _Unwind_SetIP'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_SetIP+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_GetLanguageSpecificData':
(.text+0x2420): multiple definition of _Unwind_GetLanguageSpecificData'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_GetLanguageSpecificData+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_GetRegionStart':
(.text+0x2430): multiple definition of _Unwind_GetRegionStart'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_GetRegionStart+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_RaiseException':
(.text+0x25c0): multiple definition of _Unwind_RaiseException'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_RaiseException+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_ForcedUnwind':
(.text+0x2960): multiple definition of _Unwind_ForcedUnwind'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_ForcedUnwind+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_Resume':
(.text+0x2b40): multiple definition of _Unwind_Resume'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_Resume+0x0): first defined here /usr/bin/x86_64-unknown-linux-gnu-ld: /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/libgcc_eh.a(unwind-dw2.o): in function _Unwind_DeleteException':
(.text+0x2e30): multiple definition of _Unwind_DeleteException'; /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/12.2/../../../../lib64/libc++.a(UnwindLevel1.c.o):(.text._Unwind_DeleteException+0x0): first defined here clang-15: error: linker command failed with exit code 1 (use -v to see invocation) chmod: cannot access 'lpunpack_and_lpmake/bin/*': No such file or directory

Windows

Hi. is it possible to compile the code for windows? it would be very convenient. I don’t know how. I ask for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.