Compare commits

...
Author SHA1 Message Date
Caleb Connolly 544f2bf5f3 WIP: community/device-shift-axolotl: convert to u-boot
wrap it all up with chainloaded u-boot. When we get UFS support in
u-boot this will bring us much closer to generic images on sdm845
devices by letting us strip out the requirement on Android boot images
entirely (we would make u-boot "firmware" and not generate or flash it
on update)
2023-04-20 19:34:48 +01:00
Caleb Connolly cb0df913c0 WIP: u-boot-starqltechn: hack in axolotl support 2023-04-20 19:34:16 +01:00
8 changed files with 218 additions and 17 deletions

No files matched your search

+23 -12
View File
@@ -4,8 +4,8 @@
pkgname=device-shift-axolotl
pkgdesc="SHIFT6mq"
pkgver=8
pkgrel=0
pkgver=9
pkgrel=4
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
@@ -20,16 +20,20 @@ depends="
soc-qcom-sdm845-ucm
soc-qcom-sdm845-qbootctl
fwupd>=1.8.6
u-boot-starqltechn
u-boot-tools
dtc
"
makedepends="devicepkg-dev"
source="
deviceinfo
phoc.ini
q6voiced.conf
boot_image.its
payload_mock.dts
bootscript.sh
"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-phosh
"
build() {
@@ -38,6 +42,17 @@ build() {
package() {
devicepkg_package $startdir $pkgname
mkdir -p "$pkgdir"/usr/share/u-boot/starqltechn/
mkdir "$builddir"
payload_mock_dtb="$builddir/payload_mock.dtb"
dtc -I dts -O dtb -o "$payload_mock_dtb" "$srcdir/payload_mock.dts"
install -D -m644 "$payload_mock_dtb" \
"$pkgdir"/usr/share/u-boot/starqltechn/payload_mock.dtb
install -D -m644 "$srcdir/"*.its \
"$pkgdir"/usr/share/u-boot/starqltechn/
install -D -m644 "$srcdir/"bootscript.sh \
"$pkgdir"/usr/share/u-boot/starqltechn/
}
nonfree_firmware() {
@@ -48,14 +63,10 @@ nonfree_firmware() {
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
}
phosh() {
install_if="$pkgname=$pkgver-r$pkgrel phosh"
install -Dm644 "$srcdir"/phoc.ini \
"$subpkgdir"/etc/phosh/phoc.ini
}
sha512sums="
a3e9ae292631233480b0fa60d90a7c0940162ea3876ae4bb8f2ad09ca4da94e9bcd6a0c690e8957ba4cd5d11ac50d3b32e7c89df5c44fd523aef6ea5e9c05c3d deviceinfo
65f74d29ab318b23f7ac8923a3661f2c4130049273a8c6be234ed2c8e00810b6a1254b54cf0932e42850a6d48f821dcd038900fbb836feeddfab2759afffae38 phoc.ini
0d61585aaf2ab0ce11356e463fc03999463c480b5cb909d03a607d328f606ed835bbaf13eda312d678ab2ebf15d420c5e9730b3951a25d83350be47048d41aa5 deviceinfo
2a3cbdad5aa91181d24a4e56e63986af6accf887c64fa4d1b6ddad1926e29050243c4b1e2fd892d38ca7c16e24dff8545a16552e5749ae31b6d01bf428468e51 q6voiced.conf
4984ceb356bb2aab5a67222d7e8a6b8b881c09ce21084310214d95ce5c3666da8fd2cf3e249e270145049864ded72cb1d2efb5af702a82a3e132eedb1281b752 boot_image.its
65f8a0f9ed2af6fe010d9027b3891378ccc212f9857eb147a2bd76f2442ce01c4b6f7f3775eb01b4c4d38f1983b6a52e94c114b550e85df73c500e696e6fbe6c payload_mock.dts
482ac045d2ba5bada985290a59d9bbc5224228bf0ca1e63f191e32e8c5e7ec8b12c17c93243049fe244780ac98169a60f2e821c87da37b56bc09da10f9b34b51 bootscript.sh
"
@@ -0,0 +1,70 @@
/dts-v1/;
/ {
description = "SHIFT6mq FIT Image";
#address-cells = <1>;
images {
bootscript {
description = "Boot script";
data = /incbin/("bootscript.sh");
type = "script";
compression = "none";
load = <0x90000000>;
entry = <0x90000000>;
hash {
algo = "sha1";
};
};
kernel {
description = "Kernel";
data = /incbin/("vmlinuz");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "gzip";
load = <0x80000000>;
entry = <0x80000000>;
hash {
algo = "sha1";
};
};
fdt {
description = "DTB";
data = /incbin/("/boot/dtbs/qcom/sdm845-shift-axolotl.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
load = <0x81a80000>;
entry = <0x81a80000>;
hash {
algo = "sha1";
};
};
initrd {
description = "Initrd";
compression = "none";
data = /incbin/("initramfs");
type = "ramdisk";
arch = "arm64";
load = <0x81000000>;
os = "linux";
hash {
algo = "sha1";
};
};
};
configurations {
default = "standard";
standard {
description = "Standard Boot";
kernel = "kernel";
fdt = "fdt";
ramdisk = "initrd";
hash {
algo = "sha1";
};
};
};
};
@@ -0,0 +1,3 @@
setenv bootargs 'console=tty1 console=ttyMSM0,115200n8 loglevel=15 clk_ignore_unused'
bootm $prevbl_initrd_start_addr
@@ -26,12 +26,20 @@ deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_sparse="true"
# u-boot
deviceinfo_generate_uboot_fit_images="true"
deviceinfo_uboot_boardname="starqltechn"
deviceinfo_bootimg_override_payload="u-boot-axolotl.bin"
deviceinfo_bootimg_override_payload_compression="gzip"
deviceinfo_bootimg_override_payload_append_dtb="payload_mock.dtb"
deviceinfo_bootimg_override_initramfs="boot_image.itb"
# Kernel
deviceinfo_append_dtb="true"
deviceinfo_dtb="qcom/sdm845-shift-axolotl"
@@ -0,0 +1,12 @@
/dts-v1/;
/ {
#address-cells = <2>;
#size-cells = <2>;
memory {
/* We expect the bootloader to fill in the size */
reg = <0 0 0 0>;
};
chosen { };
};
@@ -0,0 +1,90 @@
From 36468baa5e66fbc7eaf82e3d9aaa54943250c6be Mon Sep 17 00:00:00 2001
From: Caleb Connolly <caleb@connolly.tech>
Date: Thu, 20 Apr 2023 15:29:23 +0100
Subject: [PATCH] sdm845: extend starqltechn to support axolotl
Something better will be needed long-term for this...
---
arch/arm/dts/Makefile | 3 ++-
arch/arm/dts/axolotl.dts | 54 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/dts/axolotl.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 337bee7e1ec6..db421bd62a0e 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -532,7 +532,8 @@ dtb-$(CONFIG_TARGET_TEN64) += fsl-ls1088a-ten64.dtb
dtb-$(CONFIG_TARGET_DRAGONBOARD410C) += dragonboard410c.dtb
dtb-$(CONFIG_TARGET_DRAGONBOARD820C) += dragonboard820c.dtb
-dtb-$(CONFIG_TARGET_STARQLTECHN) += starqltechn.dtb
+dtb-$(CONFIG_TARGET_STARQLTECHN) += starqltechn.dtb \
+ axolotl.dtb
dtb-$(CONFIG_TARGET_QCS404EVB) += qcs404-evb.dtb
dtb-$(CONFIG_TARGET_STEMMY) += ste-ux500-samsung-stemmy.dtb
diff --git a/arch/arm/dts/axolotl.dts b/arch/arm/dts/axolotl.dts
new file mode 100644
index 000000000000..252d798f1748
--- /dev/null
+++ b/arch/arm/dts/axolotl.dts
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Samsung S9 SM-G9600 (starqltechn) board device tree source
+ *
+ * (C) Copyright 2021 Dzmitry Sankouski <dsankouski@gmail.com>
+ *
+ */
+
+/dts-v1/;
+
+#include "sdm845.dtsi"
+
+/ {
+ model = "SHIFT SHIFT6mq";
+ compatible = "shift,axolotl", "qcom,sdm845", "qcom,mtp";
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ aliases {
+ serial0 = &debug_uart;
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0 0x80000000 1 0x00000000
+ 1 0x80000000 0 0xfc7a0000>;
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ framebuffer: framebuffer@9D400000 {
+ compatible = "simple-framebuffer";
+ reg = <0 0x9D400000 0 (2160 * 1080 * 4)>;
+ width = <1080>;
+ height = <2160>;
+ stride = <(1080 * 4)>;
+ format = "a8r8g8b8";
+ };
+
+ soc: soc {
+ serial@a84000 {
+ status = "okay";
+ };
+
+ pinctrl_north@3900000 {
+ };
+ };
+};
+
+#include "starqltechn-uboot.dtsi"
--
2.40.0
@@ -44,7 +44,7 @@ index 7955076d61..995a623305 100644
-CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_VIDEO_DT_SIMPLEFB=n
CONFIG_LMB_MAX_REGIONS=64
+CONFIG_BAUDRATE=921600
+CONFIG_BAUDRATE=115200
--
2.30.2
+9 -2
View File
@@ -1,7 +1,7 @@
# U-boot with patches to make the Samsung S9 boot
pkgname=u-boot-starqltechn
pkgver=2023.01_rc2
pkgrel=1
pkgrel=5
pkgdesc="U-Boot bootloader for the Samsung SM-G9600 starqltechn"
url="https://source.denx.de/u-boot"
arch="aarch64"
@@ -22,6 +22,7 @@ _ubootver=2023.01-rc2
source="
http://source.denx.de/u-boot/u-boot/-/archive/v$_ubootver/u-boot-v$_ubootver.tar.gz
0001-starqltechn-enable-serial-console.patch
0001-sdm845-extend-starqltechn-to-support-axolotl.patch
0002-sdm845-save-relocaddr-to-env-variables.patch
0003-input-do-not-override-console-when-stdin-and-device-.patch
0004-wip-input-driver-for-gpio-buttons.patch
@@ -38,11 +39,17 @@ build() {
package() {
install -D -m644 $builddir/"u-boot.bin" \
"$pkgdir/usr/share/u-boot/starqltechn/u-boot.bin"
cat $builddir/"u-boot-nodtb.bin" $builddir/"arch/arm/dts/axolotl.dtb" > \
$builddir/"u-boot-axolotl.bin"
install -D -m644 $builddir/"u-boot-axolotl.bin" \
"$pkgdir/usr/share/u-boot/starqltechn/u-boot-axolotl.bin"
}
sha512sums="
5e570a0070cd31bb4d9541542532229dbe15e28955428e8a6659de5e4140c89f82d635045d5594e6b9cc6b4bb3037ea4e2c6236433d65a7c814a0ec9c0f32004 u-boot-v2023.01-rc2.tar.gz
068453a2eb3e2e6a950a31cd014f1dd4eed99f327f09aae69f4e4e55edf99cbef640d2361ada5844c5a02b2242c5668800d6b88599886c257764378615b351f8 0001-starqltechn-enable-serial-console.patch
a6afb1fa9cf7447a6a381e05402e0c4ce3a4bcd963b4fdf0b018087b81c77fda38c1ff9c9a05d59f9350f2c0f987a31878c5a4f6138e877976fbff8a14c86a20 0001-starqltechn-enable-serial-console.patch
46d13a4482f6497c893c34ef51f19cc6a4c14cbe50c14475d1aaa953dcdbf1dd9f3f1f1f811674c95d32e50e63b5d2963b704ae9f9dccd9829c65f5c82477fc6 0001-sdm845-extend-starqltechn-to-support-axolotl.patch
5e0dbe9a99c3931aba8d67510453058722f028ca3dbaeb8f12523b76b60349d2394175ffc25a6ea2395f5f65c5e86f563cd4db3794e17986c1085ca444613b0b 0002-sdm845-save-relocaddr-to-env-variables.patch
ea3e3c270d04da74a7ab993802467631af7c47a14b78dcb3e185b234ceec804841eb4b6c0919d6bdd30157126fdb44a99e829712f3b44c60dd794a2a3acb812c 0003-input-do-not-override-console-when-stdin-and-device-.patch
72b78a26737d9ee21854b71036ec5e31206be7cfe70e11ba583eb3e699da674db0db45ce9e51c30f1935aa8bcfa8ed6157899f129de55fb5966892490e6e7eb3 0004-wip-input-driver-for-gpio-buttons.patch