Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-06-2018, 02:38 AM   #1
EtiennePasteur
Junior Member
EtiennePasteur began at the beginning.
 
EtiennePasteur's Avatar
 
Posts: 2
Karma: 10
Join Date: Mar 2018
Device: KOBO AURA H2O
Compiling C for Kobo aura H2O

Hi everyone,

I'm actually trying to figure out how to cross-compile C/C++ code for my Kobo aura H2O running on Linux 2.6.35.3.

I'm trying to compile a custom busybox to disable rtcwake sanitation (cf: https://www.mobileread.com/forums/sh...=212145&page=4)

First of all, I want to be able to run a simple helloworld program on my Kobo.
Code:
#include <unistd.h>

int main(int ac, char **av) {
  write(1, "Hello world\n", 12);
  return 0;
}
I have downloaded the gcc-linaro-arm-linux-gnueabihf toolchain on the Kobo-Reader repository and also the Kernel 2.6.35.3 (cf: https://github.com/kobolabs/Kobo-Reader)

After that I'm able to compile my helloworld without any issues by :
Code:
cd ~/gcc-linaro-arm-linux-gnueabihf-4.8-2013.04-20130417_linux/bin
./arm-linux-gnueabihf-gcc -I ~/linux-2.6.35.3/include/ -o helloworld helloworld.c
But when I'm trying to execute my helloworld on my Kobo I'm always getting a Segmentation Fault. Or when I compile it in static with the -static flag I'm getting an Illegal instruction .

I don't understand what I'm doing wrong. Can somebody give me some clues ?

Thanks.
EtiennePasteur is offline   Reply With Quote
Old 03-06-2018, 10:16 AM   #2
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,739
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
How are you executing the program? Over SSH, with fmon, in a init file, etc?
geek1011 is offline   Reply With Quote
Old 03-06-2018, 12:02 PM   #3
EtiennePasteur
Junior Member
EtiennePasteur began at the beginning.
 
EtiennePasteur's Avatar
 
Posts: 2
Karma: 10
Join Date: Mar 2018
Device: KOBO AURA H2O
I find out why ...

I sent my executable over ftp with FilleZilla who is choosing ASCII as transfer mode.

After sending it over USB or using ftp command line, it finally works

Thanks anyway !
EtiennePasteur is offline   Reply With Quote
Old 03-06-2018, 12:47 PM   #4
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,739
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by EtiennePasteur View Post
I find out why ...

I sent my executable over ftp with FilleZilla who is choosing ASCII as transfer mode.

After sending it over USB or using ftp command line, it finally works

Thanks anyway !
No problem!
geek1011 is offline   Reply With Quote
Reply

Tags
compilation, development environment, help kobo, kobo aura h2o, toolchain


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Aura H2O 2nd Edition vs old Kobo Aura H2O screen dimentions. iXPert12 Kobo Reader 1 09-18-2017 09:35 AM
Upgrade to Kobo Aura One from Kobo Aura H2O? Amiieey Kobo Reader 19 07-27-2017 06:33 PM
Kobo aura h2o display on aura hd? gezzer Kobo Developer's Corner 3 02-22-2017 10:32 AM
Buy Kobo Aura and/or Aura H2O kobayashi Flea Market 4 02-04-2015 11:03 PM
Replacing Nook Simple Touch: Onyx T68 vs Kobo Aura vs Kobo Aura H2O iNovelReader Which one should I buy? 0 10-28-2014 01:40 AM


All times are GMT -4. The time now is 11:26 PM.


MobileRead.com is a privately owned, operated and funded community.