[coreboot] qemu ROM Image Size
Pattrick Hueper
phueper at hueper.net
Mon May 25 11:21:32 CEST 2009
Hi all,
since i wanted to be able to debug qemu using its gdb port i did this:
--- a/src/config/Config.lb
+++ b/src/config/Config.lb
@@ -10,7 +10,8 @@ makedefine GCC ?= $(CC)
makedefine GCC_INC_DIR := $(shell LC_ALL=C $(GCC) -print-search-dirs
| sed -ne "s/install: \(.*\)/\1include/gp")
makedefine CPPFLAGS := -I$(TOP)/src/include
-I$(TOP)/src/arch/$(ARCH)/include -I$(GCC_INC_DIR) $(CPUFLAGS)
-makedefine CFLAGS := $(CPU_OPT) $(DISTRO_CFLAGS) $(CPPFLAGS) -Os
-nostdinc -nostdlib -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-Werror-implicit-function-declaration -Wstric
+#makedefine CFLAGS := $(CPU_OPT) $(DISTRO_CFLAGS) $(CPPFLAGS) -Os
-nostdinc -nostdlib -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-Werror-implicit-function-declaration -Wstri
+makedefine CFLAGS := $(CPU_OPT) $(DISTRO_CFLAGS) $(CPPFLAGS) -g -O0
-nostdinc -nostdlib -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-Werror-implicit-function-declaration -Wst
if ASSEMBLER_DEBUG
makedefine DEBUG_CFLAGS := -g -dA -fverbose-asm
Since the debugging info increases the code size, with the pre-CBFS
version i could do this to be able to build a qemu image again:
--- a/targets/emulation/qemu-x86/Config.lb
+++ b/targets/emulation/qemu-x86/Config.lb
@@ -11,10 +12,10 @@ option HAVE_PIRQ_TABLE=1
option IRQ_SLOT_COUNT=6
romimage "normal"
- option ROM_IMAGE_SIZE=0x10000
+ option ROM_IMAGE_SIZE=0x20000
But i suppose since upgrading to CBFS that doesnt help anymore... i
always get this error message:
echo '/*ldoptions*/' > ldscript.ld; cat ldoptions >> ldscript.ld ; for
file in /home/phueper/work/coreboot/coreboot-v2/src/arch/i386/init/ldscript.lb
/home/phueper/work/coreboot/coreboot-v2/src//cpu/x86/16bit/entry16.lds
/home/phueper/work/coreboot/coreboot-v2/src//cpu/x86/32bit/entry32.lds
/home/phueper/work/coreboot/coreboot-v2/src//cpu/x86/16bit/reset16.lds
/home/phueper/work/coreboot/coreboot-v2/src//arch/i386/lib/id.lds ; do
echo /\* $file \*/ >> ldscript.ld; cat $file >> ldscript.ld ; done
gcc -m32 -nostdlib -nostartfiles -static -o coreboot -T ldscript.ld
crt0.o src/arch/i386/lib/copy_and_run.o src/lib/uart8250.o
src/lib/memcmp.o src/lib/memcpy.o src/lib/memset.o
src/console/vtxprintf.o src/arch/i386/lib/printk_init.o
/usr/bin/ld: section .rodata [00000000fffffff0 -> 000000010000022f]
overlaps section .reset [00000000fffffff0 -> 00000000ffffffff]
/usr/bin/ld: coreboot: section .rodata vma 0xfffffff0 overlaps previous sections
collect2: ld returned 1 exit status
make[1]: *** [coreboot] Error 1
make[1]: Leaving directory
`/home/phueper/work/coreboot/coreboot-v2/targets/emulation/qemu-x86/qemu-x86/normal'
make: *** [normal/coreboot.rom] Error 1
I tried increasing ROM_IMAGE_SIZE further but to no avail, only the
error message changes:
echo '/*ldoptions*/' > ldscript.ld; cat ldoptions >> ldscript.ld ; for
file in /home/phueper/work/coreboot/coreboot-v2/src/arch/i386/init/ldscript.lb
/home/phueper/work/coreboot/coreboot-v2/src//cpu/x86/16bit/entry16.lds
/home/phueper/work/coreboot/coreboot-v2/src//cpu/x86/32bit/entry32.lds
/home/phueper/work/coreboot/coreboot-v2/src//cpu/x86/16bit/reset16.lds
/home/phueper/work/coreboot/coreboot-v2/src//arch/i386/lib/id.lds ; do
echo /\* $file \*/ >> ldscript.ld; cat $file >> ldscript.ld ; done
gcc -m32 -nostdlib -nostartfiles -static -o coreboot -T ldscript.ld
crt0.o src/arch/i386/lib/copy_and_run.o src/lib/uart8250.o
src/lib/memcmp.o src/lib/memcpy.o src/lib/memset.o
src/console/vtxprintf.o src/arch/i386/lib/printk_init.o
/usr/bin/ld: _start too low. Please decrease ROM_IMAGE_SIZE
/usr/bin/ld: _start too low. Please decrease ROM_IMAGE_SIZE
/usr/bin/ld: section .rodata [00000000fffffff0 -> 000000010000022f]
overlaps section .reset [00000000fffffff0 -> 00000000ffffffff]
/usr/bin/ld: coreboot: section .rodata vma 0xfffffff0 overlaps previous sections
collect2: ld returned 1 exit status
make[1]: *** [coreboot] Error 1
make[1]: Leaving directory
`/home/phueper/work/coreboot/coreboot-v2/targets/emulation/qemu-x86/qemu-x86/normal'
make: *** [normal/coreboot.rom] Error 1
Does anybody have a idea how i can enable larger ROM Image for qemu to
be able to include debugging symbols again?
Regards, Pattrick
More information about the coreboot
mailing list