Vadim Bendebury (vbendeb(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9997
-gerrit
commit 0c44f9a93127b41b76287536cee88005d634ccdd
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Sat Apr 25 13:05:10 2015 -0700
xcompile: improve mips toolchain handling
The mips toolchain used by coreboot so far comes from Chrome OS chroot
and is built explicitly for little endian code generation.
Other flavors of MIPS toolchain usually generate big endian code by
default and require command line options to switch to little endian
mode.
This patch adds another variable to the set of compiler flags examined
to determine compiler compatibility. This results in adding another
nested for loop in test_architecture(). To avoid the need to break
from different levels of nesting, processing of the successful case is
taken out from test_architecture().
With this change the Mentor Graphics provided mips GCC toolchain is
accepted by xcompile, resulting in the following output:
ARCH_SUPPORTED+=mips
SUBARCH_SUPPORTED+=mips mipsel
CC_mips:=mips-linux-gnu-gcc
CFLAGS_mips:= -Wno-unused-but-set-variable -fno-stack-protector -Wl,--build-id=none -mno-abicalls -fno-pic -EL
CPP_mips:=mips-linux-gnu-cpp
AS_mips:=mips-linux-gnu-as
LD_mips:=mips-linux-gnu-ld
NM_mips:=mips-linux-gnu-nm
OBJCOPY_mips:=mips-linux-gnu-objcopy
OBJDUMP_mips:=mips-linux-gnu-objdump
READELF_mips:=mips-linux-gnu-readelf
STRIP_mips:=mips-linux-gnu-strip
AR_mips:=mips-linux-gnu-ar
Change-Id: I4da384b366880929693c59dc0e1c522b35c41bea
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
util/xcompile/xcompile | 40 ++++++++++++++++++++++++----------------
1 file changed, 24 insertions(+), 16 deletions(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 4a0fcf7..e079c9d 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -80,13 +80,15 @@ testas() {
local twidth="$2"
local arch="$3"
local use_dash_twidth="$4"
+ local endian="$5"
local obj_file="$TMPFILE.o"
local full_arch="elf$twidth-$arch"
rm -f "$obj_file"
[ -n "$use_dash_twidth" ] && use_dash_twidth="--$twidth"
- ${gccprefix}as $use_dash_twidth -o "$obj_file" $TMPFILE 2>/dev/null ||
- return 1
+ [ -n "$endian" ] && endian="-$endian"
+ ${gccprefix}as $use_dash_twidth $endian -o "$obj_file" $TMPFILE \
+ 2>/dev/null || return 1
# Check output content type.
local obj_type="$(${gccprefix}objdump -p $obj_file)"
@@ -147,6 +149,10 @@ detect_special_flags() {
mipsel)
testcc "$CC" "$CFLAGS -mno-abicalls -fno-pic" && \
CFLAGS+=" -mno-abicalls -fno-pic"
+
+ # Enforce little endian mode.
+ testcc "$CC" "$CFLAGS -EL" && \
+ CFLAGS+=" -EL"
;;
esac
}
@@ -215,14 +221,15 @@ arch_config_mipsel() {
TWIDTH="32"
TSUPP="mips mipsel"
TABI="elf"
+ TENDIAN="EL"
}
test_architecture() {
local architecture=$1
- local gccprefix search
+ local endian gccprefix search
GCCPREFIX="invalid"
- unset TARCH TBFDARCH TCLIST TWIDTH TSUPP TABI
+ unset TABI TARCH TBFDARCH TCLIST TENDIAN TSUPP TWIDTH
if type arch_config_$architecture > /dev/null; then
arch_config_$architecture
else
@@ -247,23 +254,24 @@ test_architecture() {
for TBFDARCH in $TBFDARCHS; do
for gccprefix in $search ""; do
program_exists "${gccprefix}as" || continue
- testas "$gccprefix" "$TWIDTH" "$TBFDARCH" "" && break
- testas "$gccprefix" "$TWIDTH" "$TBFDARCH" "TRUE" && break
+ for endian in $TENDIAN ""; do
+ testas "$gccprefix" "$TWIDTH" "$TBFDARCH" \
+ "" "$endian" && return 0
+ testas "$gccprefix" "$TWIDTH" "$TBFDARCH" \
+ "TRUE" "$endian" && return 0
+ done
done
- [ "$GCCPREFIX" = "invalid" ] || break
done
- if [ "$GCCPREFIX" = "invalid" ]; then
- echo "Warning: no suitable GCC for $architecture." >&2
- continue
- fi
- CC="${GCCPREFIX}"gcc
-
- detect_special_flags "$architecture"
- report_arch_toolchain
+ echo "Warning: no suitable GCC for $architecture." >&2
+ return 1
}
# This loops over all supported architectures.
for architecture in $SUPPORTED_ARCHITECTURES; do
- test_architecture $architecture
+ if test_architecture $architecture; then
+ CC="${GCCPREFIX}"gcc
+ detect_special_flags "$architecture"
+ report_arch_toolchain
+ fi
done
Vadim Bendebury (vbendeb(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9994
-gerrit
commit 6166e128d663e5d0b89a88c5760a9a838a835438
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Sat Apr 25 11:34:35 2015 -0700
make: avoid problems with mv aliases
Make fails to update .xcompile in case there is an mv alias preventing
silent overwrites of existing files. To avoid ambiguity, invoke mv
from standard location.
While we are at it, also simplify the rule for .xcompile generation:
there is no real need to create a special temporary file, using a file
name extension works just fine in this case.
There is also no need to use shell '&&' operator - make is intelligent
enough to stop building on the first encountered error.
Tested by touching util/xcompile/xcompile and/or running 'make
oldconfig' a few times. .xcompile gets properly regenerated when
required.
Change-Id: Iedc5e288fbcc5dfc18ce39de5c067bb869a13275
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3c57608..25aaade 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,8 @@
$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
.xcompile: util/xcompile/xcompile
- A=`mktemp $@.XXXXXX`; $< $(XGCCPATH) > $$A && mv $$A $@ 2> /dev/null
+ $< $(XGCCPATH) > $@.tmp
+ /bin/mv -f $@.tmp $@ 2> /dev/null
include .xcompile
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9995
-gerrit
commit 33116932a3e04f7e5125fbbe8c6ab6df56081aee
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sat Apr 25 21:29:10 2015 +0200
cbfstool/cbfs_image.c: Compare only signed integers
Fix up commit 0e53931f (cbfstool: Clean up in preparation for adding
new files) enabling extra warnings for building *cbfstool*, which also
enables the warning *sign-compare* [1].
> Warn when a comparison between signed and unsigned values could
> produce an incorrect result when the signed value is converted to
> unsigned.
As warnings are treated as errors, building *cbfstool* fails now with
the following error.
cbfs_image.c: In function ‘cbfs_add_entry_at’:
cbfs_image.c:451:66: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
assert((int)((char*)CBFS_SUBHEADER(entry) - image->buffer.data) ==
Fix this by casting the unsigned part to a signed integer.
[1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Change-Id: I2634a0004cd46da7fcfe5301221c7099258befe6
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/cbfstool/cbfs_image.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index e61664c..cdc630d 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -449,7 +449,7 @@ static int cbfs_add_entry_at(struct cbfs_image *image,
content_offset, (int)((char*)CBFS_SUBHEADER(entry) -
image->buffer.data));
assert((char*)CBFS_SUBHEADER(entry) - image->buffer.data ==
- content_offset);
+ (int)content_offset);
memcpy(CBFS_SUBHEADER(entry), data, size);
if (verbose > 1) cbfs_print_entry_info(image, entry, stderr);
Vadim Bendebury (vbendeb(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9994
-gerrit
commit 87898064ba578bba58da5854988ec26c77f97f9c
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Sat Apr 25 11:34:35 2015 -0700
make: avoid problems with mv aliases
Make fails to update .xcompile in case there is an mv alias preventing
silent overwrites of existing files. To avoid ambiguity, invoke mv
from standard location.
While we are at it, also simplify the rule for .xcompile generation:
there is no really need to create a special temporary file, using a
file name extension works just fine in this case.
There is also no need to use shell '&&' operator - make is intelligent
enough to stop building on the first encountered error.
Tested by touching util/xcompile/xcompile and/or running 'make
oldconfig' a few times. .xcompile gets properly regenerated when
required.
Change-Id: Iedc5e288fbcc5dfc18ce39de5c067bb869a13275
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3c57608..25aaade 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,8 @@
$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
.xcompile: util/xcompile/xcompile
- A=`mktemp $@.XXXXXX`; $< $(XGCCPATH) > $$A && mv $$A $@ 2> /dev/null
+ $< $(XGCCPATH) > $@.tmp
+ /bin/mv -f $@.tmp $@ 2> /dev/null
include .xcompile
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9991
-gerrit
commit 216d0550d6c4d81d5e20bd519c291d3a41762eb6
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Fri Apr 24 15:41:18 2015 +0300
mainboard/intel: Drop unused onboard.h files
Change-Id: I0851375f419202f62ddc8c80fa77e1d8c95ed50f
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/mainboard/intel/baskingridge/onboard.h | 37 ------------------------------
src/mainboard/intel/emeraldlake2/onboard.h | 37 ------------------------------
2 files changed, 74 deletions(-)
diff --git a/src/mainboard/intel/baskingridge/onboard.h b/src/mainboard/intel/baskingridge/onboard.h
deleted file mode 100644
index 52f53e0..0000000
--- a/src/mainboard/intel/baskingridge/onboard.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LUMPY_ONBOARD_H
-#define LUMPY_ONBOARD_H
-
-#include <arch/smp/mpspec.h>
-
-#define LUMPY_LIGHTSENSOR_NAME "lightsensor"
-#define LUMPY_LIGHTSENSOR_I2C_ADDR 0x44
-#define LUMPY_LIGHTSENSOR_GSI 20
-#define LUMPY_LIGHTSENSOR_IRQ 14
-#define LUMPY_LIGHTSENSOR_IRQ_MODE (MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_LOW)
-
-#define LUMPY_TRACKPAD_NAME "trackpad"
-#define LUMPY_TRACKPAD_I2C_ADDR 0x67
-#define LUMPY_TRACKPAD_GSI 21
-#define LUMPY_TRACKPAD_IRQ 15
-#define LUMPY_TRACKPAD_IRQ_MODE (MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_LOW)
-
-#endif
diff --git a/src/mainboard/intel/emeraldlake2/onboard.h b/src/mainboard/intel/emeraldlake2/onboard.h
deleted file mode 100644
index 52f53e0..0000000
--- a/src/mainboard/intel/emeraldlake2/onboard.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LUMPY_ONBOARD_H
-#define LUMPY_ONBOARD_H
-
-#include <arch/smp/mpspec.h>
-
-#define LUMPY_LIGHTSENSOR_NAME "lightsensor"
-#define LUMPY_LIGHTSENSOR_I2C_ADDR 0x44
-#define LUMPY_LIGHTSENSOR_GSI 20
-#define LUMPY_LIGHTSENSOR_IRQ 14
-#define LUMPY_LIGHTSENSOR_IRQ_MODE (MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_LOW)
-
-#define LUMPY_TRACKPAD_NAME "trackpad"
-#define LUMPY_TRACKPAD_I2C_ADDR 0x67
-#define LUMPY_TRACKPAD_GSI 21
-#define LUMPY_TRACKPAD_IRQ 15
-#define LUMPY_TRACKPAD_IRQ_MODE (MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_LOW)
-
-#endif
the following patch was just integrated into master:
commit 057256541bd887e2fadcafdea3b3500cf27c343d
Author: Sol Boucher <solb(a)chromium.org>
Date: Thu Apr 2 20:58:26 2015 -0700
cbfstool: Fix ability to add files at offsets near the end of empty spaces
Because cbfs_add_entry_at() previously *assumed* it would have to create a
trailing empty entry, it was impossible to add files at exact offsets close
enough to the end of an existing empty entry that they occupied the remainder
of its space. This addresses the problem by skipping the step of creating the
trailing empty entry if doing so would place it at the start offset of whatever
already followed the original empty section.
BUG=chromium:473511
TEST=Run the following commands:
$ ./cbfstool test.image create -s 0x100000 -m arm
$ dd if=/dev/zero of=twok.bin bs=1 count=2048
$ ./cbfstool test.image add -t 0x50 -f twok.bin -n at_end -b 0xff7c0
$ ./cbfstool test.image add -t 0x50 -f twok.bin -n near_end -b 0xfef80
$ ./cbfstool test.image print
There shouldn't be any assertions, and the output should be:
test.image: 1024 kB, bootblocksize 0, romsize 1048576, offset 0x40
alignment: 64 bytes, architecture: arm
Name Offset Type Size
(empty) 0x40 null 1044184
near_end 0xfef40 raw 2048
at_end 0xff780 raw 2048
BRANCH=None
Change-Id: Ic8a6c3dfa4f82346a067c0804afb6c5a5e89e6c8
Signed-off-by: Sol Boucher <solb(a)chromium.org>
Original-Commit-Id: 1bbd353fddc818f725e488e8f2fb6e967033539d
Original-Change-Id: I15d25df80787a8e34c2237262681720203509c72
Original-Signed-off-by: Sol Boucher <solb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/263809
Original-Reviewed-by: Hung-Te Lin <hungte(a)chromium.org>
Original-Reviewed-by: Stefan Reinauer <reinauer(a)google.com>
Reviewed-on: http://review.coreboot.org/9938
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See http://review.coreboot.org/9938 for details.
-gerrit
the following patch was just integrated into master:
commit 7f845b3ebe936f0abe7f404d3760421f5c3219f0
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Apr 24 10:52:52 2015 +0200
nvidia/cbootimage: update to 1.5
Change-Id: I16e7c376fe6d79676734df325ac61449bb2d0871
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/9982
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones(a)se-eng.com>
See http://review.coreboot.org/9982 for details.
-gerrit