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.