Setup for own development

This is general talk area for things that NOT RELATED WITH TV! Instead, about internal works like web site, forum, wiki, or talking, etc...
Post Reply

hogi
SamyGO Project Donor
Posts: 8
Joined: Wed May 01, 2013 6:22 pm

Setup for own development

Post by hogi »

Hello SamyGo developers,

I've been browsing the SamyGo forum for quite some time now and I'm excited about all these interesting apps that have been released in the last couple of months.
Now I want to start developing on my own, but I don't really know how to begin, since the wiki seems to be outdated and I can't find anything on the forum itself. That's where I hope you can provide some help to me and possibly other peoples who are interessted. :)

First of all, I guess I would need to have a running toolchain. What is necessary to compile the source files into .so files that i can load with samyGOso?
Is there a list of necessary tools/libraries I would have to install on a new Linux pc? From my understanding this would be independent of the actual TV model (E/F/H) and its processor, right?
My first goal would be to use the provided source files within some released applications and to successfully compile them myself.

Second question is about the "function calls", like

Code: Select all

const int (*SdDisplay_CaptureScreenE)(int *CDSize, unsigned char *buffer, int *CaptureInfo); 
...
(const void*)"_Z23SdDisplay_CaptureScreenP8SdSize_tPhP23SdDisplay_CaptureInfo_t"
Where can I find some information, on what functions are available and how to properly call them? Also, is there a system behind the "weird" naming?

Thanks alot in advance!
Best regards,
hogi
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

Re: Setup for own development

Post by bobiturboto »

For f toolchain, search in docker hub for samygo. I have created that image for oscam compilation but can be used for any other.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Setup for own development

Post by sectroyer »

hogi wrote: What is necessary to compile the source files into .so files that i can load with samyGOso?
ARM Compiler is enough :) You can download some specific toolchain from samygo: Toolchains
hogi wrote: Where can I find some information, on what functions are available and how to properly call them? Also, is there a system behind the "weird" naming?
Well basically read sources if it's NOT in sources you have to reverse it yourself using IDA or any other tool :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
hogi
SamyGO Project Donor
Posts: 8
Joined: Wed May 01, 2013 6:22 pm

Re: Setup for own development

Post by hogi »

thank you both!
I will try my best with these answers :)
Though I have two more questions right away.


1. Which of these toolchains should I use? What's the difference and does it matter which one I choose for creating .so files?
sectroyer wrote:You can download some specific toolchain from samygo: Toolchains
2. Many of the apps provided in this forum use the same template for the makefile.
Like the one included in libAlert (download/file.php?id=5802).
The first 2 lines refer to some config files which are not included. What's in them and how can I get them too?

Code: Select all

-include ../toolchain.conf
-include ../install.conf
Thanks for any input! :D
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Setup for own development

Post by zoelechat »

hogi wrote:1. Which of these toolchains should I use? What's the difference and does it matter which one I choose for creating .so
I personnally use none of them, but one more generic arm from Sourcery CodeBench: arm-none-linux-gnueabi which has the advantage to work from B to H series. Otherwise, in SamyGO stuff I'd say arm-v7a8v3r1-linux-gnueabi is amongst the "right" ones for (at least) E/F/H...
hogi wrote:

Code: Select all

-include ../toolchain.conf
-include ../install.conf
These lines are remnants of sectroyer's environment and might be useful in case you use several toolchains (mips etc..). You can ignore them like I do because I don't have these files :)
Just put your toolchain/bin in path, export CC=toolchain-gcc, make, done.

Btw, about reversing, look for IDA with decompiler, it helps ;)
I do NOT receive any PM. Please use forum.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Setup for own development

Post by sectroyer »

hogi wrote: 2. Many of the apps provided in this forum use the same template for the makefile.
Like the one included in libAlert (download/file.php?id=5802).
The first 2 lines refer to some config files which are not included. What's in them and how can I get them too?

Code: Select all

-include ../toolchain.conf
-include ../install.conf
As zoelechat already said they are NOT required. I don't use install.conf at all and toolchain.conf I use for cross compilation and/or for flags specific for my board for example:

Code: Select all

CFLAGS+=-D_GNU_SOURCE -U_FORTIFY_SOURCE
:)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
hogi
SamyGO Project Donor
Posts: 8
Joined: Wed May 01, 2013 6:22 pm

Re: Setup for own development

Post by hogi »

Thanks again! :)
I have a working setup now. I'm using arm-none-linux-gnueabi on a virtual Ubuntu PC.
I tested my setup with the source code of several of the release apps and everythings works fine.

Now the hard part (reverse engineering) begins ;)

Post Reply

Return to “General”