X-Git-Url: http://git.dujemihanovic.xyz/?a=blobdiff_plain;f=content%2Fprojects%2Fpxa1908%2Findex.md;fp=content%2Fprojects%2Fpxa1908%2Findex.md;h=88a3636e71a24a358c613f457cedd6dc4ff86bbf;hb=5a6aeedd5e4d04ff17477ae9e3373fb4dba971d1;hp=0000000000000000000000000000000000000000;hpb=2418d7d31036b2a211d521b1313f8073bf8cf497;p=dujemihanovic.xyz.git diff --git a/content/projects/pxa1908/index.md b/content/projects/pxa1908/index.md new file mode 100644 index 0000000..88a3636 --- /dev/null +++ b/content/projects/pxa1908/index.md @@ -0,0 +1,65 @@ +--- +title: "Mainline Linux on Marvell PXA1908" +date: 2023-09-10T22:23:48+02:00 +--- +The Marvell PXA1908 was Marvell's first ARM64 SoC released sometime around 2014 +or 2015. The SoC is used in some of Samsung's entry level 2015 phones such as +the [Core Prime VE +LTE](https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Core_Prime_VE_LTE_(samsung-coreprimevelte)) +and the [Xcover 3 +LTE](https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Xcover_3_(samsung-xcover3lte)). +The PXA1908 currently has out-of-tree support for booting mainline Linux. + +## Links + +* [Latest version of patchset (v5)](https://lore.kernel.org/all/20230812-pxa1908-lkml-v5-0-a5d51937ee34@skole.hr/) +* [Main Git + repository](https://gitlab.com/LegoLivesMatter/linux/-/tree/pxa1908-lkml) +* [postmarketOS SoC page](https://wiki.postmarketos.org/wiki/Marvell_PXA1908) + +## Building outside pmbootstrap + +1. Clone and compile [pxa-mkbootimg](https://github.com/osm0sis/pxa-mkbootimg) +1. Clone repository +1. Checkout `pxa1908-lkml` +1. Get [kernel + config](https://gitlab.com/postmarketOS/pmaports/-/raw/master/device/testing/linux-samsung-coreprimevelte-mainline/config-samsung-coreprimevelte-mainline.aarch64) + from pmaports +1. `make` the kernel and create a boot.img using the below script + +## Script for creating boot.img +Written to be run from `out/arch/arm64/boot`. Adapt to your needs. + +```sh +#!/bin/sh + +mkimage -A arm64 -C gzip -a 0x1000000 -e 0x1000000 -n "pxa1928dkb linux" -d Image.gz uImage +~/code/pxa-mkbootimg/pxa1908-dtbTool -p ../../../scripts/dtc/ -s 2048 -o dt.img dts/marvell/ +~/code/pxa-mkbootimg/pxa-mkbootimg \ + --kernel uImage \ + --base 0x10000000 \ + --ramdisk /tmp/postmarketOS-export/initramfs \ + --ramdisk_offset 0x1000000 \ + --pagesize 2048 \ + --dt dt.img \ + --second_offset 0xf00000 \ + --tags_offset 0x100 \ + -o boot.img +``` + +## Todo +- [ ] Early mainlining + - [x] Boot + - [x] Serial + - [x] USB networking + - [x] `simplefb` + - [x] Boots into rootfs on SD card + - [ ] Boots into rootfs on eMMC *(LOW PRIORITY)* + - [ ] PMIC driver +- [ ] U-Boot + - [ ] Boot + - [ ] Serial (including loading kernel) + - [ ] `simplefb` + - [ ] Load kernel from external storage + - [ ] USB + - Don't know what else to put here