add the compiler path to the $PATH environment variable On Thu, May 23, 2013 at 1:38 PM, ntt broken <[email protected]> wrote: > Hello, > > i am trying to build without success the Emulator's kernel source code over > Ubunto 12.04.02 machine installed on a VMware. > those are the commands i tried to follow using the 'official guide found > here: > http://source.android.com/source/building-kernels.html > > and others i found on the web: > http://linuxclues.blogspot.co.il/2010/05/build-compile-linux-kernel-android.html > http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source > http://stackoverflow.com/questions/1809774/android-kernel-compile-and-test-with-android-emulator > http://forum.xda-developers.com/showthread.php?t=1774035 > http://stackoverflow.com/questions/5178386/download-android-kernel-source-code > http://forum.xda-developers.com/showthread.php?t=1516051 > > could not find detailed resource with the complete working steps from a > fresh ubunto machine to a working compiled kernel. > a video describing the process to follow would be great to have. > > here are the detailed steps i did till i get errors: > > max@ubuntu:~/Maxdata/emulatorsource$ git clone > https://android.googlesource.com/kernel/goldfish > Cloning into 'goldfish'... > remote: Counting objects: 41021, done > remote: Finding sources: 100% (114/114) > remote: Getting sizes: 100% (70/70) > remote: Compressing objects: 100% (311571/311571) > remote: Total 2442756 (delta 2048903), reused 2442724 (delta 2048900) > Receiving objects: 100% (2442756/2442756), 499.77 MiB | 954 KiB/s, done. > Resolving deltas: 100% (2049056/2049056), done. > max@ubuntu:~/Maxdata/emulatorsource$ ls > goldfish > max@ubuntu:~/Maxdata/emulatorsource$ cd goldfish/ > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ git branch > * master > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ git remote show origin > * remote origin > Fetch URL: https://android.googlesource.com/kernel/goldfish > Push URL: https://android.googlesource.com/kernel/goldfish > HEAD branch: master > Remote branches: > android-goldfish-2.6.29 tracked > android-goldfish-3.4 tracked > linux-goldfish-3.0-wip tracked > master tracked > Local branch configured for 'git pull': > master merges with remote master > Local ref configured for 'git push': > master pushes to master (up to date) > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ git checkout --track -b > android-goldfish-2.6.29 origin/android-goldfish-2.6.29 > Checking out files: 100% (26821/26821), done. > Branch android-goldfish-2.6.29 set up to track remote branch > android-goldfish-2.6.29 from origin. > Switched to a new branch 'android-goldfish-2.6.29' > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ ls > arch crypto fs Kbuild Makefile REPORTING-BUGS > sound > block Documentation include kernel mm samples usr > COPYING drivers init lib net scripts virt > CREDITS firmware ipc MAINTAINERS README security > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ make ARCH=arm > goldfish_defconfig > HOSTCC scripts/basic/fixdep > scripts/basic/fixdep.c: In function ‘traps’: > scripts/basic/fixdep.c:377:2: warning: dereferencing type-punned pointer > will break strict-aliasing rules [-Wstrict-aliasing] > scripts/basic/fixdep.c:379:4: warning: dereferencing type-punned pointer > will break strict-aliasing rules [-Wstrict-aliasing] > HOSTCC scripts/basic/docproc > HOSTCC scripts/basic/hash > HOSTCC scripts/kconfig/conf.o > scripts/kconfig/conf.c: In function ‘conf_sym’: > scripts/kconfig/conf.c:159:6: warning: variable ‘type’ set but not used > [-Wunused-but-set-variable] > scripts/kconfig/conf.c: In function ‘conf_choice’: > scripts/kconfig/conf.c:231:6: warning: variable ‘type’ set but not used > [-Wunused-but-set-variable] > scripts/kconfig/conf.c:307:9: warning: ignoring return value of ‘fgets’, > declared with attribute warn_unused_result [-Wunused-result] > scripts/kconfig/conf.c: In function ‘conf_askvalue’: > scripts/kconfig/conf.c:105:8: warning: ignoring return value of ‘fgets’, > declared with attribute warn_unused_result [-Wunused-result] > HOSTCC scripts/kconfig/kxgettext.o > SHIPPED scripts/kconfig/zconf.tab.c > SHIPPED scripts/kconfig/lex.zconf.c > SHIPPED scripts/kconfig/zconf.hash.c > HOSTCC scripts/kconfig/zconf.tab.o > HOSTLD scripts/kconfig/conf > arch/arm/configs/goldfish_defconfig:289:warning: override: FB_EARLYSUSPEND > changes choice state > # > # configuration written to .config > # > > I have the arm-eabi files as you can see below: > > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ ls /home/max/arm-eabi-4.6/bin/ > arm-eabi-addr2line arm-eabi-gcc-4.6.x-google arm-eabi-objdump > arm-eabi-ar arm-eabi-gcov arm-eabi-ranlib > arm-eabi-as arm-eabi-gdb arm-eabi-readelf > arm-eabi-c++ arm-eabi-gdbtui arm-eabi-run > arm-eabi-c++filt arm-eabi-gprof arm-eabi-size > arm-eabi-cpp arm-eabi-ld arm-eabi-strings > arm-eabi-elfedit arm-eabi-ld.bfd arm-eabi-strip > arm-eabi-g++ arm-eabi-nm > arm-eabi-gcc arm-eabi-objcopy > > but when I try to do the cross compile it and/or make it give me errors: > > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ ARCH=arm > CROSS_COMPILE=/home/max/arm-eabi-4.6/bin/arm-eabi-gcc make > make: /home/max/arm-eabi-4.6/bin/arm-eabi-gccgcc: Command not found > CHK include/linux/version.h > make[1]: `include/asm-arm/mach-types.h' is up to date. > CHK include/linux/utsrelease.h > SYMLINK include/asm -> include/asm-arm > CC kernel/bounds.s > /bin/sh: 1: /home/max/arm-eabi-4.6/bin/arm-eabi-gccgcc: not found > make[1]: *** [kernel/bounds.s] Error 127 > make: *** [prepare0] Error 2 > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ > > also tried to use the command with uImage mentioned in few places: > http://stackoverflow.com/questions/13864620/cross-compile-error-arm-android-eabi-gcc-command-not-found > > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ ARCH=arm > CROSS_COMPILE=/home/max/arm-eabi-4.6/bin/arm-eabi- uImage make > uImage: command not found > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ ARCH=arm > CROSS_COMPILE=/home/max/arm-eabi-4.6/bin/arm-eabi- uImage > uImage: command not found > > and tried to have the toolchain properly declared as I read it can be > relevant: > > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ sudo add-apt-repository > ppa:linaro-maintainers/toolchain > [sudo] password for max: > You are about to add the following PPA to your system: > Official backport of cross compiler from current Ubuntu release. Consists > fresh gcc, binutils, eglibc. > Support provided for last LTS (12.04 Precise) and last stable release. > Binaries for older releases will not be removed but also do not get any > support. > Note that this toolchain defaults to ARMv7 with Thumb2. If you want to use > it for older processors you have to add "-marm" into CFLAGS. > Remember to enable 'universe' part of Ubuntu distribution on your machine - > otherwise you may get problems with solving dependencies (like it was with > 'libmpc2' under Lucid). > To install latest version: apt-get install gcc-arm-linux-gnueabi (replace > gcc with g++/gfortran/gobjc/gobjc++ if needed). > More info: https://launchpad.net/~linaro-maintainers/+archive/toolchain > Press [ENTER] to continue or ctrl-c to cancel adding it > gpg: keyring `/tmp/tmpFM9EsS/secring.gpg' created > gpg: keyring `/tmp/tmpFM9EsS/pubring.gpg' created > gpg: requesting key 7BE1F97B from hkp server keyserver.ubuntu.com > gpg: /tmp/tmpFM9EsS/trustdb.gpg: trustdb created > gpg: key 7BE1F97B: public key "Launchpad Linaro Overlay PPA" imported > gpg: Total number processed: 1 > gpg: imported: 1 (RSA: 1) > OK > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ > and tried to define what mentioned in the official guide: > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ export ARCH=arm > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ export SUBARCH=arm > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ export CROSS_COMPILE=arm-eabi- > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ make goldfish_defconfig > arch/arm/configs/goldfish_defconfig:289:warning: override: FB_EARLYSUSPEND > changes choice state > # > # configuration written to .config > # > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ make > make: arm-eabi-gcc: Command not found > scripts/kconfig/conf -s arch/arm/Kconfig > make: arm-eabi-gcc: Command not found > CHK include/linux/version.h > make[1]: `include/asm-arm/mach-types.h' is up to date. > CHK include/linux/utsrelease.h > SYMLINK include/asm -> include/asm-arm > CC kernel/bounds.s > /bin/sh: 1: arm-eabi-gcc: not found > make[1]: *** [kernel/bounds.s] Error 127 > make: *** [prepare0] Error 2 > max@ubuntu:~/Maxdata/emulatorsource/goldfish$ > > as you can see I have errors and I have no clue how I need to proceed to > have the emulator’s kernel source build and compiled. > > can you share your tell what am i missing? please be detailed in your answer > so i will be able to take it and try. > > THANK YOU! > > -- > -- > unsubscribe: [email protected] > website: http://groups.google.com/group/android-kernel > --- > You received this message because you are subscribed to the Google Groups > "Android Linux Kernel Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > >
-- -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel --- You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
