Page 1 of 2

Cross Compiler for MOI

PostPosted: Wed Apr 10, 2013 11:33 pm
by Angel
Hello,

I need your help.

I'm going to use a cross compiler in order to build OSCAM for MOI.
The question is, Which cross compiler should I use ?

I made a lot of research for Buildroot Platform and Samsung ARMv7 cpu but I couldn't find anything.
Is there any compatible compiler ?

Is anyone able to give us a tip so that we can start searching ?

Thank you.

Re: Cross Compiler for MOI

PostPosted: Thu Apr 11, 2013 2:03 am
by updatelee
Build root should include everything you need. I haven't tested on the moi but I've used Dreambox build root env before to cross compile applications

UDL

Re: Cross Compiler for MOI

PostPosted: Thu Apr 11, 2013 8:18 am
by gfi
updatelee Wrote:Build root should include everything you need. I haven't tested on the moi but I've used Dreambox build root env before to cross compile applications

UDL


That isn't so true. Missing config for Buildroot, device list handling (hw) etc...
Thats work 's step by steb with looking to kernel configuration.
Dreambox developers team (e.g. OpenPli), duckbox sh4 have a complete package with all informations.

But I have a first image compiled as good. Cross isn't problem, now for nothing.

About oscam:
Disable debug output before compiling Buildroot on ttyS0. But it's a 3,3V TTL, I'm not sure.
For USB, enable USB utils, support usb-serial

Re: Cross Compiler for MOI

PostPosted: Tue Apr 16, 2013 8:24 pm
by biv21

Re: Cross Compiler for MOI

PostPosted: Tue Apr 16, 2013 9:12 pm
by gfi


Already done:
viewtopic.php?f=98&t=8451

As best way for all, use buildroot, with optimisations for s5pv210.
I tried some external cross-tools (for example newest git of tvheadend), Buildroot provide the best results and lowest cpu usage (not only on TVheadend.
After some days I've a new rootfs with Busybox 1.21.1.

Re: Cross Compiler for MOI

PostPosted: Thu Apr 18, 2013 6:32 am
by linuxstb
Hi gfi,

Would you be willing to share your buildroot config? I've successfully used it to build a newer tvheadend, but would like to be able to build the complete filesystem.

I've been playing with building my own kernel, and that's working quite well now - I've added the driver for my DVB-T stick (a dual-tuner dib0700 device) and that's working fine. The main issue was that it has a loadable firmware file, and the /lib/firmware directory wasn't being mounted on boot. The solution was to embed it into the kernel binary - you need to copy the .fw file into the firmware/ directory in the kernel sources, and then add its name to the list of firmware files to embed.

Also, I can't recall what was in the kernel being provided by TBS, but the .config included in tbs-moi-linux-kernel-sources has NFS enabled. I have managed to get this working with the following options:

mount -o nolock,clientaddr=192.168.1.188 192.168.1.10:/abc /abc

i.e. you need to disable locking and explicity specify which interface on the MOI the NFS client binds to.

Re: Cross Compiler for MOI

PostPosted: Thu Apr 18, 2013 12:12 pm
by gfi
linuxstb Wrote:Hi gfi,

Would you be willing to share your buildroot config? I've successfully used it to build a newer tvheadend, but would like to be able to build the complete filesystem.

I've been playing with building my own kernel, and that's working quite well now - I've added the driver for my DVB-T stick (a dual-tuner dib0700 device) and that's working fine. The main issue was that it has a loadable firmware file, and the /lib/firmware directory wasn't being mounted on boot. The solution was to embed it into the kernel binary - you need to copy the .fw file into the firmware/ directory in the kernel sources, and then add its name to the list of firmware files to embed.

Also, I can't recall what was in the kernel being provided by TBS, but the .config included in tbs-moi-linux-kernel-sources has NFS enabled. I have managed to get this working with the following options:

mount -o nolock,clientaddr=192.168.1.188 192.168.1.10:/abc /abc

i.e. you need to disable locking and explicity specify which interface on the MOI the NFS client binds to.


.config - meanwhile not, I'm still doing some changes. But it's not your problem, I think.
What target image (fs) have you defined?
BTW: I'm still going with clear tarball for training, with hardly method - mtd3 (flash_unlock, erase, mount tmpfs, lock... I don't want write about this unsafe ways).

About dvb usb stick. I have also kernel (only upgraded TBS) with af9015 chip.
I just created firmware directory in target/lib, cp <fw files> and simply make.
Nothing else. But for example in tvheadend frontend don't going "down", close handle don't working too, when device is in "idle" state.
I haven't any problem with mount, I'm not sure, what you mean with "wasn't mounted on boot".
Try: create diectory in original rootfs, copy fw file and reboot.

NFS I didn't checked, so I can't help you. But I know what you mean.

You have another kernel, as you wrote. How You managed drivers from TBS (are precompiled)? Step by step from TBS's kernel (with path of patches, etc), or with linux drivers (also precompiled) for TBS QUAD PCIe (some tuner)?

Re: Cross Compiler for MOI

PostPosted: Fri Apr 19, 2013 2:52 pm
by linuxstb
gfi Wrote:I haven't any problem with mount, I'm not sure, what you mean with "wasn't mounted on boot".
Try: create diectory in original rootfs, copy fw file and reboot.


The problem I had was that if my DVB-T stick was inserted in the MOI when the MOI booted, then the firmware file was not found. If I inserted it into my MOI after it booted, then it worked fine. So I assume that the root filesystem isn't mounted at the time the DVB-T driver is initialised.

As I mentioned, the solution was to tell the kernel to embed my DVB-T stick's firmware file in the zImage - the kernel's firmware loading mechanism supports this method, so it's not hard.

gfi Wrote:You have another kernel, as you wrote. How You managed drivers from TBS (are precompiled)? Step by step from TBS's kernel (with path of patches, etc), or with linux drivers (also precompiled) for TBS QUAD PCIe (some tuner)?


I have just been using TBS's kernel with the pre-compiled drivers for the built-in DVB-S2 tuners.

Re: Cross Compiler for MOI

PostPosted: Sat Apr 20, 2013 2:47 am
by TUISTERa
Is there any chance for us to get some user friendly cross compiler? I need it to compile latest dvblast, mine is 2.0 with broken mmi menus and can't get the ci to work . Gfi can you help about that ?

Re: Cross Compiler for MOI

PostPosted: Sat Apr 20, 2013 11:53 am
by gfi
TUISTERa Wrote:Is there any chance for us to get some user friendly cross compiler? I need it to compile latest dvblast, mine is 2.0 with broken mmi menus and can't get the ci to work . Gfi can you help about that ?


Hi,

buildroot is best for compilation for MOI. I tried all other cross tools...

You have already in MOI dvblast version 2.2 with dvblast_mmi.sh.

PATH: /usr/local/bin
files: dvblast22 (!)
dvblast_mmi.sh

# dvblast22 -V
DVBlast 2.2 (release)

----------------
But, If You want compile yours (upgraded), don't forget to libiconv path. In Makefile of dvblast missing path of libiconv for LD.
So, in line with
LDLIBS += lrt
add -liconv

+ of course add in CFLAGS props for s5pv210 cpu. Note: neon is disabled, so without neon...
+ includes (-I,-L), if you need or if your cross-compiler need that.