- CONFIG_CBFS
- anything that's conditional on CONFIG_CBFS == 0
- files that were only included for CONFIG_CBFS == 0
In particular:
- elfboot
- stream boot code
- mini-filo and filesystems (depends on stream boot code)

After this commit, there is no way to build an image that is not using
CBFS anymore.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4712 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Patrick Georgi
2009-10-03 16:24:58 +00:00
parent 8f3ec7b1a3
commit 6768f39a4b
150 changed files with 41 additions and 4723 deletions

View File

@@ -1,45 +1,29 @@
uses CONFIG_CBFS
uses CONFIG_SMP
uses CONFIG_PRECOMPRESSED_PAYLOAD
uses CONFIG_USE_INIT
uses CONFIG_HAVE_FAILOVER_BOOT
uses CONFIG_USE_FAILOVER_IMAGE
uses CONFIG_USE_FALLBACK_IMAGE
uses CONFIG_CBFS
init init/crt0.S.lb
if CONFIG_CBFS
if CONFIG_USE_FAILOVER_IMAGE
else
initobject /src/lib/cbfs.o
initobject /src/lib/lzma.o
end
if CONFIG_USE_FAILOVER_IMAGE
else
initobject /src/lib/cbfs.o
initobject /src/lib/lzma.o
end
if CONFIG_HAVE_FAILOVER_BOOT
if CONFIG_USE_FAILOVER_IMAGE
ldscript init/ldscript_failover.lb
else
if CONFIG_CBFS
ldscript init/ldscript_cbfs.lb
else
ldscript init/ldscript.lb
end
end
else
if CONFIG_CBFS
if CONFIG_USE_FALLBACK_IMAGE
ldscript init/ldscript_fallback_cbfs.lb
else
ldscript init/ldscript_cbfs.lb
end
if CONFIG_USE_FALLBACK_IMAGE
ldscript init/ldscript_fallback_cbfs.lb
else
if CONFIG_USE_FALLBACK_IMAGE
ldscript init/ldscript_fallback.lb
else
ldscript init/ldscript.lb
end
ldscript init/ldscript_cbfs.lb
end
end
@@ -82,13 +66,6 @@ end
# catch the case where there is no compression
makedefine PAYLOAD-1:=payload
if CONFIG_CBFS
else
# match the case where a compression type is specified.
makedefine PAYLOAD-$(CONFIG_COMPRESSED_PAYLOAD_NRV2B):=payload.nrv2b
makedefine PAYLOAD-$(CONFIG_COMPRESSED_PAYLOAD_LZMA):=payload.lzma
end
# catch the case where there is precompression. Yes, this bites.
if CONFIG_PRECOMPRESSED_PAYLOAD
makedefine PAYLOAD-1:=payload
@@ -105,8 +82,8 @@ if CONFIG_USE_FAILOVER_IMAGE
else
makerule coreboot.rom
depends "coreboot.strip buildrom $(PAYLOAD-1)"
action "PAYLOAD=$(PAYLOAD-1); if [ $(CONFIG_CBFS) -eq 1 ]; then PAYLOAD=/dev/null; touch cbfs-support; fi; ./buildrom $< $@ $$PAYLOAD $(CONFIG_ROM_IMAGE_SIZE) $(CONFIG_ROM_SECTION_SIZE)"
action "if [ $(CONFIG_COMPRESSED_PAYLOAD_LZMA) -eq 1 -a $(CONFIG_CBFS) -eq 1 ]; then echo l > cbfs-support; fi"
action "touch cbfs-support; ./buildrom $< $@ /dev/null $(CONFIG_ROM_IMAGE_SIZE) $(CONFIG_ROM_SECTION_SIZE)"
action "if [ $(CONFIG_COMPRESSED_PAYLOAD_LZMA) -eq 1 ]; then echo l > cbfs-support; fi"
end
end

View File

@@ -74,19 +74,8 @@ __main:
movl $0x4000000, %esp
movl %esp, %ebp
pushl %esi
#if CONFIG_CBFS == 1
pushl $str_coreboot_ram_name
call cbfs_and_run_core
#else
movl $_liseg, %esi
movl $_iseg, %edi
movl $_eiseg, %ecx
subl %edi, %ecx
pushl %ecx
pushl %edi
pushl %esi
call copy_and_run_core
#endif
.Lhlt:
intel_chip_post_macro(0xee) /* post fe */
@@ -148,12 +137,10 @@ str_pre_main: .string "Jumping to coreboot.\r\n"
#endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
#if CONFIG_CBFS == 1
# if CONFIG_USE_FALLBACK_IMAGE == 1
#if CONFIG_USE_FALLBACK_IMAGE == 1
str_coreboot_ram_name: .string "fallback/coreboot_ram"
# else
#else
str_coreboot_ram_name: .string "normal/coreboot_ram"
# endif
#endif
#endif /* CONFIG_USE_DCACHE_RAM */

View File

@@ -1,70 +0,0 @@
/*
* Memory map:
*
* CONFIG_RAMBASE
* : data segment
* : bss segment
* : heap
* : stack
* CONFIG_ROMBASE
* : coreboot text
* : readonly text
*/
/*
* Bootstrap code for the STPC Consumer
* Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
*
*/
/*
* Written by Johan Rydberg, based on work by Daniel Kahlin.
* Rewritten by Eric Biederman
*/
/*
* We use ELF as output format. So that we can
* debug the code in some form.
*/
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
/*
ENTRY(_start)
*/
TARGET(binary)
INPUT(coreboot_ram.rom)
SECTIONS
{
. = CONFIG_ROMBASE;
.ram . : {
_ram = . ;
coreboot_ram.rom(*)
_eram = . ;
}
/* This section might be better named .setup */
.rom . : {
_rom = .;
*(.rom.text);
*(.rom.data);
*(.rodata.*);
*(.rom.data.*);
. = ALIGN(16);
_erom = .;
}
_lrom = LOADADDR(.rom);
_elrom = LOADADDR(.rom) + SIZEOF(.rom);
_iseg = CONFIG_RAMBASE;
_eiseg = _iseg + SIZEOF(.ram);
_liseg = _ram;
_eliseg = _eram;
/DISCARD/ : {
*(.comment)
*(.comment.*)
*(.note)
*(.note.*)
}
}

View File

@@ -1,75 +0,0 @@
/*
* Memory map:
*
* CONFIG_RAMBASE
* : data segment
* : bss segment
* : heap
* : stack
* CONFIG_ROMBASE
* : coreboot text
* : readonly text
*/
/*
* Bootstrap code for the STPC Consumer
* Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
*
*/
/*
* Written by Johan Rydberg, based on work by Daniel Kahlin.
* Rewritten by Eric Biederman
*/
/*
* We use ELF as output format. So that we can
* debug the code in some form.
*/
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
/*
ENTRY(_start)
*/
TARGET(binary)
INPUT(coreboot_ram.rom)
SECTIONS
{
. = CONFIG_ROMBASE;
.ram . : {
_ram = . ;
coreboot_ram.rom(*)
_eram = . ;
}
/* cut _start into last 64k*/
_x = .;
. = (_x < (CONFIG_ROMBASE - 0x10000 + CONFIG_ROM_IMAGE_SIZE)) ? (CONFIG_ROMBASE - 0x10000 + CONFIG_ROM_IMAGE_SIZE) : _x;
/* This section might be better named .setup */
.rom . : {
_rom = .;
*(.rom.text);
*(.rom.data);
*(.init.rodata.*);
*(.rodata.*);
*(.rom.data.*);
. = ALIGN(16);
_erom = .;
}
_lrom = LOADADDR(.rom);
_elrom = LOADADDR(.rom) + SIZEOF(.rom);
_iseg = CONFIG_RAMBASE;
_eiseg = _iseg + SIZEOF(.ram);
_liseg = _ram;
_eliseg = _eram;
/DISCARD/ : {
*(.comment)
*(.note)
*(.comment.*)
*(.note.*)
}
}

View File

@@ -1,7 +1,6 @@
uses CONFIG_USE_INIT
uses CONFIG_USE_PRINTK_IN_CAR
uses CONFIG_USE_FAILOVER_IMAGE
uses CONFIG_CBFS
object c_start.S
object cpu.c
@@ -15,9 +14,5 @@ initobject printk_init.o
if CONFIG_USE_FAILOVER_IMAGE
else
if CONFIG_CBFS
initobject cbfs_and_run.o
else
initobject copy_and_run.o
end
initobject cbfs_and_run.o
end

View File

@@ -1,53 +0,0 @@
/* by yhlu 6.2005
moved from nrv2v.c and some lines from crt0.S
2006/05/02 - stepan: move nrv2b to an extra file.
*/
#include <console/console.h>
#include <stdint.h>
#include <string.h>
#if CONFIG_COMPRESS
#define ENDIAN 0
#define BITSIZE 32
#include "../lib/nrv2b.c"
#endif
void copy_and_run_core(u8 *src, u8 *dst, unsigned long ilen, unsigned ebp)
{
unsigned long olen;
#if CONFIG_USE_INIT
printk_spew("src=%08x\r\n",src);
printk_spew("dst=%08x\r\n",dst);
#else
print_spew("src="); print_spew_hex32((uint32_t)src); print_spew("\r\n");
print_spew("dst="); print_spew_hex32((uint32_t)dst); print_spew("\r\n");
#endif
#if !CONFIG_COMPRESS
print_debug("Copying image to RAM.\r\n");
memcpy(src, dst, ilen);
olen = ilen;
#else
print_debug("Uncompressing image to RAM.\r\n");
// dump_mem(src, src+0x100);
olen = unrv2b(src, dst, &ilen);
#endif
// dump_mem(dst, dst+0x100);
#if CONFIG_USE_INIT
printk_spew("image length = %08x\r\n", olen);
#else
print_spew("image length = "); print_spew_hex32(olen); print_spew("\r\n");
#endif
print_debug("Jumping to image.\r\n");
__asm__ volatile (
"movl %%eax, %%ebp\n\t"
"cli\n\t"
"jmp *%%edi\n\t"
:: "a"(ebp), "D"(dst)
);
}

View File

@@ -1,4 +1,3 @@
uses CONFIG_CBFS
ldscript init/ldscript.lb
makerule coreboot.strip
@@ -11,10 +10,8 @@ makerule coreboot.rom
action "cp $< $@"
end
if CONFIG_CBFS
initobject /src/lib/cbfs.o
initobject /src/lib/lzma.o
end
initobject /src/lib/cbfs.o
initobject /src/lib/lzma.o
dir init
dir lib