lfs-uefi: fix efivar-37 FTBFS
[linux_from_scratch_hints.git] / lzma.txt
blob2625645ca60ef6c2be94a78b57d2959973a6985f
1 AUTHOR: Robert Connolly <robert@linuxfromscratch.org>
3 DATE: 2005-06-10
5 LICENSE: Public Domain
7 SYNOPSIS: LZMA / 7-zip file compression
9 DESCRIPTION:
10 LZMA, or 7-zip, is a new file compression tool which compresses files 10-30% better
11 than bzip2 or gzip. LZMA has been ported to Linux, BSD, and Windows. 7-zip also uses
12 more CPU power than bzip2, but its pretty quick to decompress.
14 PREREQUISITES: None
16 HINT:
17 The homepage for the main software is:
18         http://www.7-zip.com/sdk.html
20 Compatable software projects:
21         http://p7zip.sourceforge.net/
22         http://martinus.geekisp.com/rublog.cgi/Projects/LZMA/
23         http://www.zelow.no/floppyfw/download/Development/lzma/lzmatool-0.11.tgz
25 First download this (or the newest version):
26 http://www.7-zip.org/dl/lzma417.tar.bz2
28 # Unpack the software:
30 mkdir lzma417/ &&
31 tar jxf lzma417.tar.bz2 -C lzma417/
33 # Compile and install the software:
35 cd lzma417/SRC/7zip/Compress/LZMA_Alone/ &&
36 make &&
37 install lzma /bin/
39 # There is no man page. Enter 'lzma' to see the help menu. lzma doesn't act like gzip
40 # or bzip2 by default. A couple small scripts can help:
42 cat > /tmp/7zip.sh << "EOF"
43 #!/bin/sh
44 /bin/lzma e ${1} ${1}.7z &&
45 rm -f ${1}
46 EOF
47 install /tmp/7zip.sh /bin/7zip
49 cat > /tmp/7unzip.sh << "EOF"
50 #!/bin/sh
51 /bin/lzma d ${1} $(echo ${1} | sed -e 's/.7z$//') &&
52 rm -f ${1}
53 EOF
54 install /tmp/7unzip.sh /bin/7unzip
56 rm /tmp/{7zip,7unzip}.sh
58 # These two scripts will behave like gzip and gunzip by compressing the file and
59 # removing the original when successfully completed.
61 # To compress your kernel with LZMA use one of these patches:
63 http://www.linuxfromscratch.org/patches/downloads/linux/
64         linux-2.4-lzma-1.patch
65         linux-2.6-lzma-1.patch
67 # Patch it on the kernel and it will work all by itself. The Zlib routines are replaced
68 # with LZMA. My kernel was 1.3MB before LZMA, and 1.1MB after.
70 TODO:
71   * It would be nice to get LZMA support for kernel modules in modutils.
73 ACKNOWLEDGMENTS:
74   * Thanks to Google for helping me search for information about LZMA.
75   * Thanks to the LZMA team at:
76         http://www.7-zip.com/sdk.html
77   * Thanks to Ming-Ching Tiew for the LZMA kernel patches. 
79 CHANGELOG:
80 [2005-06-09]
81   * Initial hint.
82 [2005-06-10]
83   * Added urls for compatable software projects.