Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hikey_stable.xml compile failed #914

Closed
FlynnMa opened this issue Jul 13, 2016 · 15 comments
Closed

hikey_stable.xml compile failed #914

FlynnMa opened this issue Jul 13, 2016 · 15 comments

Comments

@FlynnMa
Copy link

FlynnMa commented Jul 13, 2016

Dear sir,

I am following "readme" of this page "https://github.com/OP-TEE/optee_os" to setup my hikey board, I simply cloned the repo and use the command "make all" as it said, and I get following error:

make -C /home/fpc/devel/optee/build/../linux LOCALVERSION= CROSS_COMPILE="/usr/bin/ccache " ARCH=arm make[1]: Entering directory/home/fpc/devel/optee/linux'
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[2]: include/generated/mach-types.h' is up to date. CC kernel/bounds.s gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: unrecognized command line option ‘-mlittle-endian’ gcc: error: unrecognized command line option ‘-mno-thumb-interwork’ gcc: error: unrecognized command line option ‘-mfpu=vfp’ make[2]: *** [kernel/bounds.s] Error 1 make[1]: *** [prepare0] Error 2 make[1]: Leaving directory/home/fpc/devel/optee/linux'
make: *** [linux-common] Error 2`

@etienne-lms
Copy link
Contributor

Dear marduino,
maybe you forgot to run make toolchains before make all.

@FlynnMa
Copy link
Author

FlynnMa commented Jul 14, 2016

Dear etiennec-linaro,
Thank you, same error after make toolchains.
Due to their is no Makefile exists under "build", I am not sure how to "make toolchains". In fact I copied makefile from a very old version b66c130224f140350d3f337a90bcd4a240316b34 to excute this.

@vchong
Copy link
Contributor

vchong commented Jul 14, 2016

The Makefile should have been created automatically when you run the repo init .. and repo sync commands. Please verify that you've followed the proper instructions for HiKey. They should be section 4.1, 5.1, 5.2, 5.2.3, 5.5.1 and 6 in your case.

@FlynnMa
Copy link
Author

FlynnMa commented Jul 14, 2016

Thank you vchong, following commands used by me and double checked, dont know what is missed, I removed the manually copied makefile, re-excute again, no makefile generated automatically

repo init -u https://github.com/OP-TEE/manifest.git -m hikey_stable.xml
repo sync
~/devel/optee$ repo sync
Fetching projects: 100% (16/16), done.  anifest.git -m hikey_stable.xml
Syncing work tree: 100% (16/16), done.
aes-perf/: discarding 2 commits
build/: discarding 1 commits
gen_rootfs/: discarding 1 commits
linux/: discarding 3 commits

optee_os/: discarding 29 commits
optee_test/: discarding 1 commits
sha-perf/: discarding 3 commits

strace/: discarding 43 commits

@vchong
Copy link
Contributor

vchong commented Jul 14, 2016

Did you look in ~/devel/optee/build directory?

@FlynnMa
Copy link
Author

FlynnMa commented Jul 14, 2016

After excute repo sync, I canot find makefile in my build folder

~/devel/optee$ ls build/
common.mk  hikey_debian.mk  juno.mk   l.txt        qemu-check.exp  README.md
fvp.mk     hikey.mk         kconfigs  mediatek.mk  qemu.mk         toolchain.mk

I also tried repo init -u https://github.com/OP-TEE/manifest.git -m hikey.xml;repo sync, still cannot see the makefile.

@vchong
Copy link
Contributor

vchong commented Jul 14, 2016

You should be able to create the makefile manually by running ln -sf hikey.mk Makefile in the build directory, but curious why repo didn't automatically generate it for you. Can you maybe delete the build dir and try repo sync again? Also, what is that l.txt file? Are you making any changes before running the commands?

@FlynnMa
Copy link
Author

FlynnMa commented Jul 14, 2016

Eventually I see the generated Makefile. It's really strange.
I manually do another creation from my original repo repo init -u https://github.com/OP-TEE/manifest.git -m hikey.xml --reference=~/devel/optee/;repo sync -j8

I can now pass compile after fix a path error. Thanks!

@vchong
Copy link
Contributor

vchong commented Jul 14, 2016

The toolchain file (/home/fpc/devel/hikeyOptee/toolchains/aarch64/bin/aarch64-linux-gnu-gcc) is not there. Did you run make toolchains under /home/fpc/devel/hikeyOptee/build? If yes, what's the output of the command? Please make sure it runs to completion without errors.

@FlynnMa
Copy link
Author

FlynnMa commented Jul 14, 2016

Hi Vchong,

It is fixed by moving out the foler from hikeyOptee/build/toolchains to hikeyOptee/toolchains. I manually set up my toolchains due to my net work is slow.

In general, I guess there was something wrong happened during my first time repo creation, it caused makefile not generated automatically. After that, what ever how I redo the repo init or repo sync again and again, the makefile will no longer be generated. So, I have to redo repo sync, according with my test simply remove build folder and redo repo sync cannot generate 'makefile' either.

I am really appreciate for you and etiennec-linaro's help.

@jbech-linaro
Copy link
Contributor

I'm a bit surprised. We haven't changed anything related to this in a long time and I setup new builds several times a week and I haven't seen any issue. Not for HiKey, but I did it several times yesterday for QEMU-v8 and for the coming RPi3 port, no problems found.

@FlynnMa
Copy link
Author

FlynnMa commented Jul 14, 2016

I feel It is a smart solution for creating makefile link dynamically at clone time.
I still dont know the root cause to my issue.

@jbech-linaro
Copy link
Contributor

I've tried everything from scratch this morning:

$ history
....
 1791  rm -rf hikey/
 1792  mkdir hikey
 1793  cd hikey/
 1794  repo init -u https://github.com/OP-TEE/manifest.git -m hikey.xml 
 1795  repo sync -j3
 1796  cd build/
 1797  make toolchains 
 1798  make all -j4

Everything worked as it should, toolchain were downloaded and everything compiled.

@FlynnMa
Copy link
Author

FlynnMa commented Jul 15, 2016

Let's close it and let's see if anyone else will met this issue. Thank you all for the impressive support.

@FlynnMa FlynnMa closed this as completed Jul 15, 2016
@targetnull
Copy link

Are you using unofficial repo?I came across the same question long ago,it is solved now after I downloaded repo from the official site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants