> Yes, using > cd userspace && make > should compile xzminidec for you. > > I hacked the makefile a bit more to compile against klibc.
Ah, I hadn't seen this sample app before. Unfortunately, building on my Ubuntu Linux system failed with: gcc -std=gnu89 -I../linux/include/linux -I. -DXZ_DEC_X86 -DXZ_DEC_POWERPC -DXZ_DEC_IA64 -DXZ_DEC_ARM -DXZ_DEC_ARMTHUMB -DXZ_DEC_SPARC -DXZ_DEC_ANY_CHECK -ggdb3 -O2 -pedantic -Wall -Wextra -c -o boottest.o boottest.c In file included from ../linux/lib/decompress_unxz.c:235:0, from boottest.c:22: ../linux/lib/xz/xz_dec_lzma2.c: In function xz_dec_lzma2_run: /usr/include/bits/string3.h:56:1: sorry, unimplemented: inlining failed in call to memmove: redefined extern inline functions are not considered for inlining ../linux/lib/xz/xz_dec_lzma2.c:884:11: sorry, unimplemented: called from here make: *** [boottest.o] Error 1 *However!* Studying the source code in that directory demonstrated what was wrong in my own sample app-- I need to call xz_crc32_init() before the other functions. I see that's mentioned near the end of xz.h; perhaps it warrants an earlier mention. Anyway, I got past that problem. It should be noted that "--check=crc32" really is necessary for compressed data if Embedded XZ will be chewing on it. The library returns XZ_OPTIONS_ERROR otherwise, but only on the first call. If you call xz_dec_run() again, decoding will proceed fine (and accurately). I figured this out when I made a mistake in my decode loop and didn't terminate on error. Thanks for all the hints! -- -Mike Melanson