[Galaxy 3 Android Development] hillbeast:
Update on what I've been up to today:

I haven't been touching Android itself as I haven't really been that concerned with it. I more wanted to get the kernel to compile nicely. I already had it compiling alright, but it wasn't how I wanted it. I wanted to build upon G3MODs foundations and at the same time take a step away from it so therefore I have gone and COMPLETELY rebuilt the initramfs for G3MOD and replaced it with a more modern and more standards friendly 2-stage init. Now this is going to get a little technical so turn away if these things annoy you or you can't be assed reading it:

The old system was a 1 stage init and was hugely ugly to look at, especially from a programmers point of view. We had so many files sitting there, heck we had 17 files in the root alone. Sure most of those files were deleted upon boot if they weren't needed (ie Gingerbread files if you booted Froyo) but it's still there when you're developing and it's hideous as a programmer to work around that.

This isn't anyones fault that this happened, it's just everyone piled more and more into G3MOD that it got bloated as hell and I just had to take the initiative to clean it up and 2-stage init seemed like the best method. Let me go over how both systems worked:

Kernel would boot

Kernel would extract the initramfs from the kernel image in RAM to /

Kernel would pass control over to whatever file is at /init

/init was a link to a script 'init.sh'

init.sh would execute /sbin/pre-init.sh

pre-init.sh would load core drivers for the NAND

pre-init would detect the filesystems and set them all up (EXT2/4/RFS/JFS etc)

pre-init would detect settings and all that (compcache, fs.options, Hybrid Data2SD, etc)

pre-init would detect the operating system (Froyo, GB, ICS)

pre-init would select the appropriate files for the OS and delete the unneeded files

pre-init would hand over control to the respective init for the OS

init would mount filesystems and set everything up and boot Android

Android would boot

That was exhausting just typing all that... well here's the new system:

Kernel would boot

Kernel would extract the initramfs from the kernel image in RAM to /

Kernel would pass control over to whatever file is at /init

/init is a small script that would extract one of two files: ramdisk.cpio or ramdisk-recovery.cpio, and depending on the boot mode (recovery or normal)

/init would load core drivers for the NAND

/init would run a script to detect your filesystems (fsdetect.sh)

/init will delete itself and all the temporary files in /stage1

/init will execute the init process for Android

Android would boot

As you can see it's a lot simpler (namely because it doesn't do Hybrid Data2SD and all that stuff yet, but implementing those functions is a lot easier, but more importantly the way to implement other OSes is WAY easier now. Instead of piling them all up in / and making a mess of things, I can make separate cpios for each (ramdisk-froyo.cpio, ramdisk-gb.cpio, ramdisk-ics.cpio) and they can all share the same ramdisk-recovery.cpio. No need to have recovery-ics,gb,froyo anymore.

Add to that, I have been working hard to get CWM 5.5 working properly as well. I'm not sure if something has changed in CWM5 compared to old versions but I've had a right ***** of a job getting it going. Firstly, it was in the wrong resolution, so I could only see the top half of the screen, then it was in the wrong font, and then the keys were all wrong, and now cache won't mount. Everything else mounts just fine, but cache isn't mounting automatically. If I mount it from adb shell or UART it works fine, but it just won't do it from CWM which is really annoying me.

And what's more, for some reason telling recovery to reboot will just reboot back into recovery again and again. I had to literally go into the bootloader and edit the BOOT_MODE parameter to stop it. Really annoying.

So yeah most of these changes all work (the Android side of things works flawlessly as long as you don't don't want Data2SD or anything like that), just recovery is being a pain right now. Once I get it all sorted I shall release it. Expect slightly faster boot times, and a more reliable boot.

Lastly I removed the G3MOD logo. Not because I don't like it, I loved it. I removed it because I am tired of people asking how to remove it because they don't like it.

EDIT: Update: I got cache working right now in recovery. I forced it to mount upon boot and that fixed it up. As for the rebooting thing, I'm still stumped there. In the mean time I am working in an override where you can hold the home button while booting to force it into normal mode, and you can hold the menu button to force it into the recovery menu.