I am not sure this is specific to Samsung phones, fastboot/Heimdall supported phones or whatever.

Partitions are named, maybe this is GPT, but needs to be confirmed.

There is a partition named aboot. It looks like this contains a COFF file, so it could be the bootloader.

There are two interesting partitions for us: boot and recovery. Both contain a boot image, which I describe below. The boot partition is used for normal booting. The recovery partition is used when you press volume-up + home + poweron, when powering your device on. I recommend using the recovery partition for development, and booting into the normal system to overwrite it, although it should be possible to download it using Heimdall.

The boot image contains kernel, initrd and command line. I have a program at (http://git.cascardo.info/?p=cascardo/bootimg.git;a=summary) that is able to extract kernel and initrd from the boot image, and replace kernel and initrd into an existing image. This image contains also the load addresses, that I don't recommend to change. It supposedly also contains a SHA1 sum, but I overwrote it with zeroes, and it still worked on my phone.

I was able to extract the kernel from the boot partition, put it into the image from the recovery partition, and write it to the recovery partition, and it still booted.

You can look up for your partition by doing find /dev/block -name recovery. dd that and the boot partition into a file, move those to your computer, run bootimg to extract kernel and initrd, build a new boot image, and write it to the recovery partition.

My plan is to write a simple initrd that just mounts a SD partition and pivot_root into it. Such SD partition would contain a Debian install. However, for initial development, we need to get at least a shell into the system. There are a couple of options to evaluate.

One option is to make network working. That is probably wifi, and requires firmware loading, and wifi setup with wpa_supplicant or something like it, which may not be trivial to do. After that, just make sure you start a ssh server, and you can check the IP address on your router.

The other option is using ADB through USB. That's how I access the recovery system right now. One other USB possibility would be to use a USB-serial module, and try to put console into it. Unfortunately, the USB gadget stack on Linux usually requires some userspace configuration, so it might not be that plain simple either.

Although I guess there are some unusual graphics acceleration stack on Android, it also uses framebuffer. I would like to make Xorg work on top of that. And the input devices look properly implemented as input devices, so Xorg should do the right thing here as well.