cross compiling parallella-linux from source fails

Forum about Parallella boot process, linux kernel, distros, SD-cards, etc.

cross compiling parallella-linux from source fails

Postby jfdawson20 » Wed Dec 16, 2015 4:31 am

Hey All,
So I've pulled the latest version of parallella-linux from the git repo and have attempted to compile following a few instructions found on this forum however I am running into a few issues.

Quick background:
- I am cross compiling on am x86 platform running ubuntu 15.10

compilation sequence:
jack@TheLorAxe:~/Sandbox/parallella/parallella-linux$ export ARCH=arm
jack@TheLorAxe:~/Sandbox/parallella/parallella-linux$ export CROSS_COMPILE=arm-linux-gnueabihf-
jack@TheLorAxe:~/Sandbox/parallella/parallella-linux$ make ARCH=arm parallella_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:587:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
jump->offset = strlen(r->s);
^
scripts/kconfig/menu.c:548:19: note: ‘jump’ was declared here
struct jump_key *jump;
^
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#

jack@TheLorAxe:~/Sandbox/parallella/parallella-linux$ make ARCH=arm LOADADDR=0x8000 uImage
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from /home/jack/Sandbox/parallella/parallella-linux/include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/page-flags.h:8,
from kernel/bounds.c:9:
include/linux/compiler-gcc.h:106:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
/home/jack/Sandbox/parallella/parallella-linux/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:884: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

so from looking around on the web I see that the first error is from using a gcc5 version of the arm-linux-gnueabihf- toolchain. So I tried simply placing a copy of "compiler-gcc5.h" in "includes/linux/" and tried compiling again...

second compile attempt:
jack@TheLorAxe:~/Sandbox/parallella/parallella-linux$ make ARCH=arm LOADADDR=0x8000 uImage
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/util.o
HOSTLD scripts/dtc/dtc
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.lex.o
HOSTCC scripts/genksyms/parse.tab.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
HOSTCC scripts/sortextable
In file included from scripts/sortextable.c:190:0:
scripts/sortextable.c: In function ‘main’:
scripts/sortextable.h:176:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: ‘relocs_size’ was declared here
int relocs_size;
^
In file included from scripts/sortextable.c:188:0:
scripts/sortextable.h:176:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: ‘relocs_size’ was declared here
int relocs_size;
^
CC init/main.o
CHK include/generated/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
LD init/mounts.o
init/do_mounts_rd.o: In function `nop_flush_icache_all':
do_mounts_rd.c:(.text+0x0): multiple definition of `nop_flush_icache_all'
init/do_mounts.o:do_mounts.c:(.text+0x94): first defined here
init/do_mounts_rd.o: In function `nop_flush_kern_cache_all':
do_mounts_rd.c:(.text+0x4): multiple definition of `nop_flush_kern_cache_all'
init/do_mounts.o:do_mounts.c:(.text+0x98): first defined here
init/do_mounts_rd.o: In function `nop_flush_kern_cache_louis':
do_mounts_rd.c:(.text+0x8): multiple definition of `nop_flush_kern_cache_louis'
init/do_mounts.o:do_mounts.c:(.text+0x9c): first defined here
init/do_mounts_rd.o: In function `nop_flush_user_cache_all':
do_mounts_rd.c:(.text+0xc): multiple definition of `nop_flush_user_cache_all'
init/do_mounts.o:do_mounts.c:(.text+0xa0): first defined here
init/do_mounts_rd.o: In function `nop_flush_user_cache_range':
do_mounts_rd.c:(.text+0x10): multiple definition of `nop_flush_user_cache_range'
init/do_mounts.o:do_mounts.c:(.text+0xa4): first defined here
init/do_mounts_rd.o: In function `nop_coherent_kern_range':
do_mounts_rd.c:(.text+0x14): multiple definition of `nop_coherent_kern_range'
init/do_mounts.o:do_mounts.c:(.text+0xa8): first defined here
init/do_mounts_rd.o: In function `nop_coherent_user_range':
do_mounts_rd.c:(.text+0x18): multiple definition of `nop_coherent_user_range'
init/do_mounts.o:do_mounts.c:(.text+0xac): first defined here
init/do_mounts_rd.o: In function `nop_flush_kern_dcache_area':
do_mounts_rd.c:(.text+0x20): multiple definition of `nop_flush_kern_dcache_area'
init/do_mounts.o:do_mounts.c:(.text+0xb4): first defined here
init/do_mounts_rd.o: In function `nop_dma_flush_range':
do_mounts_rd.c:(.text+0x24): multiple definition of `nop_dma_flush_range'
init/do_mounts.o:do_mounts.c:(.text+0xb8): first defined here
init/do_mounts_rd.o: In function `nop_dma_map_area':
do_mounts_rd.c:(.text+0x28): multiple definition of `nop_dma_map_area'
init/do_mounts.o:do_mounts.c:(.text+0xbc): first defined here
init/do_mounts_rd.o: In function `nop_dma_unmap_area':
do_mounts_rd.c:(.text+0x2c): multiple definition of `nop_dma_unmap_area'
init/do_mounts.o:do_mounts.c:(.text+0xc0): first defined here
init/do_mounts_rd.o: In function `return_address':
do_mounts_rd.c:(.text+0x30): multiple definition of `return_address'
init/do_mounts.o:do_mounts.c:(.text+0xc4): first defined here
init/do_mounts_initrd.o: In function `nop_flush_icache_all':
do_mounts_initrd.c:(.text+0x7c): multiple definition of `nop_flush_icache_all'
init/do_mounts.o:do_mounts.c:(.text+0x94): first defined here
init/do_mounts_initrd.o: In function `nop_flush_kern_cache_all':
do_mounts_initrd.c:(.text+0x80): multiple definition of `nop_flush_kern_cache_all'
init/do_mounts.o:do_mounts.c:(.text+0x98): first defined here
init/do_mounts_initrd.o: In function `nop_flush_kern_cache_louis':
do_mounts_initrd.c:(.text+0x84): multiple definition of `nop_flush_kern_cache_louis'
init/do_mounts.o:do_mounts.c:(.text+0x9c): first defined here
init/do_mounts_initrd.o: In function `nop_flush_user_cache_all':
do_mounts_initrd.c:(.text+0x88): multiple definition of `nop_flush_user_cache_all'
init/do_mounts.o:do_mounts.c:(.text+0xa0): first defined here
init/do_mounts_initrd.o: In function `nop_flush_user_cache_range':
do_mounts_initrd.c:(.text+0x8c): multiple definition of `nop_flush_user_cache_range'
init/do_mounts.o:do_mounts.c:(.text+0xa4): first defined here
init/do_mounts_initrd.o: In function `nop_coherent_kern_range':
do_mounts_initrd.c:(.text+0x90): multiple definition of `nop_coherent_kern_range'
init/do_mounts.o:do_mounts.c:(.text+0xa8): first defined here
init/do_mounts_initrd.o: In function `nop_coherent_user_range':
do_mounts_initrd.c:(.text+0x94): multiple definition of `nop_coherent_user_range'
init/do_mounts.o:do_mounts.c:(.text+0xac): first defined here
init/do_mounts_initrd.o: In function `nop_flush_kern_dcache_area':
do_mounts_initrd.c:(.text+0x9c): multiple definition of `nop_flush_kern_dcache_area'
init/do_mounts.o:do_mounts.c:(.text+0xb4): first defined here
init/do_mounts_initrd.o: In function `nop_dma_flush_range':
do_mounts_initrd.c:(.text+0xa0): multiple definition of `nop_dma_flush_range'
init/do_mounts.o:do_mounts.c:(.text+0xb8): first defined here
init/do_mounts_initrd.o: In function `nop_dma_map_area':
do_mounts_initrd.c:(.text+0xa4): multiple definition of `nop_dma_map_area'
init/do_mounts.o:do_mounts.c:(.text+0xbc): first defined here
init/do_mounts_initrd.o: In function `nop_dma_unmap_area':
do_mounts_initrd.c:(.text+0xa8): multiple definition of `nop_dma_unmap_area'
init/do_mounts.o:do_mounts.c:(.text+0xc0): first defined here
init/do_mounts_initrd.o: In function `return_address':
do_mounts_initrd.c:(.text+0xac): multiple definition of `return_address'
init/do_mounts.o:do_mounts.c:(.text+0xc4): first defined here
scripts/Makefile.build:441: recipe for target 'init/mounts.o' failed
make[1]: *** [init/mounts.o] Error 1
Makefile:841: recipe for target 'init' failed
make: *** [init] Error 2


...which makes it farther but still massively fails. From what I can think of I have a few paths to go down:

1) revert my toolchain to a 4x version (assuming that the compiler-gcc5.h is causing some issue)
2) give up on cross compiling and build in arm linux
3) maybe some environment variable is messed up and causing libraries to be included with conflicting names?

any thoughts/suggestions?

Thanks!
Jack
jfdawson20
 
Posts: 4
Joined: Tue Dec 15, 2015 7:02 pm

Re: cross compiling parallella-linux from source fails

Postby jfdawson20 » Wed Dec 16, 2015 6:58 pm

sigh, looks like avoiding gcc5/ubuntu 15.10 does the trick..... cross compiling under ubuntu 14.04 with arm-linux-gnueabihf 4 seems to work

also looks like ubuntu 15.10 doesn't support arm-linux-gnueabihf toolchains before version 5
jfdawson20
 
Posts: 4
Joined: Tue Dec 15, 2015 7:02 pm


Return to Linux/U-Boot

Who is online

Users browsing this forum: No registered users and 9 guests

cron