postmarketOS

Samsung i9070 (Samsung Galaxy S Advance)

Contributors

What works

What does not work

Boot process

Unlike most other Android devices, the i9070 can not boot a boot.img (which consists of kernel + initramfs). Instead, the boot.img file is just a regular kernel.

However, it is possible to directly integrate a initramfs into the kernel at kernel compile time (this is totally different from the boot.img approach, if this is unclear to you, please ask in the channel), and this is what the Android ROMs do on the i9070. While it is not a big deal in the Android compilation process, it is a problem for postmarketOS, because we want to be able to build the initramfs independently from the kernel.

The following workaround is currently implemented: We flash the real initramfs to the kernel2 partition (this partition usually contains a backup of the stock kernel) The initramfs init script built into the kernel checks if the kernel2 partition contains a compressed initramfs, and if it does, it extracts it and passes execution to the real initramfs init script. * This idea is based on something called "isorec".

Device partitions

The following partitions are used for the postmarketOS:

Possible partitions for the postmarketOS system image: SYSTEM => /dev/mmcblk0p3 (600MB) DATAFS => /dev/mmcblk0p5 (2GB)

Flashing with heimdall

In order to flash the kernel and the initramfs using heimdall you simply have to call pmbootstrap flasher flash_kernel

This will write in the partitions specified in the deviceinfo file.

At the moment is not possible to write the system image file (samsung-i9070.img) using heimdall. A temporary solution is to use the TWRP shell to perform a command like this: dd if=samsung-i9070.img of=/dev/mmcblk0p5

How drebrez made wifi work

insmod dhd.ko firmware_path=/etc/wifi/bcmdhd_sta.bin nvram_path=/etc/wifi/nvram_net.txt * set a mac address

ifconfig wlan0 hw ether 01:02:03:04:05:06 * bring the interface up

ifconfig wlan0 up * scan to find out what WiFi networks are detected

iw dev wlan0 scan * connect to WPA/WPA2 WiFi network

wpa_passphrase wifi_ssid wifi_key >> /etc/wpa_supplicant.conf * start wpa_supplicant to connect to the network

wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf * verify that you are indeed connected to the SSID

iw wlan0 link * start udhcpc to get an ip address

udhcpc -b -i wlan0

Links

Photos