This patch makes lar -l print a total of the bytes used in an archive. I did it because I wanted to know the differences between preparsing elf files and compressing the pieces. Here is the output from a few of them:
Coreboot v3 with filo.elf added using lar -a
normal/option_table (932 bytes @0x50);loadaddress 0x0 entry 0x0 normal/stage2/segment0 (191792 bytes, lzma compressed to 110 bytes @0x450);loadaddress 0x0xa1c0 entry 0x0x2000 normal/stage2/segment1 (28084 bytes, lzma compressed to 14976 bytes @0x510);loadaddress 0x0x2000 entry 0x0x2000 normal/stage2/segment2 (4540 bytes, lzma compressed to 316 bytes @0x3fe0);loadaddress 0x0x9000 entry 0x0x2000 normal/initram/segment0 (432 bytes @0x4170);loadaddress 0x0 entry 0x0x42 normal/payload (77840 bytes @0x4360);loadaddress 0x0 entry 0x0 bootblock (20480 bytes @0xfb000) Total size = 115422 bytes (0x1c2de)
Coreboot v3 with filo.elf.lzma added using lar -a
normal/option_table (932 bytes @0x50);loadaddress 0x0 entry 0x0 normal/stage2/segment0 (191792 bytes, lzma compressed to 110 bytes @0x450);loadaddress 0x0xa1c0 entry 0x0x2000 normal/stage2/segment1 (28084 bytes, lzma compressed to 14976 bytes @0x510);loadaddress 0x0x2000 entry 0x0x2000 normal/stage2/segment2 (4540 bytes, lzma compressed to 316 bytes @0x3fe0);loadaddress 0x0x9000 entry 0x0x2000 normal/initram/segment0 (432 bytes @0x4170);loadaddress 0x0 entry 0x0x42 normal/payload (42791 bytes @0x4360);loadaddress 0x0 entry 0x0 bootblock (20480 bytes @0xfb000) Total size = 80373 bytes (0x139f5)
Coreboot v3 with filo.elf added using lar -ae
normal/option_table (932 bytes @0x50);loadaddress 0x0 entry 0x0 normal/stage2/segment0 (191792 bytes, lzma compressed to 110 bytes @0x450);loadaddress 0x0xa1c0 entry 0x0x2000 normal/stage2/segment1 (28084 bytes, lzma compressed to 14976 bytes @0x510);loadaddress 0x0x2000 entry 0x0x2000 normal/stage2/segment2 (4540 bytes, lzma compressed to 316 bytes @0x3fe0);loadaddress 0x0x9000 entry 0x0x2000 normal/initram/segment0 (432 bytes @0x4170);loadaddress 0x0 entry 0x0x42 normal/payload/segment0 (172032 bytes @0x4370);loadaddress 0x0x112d60 entry 0x0x10e51c normal/payload/segment1 (77128 bytes @0x2e3c0);loadaddress 0x0x100000 entry 0x0x10e51c normal/payload/segment2 (72 bytes @0x41160);loadaddress 0x0x13cd60 entry 0x0x10e51c bootblock (20480 bytes @0xfb000) Total size = 286910 bytes (0x460be)
Coreboot v3 with filo.elf added using lar -ae -C lzma
normal/option_table (932 bytes @0x50);loadaddress 0x0 entry 0x0 normal/stage2/segment0 (191792 bytes, lzma compressed to 110 bytes @0x450);loadaddress 0x0xa1c0 entry 0x0x2000 normal/stage2/segment1 (28084 bytes, lzma compressed to 14976 bytes @0x510);loadaddress 0x0x2000 entry 0x0x2000 normal/stage2/segment2 (4540 bytes, lzma compressed to 316 bytes @0x3fe0);loadaddress 0x0x9000 entry 0x0x2000 normal/initram/segment0 (432 bytes @0x4170);loadaddress 0x0 entry 0x0x42 normal/payload/segment0 (172032 bytes, lzma compressed to 108 bytes @0x4370);loadaddress 0x0x112d60 entry 0x0x10e51c normal/payload/segment1 (77128 bytes, lzma compressed to 42548 bytes @0x4430);loadaddress 0x0x100000 entry 0x0x10e51c normal/payload/segment2 (72 bytes, lzma compressed to 47 bytes @0xeac0);loadaddress 0x0x13cd60 entry 0x0x10e51c bootblock (20480 bytes @0xfb000) Total size = 80381 bytes (0x139fd)
I'm not sure I counted everything right, but I think this is a feature that lar ought to have (space left in the archive is just as good for me.)
Signed-off-by: Myles Watson myles@pel.cs.byu.edu