]> git.dujemihanovic.xyz Git - dujemihanovic.xyz.git/blob - content/projects/pxa1908/index.md
Add projects section
[dujemihanovic.xyz.git] / content / projects / pxa1908 / index.md
1 ---
2 title: "Mainline Linux on Marvell PXA1908"
3 date: 2023-09-10T22:23:48+02:00
4 ---
5 The Marvell PXA1908 was Marvell's first ARM64 SoC released sometime around 2014
6 or 2015. The SoC is used in some of Samsung's entry level 2015 phones such as
7 the [Core Prime VE
8 LTE](https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Core_Prime_VE_LTE_(samsung-coreprimevelte))
9 and the [Xcover 3
10 LTE](https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Xcover_3_(samsung-xcover3lte)).
11 The PXA1908 currently has out-of-tree support for booting mainline Linux.
12
13 ## Links
14
15 * [Latest version of patchset (v5)](https://lore.kernel.org/all/20230812-pxa1908-lkml-v5-0-a5d51937ee34@skole.hr/)
16 * [Main Git
17 repository](https://gitlab.com/LegoLivesMatter/linux/-/tree/pxa1908-lkml)
18 * [postmarketOS SoC page](https://wiki.postmarketos.org/wiki/Marvell_PXA1908)
19
20 ## Building outside pmbootstrap
21
22 1. Clone and compile [pxa-mkbootimg](https://github.com/osm0sis/pxa-mkbootimg)
23 1. Clone repository
24 1. Checkout `pxa1908-lkml`
25 1. Get [kernel
26 config](https://gitlab.com/postmarketOS/pmaports/-/raw/master/device/testing/linux-samsung-coreprimevelte-mainline/config-samsung-coreprimevelte-mainline.aarch64)
27 from pmaports
28 1. `make` the kernel and create a boot.img using the below script
29
30 ## Script for creating boot.img
31 Written to be run from `out/arch/arm64/boot`. Adapt to your needs.
32
33 ```sh
34 #!/bin/sh
35
36 mkimage -A arm64 -C gzip -a 0x1000000 -e 0x1000000 -n "pxa1928dkb linux" -d Image.gz uImage
37 ~/code/pxa-mkbootimg/pxa1908-dtbTool -p ../../../scripts/dtc/ -s 2048 -o dt.img dts/marvell/
38 ~/code/pxa-mkbootimg/pxa-mkbootimg \
39 --kernel uImage \
40 --base 0x10000000 \
41 --ramdisk /tmp/postmarketOS-export/initramfs \
42 --ramdisk_offset 0x1000000 \
43 --pagesize 2048 \
44 --dt dt.img \
45 --second_offset 0xf00000 \
46 --tags_offset 0x100 \
47 -o boot.img
48 ```
49
50 ## Todo
51 - [ ] Early mainlining
52 - [x] Boot
53 - [x] Serial
54 - [x] USB networking
55 - [x] `simplefb`
56 - [x] Boots into rootfs on SD card
57 - [ ] Boots into rootfs on eMMC *(LOW PRIORITY)*
58 - [ ] PMIC driver
59 - [ ] U-Boot
60 - [ ] Boot
61 - [ ] Serial (including loading kernel)
62 - [ ] `simplefb`
63 - [ ] Load kernel from external storage
64 - [ ] USB
65 - Don't know what else to put here