Compile C applications with gcc on AppleTV2.
Here is a good tutorial, building a Webserver, direct on your AppleTV.
Follow these steps:
|
1 2 3 4 5 |
apt-get update apt-get install wget zip unzip tar vim wget http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb apt-get install iphone-gcc ldid make |
Download sys32.tgz, and copy it to Apple TV2 path /var/mobile/
Install the 3.2 SDK header file (this is huge)
|
1 2 3 |
mkdir -p /var/toolchain/ cd /var/toolchain/ tar -xzvf /var/mobile/sys32.tgz |
download the Utilities_atv2.zip (1238 K) source code (including the ATv2 header-files) to Apple TV2 path /var/root/
|
1 2 3 4 5 6 |
cd /var/root/ unzip Utilities_atv2 cd Utilities_atv2 make clean make make install |
Note : Remove with make uninstall
Package and install deb packages
|
1 2 |
cd Utilities_atv2 make clean deb |
Deb package installation
|
1 |
dpkg -i ipod4g.frontrow.appliance.utilities_atv2_1.0_iphoneos-arm.deb |
Reboot the Apple TV2
You will now see a new menu item “Utilities”.
Start the server in the sub menu
Now in your favorite computer’s browser type : “http:// to your AppleTV2 IP address: 8080 /”, such as “Appletv.local:8080/”
You should now get something like this:
The ipod4g.frontrow.appliance.utilities_atv2_1.1_iphoneos-arm.deb file is ready for download if you would like to test without the GCC installation set.
Tags: AppleTV 2, AppleTV2, AppleTV2.nl, assembly, ATV2, C, compilation, embedded web server, g++, GCC, hello.c, iMHo, ldid, linking, MACasuba, mongoose, preprocessing, web server, webserber, Webserver Mongoose GCC