Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[QoolBox VMDK] My Personal SDK with Fajo ToolChain
#1
Bring you today my personnal VM, i use to make my module :

http://www.positiv-it.fr/thecus/download...oolbox.rar

user : root
pass : root

required Tools :

VMPlayer or VMWorkstation 9
Putty
WinSCP

Based on Fedora 16 x64

Toolchains :

Fajo :

Cross tools i686 v2.x (R5) (pre patched) (for x86 cross compilation)
Cross tools x86_64 v1.x/v2.x (pre patched) (for x64 cross compilation)


toolchain are located in
Code:
/data/Development/Home/Thecus/Toolchains/x-tools

${HOST} is preconfigured in /root/.bash_profile

modify it, if you want cross compile for x86 or x64

Code:
HOST=i686-thecus32v5-linux-gnu
export HOST

TOOLCHAIN_PATH=/data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu
export TOOLCHAIN_PATH

#ROOTFS_PATH=/usr/local/ToolChain/rootfs
#export ROOTFS_PATH

OPT_PATH=/opt
export OPT_PATH

#OPTEXTERN_PATH=${ROOTFS_PATH}/opt_extern
#export OPTEXTERN_PATH

PATH=$PATH:$HOME/bin:${TOOLCHAIN_PATH}/bin:${TOOLCHAIN_PATH}/i686-thecus32v5-linux-gnu/bin
export PATH


# Preconfigured for x64 cross compilation, for 32 bit replace x86_64-thecus64v1-linux-gnu reference by i686-thecus32v5-linux-gnu

# x64 toolchain : /data/Development/Home/Thecus/Toolchains/x-tools/x86_64-thecus64v1-linux-gnu
# x86 toolchain : /data/Development/Home/Thecus/Toolchains/x-tools/i686-thecus32v5-linux-gnu

Now you can compile your own application with
Code:
./configure --prefix=/raid/data/module/$name_of_module --host=${HOST}

some example will follow
Stéphane Guérithault

In a world without walls and fences, who needs Windows and Gates

PayPal Donation: https://www.paypal.me/qoolbox

My apps

##########################################################################

rolling now for competitor, i do not support anymore Thecus apllications due to lack of time

##########################################################################


voyance - Sophrologue Hypnothérapeute Essonne 
Reply
#2
Nice thanks for that!

I'll grab it when I get home .. can't do it from work as EMC classes you as unsafe!! ... silly security overkill I'm sure :-)
N4200Pro with 4 * 2TB WD20EARS drives, upgraded to 4GB RAM.
Reply
#3
Coolio!

Any update about the docs?
Reply
#4
By the way, username and password don't match
Reply
#5
username : root
pass : root

i use it everyday Wink
Stéphane Guérithault

In a world without walls and fences, who needs Windows and Gates

PayPal Donation: https://www.paypal.me/qoolbox

My apps

##########################################################################

rolling now for competitor, i do not support anymore Thecus apllications due to lack of time

##########################################################################


voyance - Sophrologue Hypnothérapeute Essonne 
Reply
#6
It comes up in X with username and password.
Administrator and passwd root works, then suing to root with passwd root works
Reply
#7
thank you so much

I worked a lot on the official 64bit sdk under fedora 12, but for recompiling ffmpeg-libs for mediatomb I got so much issues...
fc16 is the lowest level for having support on compiling these days, I got so much hope in this sdk Smile
scavenger
N5550 V2.05.08.20150416.cdv + 4G patch
2*4GB Corsair CMSO8GX3M2A1333C9 = 8GB RAM
5 x 2To Hitashi HDS72202 (RAID5) @ write=72MB/s - read=91MB/s (802.3ad dual cable)
Reply
#8
thank you so much

I worked a lot on the official 64bit sdk under fedora 12, but for recompiling ffmpeg-libs for mediatomb I got so much issues...
fc16 is the lowest level for having support on compiling these days, I got so much hope in this sdk Smile
scavenger
N5550 V2.05.08.20150416.cdv + 4G patch
2*4GB Corsair CMSO8GX3M2A1333C9 = 8GB RAM
5 x 2To Hitashi HDS72202 (RAID5) @ write=72MB/s - read=91MB/s (802.3ad dual cable)
Reply
#9
ok it seems to work well... However I didn't test the resulting binaries on the Thecus yet.

here are some customization of the .profile or .bash_profile for those who like to automate a lot and the refinement of a dedicated prompt showing exactly the mode they are working on :

Code:
(...)

pathmunge() {
if [ -d $1 ]; then
        /usr/bin/realpath / >/dev/null 2>&1 && path=$(/usr/bin/realpath $1) || path=$1
        [[ -z $PATH ]] && export PATH=$path
        echo $PATH | /bin/egrep -s "(^|:)$path($|:)" >/dev/null || {
        [[ "$2" == 'after' ]] && export PATH=$PATH:$path || export PATH=$path:$PATH
        }
fi
}
removePath() {
        [[ -z $PATH ]] && return || _PATH=$(echo $PATH | tr ':' ' ')
        unset PATH
        for _path in $_PATH
        do
                echo $_path | /bin/grep -w $1 >/dev/null || pathmunge $_path after
        done
}

N=$(printf '\033[1;30m')
n=$(printf '\033[0;30m')
R=$(printf '\033[1;31m')
r=$(printf '\033[0;31m')
G=$(printf '\033[1;32m')
g=$(printf '\033[0;32m')
Y=$(printf '\033[1;33m')
y=$(printf '\033[0;33m')
B=$(printf '\033[1;34m')
b=$(printf '\033[0;34m')
M=$(printf '\033[1;35m')
m=$(printf '\033[0;35m')
C=$(printf '\033[1;36m')
c=$(printf '\033[0;36m')
W=$(printf '\033[1;37m')
w=$(printf '\033[0;37m')
END=$(printf '\033[0m')

export OPT_PATH=/opt
export HOST64=x86_64-thecus64v1-linux-gnu
export HOST32=i686-thecus32v5-linux-gnu
export HOST=$HOST64

switcher()
{
(($# != 1)) && return 99

export CROSS=$1
# remove the current TOOLCHAIN_PATH from the PATH
export TOOLCHAIN_PATH=/data/Development/Home/Thecus/Toolchains/x-tools/$HOST
removePath $TOOLCHAIN_PATH/bin
removePath $TOOLCHAIN_PATH/$HOST/bin

case $1 in
32)     export HOST=$HOST32 ;;
64)     export HOST=$HOST64 ;;
*)      export HOST=$HOST64 ;;
esac

# add up the new choosen TOOLCHAIN_PATH to the PATH
export TOOLCHAIN_PATH=/data/Development/Home/Thecus/Toolchains/x-tools/$HOST
pathmunge ${TOOLCHAIN_PATH}/bin after
pathmunge ${TOOLCHAIN_PATH}/$HOST/bin after
}

switcher 64
export PS1='${M}${LOGNAME}${W}@${m}${HOSTNAME}:${R}($CROSS)${c}:$PWD # $END'

you will need realpath binary, you can compile it this way :

vi realpath.c
Code:
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
int i;

for (i = 1; i < argc; i++) {
char rp[PATH_MAX];

if (!realpath(argv[i], rp)) {
perror(argv[i]);
return 1;
} else {
printf("%s\n", rp);
}
}

return 0;
}

Code:
gcc -o realpath realpath.c
cp realpath /usr/bin/

then to switch to 32 or 64 bit compilation :
switcher 32|64

look at the prompt you get : you cannot be lured by the mode you are working on : root@qoolbox:(64):/share #
scavenger
N5550 V2.05.08.20150416.cdv + 4G patch
2*4GB Corsair CMSO8GX3M2A1333C9 = 8GB RAM
5 x 2To Hitashi HDS72202 (RAID5) @ write=72MB/s - read=91MB/s (802.3ad dual cable)
Reply
#10
ok it seems to work well... However I didn't test the resulting binaries on the Thecus yet.

here are some customization of the .profile or .bash_profile for those who like to automate a lot and the refinement of a dedicated prompt showing exactly the mode they are working on :

Code:
(...)

pathmunge() {
if [ -d $1 ]; then
        /usr/bin/realpath / >/dev/null 2>&1 && path=$(/usr/bin/realpath $1) || path=$1
        [[ -z $PATH ]] && export PATH=$path
        echo $PATH | /bin/egrep -s "(^|:)$path($|:)" >/dev/null || {
        [[ "$2" == 'after' ]] && export PATH=$PATH:$path || export PATH=$path:$PATH
        }
fi
}
removePath() {
        [[ -z $PATH ]] && return || _PATH=$(echo $PATH | tr ':' ' ')
        unset PATH
        for _path in $_PATH
        do
                echo $_path | /bin/grep -w $1 >/dev/null || pathmunge $_path after
        done
}

N=$(printf '\033[1;30m')
n=$(printf '\033[0;30m')
R=$(printf '\033[1;31m')
r=$(printf '\033[0;31m')
G=$(printf '\033[1;32m')
g=$(printf '\033[0;32m')
Y=$(printf '\033[1;33m')
y=$(printf '\033[0;33m')
B=$(printf '\033[1;34m')
b=$(printf '\033[0;34m')
M=$(printf '\033[1;35m')
m=$(printf '\033[0;35m')
C=$(printf '\033[1;36m')
c=$(printf '\033[0;36m')
W=$(printf '\033[1;37m')
w=$(printf '\033[0;37m')
END=$(printf '\033[0m')

export OPT_PATH=/opt
export HOST64=x86_64-thecus64v1-linux-gnu
export HOST32=i686-thecus32v5-linux-gnu
export HOST=$HOST64

switcher()
{
(($# != 1)) && return 99

export CROSS=$1
# remove the current TOOLCHAIN_PATH from the PATH
export TOOLCHAIN_PATH=/data/Development/Home/Thecus/Toolchains/x-tools/$HOST
removePath $TOOLCHAIN_PATH/bin
removePath $TOOLCHAIN_PATH/$HOST/bin

case $1 in
32)     export HOST=$HOST32 ;;
64)     export HOST=$HOST64 ;;
*)      export HOST=$HOST64 ;;
esac

# add up the new choosen TOOLCHAIN_PATH to the PATH
export TOOLCHAIN_PATH=/data/Development/Home/Thecus/Toolchains/x-tools/$HOST
pathmunge ${TOOLCHAIN_PATH}/bin after
pathmunge ${TOOLCHAIN_PATH}/$HOST/bin after
}

switcher 64
export PS1='${M}${LOGNAME}${W}@${m}${HOSTNAME}:${R}($CROSS)${c}:$PWD # $END'

you will need realpath binary, you can compile it this way :

vi realpath.c
Code:
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
int i;

for (i = 1; i < argc; i++) {
char rp[PATH_MAX];

if (!realpath(argv[i], rp)) {
perror(argv[i]);
return 1;
} else {
printf("%s\n", rp);
}
}

return 0;
}

Code:
gcc -o realpath realpath.c
cp realpath /usr/bin/

then to switch to 32 or 64 bit compilation :
switcher 32|64

look at the prompt you get : you cannot be lured by the mode you are working on : root@qoolbox:(64):/share #
scavenger
N5550 V2.05.08.20150416.cdv + 4G patch
2*4GB Corsair CMSO8GX3M2A1333C9 = 8GB RAM
5 x 2To Hitashi HDS72202 (RAID5) @ write=72MB/s - read=91MB/s (802.3ad dual cable)
Reply
#11
nice tip

Wink
Stéphane Guérithault

In a world without walls and fences, who needs Windows and Gates

PayPal Donation: https://www.paypal.me/qoolbox

My apps

##########################################################################

rolling now for competitor, i do not support anymore Thecus apllications due to lack of time

##########################################################################


voyance - Sophrologue Hypnothérapeute Essonne 
Reply
#12
nice tip

Wink
Stéphane Guérithault

In a world without walls and fences, who needs Windows and Gates

PayPal Donation: https://www.paypal.me/qoolbox

My apps

##########################################################################

rolling now for competitor, i do not support anymore Thecus apllications due to lack of time

##########################################################################


voyance - Sophrologue Hypnothérapeute Essonne 
Reply
#13
coming from you that's an honor Wink

well nice build, I use it at my new SDK now.
1) I added rpmfusion:
Code:
wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-16.noarch.rpm
rpm -Uvh rpmfusion-free-release-16.noarch.rpm
2) I edited /etc/inittab to stay in level 3 so it works fine with 256Mb RAM only.

Now well I got questions about the toolchain...

what is it ?
I configured all of the compiled binaries till now with --host=$HOST, but for mediatomb I get issues :
1) i got tu use --build=$HOST instead
2) i get issues when I use it, without I get less issues

A) should I update the toolchain one day or another ?
The biggest issue is with libmagic : I guess it's because magic.h is present inside :
Code:
/data/Development/Home/Thecus/Toolchains/x-tools/x86_64-thecus64v1-linux-gnu/x86_64-thecus64v1-linux-gnu/sysroot/usr/include/linux/magic.h
B) fajo seems to use a lot more detailed method to cross compile :
<!-- m --><a class="postlink" href="http://www.fajo.de/main/de/webfm_send/79">http://www.fajo.de/main/de/webfm_send/79</a><!-- m -->
what is it about ?

thanks for the help
scavenger
N5550 V2.05.08.20150416.cdv + 4G patch
2*4GB Corsair CMSO8GX3M2A1333C9 = 8GB RAM
5 x 2To Hitashi HDS72202 (RAID5) @ write=72MB/s - read=91MB/s (802.3ad dual cable)
Reply
#14
coming from you that's an honor Wink

well nice build, I use it at my new SDK now.
1) I added rpmfusion:
Code:
wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-16.noarch.rpm
rpm -Uvh rpmfusion-free-release-16.noarch.rpm
2) I edited /etc/inittab to stay in level 3 so it works fine with 256Mb RAM only.

Now well I got questions about the toolchain...

what is it ?
I configured all of the compiled binaries till now with --host=$HOST, but for mediatomb I get issues :
1) i got tu use --build=$HOST instead
2) i get issues when I use it, without I get less issues

A) should I update the toolchain one day or another ?
The biggest issue is with libmagic : I guess it's because magic.h is present inside :
Code:
/data/Development/Home/Thecus/Toolchains/x-tools/x86_64-thecus64v1-linux-gnu/x86_64-thecus64v1-linux-gnu/sysroot/usr/include/linux/magic.h
B) fajo seems to use a lot more detailed method to cross compile :
<!-- m --><a class="postlink" href="http://www.fajo.de/main/de/webfm_send/79">http://www.fajo.de/main/de/webfm_send/79</a><!-- m -->
what is it about ?

thanks for the help
scavenger
N5550 V2.05.08.20150416.cdv + 4G patch
2*4GB Corsair CMSO8GX3M2A1333C9 = 8GB RAM
5 x 2To Hitashi HDS72202 (RAID5) @ write=72MB/s - read=91MB/s (802.3ad dual cable)
Reply
#15
You must cross compiled dependency first and rpath link them With ldflags also set cflags cppflags cxxflags
You never have to touch toolchain directory. Mediatomb is a mess to compil. Why not use the precompiled binaries.
I already test it on thecus and it works.
Stéphane Guérithault

In a world without walls and fences, who needs Windows and Gates

PayPal Donation: https://www.paypal.me/qoolbox

My apps

##########################################################################

rolling now for competitor, i do not support anymore Thecus apllications due to lack of time

##########################################################################


voyance - Sophrologue Hypnothérapeute Essonne 
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [QoolBox VMDK] My Personal SDK with Fajo ToolChain 0 19,515 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)