Sorry for not testing this patch before committing it. It breaks the compression exception code.
Without patch:
stepan@linux:~/svn/LinuxBIOSv3> build/util/lar/lar -l build/linuxbios.rom normal/option_table (932 bytes @0x40) normal/stage2 (37404 bytes, lzma compressed to 15530 bytes @0x420) normal/initram (2221 bytes @0x4100) bootblock (16384 bytes @0x3c000)
With patch: stepan@linux:~/svn/LinuxBIOSv3> build/util/lar/lar -l build/linuxbios.rom normal/option_table (932 bytes, lzma compressed to 352 bytes @0x40) normal/stage2 (37404 bytes, lzma compressed to 15526 bytes @0x1d0) normal/initram (2221 bytes, lzma compressed to 1593 bytes @0x3eb0) bootblock (16384 bytes @0x3c000)
svn@openbios.org wrote:
Author: stepan Date: 2007-08-20 01:33:41 +0200 (Mon, 20 Aug 2007) New Revision: 471
Modified: LinuxBIOSv3/util/lar/lib.c Log: Add another field to the filename specified for create and add operations to specify the intended pathname for the blob.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: LinuxBIOSv3/util/lar/lib.c
--- LinuxBIOSv3/util/lar/lib.c 2007-08-19 23:31:58 UTC (rev 470) +++ LinuxBIOSv3/util/lar/lib.c 2007-08-19 23:33:41 UTC (rev 471) @@ -210,16 +210,29 @@ { struct stat filestat; int ret = -1;
- const char *realname;
- char *realname;
- char *c;
- realname = name; if (strstr(name, "nocompress:") == name) {
realname = name + 11;
name += 11;
}
realname = strdup(name);
if (realname == NULL) {
fprintf(stderr, "Out of memory.\n");
exit(1);
}
c = strchr(realname, ':');
if (c != NULL)
*c = '\0';
/* printf("... add_files %s\n", name); */ if (stat(realname, &filestat) == -1) { fprintf(stderr, "Error getting file attributes of %s\n", name);
free(realname);
return -1; }
@@ -264,6 +277,7 @@ ret = 0; }
- free(realname); return ret;
}