[coreboot] patch: always build cbfstool -g; problem with segv.

ron minnich rminnich at gmail.com
Wed Sep 16 07:30:53 CEST 2009


I'm getting this on dell s1850:

rm -f ./coreboot.rom
cat fallback/coreboot.rom > ./coreboot.rom.bootblock
./cbfs/cbfstool ./coreboot.rom create 1048576 90112 ./coreboot.rom.bootblock
./cbfs/cbfstool ./coreboot.rom add-payload /tmp/filo.elf fallback/payload
make: *** [coreboot.rom] Segmentation fault
make: *** Deleting file `coreboot.rom'

And gdb is unhappy. So here's a patch to make our life easier:
You might care about performance but in fact there's not enough of a
difference to matter or even be measured. And, when I get a segv, it's
nice to have it debuggable. And there's certainly no need to strip the
binary ...

Index: util/cbfstool/Makefile
===================================================================
--- util/cbfstool/Makefile	(revision 4636)
+++ util/cbfstool/Makefile	(working copy)
@@ -2,7 +2,9 @@

 HOSTCXX ?= g++
 HOSTCC ?= gcc
+CFLAGS ?= -g

+
 BINARY:=$(obj)/cbfstool

 COMMON:=common.o compress.o minilzma.o
@@ -43,9 +45,8 @@
 	ctags *.[ch]

 CXXFLAGS=-DCOMPACT
-CFLAGS=
-LDFLAGS=
+CFLAGS=-g
+LDFLAGS=-g

 $(obj)/cbfstool:$(COMMON)
 	$(HOSTCXX) $(LDFLAGS) -o $@ $^
-	strip $@




More information about the coreboot mailing list