Toolchain guidance needed

Here for general support for D series TVs, request and problem solve area.

User avatar
prairie
SamyGO Project Donor
Posts: 303
Joined: Wed May 04, 2011 10:30 pm

Re: Toolchain guidance needed

Post by prairie »

juuso wrote: Optional you can try this:

Code: Select all

arm-v7a8-linux-gnueabi-gcc -O2 -c helloworld.c -o helloworld.o
arm-v7a8-linux-gnueabi-gcc -shared -Wl -o hello helloworld.o
ok, some progress. Above generated error:

Code: Select all

relocation R_ARM_ABS_NC against a local symbol can not be used when making a shared object: recompile with -fPIC
So after recompile with fPIC, uploaded result to TV and it doesn't segfault now but gives "illegal instruction"
PN60F8500AFXZA
T-FXPAKUC 1206.3 + SamyGO

"BrickMaster 2015"
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Toolchain guidance needed

Post by juusso »

what code you try to compile? what is your sourcefile?
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
User avatar
prairie
SamyGO Project Donor
Posts: 303
Joined: Wed May 04, 2011 10:30 pm

Re: Toolchain guidance needed

Post by prairie »

Code: Select all

#include <stdio.h>

main()
{
  printf("Hello world!\n");
}
PN60F8500AFXZA
T-FXPAKUC 1206.3 + SamyGO

"BrickMaster 2015"
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: Toolchain guidance needed

Post by arris69 »

let the compiler do the job:

Code: Select all

<fullpath>/arm-v7a8-linux-gnueabi-gcc -o hello helloworld.c
if you like to make preprocess/compile/linking manually then you have to pass all required parameters to the compiler/assambler/linker...
User avatar
prairie
SamyGO Project Donor
Posts: 303
Joined: Wed May 04, 2011 10:30 pm

Re: Toolchain guidance needed

Post by prairie »

arris69 wrote:let the compiler do the job:

Code: Select all

<fullpath>/arm-v7a8-linux-gnueabi-gcc -o hello helloworld.c
if you like to make preprocess/compile/linking manually then you have to pass all required parameters to the compiler/assambler/linker...
I tried that first. ;) Which is what led me to think it's a toolchain issue because that segfaults too.
PN60F8500AFXZA
T-FXPAKUC 1206.3 + SamyGO

"BrickMaster 2015"
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Toolchain guidance needed

Post by juusso »

Try this code:

Code: Select all

#include <stdio.h>

int main()
{
   printf("Hello World!\n");
   return 0;
}
and arris`s cmdline :)

p.s. segfaults are not because of toolchain, but because of your code.
p.p.s this ok for me:
SpoilerShow

Code: Select all

root@[TV] /mtd_rwcommon> chmod 755 ./hello
root@[TV] /mtd_rwcommon> ./hello
Hello World!

LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
User avatar
prairie
SamyGO Project Donor
Posts: 303
Joined: Wed May 04, 2011 10:30 pm

Re: Toolchain guidance needed

Post by prairie »

:evil: Problem was not toolchain or code, was stupid filezilla ftp upload of executable. When I copy over via USB stick it's fine.
PN60F8500AFXZA
T-FXPAKUC 1206.3 + SamyGO

"BrickMaster 2015"
User avatar
bugficks
Official SamyGO Developer
Posts: 1062
Joined: Tue Jun 25, 2013 3:56 pm

Re: Toolchain guidance needed

Post by bugficks »

heh, text vs. binary xfer mode?
User avatar
prairie
SamyGO Project Donor
Posts: 303
Joined: Wed May 04, 2011 10:30 pm

Re: Toolchain guidance needed

Post by prairie »

bugficks wrote:heh, text vs. binary xfer mode?
no, I use it for binary transfer all the time between home and work machines, it's something unique about TV.

So far tested on my TV:

STFU - works.
SleepTimer - crashes exeDSP (must be changed function here)
PN60F8500AFXZA
T-FXPAKUC 1206.3 + SamyGO

"BrickMaster 2015"
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Toolchain guidance needed

Post by juusso »

prairie wrote:SleepTimer - crashes exeDSP (must be changed function here)
possible. We checked only GAS* code, but GAP* needs to be checked/tested. Do you have IDA bin file of your fw?
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Post Reply

Return to “[D] Support”