[Sprint Samsung Galaxy S III] Edge-Case:
I guess kind of a bump/update on my current progress:

1) Source code mounted via NFS as you can see above. > Check

2) Create swapfile in tmpfs on Linux device and export to phone > Check

3) swapon the swap file > Error Invalid argument (darn)

maybe to help you see :

Server side:

root@HIVE-PC-01:/run/shm# mkdir swamp
root@HIVE-PC-01:/run/shm# cd swamp
root@HIVE-PC-01:/run/shm/swamp# ls
root@HIVE-PC-01:/run/shm/swamp# df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.0G 2.8M 3.0G 1% /run/shm
root@HIVE-PC-01:/run/shm/swamp# dd if=/dev/zero of=./swapfile1 bs=1024 count=524288
524288+0 records in
524288+0 records out
536870912 bytes (537 MB) copied, 1.02089 s, 526 MB/s
root@HIVE-PC-01:/run/shm/swamp# ls
swapfile1
root@HIVE-PC-01:/run/shm/swamp# mkswap ./swapfile1
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=347cdb9a-ecc7-4cec-b352-3e4f092fcd66
root@HIVE-PC-01:/run/shm/swamp# chown root:root swapfile1
root@HIVE-PC-01:/run/shm/swamp# chmod 0600 swapfile1
****************************************************************************
A lil later
****************************************************************************

root@HIVE-PC-01:~# cd /etc
root@HIVE-PC-01:/etc# nano exports
root@HIVE-PC-01:/etc# exportfs -a
exportfs: /etc/exports:4: unknown keyword "rw.sync"

root@HIVE-PC-01:/etc# nano exports
root@HIVE-PC-01:/etc# exportfs -a
exportfs: /run/shm/swamp requires fsid= for NFS export
root@HIVE-PC-01:/etc# nano exports
root@HIVE-PC-01:/etc# exportfs -a
root@HIVE-PC-01:/etc#

Client side (phone):

localhost media # ls
cyan linsys
localhost media # mkdir swamp
localhost media # busybox mount -o nolock -t nfs 192.168.1.117:/run/shm/swamp /media/swamp
localhost media # cd swamp
localhost swamp # ls
swapfile1
localhost swamp # which swapon
/system/xbin/swapon
localhost swamp # swapon swapfile1
swapon: swapfile1: Invalid argument
localhost swamp # swapo
swapoff swapon
localhost swamp # swapon -v swapfile1
unknown option -- v
BusyBox v1.21.1-jb bionic (2013-07-01 01:04 +0200) multi-call binary.

Usage: swapon [-a] [DEVICE]

Start swapping on DEVICE

-a	Start swapping on all swap devices

localhost swamp # busybox swapon swapfile1
swapon: swapfile1: Invalid argument
localhost swamp # ls
swapfile1
localhost swamp # busybox swapon ./swapfile1
swapon: ./swapfile1: Invalid argument
localhost swamp # free -m
total used free shared buffers
Mem: 1822936 721860 1101076 0 44500
-/+ buffers: 677360 1145576
Swap: 0 0 0
localhost swamp # cd /etc

This is happening right now, can anyone please help?

"2012	NEC, Corning[11]	1.05 Petabit/s	12 core fiber	52.4 km" (wiki, fiber-optic communication)

Makes the 526 MB/s from /dev/zero to tmpfs look like total crap.

Update:

I am going to forget about the swap over NFS for now. I may need to go about this differently.

I created some swap on my internal storage, so thats just fine, I will try two of 512 for a gig of swap and slightly less than 2 gigs of memory.

If i can get all the build tools, then I should be able to start building soon, just waiting on rsync to do it's job.

Update (Sun Nov 24, 5:44 PM Central Time) :

Alright, I made some space on my image so I could install some packages. Almost to the races. I really don't think this is going to work due to not being 64 bit, but maybe I can build a GB rom just for historical reasons.

These are the packages I am missing:

lib32ncurses5-dev lib32readline-gplv2-dev g++-multilib gcc-multilib
lib32z1-dev

I am not sure if they have arm versions, or if these packages are named differently for 32 bit processors.

I will try to aptitude search for them, and maybe try adding 64 bit archetecture support (but I have an inkling that wont work out).

I may end up syncing a old GB repo and try that if this fails. I will also try with open-jdk as that is what CyanogenMod says to use, and its open source so I would like to see it work to build Android with.

Update (Nov 24, 7:16 centeral time):

I finished installing the list of packages from the first post, (note, use .img file mounted to loop device on internal storage, much faster read/write rates), Then I added multiarch support for i386 and amd64.

Then I apt-get install the missing packages and it is grabing the packages for both archs (i386 amd64), I aptitude search'ed for the missing packages and found there armhf counter parts. So I will install all from all archs and cross my fingers.

hrm, and the follow are being removed...

The following packages will be REMOVED:
binutils build-essential chkrootkit clang cpp cpp-4.6 dpkg-dev g++ g++-4.6
gcc gcc-4.6 libclang-dev libclang1 libmpc2 libstdc++6-4.6-dev

There is a terminal dump attached to this post, perhaps somebody who does package management or ports stuff to arm, or someone more knowledgable than I can look over without actually going through with it themselves.

Update (Sun Nov 24, 8:25 PM Central)

So adding multi-arch support screws things up, that why I couldn't develop on Ubuntu, it kept jacking up my OS.

I think I am going to have to do this the hard way, which might be easier, and compile all my build tools on the phone itself. I have already compiled Ruby 1.9.3 on my phone, so I know compiling works, and it works well, but with the repo not having what I need I am going to have to do it all myself.

I still think that a lot of stuff wont be needed building on arm, since it doesn't need to cross compile, I wish I knew more....

(Update (Sun Nov 24, 8:25 PM Central)

I had to reinstall due to the screw up of deps. Oh well. So I will try will pure armhf packages and compile whatever else is missing, such as the gcc/g++-multilibs, from source on my phone. Then I will just try to build and see what errors I get. From there I will try to edit the build system itself (not Android) in an attempt to get it to build on arm. I don't see why it wouldn't work, I actually think if done right, it might not be as resource hungry as it is building on the processessor it is ment for. Maybe cross compiling isn't as costly as I think it is, so who knows. I just gotta keep following this green bot and see where it takes me.

Update (Mon Nov 25, 12:14 AM)

I have to do this as root or build a kernel without Paranoid Networking

as well as fix Host name resolution for Android, going to have to hard code the ip addresses or some such work around:

localhost system # cp -a /home/edge-case/bin/repo /root/bin/repo
<t -u git://192.30.252.129/CyanogenMod/android.git - b cm-10.1
remote: Finding bitmap roots...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 3 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://192.30.252.129/CyanogenMod/android
34f2ad3..952dea7 cm-11.0 -> origin/cm-11.0

Your identity is: anonymous
If you want to change this, please re-run 'repo init' with --config-name

Testing colorized output (for 'repo diff', 'repo status'):
black red green yellow blue magenta cyan white
bold dim ul reverse
Enable color display in this user account (y/N)? y

repo has been initialized in /media/media/android/system
localhost system # repo sync
Fetching project CyanogenMod/android_kernel_samsung_d2
Fetching project CyanogenMod/android_vendor_cm
Fetching project CyanogenMod/android_external_busybox
Fetching project CyanogenMod/android_hardware_qcom_display-caf
Fetching projects: 0% (1/371) Fetching project CyanogenMod/android_frameworks_base
Fetching project CyanogenMod/android_packages_apps_Settings
Fetching project CyanogenMod/android_hardware_samsung
Fetching projects: 1% (4/371) Fetching project CyanogenMod/android_packages_apps_Mms
Fetching project CyanogenMod/android_packages_apps_Trebuchet
Fetching project CyanogenMod/android_bionic
Fetching project CyanogenMod/android_device_samsung_d2-common
Fetching projects: 2% (8/371) Fetching project CyanogenMod/android_packages_apps_Phone
Fetching project CyanogenMod/android_packages_apps_Contacts
Fetching project CyanogenMod/android_build
Fetching project CyanogenMod/android_frameworks_compile_slang
Fetching projects: 3% (12/371) Fetching project CyanogenMod/android_external_webkit
Fetching project CyanogenMod/android_packages_apps_Camera
Fetching project CyanogenMod/android_external_llvm
Fetching projects: 4% (15/371) Fetching project CyanogenMod/android_frameworks_av
Fetching project CyanogenMod/android_packages_apps_Stk
Fetching project CyanogenMod/android_device_samsung_msm8960-common
Fetching project CyanogenMod/android_external_wpa_supplicant_8_ti
Fetching projects: 5% (19/371) Fetching project CyanogenMod/android_external_checkpolicy
Fetching project CyanogenMod/android_sdk
Fetching project CyanogenMod/android_packages_apps_Gallery2
Fetching project CyanogenMod/android_system_core
Fetching projects: 6% (23/371) Fetching project CyanogenMod/android_external_clang
Fetching project CyanogenMod/android_development
Fetching project CyanogenMod/android_dalvik
Fetching projects: 7% (26/371) Fetching proj
....
....
Fetching projects: 98% (364/371) Fetching project platform/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.6
Fetching project platform/prebuilts/clang/linux-x86/3.1
Fetching project platform/prebuilts/clang/darwin-x86/3.2
Fetching project platform/prebuilts/clang/darwin-x86/3.1
Fetching projects: 100% (371/371), done.
Syncing work tree: 1% (5/371)

Does it think my phone is a Mac?