oops. broke the BM_PUTPIXEL coords. use PIXFMT_BGRA32 for x86, and convert the color...
[AROS.git] / arch / all-ios / README.txt
blob5b9f9eff075825543c963208abf461cd5702f621
1  1. INTRODUCTION.
3  This is Apple iOS-hosted port of AROS. Currently it's incomplete and under development.
4  i386 architecture support is complete and the port successfully runs in iPhone Simulator.
5 Support for ARM architecture is still in progress. ARM iOS puts some limitations on application's behavior so
6 running AROS under iOS is slightly more complex task than running it on ARM Linux. Currently ARM versions boots
7 up to the point where it runs contents of DEVS:Monitors directory. The first loaded binary crashes because of
8 iOS' no-execution protection.
9  Note that currently there's no UIKit display driver, so AROS currently displays "Unknown type of system screen"
10 guru. However it boots up into Workbench.
12  2. COMPILING.
14  In order to compile iOS-hosted AROS you currently need Apple XCode with iOS SDK. This assumes you
15 are running on Mac. Cross-compiling of the port seems to be possible using source code of Darwin tools,
16 but i haven't tried it yet.
17  When configuring you need to supply --enable-target-variant=ios argument and select one of supported targets:
18 darwin-i386 for Simulator version and darwin-arm for real hardware.
19  The following iOS-specific options are added to configure for supporting this build:
20  --with-xcode       - specifies where XCode is located on your machine. Default is /Developer (this is where
21                       XCode v3.2.4 installed itself by default on my machine)
22  --with-ios-version - specifies minimum supported iOS version, defaults to 3.0. Actually this value is supplied
23                       to gcc via -miphoneos-version-min and nothing else.
24  --with-ios-sdk     - specifies iOS SDK version to use. Defaults to 4.1 (the latest SDK available with my XCode).
25                       Actually this value sets the SDK's root directory (used for locating headers and libraries) in the form of:
26                       $aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/SDKs/$aros_ios_platform$aros_ios_sdk.sdk
27                       where:
28                         $aros_xcode_path   - what is supplied by --with-xcode
29                         $aros_ios_platform - "iPhoneSimulator" for ios-i386 target and "iPhoneOS" for ios-arm target
30                         $aros_ios_sdk      - what is supplied by --with-ios-sdk
32  3. INSTALLING.
34  The bootstrap expects to locate AROS root directory inside Documents directory of its sandbox (i.e. Documents/AROS). The root does
35 not have to contain the bootstrap itself. The bootstrap is built as standard application bundle and is located one level up relating to
36 AROS directory. iTunes is known not to accept unsigned applications, so you'll have to use any third-party tools. Personally i use
37 Installous program (http://hackulo.us/forums/). You can put an IPA into its download directory (/var/mobile/Documents/Installous/Downloads),
38 then run the program, go to "Downloads" section, and you'll see AROSBootstrap there and be able to install it.
39  For transfering files i use iPhone Explorer (http://www.macroplant.com/iphoneexplorer/). Unfortunately you can't install and/or
40 update bootstrap bundle using it, because during copying files lose their 'executable' permission bit.
41  If you have Mac and XCode, you can also use XCode's organizer for installing the bootstrap application.
43  4. RUNNING.
45  Simulator version runs without problems.
46  Device version is a little bit more problematic. One of iOS limitations is that it disallows to set protection for allocated memory to
47 both writable and executable at once. This means that AROS can't run any binary from disk. This is not a stopper and can be bypassed.
48 Currently a protected memory management system for AROS is being developed, which will allow ARM iOS version to run.
49  AROS requires a jailbreak to run. I tried to create a signed version of the bootstrap and ran it on un-jailbroken iOS v3.1. As soon
50 as bootstrap launches the loaded kickstart it gets SIGKILL from the system. Apple does not allow applications to load and run any code.
51  A RedsnOw jailbreak is known to be compatible with AROS, it is used on iPhone model 2G which i use for testing AROS.
52  Debug log from AROS is directed to stderr. The easiest way to read it is using XCode's organizer window. Connect your device and go to
53 'console' tab. You'll see a log there. Unfortunately it's not transferred instantly, so you may have to wait a while until the last line
54 pops up. Re-running crashed AROS helps, the log gets flushed when new large data portion arrives.
55  Attaching remote gdb to a device is a big problem. First, you need to sign your executable with valid developer certificate and
56 debugging entitlements. Second, you'll have to compose XCode project for the bootstrap, listing all its source files. XCode integrates
57 very poorly with external build systems, so personally i abandoned this idea after some tests. Attaching remote gdb to an iPhone without
58 XCode seems to be impossible. Communication is performed through a UNIX socket which exists only while XCode debugging session is
59 running.
60  To make life simpler, something needs to be done in the bootstrap, like redirecting the log to a text file. Also perhaps some
61 third-party tools exist, which i don't know about.
62  With Simulator everything is way simpler. You just open MacOS' system console and read the output.
64                                                                         Pavel Fedin <pavel_fedin@mail.ru>