git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6516 3c298f89-4303-0410-b956-a3cf2f4a3e73
[openwrt.git] / target / linux / brcm-2.4 / image / lzma-loader / src / README
1 /*
2 * LZMA compressed kernel decompressor for bcm947xx boards
3 *
4 * Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22 The code is intended to decompress kernel, being compressed using lzma utility
23 build using 7zip LZMA SDK. This utility is located in the LZMA_Alone directory
24
25 decompressor code expects that your .trx file consist of three partitions:
26
27 1) decompressor itself (this is gziped code which pmon/cfe will extract and run
28 on boot-up instead of real kernel)
29 2) LZMA compressed kernel (both streamed and regular modes are supported now)
30 3) Root filesystem
31
32 Please be sure to apply the following patch for use this new trx layout (it will
33 allow using both new and old trx files for root filesystem lookup code)
34
35 --- linuz/arch/mips/brcm-boards/bcm947xx/setup.c 2005-01-23 19:24:27.503322896 +0300
36 +++ linux/arch/mips/brcm-boards/bcm947xx/setup.c 2005-01-23 19:29:05.237100944 +0300
37 @@ -221,7 +221,9 @@
38 /* Try looking at TRX header for rootfs offset */
39 if (le32_to_cpu(trx->magic) == TRX_MAGIC) {
40 bcm947xx_parts[1].offset = off;
41 - if (le32_to_cpu(trx->offsets[1]) > off)
42 + if (le32_to_cpu(trx->offsets[2]) > off)
43 + off = le32_to_cpu(trx->offsets[2]);
44 + else if (le32_to_cpu(trx->offsets[1]) > off)
45 off = le32_to_cpu(trx->offsets[1]);
46 continue;
47 }
48
49
50 Revision history:
51 0.02 Initial release
52 0.03 Added Mineharu Takahara <mtakahar@yahoo.com> patch to pass actual
53 output size to decoder (stream mode compressed input is not
54 a requirement anymore)
55 0.04 Reordered functions using lds script
This page took 0.04776 seconds and 5 git commands to generate.