Compare commits

...
Author SHA1 Message Date
Caleb Connolly a220421e28 linux-postmarketos-qcomlt: new aport
Add a kernel package for the Qualcomm Landing Team integration kernel.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2023-09-28 16:52:00 +01:00
Caleb Connolly 5b39dcfc64 u-boot-qcom-rbx: new aport
Add a u-boot package to support u-boot on Qualcomm Robotics RBx boards
(rb1/2/3/5). This enables standard booting with GRUB from UFS, MMC,
SDHCI, and USB (depending on platform).

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2023-09-28 16:52:00 +01:00
Caleb Connolly 3ebf25bd68 device-generic-qcom-rbx: new aport
Add a generic device target which can boot on any of the Qualcomm
RB1/2/3/5 boards via Grub, using chainloaded u-boot.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2023-09-28 16:51:59 +01:00
13 changed files with 10914 additions and 0 deletions

No files matched your search

@@ -0,0 +1,81 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Caleb Connolly <caleb@connolly.tech>
pkgname=device-generic-qcom-rbx
pkgdesc="Generic device package for Qualcomm RB1/2/3/5 dev boards"
pkgver=1
pkgrel=6
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
# pmb:strict is required for grub
options="!check !archcheck pmb:strict"
depends="
linux-postmarketos-qcomlt
mkbootimg
postmarketos-base
soc-qcom-sdm845
soc-qcom-sdm845-ucm
soc-qcom-sdm845-qbootctl
fwupd>=1.8.6
"
makedepends="devicepkg-dev grub grub-efi"
source="
deviceinfo
q6voiced.conf
modules-initfs
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
grub-mkimage \
--prefix="/grub" \
--output="bootaa64.efi" \
--format="arm64-efi" \
--compression="xz" \
\
all_video \
cat \
configfile \
disk \
echo \
efi_gop \
fat \
gzio \
help \
iso9660 \
linux \
ls \
normal \
part_gpt \
part_msdos \
search \
search_label \
test \
true
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 -t "$pkgdir"/boot/EFI/Boot \
"$srcdir"/bootaa64.efi
}
nonfree_firmware() {
pkgdesc="Modem, GPU and WiFi Firmware, also needed for osk-sdl"
depends="soc-qcom-sdm845-nonfree-firmware linux-firmware-qcom
linux-firmware-ath10k"
mkdir "$subpkgdir"
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
}
sha512sums="
f34bfce4f9fb8a8f476b4c22753ae54e1be920e7558422ab2c8eb5e62517a21f0f1b8cd784f6ae4540c08dfd70f98eaf4f72e21732794f8ceabd2bdce6593772 deviceinfo
2131a6838a7af24ff91de24064d27b0e43706831701fff5e8d6827d808d3ddaa74cd68f9d6575204df86af237224807aadc014a43f5600f1adc95408da6f273a q6voiced.conf
0c156fff3bad1135bfbb6dac21aff9706b56d6e49d7c28e71a1f85648581bf84d0426d2bf7fc4c93ae445c2e74e8322c7e2ec360fc854800b8b6539c4b6cccf4 modules-initfs
"
@@ -0,0 +1,37 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Qualcomm RBx"
deviceinfo_manufacturer="Qualcomm"
deviceinfo_codename="generic-qcom-rbx"
#deviceinfo_uboot_boardname="qcom-rbx"
deviceinfo_year="2020"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_mesa_driver="msm"
deviceinfo_chassis="embedded"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_no_framebuffer="true"
# uncomment to enable a getty on the serial port
deviceinfo_getty="ttyMSM0;115200"
deviceinfo_generate_grub_config="true"
deviceinfo_boot_filesystem="fat32"
# Look ma! no hands!
# u-boot picks the right DTB for us, no need to specify it in grub.
# deviceinfo_dtb=""
deviceinfo_initfs_compression="zstd:fast"
deviceinfo_bootimg_override_payload="u-boot.bin"
deviceinfo_bootimg_override_payload_compression="gzip"
# Required for devices using UFS as storage (instead of e.g. eMMC)
#deviceinfo_rootfs_image_sector_size="4096"
@@ -0,0 +1,4 @@
gpi
i2c_qcom_geni
lontium-lt9611
phy-qcom-qusb2
@@ -0,0 +1,22 @@
_dt_compatible="$(cat /sys/firmware/devicetree/base/compatible | \
tr '\0' '|' | cut -d'|' -f1)"
# Set q6voice_card and q6voice_device based on compatible string
# shift,axolotl: q6voice_card=0, q6voice_device=12
# oneplus,enchilada: q6voice_card=0, q6voice_device=6
# oneplus,fajita: q6voice_card=0, q6voice_device=6
# xiaomi,beryllium: q6voice_card=0, q6voice_device=4
case "$_dt_compatible" in
"shift,axolotl")
q6voice_card=0
q6voice_device=12
;;
"oneplus,enchilada"|"oneplus,fajita")
q6voice_card=0
q6voice_device=6
;;
"xiaomi,beryllium")
q6voice_card=0
q6voice_device=4
;;
esac
@@ -0,0 +1,60 @@
# Maintainer: Caleb Connolly <caleb@connolly.tech>
# Stable Linux kernel with patches for Qualcomm RBx boards
# Kernel config based on: arch/arm64/configs/defconfig
_flavor="postmarketos-qcomlt"
pkgname="linux-$_flavor"
pkgver=6.4.0
pkgrel=0
pkgdesc="Mainline Kernel fork for SDM845 devices"
arch="aarch64"
_carch="arm64"
url="https://git.codelinaro.org/linaro/qcomlt/kernel"
license="GPL-2.0-only"
options="!check !tracedeps
pmb:cross-native
pmb:kconfigcheck-community"
makedepends="bash bison findutils flex installkernel openssl-dev perl zstd"
_config="config-$_flavor.$arch"
# HEAD of branch release/qcomlt-6.4
_commit="5e91e727287e4de7abd20f1fe27cadaa54c8573a"
# Source
source="
kernel-$_commit.tar.gz::https://git.codelinaro.org/linaro/qcomlt/kernel/-/archive/$_commit/linux-$_commit.tar.gz
$_config
"
builddir="$srcdir/kernel-$_commit"
prepare() {
default_prepare
cp "$srcdir/$_config" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
}
package() {
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
"$pkgdir/boot/vmlinuz"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
a877d6087970488912e6af223e1560c88cc2461768684fc28e9856ea74ae3fadf1a108683e2468ff58ebfd072b2201fe65b628fd50f02bf9b0090dab9e42a8ad kernel-5e91e727287e4de7abd20f1fe27cadaa54c8573a.tar.gz
e5606300077b289902e8f62da55f7bc78fbe9cf765db6cdeb7d63ee2a7af005a4154bb8ac303e25c22760d33e7d43cb89471b2b1d2b93967650f07d91058e14e config-postmarketos-qcomlt.aarch64
"
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,59 @@
# Kconfig check options that aren't in the defconfig
CONFIG_DM_CRYPT=y
CONFIG_UEVENT_HELPER=y
CONFIG_INPUT_UINPUT=y
CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
CONFIG_DUMMY=y
CONFIG_BLK_DEV_THROTTLING=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_VS_NFCT=y
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_RR=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_DM_THIN_PROVISIONING=y
CONFIG_VXLAN=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_IPVLAN=y
CONFIG_EXFAT_FS=y
CONFIG_F2FS_FS=y
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_PKCS8_PRIVATE_KEY_PARSER=y
CONFIG_NF_TABLES=y
CONFIG_NF_TABLES_INET=y
CONFIG_NFT_CT=y
CONFIG_NFT_LOG=y
CONFIG_NFT_LIMIT=y
CONFIG_NFT_MASQ=y
CONFIG_NFT_NAT=y
CONFIG_NFT_REJECT=y
CONFIG_NF_TABLES_IPV4=y
CONFIG_NF_TABLES_IPV6=y
CONFIG_ANDROID_BINDER_DEVICES=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_PSI=y
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_XZ=y
CONFIG_PSI=y
CONFIG_WIREGUARD=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_NF_TABLES=y
CONFIG_NF_TABLES_IPV4=y
CONFIG_NF_TABLES_IPV6=y
CONFIG_NFT_CT=y
CONFIG_NFT_FIB=y
CONFIG_NFT_FIB_IPV4=y
CONFIG_NFT_FIB_IPV6=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_ZRAM=y
CONFIG_ZSMALLOC=y
CONFIG_CRYPTO_LZ4=y
CONFIG_LZ4_COMPRESS=y
+85
View File
@@ -0,0 +1,85 @@
# U-boot with patches for Qualcomm RBx boards
pkgname=u-boot-qcom-rbx
pkgver=2023.04_rc4
pkgrel=0
pkgdesc="U-Boot bootloader for Qualcomm RBx boards"
url="https://source.denx.de/u-boot"
arch="aarch64"
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
ISC LGPL-2.0-only LGPL-2.1-only X11"
makedepends="
mkbootimg-osm0sis
bc
bison
dtc
flex
openssl-dev
py3-setuptools
python3-dev
swig
"
options="!archcheck !check !tracedeps !strip pmb:cross-native"
_ubootver="75558f95a2c24d6a99209e421c20e96ae21f3dec"
source="
u-boot-$_ubootver.tar.gz::https://github.com/calebccff/u-boot/archive/$_ubootver.tar.gz
dummy_axolotl.dts
dummy_beryllium.dts
dummy_db845c.dts
dummy_enchilada.dts
dummy_fajita.dts
"
builddir="$srcdir/u-boot-$_ubootver"
# XXX: add beryllium DTS to u-boot
# fajita shares the enchilada DTS in u-boot
_boards_to_build="axolotl enchilada db845c"
_boards="$_boards_to_build fajita"
_build_board() {
board="$1"
echo "Building for $board"
make DEVICE_TREE="$board"
cp u-boot.bin u-boot-"$board".bin
gzip u-boot-"$board".bin
}
build() {
unset LDFLAGS
make HOSTCC=gcc ARCH=arm sdm845_defconfig
make
for board in $_boards_to_build; do
_build_board "$board"
done
cp u-boot-enchilada.bin.gz u-boot-fajita.bin.gz
for board in $_boards; do
echo "Generating image for $board"
dtc -I dts -O dtb -o dummy_"$board".dtb "$srcdir"/dummy_"$board".dts
cat u-boot-"$board".bin.gz dummy_"$board".dtb > u-boot-"$board".bin.gz-dtb
mkbootimg-osm0sis --base '0x00000000' \
--kernel_offset '0x00008000' \
--ramdisk_offset '0x01000000' \
--tags_offset '0x00000100' \
--pagesize '4096' \
--second_offset '0x00f00000' \
--kernel u-boot-"$board".bin.gz-dtb \
-o u-boot-"$board".img
done
}
package() {
for board in $_boards; do
install -D -m644 $builddir/"u-boot-$board.img" \
"$pkgdir/boot/u-boot-$board.img";
done
}
sha512sums="
1ca69b4c4bc6a71872dca3633642e0211d7d7923731c03583f950f51ce63334b0dd1dbe8c6715a51627ed2c5c949d3ec6bc1d8c53add0561eb11badf0d096227 u-boot-75558f95a2c24d6a99209e421c20e96ae21f3dec.tar.gz
65b8ab99a1cfd4fa2648018b4b9ad0e8aeeb526a8e50a098265872fd7dde08d99b3f91f0327bbc4fd5225a9760122306da48740f6c6f995b322fef162f4cf691 dummy_axolotl.dts
82b18bd546f5f8eeef0bb228a52d9f6f9dd9642e6aff8c381ff0fe767eb21cab082498268228f19a948c0a96f84299ce833bb8d9ebd547eb8889a7ef58fe14eb dummy_beryllium.dts
65b8ab99a1cfd4fa2648018b4b9ad0e8aeeb526a8e50a098265872fd7dde08d99b3f91f0327bbc4fd5225a9760122306da48740f6c6f995b322fef162f4cf691 dummy_db845c.dts
65b8ab99a1cfd4fa2648018b4b9ad0e8aeeb526a8e50a098265872fd7dde08d99b3f91f0327bbc4fd5225a9760122306da48740f6c6f995b322fef162f4cf691 dummy_enchilada.dts
83bb511dc96b39c3b846b70a6cd975b15c03bb1b9856a3c02438d4b2073abae64f863b529705936de8c2f352c52aaf04aae268f3602a802ff1a03c838ea7081e dummy_fajita.dts
"
+1
View File
@@ -0,0 +1 @@
dummy_enchilada.dts
@@ -0,0 +1,13 @@
/dts-v1/;
/ {
#address-cells = <2>;
#size-cells = <2>;
qcom,msm-id = <321 0x20001>;
qcom,board-id = <69 0>;
memory {
/* We expect the bootloader to fill in the size */
reg = <0 0 0 0>;
};
chosen { };
};
+1
View File
@@ -0,0 +1 @@
dummy_enchilada.dts
@@ -0,0 +1,14 @@
/* Used for enchilada, fajita, axolotl, and db845c */
/dts-v1/;
/ {
#address-cells = <2>;
#size-cells = <2>;
qcom,msm-id = <0x141 0x20001>;
qcom,board-id = <8 0 17819 22>;
memory {
/* We expect the bootloader to fill in the size */
reg = <0 0 0 0>;
};
chosen { };
};
@@ -0,0 +1,14 @@
/* Used for enchilada, fajita, axolotl, and db845c */
/dts-v1/;
/ {
#address-cells = <2>;
#size-cells = <2>;
qcom,msm-id = <0x141 0x20001>;
qcom,board-id = <8 0 18801 41>;
memory {
/* We expect the bootloader to fill in the size */
reg = <0 0 0 0>;
};
chosen { };
};