Chrome EC: Difference between revisions

From coreboot
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 10: Line 10:


== Building outside of the ChromiumOS chroot ==
== Building outside of the ChromiumOS chroot ==
=== Build requirements ===


You will need:
You will need:
* GNU Make 4.1 (older versions are having trouble with the Makefiles)
* GNU Make 4.1 (older versions are having trouble with the Makefiles)
* an ARM cross compiler (I used coreboot's armv7-a-eabi- toolchain)
* an ARM cross compiler (I used coreboot's armv7-a-eabi- toolchain)
=== Patches required ===
Patching up the code:
* https://chromium-review.googlesource.com/#/c/322435/
=== Build instructions ===


Let's go:
Let's go:


  $ sudo aptitude install libftdi-dev
  $ sudo aptitude install libftdi-dev
$ git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference
$ cd vboot_reference
$ make
[..]
$ cp build/futility/futility ~/bin
$ cd ..
  $ git clone https://chromium.googlesource.com/chromiumos/platform/ec
  $ git clone https://chromium.googlesource.com/chromiumos/platform/ec
  [..]
  [..]
  $ cd ec
  $ cd ec
  $ CROSS_COMPILE=armv7-a-eabi- HOST_CROSS_COMPILE= make BOARD=chell
  $ CROSS_COMPILE=armv7-a-eabi- HOST_CROSS_COMPILE= make BOARD=chell
  HOSTCC util/ectool
  [..]
  HOSTCC util/lbplay
$
  HOSTCC util/stm32mon
 
   HOSTCC  util/ec_sb_firmware_update
Build all boards:
   HOSTCC util/lbcc
 
  In file included from include/common.h:11:0,
  ls -1 board/ | grep -v OWNERS | grep -v host | \
                from chip/mec1322/registers.h:11,
  while read n; do
                from board/chell/board.h:130,
   echo "**************** $n"
                from include/config.h:2063:
   CROSS_COMPILE=armv7-a-eabi- HOST_CROSS_COMPILE= make BOARD=$n -j
  .../4.9.2/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
  done
  # include_next <stdint.h>
 
                          ^
=== Issues ===
  compilation terminated.
 
  [..]
Targets not building
 
* cr50 (make issue with -C)
* glados,kunimitsu,wheatley: `memset' referenced in section `.text' of /tmp/cc3Dv6dh.ltrans2.ltrans.o: defined in discarded section `.text' of build/wheatley/RO/common/util.o (symbol from plugin)
* it8380dev: armv7-a-eabi-gcc: error: unrecognized argument in option '-march=v3m'
* Not real targets, but in board/: host, OWNERS

Latest revision as of 01:10, 30 January 2016

Chrome EC

The Chrome EC is used in almost all Chrome OS devices, and an increasing number of accessories, like Google's Type C chargers. It is based on the Chromium EC code base.

Building the Chrome EC

Building in the ChromiumOS environment

Getting started building EC images quickly

Building outside of the ChromiumOS chroot

Build requirements

You will need:

  • GNU Make 4.1 (older versions are having trouble with the Makefiles)
  • an ARM cross compiler (I used coreboot's armv7-a-eabi- toolchain)

Patches required

Patching up the code:

Build instructions

Let's go:

$ sudo aptitude install libftdi-dev
$ git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference
$ cd vboot_reference
$ make
[..]
$ cp build/futility/futility ~/bin
$ cd ..
$ git clone https://chromium.googlesource.com/chromiumos/platform/ec
[..]
$ cd ec
$ CROSS_COMPILE=armv7-a-eabi- HOST_CROSS_COMPILE= make BOARD=chell
[..]
$

Build all boards:

ls -1 board/ | grep -v OWNERS | grep -v host | \
while read n; do
  echo "**************** $n"
  CROSS_COMPILE=armv7-a-eabi- HOST_CROSS_COMPILE= make BOARD=$n -j
done

Issues

Targets not building

  • cr50 (make issue with -C)
  • glados,kunimitsu,wheatley: `memset' referenced in section `.text' of /tmp/cc3Dv6dh.ltrans2.ltrans.o: defined in discarded section `.text' of build/wheatley/RO/common/util.o (symbol from plugin)
  • it8380dev: armv7-a-eabi-gcc: error: unrecognized argument in option '-march=v3m'
  • Not real targets, but in board/: host, OWNERS