An (almost) fully libre Galaxy S3

It's approaching three months since I started writing this blog post. In the mean time, life has gotten in the way of my work on U-Boot and Linux. One cool thing I've been working on is the Advanced Operating Systems course at UNSW - writing an operating system from (almost) scratch, based on the seL4 microkernel. That is probably worthy of its own blog post at a later point, though...

Since my last post on U-Boot, much has been achieved: U-Boot is now a usable (albeit slightly barebones) bootloader on the Galaxy S3. Now it's able to manage important stuff like battery state, charging status, and eMMC... and booting Linux successfully. But - as they say - it's not just about the destination - the journey is important, too!

Read more…

Camera on Galaxy S3

It's been a while since my last update, but much progress has been made: the Note 2 touchscreen will be landing in 4.16, and the actual device tree source files will be landing in 4.17 (hopefully along with support for the notification LED, if not more). But recently, I've been focusing on figuring out how to get the camera working.

Read more…

kexec on Galaxy S3/Note 2

So, we have a booting kernel, and a bunch of nice[citation needed] dts files describing the hardware of each phone. One problem: the proprietary bootloader, "S-BOOT", has no device tree support - it just loads an Android "boot.img", consisting of a kernel, ramdisk, and some configuration. Fortunately, Linux has a mechanism to load a device tree appended to the end of the kernel image. This allows us to use a single fixed device tree, but won't let us boot a single kernel/initramfs combo on all the devices we're aiming to support. Along with this, the boot partition only allows 8MB for kernel + initramfs, which is... not that much.

So, how can we achieve one image to rule them all?

Read more…

WiFi on Galaxy S3

So, mainline boots! However, with only access to a console over UART, copying files to/from the S3 involves rebooting to recovery mode, plugging into USB, and pushing the file using Android's debug bridge, adb. This is... painful. Fortunately, the S3 and Note 2 include a BCM4334 for WiFi + Bluetooth functionality. For now, I'm going to focus on WiFi - although Bluetooth shouldn't be too tricky in the future.

Read more…

Mainline on Galaxy S3

After successfully getting UART working, the next thing to do is boot a mainline kernel. Fortunately, on i9300 we have something of a head start: Samsung has upstreamed some amount of support for "trats2", a variant of the GT-I9300 used as the reference device for Tizen. However, the i9300 and trats2 have different partition layouts and different bootloaders: I learned in IRC that trats2 has a version of Samsung's proprietary bootloader S-BOOT which chainloads u-boot.

Read more…

UART on Galaxy S3 and Note 2

Over the next few months (years?) I plan on working on porting several Android-based Exynos 4412-based devices - namely, the Galaxy S3 (of which there are three Exynos4412-based variants), and the Galaxy Note 2 (of which there are two variants). The first step, I figured, was probably to get UART working on the vendor-provided Linux 3.0 kernel: Fortunately, I was not the first person to attempt this, and there are a few guides on constructing a cable suitable for the process.

Read more…