summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@openbios.org>2006-08-03 16:19:27 +0000
committerStefan Reinauer <stepan@openbios.org>2006-08-03 16:19:27 +0000
commit8ad7c06535694959952b7d64a9649cb9534abd2a (patch)
tree01dfbff674b3a54a417747b9b6c409d6c2f5ce15
parent9327d22641992459a8e57f4d5125fdce72f7f263 (diff)
downloadcoreboot-8ad7c06535694959952b7d64a9649cb9534abd2a.tar.xz
slightly changed C.D. Hailfinger's precompressed rom stream patch
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2359 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--src/config/Options.lb5
-rw-r--r--src/mainboard/olpc/rev_a/Options.lb1
-rw-r--r--src/stream/rom_stream.c6
-rw-r--r--targets/olpc/rev_a/Config.1M.lb5
4 files changed, 13 insertions, 4 deletions
diff --git a/src/config/Options.lb b/src/config/Options.lb
index 4742908937..5f1800a583 100644
--- a/src/config/Options.lb
+++ b/src/config/Options.lb
@@ -574,6 +574,11 @@ define CONFIG_COMPRESSED_ROM_STREAM
export always
comment "compressed boot image is located in ROM"
end
+define CONFIG_PRECOMPRESSED_ROM_STREAM
+ default 0
+ export always
+ comment "boot image is already compressed"
+end
define CONFIG_FS_STREAM
default 0
export always
diff --git a/src/mainboard/olpc/rev_a/Options.lb b/src/mainboard/olpc/rev_a/Options.lb
index d55d8ce923..e7a96ba15e 100644
--- a/src/mainboard/olpc/rev_a/Options.lb
+++ b/src/mainboard/olpc/rev_a/Options.lb
@@ -22,6 +22,7 @@ uses ROM_SECTION_SIZE
uses ROM_SECTION_OFFSET
uses CONFIG_ROM_STREAM_START
uses CONFIG_COMPRESSED_ROM_STREAM
+uses CONFIG_PRECOMPRESSED_ROM_STREAM
uses PAYLOAD_SIZE
uses _ROMBASE
uses _RAMBASE
diff --git a/src/stream/rom_stream.c b/src/stream/rom_stream.c
index e5a55d306d..ef8df9f394 100644
--- a/src/stream/rom_stream.c
+++ b/src/stream/rom_stream.c
@@ -4,7 +4,7 @@
#include <stream/read_bytes.h>
#include <string.h>
-#if CONFIG_COMPRESSED_ROM_STREAM
+#if CONFIG_COMPRESSED_ROM_STREAM || CONFIG_PRECOMPRESSED_ROM_STREAM
// include generic nrv2b
#include "../lib/nrv2b.c"
extern unsigned char _heap, _eheap;
@@ -31,7 +31,7 @@ static const unsigned char *rom;
int stream_init(void)
{
-#if CONFIG_COMPRESSED_ROM_STREAM
+#if CONFIG_COMPRESSED_ROM_STREAM || CONFIG_PRECOMPRESSED_ROM_STREAM
unsigned char *dest;
unsigned long olen;
#endif
@@ -40,7 +40,7 @@ int stream_init(void)
(unsigned long)rom_start,
(unsigned long)rom_end);
-#if CONFIG_COMPRESSED_ROM_STREAM
+#if CONFIG_COMPRESSED_ROM_STREAM || CONFIG_PRECOMPRESSED_ROM_STREAM
dest = &_eheap; /* need a good address on RAM */
diff --git a/targets/olpc/rev_a/Config.1M.lb b/targets/olpc/rev_a/Config.1M.lb
index 5ef607f481..4450e1798b 100644
--- a/targets/olpc/rev_a/Config.1M.lb
+++ b/targets/olpc/rev_a/Config.1M.lb
@@ -3,8 +3,11 @@
target rev_a_1M
mainboard olpc/rev_a
+# Don't let LinuxBIOS compress the payload
+# option CONFIG_COMPRESSED_ROM_STREAM=0
+option CONFIG_PRECOMPRESSED_ROM_STREAM=1
+
# leave 64k for vsa
-option CONFIG_COMPRESSED_ROM_STREAM=0
option ROM_SIZE=1024*1024-64*1024
option FALLBACK_SIZE=ROM_SIZE