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
This commit is contained in:
@@ -574,6 +574,11 @@ define CONFIG_COMPRESSED_ROM_STREAM
|
|||||||
export always
|
export always
|
||||||
comment "compressed boot image is located in ROM"
|
comment "compressed boot image is located in ROM"
|
||||||
end
|
end
|
||||||
|
define CONFIG_PRECOMPRESSED_ROM_STREAM
|
||||||
|
default 0
|
||||||
|
export always
|
||||||
|
comment "boot image is already compressed"
|
||||||
|
end
|
||||||
define CONFIG_FS_STREAM
|
define CONFIG_FS_STREAM
|
||||||
default 0
|
default 0
|
||||||
export always
|
export always
|
||||||
|
@@ -22,6 +22,7 @@ uses ROM_SECTION_SIZE
|
|||||||
uses ROM_SECTION_OFFSET
|
uses ROM_SECTION_OFFSET
|
||||||
uses CONFIG_ROM_STREAM_START
|
uses CONFIG_ROM_STREAM_START
|
||||||
uses CONFIG_COMPRESSED_ROM_STREAM
|
uses CONFIG_COMPRESSED_ROM_STREAM
|
||||||
|
uses CONFIG_PRECOMPRESSED_ROM_STREAM
|
||||||
uses PAYLOAD_SIZE
|
uses PAYLOAD_SIZE
|
||||||
uses _ROMBASE
|
uses _ROMBASE
|
||||||
uses _RAMBASE
|
uses _RAMBASE
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#include <stream/read_bytes.h>
|
#include <stream/read_bytes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if CONFIG_COMPRESSED_ROM_STREAM
|
#if CONFIG_COMPRESSED_ROM_STREAM || CONFIG_PRECOMPRESSED_ROM_STREAM
|
||||||
// include generic nrv2b
|
// include generic nrv2b
|
||||||
#include "../lib/nrv2b.c"
|
#include "../lib/nrv2b.c"
|
||||||
extern unsigned char _heap, _eheap;
|
extern unsigned char _heap, _eheap;
|
||||||
@@ -31,7 +31,7 @@ static const unsigned char *rom;
|
|||||||
|
|
||||||
int stream_init(void)
|
int stream_init(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_COMPRESSED_ROM_STREAM
|
#if CONFIG_COMPRESSED_ROM_STREAM || CONFIG_PRECOMPRESSED_ROM_STREAM
|
||||||
unsigned char *dest;
|
unsigned char *dest;
|
||||||
unsigned long olen;
|
unsigned long olen;
|
||||||
#endif
|
#endif
|
||||||
@@ -40,7 +40,7 @@ int stream_init(void)
|
|||||||
(unsigned long)rom_start,
|
(unsigned long)rom_start,
|
||||||
(unsigned long)rom_end);
|
(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 */
|
dest = &_eheap; /* need a good address on RAM */
|
||||||
|
|
||||||
|
@@ -3,8 +3,11 @@
|
|||||||
target rev_a_1M
|
target rev_a_1M
|
||||||
mainboard olpc/rev_a
|
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
|
# leave 64k for vsa
|
||||||
option CONFIG_COMPRESSED_ROM_STREAM=0
|
|
||||||
option ROM_SIZE=1024*1024-64*1024
|
option ROM_SIZE=1024*1024-64*1024
|
||||||
option FALLBACK_SIZE=ROM_SIZE
|
option FALLBACK_SIZE=ROM_SIZE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user