coreboot-v3/util/lar/README
<<
>>
Prefs
   1Lightweight Archiver: lar
   2-----------------------
   3
   4Table of Contents
   5  - Introduction
   6  - Usage
   7  - Archive format
   8  - TODO
   9  - Copyright and License
  10
  11
  12Introduction
  13------------
  14
  15This is a simple archiver, similar to cpio, ar or tar. It was designed and
  16written for coreboot.
  17
  18Design goals were
  19  - minimum overhead
  20  - maximum fault tolerance
  21  - simplicity
  22
  23For a usage example see example.c.
  24
  25For questions contact Stefan Reinauer <stepan@coresystems.de>.
  26
  27
  28Usage
  29-----
  30
  31Create archive archive.lar containing files file1 ... fileN:
  32
  33  $ lar c archive.lar file1 ... fileN
  34
  35Extract files from archive.lar:
  36
  37  $ lar x archive.lar [file1 ... fileN]
  38
  39List files in archive:
  40
  41  $ lar l archive.lar
  42
  43
  44Archive format
  45--------------
  46
  47The rough format is:
  48
  49 |--------------|
  50 | header       |
  51 |--------------|
  52 | data         |
  53 |--------------|
  54 | header       |
  55 |--------------|
  56 | data         |
  57 |--------------|
  58  ...
  59
  60Headers have to be 16 byte aligned.
  61
  62 |----------------------------|
  63 | magic (8 bytes)            |
  64 |----------------------------|
  65 | length (4 bytes)           |
  66 |----------------------------|
  67 | checksum (4 bytes)         |
  68 |----------------------------|
  69 | offset to blob (4 bytes)   |
  70 |----------------------------|
  71 | "path name"                | <-- null terminated, aligned to 16 bytes
  72 |----------------------------|
  73 | blob (aligned to 16 bytes) |
  74 |----------------------------|
  75
  76
  77TODO
  78----
  79
  80  - Reading flash layouts
  81  - This does not enforce any alignment yet
  82  - Alignment enforcing will be optional
  83
  84
  85Copyright and License
  86---------------------
  87
  88Copyright (C) 2006-2007 coresystems GmbH
  89Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH.
  90
  91This program is free software; you can redistribute it and/or modify
  92it under the terms of the GNU General Public License as published by
  93the Free Software Foundation; version 2 of the License.
  94
  95This program is distributed in the hope that it will be useful,
  96but WITHOUT ANY WARRANTY; without even the implied warranty of
  97MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  98GNU General Public License for more details.
  99
 100You should have received a copy of the GNU General Public License
 101along with this program; if not, write to the Free Software
 102Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
 103
 104Note: The files lar.h and example.c are dual-licensed. You can choose between:
 105 - The GNU GPL, version 2, as published by the Free Software Foundation.
 106 - The revised BSD license (without advertising clause). See lar.h.
 107
 108
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.