[HELP] ARM Cross Compilation Toolchain

Here is information about customize your E series firmware..:!:This forum is NOT FOR USER questions or problems but DEVELOPER.

E3V3A
Posts: 247
Joined: Wed Oct 31, 2012 2:31 am
Location: /dev/zero

Re: [HELP] ARM Cross Compilation Toolchain

Post by E3V3A »

This is getting really boring... and I'm very close to give up.

I've tried all sort of things for days and I always get stuck at the same place. (As shown above in previous posts.)

I have "repaired" quite a bit of the Makefile and .config script which tend to hardcode some compiler specific options etc.

1) For some still unknown reason, the ./arch/arm/include/asm/ never gets found, linked or copied to ./include/asm ? (There is already asm-generic in there.)
2) copying it there take me one step closer, but then bounds.h is never created and missing. (It is specified in top level Kbuild, but it doesn't happen.)
SpoilerShow

Code: Select all

$ make modules
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
fixdep:
: No such file or directory
/cygdrive/d/zarm/vdl_kernel/linux/linux-2.6.35.11/./Kbuild:35: recipe for target `kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 2
Makefile:951: recipe for target `prepare0' failed
make: *** [prepare0] Error 2
@arris69: Could you try to repeat your success with these sources for UExxES6xxx?

Why can't we just add the kernel headers somewhere to compile our modules??
HW: UE40ES5700SXXH
FW: T-MST10PDEUC-1029.0 Onboot: 1003
E3V3A
Posts: 247
Joined: Wed Oct 31, 2012 2:31 am
Location: /dev/zero

Re: [HELP] ARM Cross Compilation Toolchain

Post by E3V3A »

Could you please post the output of:

Code: Select all

arm-none-linux-gnueabi-gcc.exe -print-sysroot
arm-none-linux-gnueabi-gcc.exe -print-file-name=include
This is set by installation default to use the libraries in "../path-to-csbench/arm-none-linux-gnueabi/libc", but can be specified with "--sysroot=". Now I was thinking that perhaps this need to be set to use the VDLinux directory instead (If so, which one?), so that's why I am asking...

It seem that according to CS manual (getting-started.pdf) you might need to:

1. copy all *.so, ./usr/bin and ./sbin from arm-none-linux-gnueabi/libc to "your sysroot" in the target directory, wherever that might be.
2. Use the following $(CC) linker options to specify the SYSROOT location:

Code: Select all

-Wl,-rpath=$SYSROOT/lib:sysroot/usr/lib -Wl,--dynamic-linker=$SYSROOT/lib/ld-linux.so.3


@arris69: Did you do this?

Since it seem that you're using a different toolchain, that is used for cygwin, perhaps we could use the Android NDK toolchains as well??
That would be much more convenient, as they are fairly up-to-date and fail-safe, while easy to configure. However, I suspect that they wouldn't be happy to handle OS kernel compilation... Anyone tried this?
HW: UE40ES5700SXXH
FW: T-MST10PDEUC-1029.0 Onboot: 1003
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: [HELP] ARM Cross Compilation Toolchain

Post by arris69 »

E3V3A wrote:This is getting really boring... and I'm very close to give up.
...

@arris69: Could you try to repeat your success with these sources for UExxES6xxx?
....
with self compiled binutils and gcc so it really produce EABI5 objects:

Code: Select all

/cygdrive/c/SELP/arm-linux/bin/arm-v7a8v2r2-linux-gnueabi-readelf.exe -h hellok1.ko
SpoilerShow
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: ARM
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 900 (bytes into file)
Flags: 0x5000000, Version5 EABI
Size of this header: 52 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 40 (bytes)
Number of section headers: 16
Section header string table index: 13
kernel prepare in mstar kernel dir (with selfcompiled toolchain gcc-4.4.3 and binutils-2.23, but 100% sure it will work also with toolchaine from sourceforge and selfmade binutils as described in "extensive tutorial"):

Code: Select all

cp arch/arm/configs/X10P_defconfig_release .config

Code: Select all

make prepare
SpoilerShow
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c: In Funktion ?parse_config_file?:
scripts/basic/fixdep.c:242:4: Warnung: Feldindex hat Typ ?char?
scripts/basic/fixdep.c: In Funktion ?parse_dep_file?:
scripts/basic/fixdep.c:323:4: Warnung: Feldindex hat Typ ?char?
HOSTCC scripts/basic/docproc
scripts/basic/docproc.c: In Funktion ?find_export_symbols?:
scripts/basic/docproc.c:199:5: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:202:5: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:208:5: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:211:5: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c: In Funktion ?singfunc?:
scripts/basic/docproc.c:279:17: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c: In Funktion ?parse_file?:
scripts/basic/docproc.c:336:6: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:341:6: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:346:6: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:352:6: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:355:6: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:361:6: Warnung: Feldindex hat Typ ?char?
scripts/basic/docproc.c:364:6: Warnung: Feldindex hat Typ ?char?
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In Funktion ?strip?:
scripts/kconfig/conf.c:56:2: Warnung: Feldindex hat Typ ?char?
scripts/kconfig/conf.c:64:2: Warnung: Feldindex hat Typ ?char?
scripts/kconfig/conf.c: In Funktion ?conf_choice?:
scripts/kconfig/conf.c:315:4: Warnung: Feldindex hat Typ ?char?
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
In file included from scripts/kconfig/zconf.tab.c:2464:0:
scripts/kconfig/confdata.c: In Funktion ?conf_expand_value?:
scripts/kconfig/confdata.c:64:3: Warnung: Feldindex hat Typ ?char?
scripts/kconfig/confdata.c: In Funktion ?conf_set_sym_val?:
scripts/kconfig/confdata.c:119:4: Warnung: Feldindex hat Typ ?char?
scripts/kconfig/confdata.c: In Funktion ?conf_split_config?:
scripts/kconfig/confdata.c:634:4: Warnung: Feldindex hat Typ ?char?
In file included from scripts/kconfig/zconf.tab.c:2467:0:
scripts/kconfig/menu.c: In Funktion ?menu_add_prop?:
scripts/kconfig/menu.c:134:3: Warnung: Feldindex hat Typ ?char?
scripts/kconfig/menu.c:136:4: Warnung: Feldindex hat Typ ?char?
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
drivers/usb/Kconfig:5:warning: type of 'USB_SUPPORT' redefined from 'tristate' to 'boolean'
drivers/nvt/usb/musb/Kconfig:83:warning: choice value used outside its choice group
drivers/usb/musb/Kconfig:83:warning: choice value used outside its choice group
drivers/nvt/usb/musb/Kconfig:94:warning: choice value used outside its choice group
drivers/usb/musb/Kconfig:94:warning: choice value used outside its choice group
drivers/nvt/usb/musb/Kconfig:104:warning: choice value used outside its choice group
drivers/usb/musb/Kconfig:104:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:126:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:126:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:144:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:144:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:158:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:158:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:179:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:179:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:191:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:191:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:224:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:224:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:256:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:256:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:274:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:274:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:295:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:295:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:310:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:310:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:331:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:331:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:357:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:357:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:366:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:366:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:388:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:388:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:409:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:409:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:428:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:428:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:446:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:446:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:468:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:468:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:488:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:488:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:514:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:514:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:581:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:581:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:615:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:615:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:630:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:630:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:699:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:699:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:715:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:715:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:752:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:752:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:774:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:774:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:792:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:792:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:811:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:811:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:825:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:825:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:840:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:840:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:854:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:854:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:864:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:864:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:905:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:905:warning: choice value used outside its choice group
drivers/nvt/usb/gadget/Kconfig:919:warning: choice value used outside its choice group
drivers/usb/gadget/Kconfig:919:warning: choice value used outside its choice group
drivers/mmc.nvt/host/Kconfig:216:warning: choice value used outside its choice group
drivers/mmc.nvt/host/Kconfig:224:warning: choice value used outside its choice group
drivers/mmc.nvt/host/Kconfig:345:warning: choice value used outside its choice group
drivers/mmc.nvt/host/Kconfig:354:warning: choice value used outside its choice group
drivers/mmc.nvt/host/Kconfig:364:warning: choice value used outside its choice group
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
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
now to your prev. questions:
1. "set"
Your message contains 240505 characters. The maximum number of allowed characters is 60000.
SpoilerShow
ALLUSERSPROFILE='C:\ProgramData'
APPDATA='C:\Users\arris69\AppData\Roaming'
BASH=/bin/bash
BASHOPTS=cmdhist:expand_aliases:extglob:extquote:force_fignore:interactive_comments:login_shell:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_COMPLETION=/etc/bash_completion
BASH_COMPLETION_COMPAT_DIR=/etc/bash_completion.d
BASH_COMPLETION_DIR=/etc/bash_completion.d
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="1" [2]="10" [3]="4" [4]="release" [5]="i686-pc-cygwin")
BASH_VERSION='4.1.10(4)-release'
COLUMNS=180
COMMONPROGRAMFILES='C:\Program Files\Common Files'
COMPUTERNAME=A2920
COMP_WORDBREAKS=$' \t\n"\'><=;|&(:'
COMSPEC='C:\Windows\system32\cmd.exe'
CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi-
DIRSTACK=()
EUID=1000
FP_NO_HOST_CHECK=NO
GROUPS=()
HISTFILE=/home/arris69/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/arris69
HOMEDRIVE=C:
HOMEPATH='\Users\arris69'
HOSTNAME=a2920
HOSTTYPE=i686
IFS=$' \t\n'
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:
LANG=de_DE.UTF-8
LINES=61
LOCALAPPDATA='C:\Users\arris69\AppData\Local'
LOGONSERVER='\\A2920'
MACHTYPE=i686-pc-cygwin
MAILCHECK=60
MANPATH=/usr/local/man:/usr/share/man:/usr/man:
NUMBER_OF_PROCESSORS=2
OLDPWD=/cygdrive/c/SELP/VDLinux_2.6.35.11
OPTERR=1
OPTIND=1
ORIGINAL_TEMP=/cygdrive/c/Users/arris69/AppData/Local/Temp
ORIGINAL_TMP=/cygdrive/c/Users/arris69/AppData/Local/Temp
OS=Windows_NT
OSTYPE=cygwin
PATH='/usr/local/bin:/usr/bin:/cygdrive/e/Program Files/PHP:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files/Windows Live/Shared:/cygdrive/c/Program Files/Microsoft Network Monitor 3:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/Program Files/Nmap:/cygdrive/c/SELP/arm-linux/bin'
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
PHPRC='E:\Program Files\PHP\'
PIPESTATUS=([0]="1")
PPID=2832
PRINTER='Canon MP510 Printer'
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER='x86 Family 6 Model 15 Stepping 13, GenuineIntel'
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0d
PROGRAMFILES='C:\Program Files'
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
PS2='> '
PS4='+ '
PSModulePath='C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'
PUBLIC='C:\Users\Public'
PWD=/cygdrive/c/SELP/VDLinux_2.6.35.11/linux-2.6.35.11
ProgramData='C:\ProgramData'
SESSIONNAME=Console
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
SYSTEMDRIVE=C:
SYSTEMROOT='C:\Windows'
TEMP=/tmp
TERM=xterm
TMP=/tmp
TZ=Europe/Vienna
UID=1000
USER=arris69
USERDOMAIN=a2920
USERNAME=arris69
USERPROFILE='C:\Users\arris69'
VS100COMNTOOLS='C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\'
WINDIR='C:\Windows'
_=reset
_NT_SYMBOL_PATH='symsrv*symsrv.dll*e:\dev\symbols*http://msdl.microsoft.com/download/symbols'
..... lot git and cvs shit removed
get_modules ()
{
if [ -n "$prefix" ]; then
COMPREPLY=($( command ls -d ${cvsroot}/${prefix}/!(CVSROOT) ));
else
COMPREPLY=($( command ls -d ${cvsroot}/!(CVSROOT) ));
fi
}
profile_d ()
{
for file in $(export LC_COLLATE=C; echo /etc/profile.d/*.$1);
do
[ -e "${file}" ] && . "${file}";
done;
unset file
}
quote ()
{
echo \'${1//\'/\'\\\'\'}\'
}
quote_readline ()
{
local quoted;
_quote_readline_by_ref "$1" ret;
printf %s "$ret"
}
set_prefix ()
{
[ -z ${prefix:-} ] || prefix=${cur%/*}/;
[ -r ${prefix:-}CVS/Entries ] || prefix=""
}
2. "export"
SpoilerShow
declare -x !::
declare -x ALLUSERSPROFILE="C:\\ProgramData"
declare -x APPDATA="C:\\Users\\arris69\\AppData\\Roaming"
declare -x COMMONPROGRAMFILES="C:\\Program Files\\Common Files"
declare -x COMPUTERNAME="A2920"
declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
declare -x CROSS_COMPILE="arm-v7a8v2r2-linux-gnueabi-"
declare -x FP_NO_HOST_CHECK="NO"
declare -x HOME="/home/arris69"
declare -x HOMEDRIVE="C:"
declare -x HOMEPATH="\\Users\\arris69"
declare -x HOSTNAME="a2920"
declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info:"
declare -x LANG="de_DE.UTF-8"
declare -x LOCALAPPDATA="C:\\Users\\arris69\\AppData\\Local"
declare -x LOGONSERVER="\\\\A2920"
declare -x MANPATH="/usr/local/man:/usr/share/man:/usr/man:"
declare -x NUMBER_OF_PROCESSORS="2"
declare -x OLDPWD="/cygdrive/c/SELP/VDLinux_2.6.35.11"
declare -x OS="Windows_NT"
declare -x PATH="/usr/local/bin:/usr/bin:/cygdrive/e/Program Files/PHP:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files/Windows Live/Shared:/cygdrive/c/Program Files/Microsoft Network Monitor 3:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/Program Files/Nmap:/cygdrive/c/SELP/arm-linux/bin"
declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
declare -x PHPRC="E:\\Program Files\\PHP\\"
declare -x PRINTER="Canon MP510 Printer"
declare -x PROCESSOR_ARCHITECTURE="x86"
declare -x PROCESSOR_IDENTIFIER="x86 Family 6 Model 15 Stepping 13, GenuineIntel"
declare -x PROCESSOR_LEVEL="6"
declare -x PROCESSOR_REVISION="0f0d"
declare -x PROGRAMFILES="C:\\Program Files"
declare -x PS1="\\[\\e]0;\\w\\a\\]\\n\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\w\\[\\e[0m\\]\\n\\\$ "
declare -x PSModulePath="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\"
declare -x PUBLIC="C:\\Users\\Public"
declare -x PWD="/cygdrive/c/SELP/VDLinux_2.6.35.11/linux-2.6.35.11"
declare -x ProgramData="C:\\ProgramData"
declare -x SESSIONNAME="Console"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SYSTEMDRIVE="C:"
declare -x SYSTEMROOT="C:\\Windows"
declare -x TEMP="/tmp"
declare -x TERM="xterm"
declare -x TMP="/tmp"
declare -x TZ="Europe/Vienna"
declare -x USER="arris69"
declare -x USERDOMAIN="a2920"
declare -x USERNAME="arris69"
declare -x USERPROFILE="C:\\Users\\arris69"
declare -x VS100COMNTOOLS="C:\\Program Files\\Microsoft Visual Studio 10.0\\Common7\\Tools\\"
declare -x WINDIR="C:\\Windows"
declare -x _NT_SYMBOL_PATH="symsrv*symsrv.dll*e:\\dev\\symbols*http://msdl.microsoft.com/download/symbols"
declare -x temp="C:\\Users\\arris69\\AppData\\Local\\Temp"
declare -x tmp="C:\\Users\\arris69\\AppData\\Local\\Temp"
3. "shopt"
SpoilerShow
autocd off
cdable_vars off
cdspell off
checkhash off
checkjobs off
checkwinsize off
cmdhist on
compat31 off
compat32 off
compat40 off
completion_strip_exe off
dirspell off
dotglob off
execfail off
expand_aliases on
extdebug off
extglob on
extquote on
failglob off
force_fignore on
globstar off
gnu_errfmt off
histappend off
histreedit off
histverify off
hostcomplete off
huponexit off
interactive_comments on
lithist off
login_shell on
mailwarn off
no_empty_cmd_completion off
nocaseglob off
nocasematch off
nullglob off
progcomp on
promptvars on
restricted_shell off
shift_verbose off
sourcepath on
xpg_echo off
but why simple env not enought?

Code: Select all

env
SpoilerShow
HOMEPATH=\Users\arris69
MANPATH=/usr/local/man:/usr/share/man:/usr/man:
APPDATA=C:\Users\arris69\AppData\Roaming
HOSTNAME=a2920
SHELL=/bin/bash
TERM=xterm
_NT_SYMBOL_PATH=symsrv*symsrv.dll*e:\dev\symbols*http://msdl.microsoft.com/download/symbols
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 13, GenuineIntel
WINDIR=C:\Windows
PUBLIC=C:\Users\Public
OLDPWD=/cygdrive/c/SELP/VDLinux_2.6.35.11
USERDOMAIN=a2920
PHPRC=E:\Program Files\PHP\
OS=Windows_NT
ALLUSERSPROFILE=C:\ProgramData
USER=arris69
!::=::\
TEMP=/tmp
temp=C:\Users\arris69\AppData\Local\Temp
COMMONPROGRAMFILES=C:\Program Files\Common Files
tmp=C:\Users\arris69\AppData\Local\Temp
USERNAME=arris69
PROCESSOR_LEVEL=6
PATH=/usr/local/bin:/usr/bin:/cygdrive/e/Program Files/PHP:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files/Windows Live/Shared:/cygdrive/c/Program Files/Microsoft Network Monitor 3:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/Program Files/Nmap:/cygdrive/c/SELP/arm-linux/bin
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
FP_NO_HOST_CHECK=NO
PWD=/cygdrive/c/SELP/VDLinux_2.6.35.11/linux-2.6.35.11
SYSTEMDRIVE=C:
LANG=de_DE.UTF-8
USERPROFILE=C:\Users\arris69
TZ=Europe/Vienna
PS1=\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$
LOGONSERVER=\\A2920
PROCESSOR_ARCHITECTURE=x86
LOCALAPPDATA=C:\Users\arris69\AppData\Local
ProgramData=C:\ProgramData
SHLVL=1
HOME=/home/arris69
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
HOMEDRIVE=C:
COMSPEC=C:\Windows\system32\cmd.exe
TMP=/tmp
SYSTEMROOT=C:\Windows
PRINTER=Canon MP510 Printer
PROCESSOR_REVISION=0f0d
VS100COMNTOOLS=C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:
PROGRAMFILES=C:\Program Files
CROSS_COMPILE=arm-v7a8v2r2-linux-gnueabi-
NUMBER_OF_PROCESSORS=2
SESSIONNAME=Console
COMPUTERNAME=A2920
_=/usr/bin/env
file operations on this machine are really slow so i not start the whole stuff again with cleaned directories for mstar.

if you really wanna to use codesourcery toolchain, maybe it will help if you extract it into the same directory what they used as prefix for it.
(arm<whatever>-gcc -v)

hth
arris

EDIT:
ps: also build of rfs seems more or less ok with the mstar sources:

Code: Select all

 make M=fs/rfs modules
SpoilerShow
WARNING: Symbol version dump /cygdrive/c/SELP/VDLinux_2.6.35.11/linux-2.6.35.11/Module.symvers
is missing; modules will have no dependencies and modversions.

Building modules, stage 2.
MODPOST 2 modules
CC fs/rfs/rfs_fat.mod.o
LD [M] fs/rfs/rfs_fat.ko
arm-v7a8v2r2-linux-gnueabi-ld: warning: fs/rfs/rfs_fat.mod.o uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
CC fs/rfs/rfs_glue.mod.o
LD [M] fs/rfs/rfs_glue.ko
arm-v7a8v2r2-linux-gnueabi-ld: warning: fs/rfs/rfs_glue.mod.o uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
User avatar
nobody
Posts: 182
Joined: Sat Nov 12, 2011 1:45 am

Re: [HELP] ARM Cross Compilation Toolchain

Post by nobody »

I'm also a windows user but I think that the best way to cross compile is to use a VirtualBox virtual machine with samsung toolchain.
Cygwin has a lot of problems with many sources because of CR/LF or paths.
Also, a small virtual machine would be great so we could all have a common platform, same paths, same evrything.
We should make a SamyGO VMDK :)
oga83
Posts: 268
Joined: Sun Mar 18, 2012 10:11 pm
Location: France

Re: [HELP] ARM Cross Compilation Toolchain

Post by oga83 »

I installed the toolchain under mandriva that runs in a vmware virtual machine
it works like a charm :)
E3V3A
Posts: 247
Joined: Wed Oct 31, 2012 2:31 am
Location: /dev/zero

Re: [HELP] ARM Cross Compilation Toolchain

Post by E3V3A »

nobody wrote:I'm also a windows user but I think that the best way to cross compile is to use a VirtualBox virtual machine with samsung toolchain.
Cygwin has a lot of problems with many sources because of CR/LF or paths. Also, a small virtual machine would be great so we could all have a common platform, same paths, same everything. We should make a SamyGO VMDK :)
Roger that!

I've been such a wood head trying to get this to work on Cygwin, but now I am fed up. Problem is not necessarily Cygwin, but rather the Code Sourcery toolchains compiled for Windows, who insists in using windows paths... even if you have CYGPATH defined! Apparently there are some success around for Linux compile under Cygwin, but when you have to change/patch the ./scripts programs to be able to run "make blahblah", it get really boring!

What I originally wanted to do, was to create a "package" ready for anyone to just uncompress and run to be able to get into Kernel building/hacking for our TVs. Essentially I was thinking:

1) Collect and make a VDLinux "headers" package, that could be used with any toolchain.
2) A patched "UExxES6xxx.zip" that only contain the TV relevant sources.
3) A "SamyGo toolchain" that is up-to-date regarding all binary utilities and compilers etc. That works out of the box.

I was hoping that Cygwin would have been the way to go, since it would have allowed people with minimal Linux exposure to quickly get into the kernel compiling scene, while updating and maintenance of binutils etc is would be very easy. This seem like a no-go at the moment! As you say, a much better choice, would be that we decide on a common ground like Ubuntu to do this. So for this part I would suggest this:

a) Make and pre-configure a VirtualBox VM image, that contains:
b) a minimally configured, but working version of Ubunty
c) that can be downloaded and run to immediately launch you into a developer environment already configured for a small set of TVs. (E.g. ES6/8 etc)

I also noticed that the VDLinux-toolchain is based on the older CodeSourcery toolchains. This is the primary reason why I tried to stick with this. I was hoping I could just have used the "old" toolchain files/libraries, with the new version of the CodeBench Lite. I have not tried this yet, as I have no idea what I'm doing at the moment. (Is this even possible?)
HW: UE40ES5700SXXH
FW: T-MST10PDEUC-1029.0 Onboot: 1003
E3V3A
Posts: 247
Joined: Wed Oct 31, 2012 2:31 am
Location: /dev/zero

Re: [HELP] ARM Cross Compilation Toolchain

Post by E3V3A »

Ok, re-compiled binutils under Cygwin, and ta-daa, now shit start working. It seem that CodeSourcery TC has some messed up ld-configuration...

So I was happy for about 10 min, then I got this error:

Code: Select all

$ make
Makefile:625: "WARNING: Appending $KCFLAGS (-mno-unaligned-access -mthumb -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon -mabi=aapcs-linux -ftree-vectorize -fno-pic -Wa,-mimplicit-it=thumb) from environment to kernel $CFLAGS"
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      arch/arm/kernel/setup.o
C:\cygwin\tmp\ccAypHQR.s: Assembler messages:
C:\cygwin\tmp\ccAypHQR.s:1401: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#210'
C:\cygwin\tmp\ccAypHQR.s:1404: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#215'
C:\cygwin\tmp\ccAypHQR.s:1407: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#219'
C:\cygwin\tmp\ccAypHQR.s:1410: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#211'
scripts/Makefile.build:232: recipe for target `arch/arm/kernel/setup.o' failed
make[1]: *** [arch/arm/kernel/setup.o] Error 1
Makefile:922: recipe for target `arch/arm/kernel' failed
make: *** [arch/arm/kernel] Error 2
Any insights?
HW: UE40ES5700SXXH
FW: T-MST10PDEUC-1029.0 Onboot: 1003
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: [HELP] ARM Cross Compilation Toolchain

Post by arris69 »

E3V3A wrote:Ok, re-compiled binutils under Cygwin, and ta-daa, now shit start working. It seem that CodeSourcery TC has some messed up ld-configuration...
yes, thought this was clear.
So I was happy for about 10 min, then I got this error:

Code: Select all

$ make
Makefile:625: "WARNING: Appending $KCFLAGS (-mno-unaligned-access -mthumb -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon -mabi=aapcs-linux -ftree-vectorize -fno-pic -Wa,-mimplicit-it=thumb) from environment to kernel $CFLAGS"
....
C:\cygwin\tmp\ccAypHQR.s: Assembler messages:
C:\cygwin\tmp\ccAypHQR.s:1401: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#210'
C:\cygwin\tmp\ccAypHQR.s:1404: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#215'
C:\cygwin\tmp\ccAypHQR.s:1407: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#219'
C:\cygwin\tmp\ccAypHQR.s:1410: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#211'
scripts/Makefile.build:232: recipe for target `arch/arm/kernel/setup.o' failed
make[1]: *** [arch/arm/kernel/setup.o] Error 1
Makefile:922: recipe for target `arch/arm/kernel' failed
make: *** [arch/arm/kernel] Error 2
Any insights?
don't try to "dead optimize" your binaries, don't pass custom tuning flags to compiler on kernel build, the kernel build system knows exactly what the cpu can.
i also suggest to build the binutils from samsung sources it's maybe also patched for the samsung armv7 cpu...

hth
arris
E3V3A
Posts: 247
Joined: Wed Oct 31, 2012 2:31 am
Location: /dev/zero

Re: [HELP] ARM Cross Compilation Toolchain

Post by E3V3A »

arris69 wrote: don't try to "dead optimize" your binaries, don't pass custom tuning flags to compiler on kernel build, the kernel build system knows exactly what the cpu can.
i also suggest to build the binutils from samsung sources it's maybe also patched for the samsung armv7 cpu...
Yeah, thanks, I realized this was a very bad idea. But since I'm insisiting getting this to compile under with CodeSourcery Bench, I had to try to match what was set in the Samsung VDL toolchain. Doing this really helped, but things are still borked. Now I get "inline" problems during compilation, instead. And I'm clueless as to how to fix this. It seem to be due to lazy hacks by Sammy engineers, as inlining is generally considered bad programming.
SpoilerShow

Code: Select all

dos2unix: converting file arch/arm/mm/.context.o.d to Unix format ...
  AS      arch/arm/mm/tlb-v7.o
dos2unix: converting file arch/arm/mm/.tlb-v7.o.d to Unix format ...
  AS      arch/arm/mm/proc-v7.o
dos2unix: converting file arch/arm/mm/.proc-v7.o.d to Unix format ...
  CC      arch/arm/mm/cache-l2x0.o
In file included from arch/arm/mm/cache-l2x0.c:27:0:
arch/arm/mm/cache-l2x0.c: In function 'l2x0_cache_sync':
arch/arm/arm-boards/amber3/chip_setup.h:16:20: error: inlining failed in call to always_inline '_chip_flush_miu_pipe': function body not available
arch/arm/mm/cache-l2x0.c:124:22: error: called from here
In file included from arch/arm/mm/cache-l2x0.c:27:0:
arch/arm/mm/cache-l2x0.c: In function 'l2x0_clean_all':
arch/arm/arm-boards/amber3/chip_setup.h:16:20: error: inlining failed in call to always_inline '_chip_flush_miu_pipe': function body not available
arch/arm/mm/cache-l2x0.c:154:22: error: called from here
In file included from arch/arm/mm/cache-l2x0.c:27:0:
arch/arm/mm/cache-l2x0.c: In function 'l2x0_clean_range':
arch/arm/arm-boards/amber3/chip_setup.h:16:20: error: inlining failed in call to always_inline '_chip_flush_miu_pipe': function body not available
arch/arm/mm/cache-l2x0.c:240:22: error: called from here
In file included from arch/arm/mm/cache-l2x0.c:27:0:
arch/arm/mm/cache-l2x0.c: In function 'l2x0_flush_all':
arch/arm/arm-boards/amber3/chip_setup.h:16:20: error: inlining failed in call to always_inline '_chip_flush_miu_pipe': function body not available
arch/arm/mm/cache-l2x0.c:139:22: error: called from here
In file included from arch/arm/mm/cache-l2x0.c:27:0:
arch/arm/mm/cache-l2x0.c: In function 'l2x0_flush_range':
arch/arm/arm-boards/amber3/chip_setup.h:16:20: error: inlining failed in call to always_inline '_chip_flush_miu_pipe': function body not available
arch/arm/mm/cache-l2x0.c:275:22: error: called from here
scripts/Makefile.build:232: recipe for target `arch/arm/mm/cache-l2x0.o' failed
make[1]: *** [arch/arm/mm/cache-l2x0.o] Error 1
Makefile:926: recipe for target `arch/arm/mm' failed
make: *** [arch/arm/mm] Error 2
As you can see this occurs in ./arch/arm/mm/cache-l2x0.c after loading the ./arch/arm/arm-boards/amber3/chip_setup.h file...
But now I'm thinking it's a compile thing. The "late" 4.7.2 is just to smart compared to the original 4.4.1...

Any ideas how we can separate out the "relevant Samsung specific" source code from the rest of the kernel tree? (So that we can make our own tool chain?)
I'd like to make a ES-series specific toolchain we can use to compile a newer kernel... Has anyone ever done that?
HW: UE40ES5700SXXH
FW: T-MST10PDEUC-1029.0 Onboot: 1003
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: [HELP] ARM Cross Compilation Toolchain

Post by arris69 »

E3V3A wrote:...
Any ideas how we can separate out the "relevant Samsung specific" source code from the rest of the kernel tree? (So that we can make our own tool chain?)
I'd like to make a ES-series specific toolchain we can use to compile a newer kernel... Has anyone ever done that?
think aquadran extracted the samsung patches from b-series kernel (see in openembedded svn trunk), dunno how long he played around to get the stuff...
in theprie you can download original kernel sources and make a diff....

but more recent kernel is not really useful as long samsung not release the driver sources...

Post Reply

Return to “[E] Firmware”