README.svn-base 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. The code is intended to decompress kernel, being compressed using lzma utility
  22. build using 7zip LZMA SDK. This utility is located in the LZMA_Alone directory
  23. decompressor code expects that your .trx file consist of three partitions:
  24. 1) decompressor itself (this is gziped code which pmon/cfe will extract and run
  25. on boot-up instead of real kernel)
  26. 2) LZMA compressed kernel (both streamed and regular modes are supported now)
  27. 3) Root filesystem
  28. Please be sure to apply the following patch for use this new trx layout (it will
  29. allow using both new and old trx files for root filesystem lookup code)
  30. --- linuz/arch/mips/brcm-boards/bcm947xx/setup.c 2005-01-23 19:24:27.503322896 +0300
  31. +++ linux/arch/mips/brcm-boards/bcm947xx/setup.c 2005-01-23 19:29:05.237100944 +0300
  32. @@ -221,7 +221,9 @@
  33. /* Try looking at TRX header for rootfs offset */
  34. if (le32_to_cpu(trx->magic) == TRX_MAGIC) {
  35. bcm947xx_parts[1].offset = off;
  36. - if (le32_to_cpu(trx->offsets[1]) > off)
  37. + if (le32_to_cpu(trx->offsets[2]) > off)
  38. + off = le32_to_cpu(trx->offsets[2]);
  39. + else if (le32_to_cpu(trx->offsets[1]) > off)
  40. off = le32_to_cpu(trx->offsets[1]);
  41. continue;
  42. }
  43. Revision history:
  44. 0.02 Initial release
  45. 0.03 Added Mineharu Takahara <mtakahar@yahoo.com> patch to pass actual
  46. output size to decoder (stream mode compressed input is not
  47. a requirement anymore)
  48. 0.04 Reordered functions using lds script