fatal error: ftdi.h: No such file or directory

1,173 views
Skip to first unread message

watermirror

unread,
Dec 29, 2014, 11:02:25 PM12/29/14
to chromiu...@chromium.org
hi , i am building Chromium Embedded Controller (EC) Development.

firstly, i got the code follow http://www.chromium.org/chromium-os/developer-guide.also , i have build the arm-generic successfully.

then i go to the trunk/src/platform/ec (execute
cros_sdk first), follow the steps in as http://www.chromium.org/chromium-os/ec-development.

i execute command as:

1)git checkout cros/firmware-snow-2695.B
2) make -j BOARD=daisy

i got errors like this:

  HOSTCC  util/ectool
  BUILDCC util/ec_uartd
  BUILDCC util/stm32mon
  CC      core/cortex-m/task.o
  CC      chip/stm32/dma.o
  CC      core/cortex-m/timer.o
  CC      chip/stm32/hwtimer.o
  CC      core/cortex-m/panic.o
util/ec_uartd.c:22:18: fatal error: ftdi.h: No such file or directory
 #include <ftdi.h>
                  ^
compilation terminated.
  CC      chip/stm32/power_led.o
make: *** [build/daisy/util/ec_uartd] Error 1
make: *** Waiting for unfinished jobs....
  CC      chip/stm32/system.o
/usr/x86_64-pc-linux-gnu/binutils-bin/2.24/ld.bfd.real: cannot find -lftdi
collect2: error: ld returned 1 exit status
make: *** [build/daisy/util/stm32mon] Error 1


how could i solve it?

Vincent Palatin

unread,
Dec 29, 2014, 11:11:08 PM12/29/14
to watermirror, Chromium OS dev
sudo emerge libftdi

-- 
Vincent

watermirror

unread,
Dec 29, 2014, 11:14:59 PM12/29/14
to chromiu...@chromium.org, huxue...@gmail.com
hi , i execute the sudo emerge libftdi in directory /trunk/src/platform/ec
still have that error.

Vincent Palatin

unread,
Dec 30, 2014, 10:32:00 AM12/30/14
to watermirror, Chromium OS dev
On Mon, Dec 29, 2014 at 8:14 PM, watermirror <huxue...@gmail.com> wrote:
hi , i execute the sudo emerge libftdi in directory /trunk/src/platform/ec
still have that error.


Ok I got it, you are using an old EC branch (cros/firmware-snow-2695.B) with a new ToT chroot (which has a newer version of libftdi aka libftdi1).
You need to backport the support for libftdi1 (which was the following changelist : https://chromium-review.googlesource.com/#/c/47875/  ) to get a working setup. something like :
git cherry-pick 357e5083

But you will get the same issue with vboot_reference repository (which is ToT and not compatible with EC branch), you would need to switch that repository to cros/firmware-snow-2695.B *and* install it.
 
--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Chirantan Ekbote

unread,
Dec 30, 2014, 1:16:31 PM12/30/14
to Vincent Palatin, watermirror, Chromium OS dev
If you want to do development on an old branch, it might be easier to
just create a brand new chroot just for that branch. You can do
something like:

repo init -u <url> -b firmware-snow-2695.B
repo sync

in a new directory, which will ensure that the correct branch gets
checked out in all the appropriate repositories. Then you would use
your original chroot to build chromium os images and use the new
chroot solely for firmware/ec development. The downside of this
approach is that you end up with an entire separate copy of the source
but the upside is that you don't have to hunt down all the
dependencies that may have changed since the branch was created.

watermirror

unread,
Jan 3, 2015, 7:58:42 PM1/3/15
to chromiu...@chromium.org, huxue...@gmail.com


On Tuesday, December 30, 2014 11:32:00 PM UTC+8, Vincent Palatin wrote:


On Mon, Dec 29, 2014 at 8:14 PM, watermirror <huxue...@gmail.com> wrote:
hi , i execute the sudo emerge libftdi in directory /trunk/src/platform/ec
still have that error.


Ok I got it, you are using an old EC branch (cros/firmware-snow-2695.B) with a new ToT chroot (which has a newer version of libftdi aka libftdi1).
You need to backport the support for libftdi1 (which was the following changelist : https://chromium-review.googlesource.com/#/c/47875/  ) to get a working setup. something like :
git cherry-pick 357e5083

Hi, i am new. i can not understand the old EC branch and new ToT chroot.
i am following the http://www.chromium.org/chromium-os/ec-development and http://www.chromium.org/chromium-os/ec-development to build the EC. it seems these two pages out of date. is there any more recent information?
 

Mike Frysinger

unread,
Jan 4, 2015, 9:10:29 PM1/4/15
to watermirror, chromium-os-dev
On Sat, Jan 3, 2015 at 7:58 PM, watermirror <huxue...@gmail.com> wrote:
On Tuesday, December 30, 2014 11:32:00 PM UTC+8, Vincent Palatin wrote:
On Mon, Dec 29, 2014 at 8:14 PM, watermirror <huxue...@gmail.com> wrote:
hi , i execute the sudo emerge libftdi in directory /trunk/src/platform/ec
still have that error.

Ok I got it, you are using an old EC branch (cros/firmware-snow-2695.B) with a new ToT chroot (which has a newer version of libftdi aka libftdi1).
You need to backport the support for libftdi1 (which was the following changelist : https://chromium-review.googlesource.com/#/c/47875/  ) to get a working setup. something like :
git cherry-pick 357e5083

Hi, i am new. i can not understand the old EC branch and new ToT chroot.

he means you can't easily check out an old branch in two repos and try to build it using the newer chroot

so when you do `repo init` the firs time, pass in the right branch name
-mike
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages