device-xiaomi-daisy: drop downstream packages (MR 4260)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Barnabás Czémán 2023-07-18 22:27:34 +02:00 committed by Pablo Correa Gómez
parent 3747b6cbd9
commit 440e57fa50
No known key found for this signature in database
GPG key ID: 7A342565FF635F79
8 changed files with 7 additions and 5191 deletions

View file

@ -2,27 +2,21 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-xiaomi-daisy
pkgdesc="Xiaomi Mi A2 Lite"
pkgver=4
pkgver=5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg"
depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8953"
makedepends="devicepkg-dev"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-kernel-downstream:kernel_downstream
$pkgname-kernel-mainline:kernel_mainline
$pkgname-phosh
$pkgname-modem
"
source="
deviceinfo
fb.modes
pointercal
30-gpu-firmware.files
phoc.ini
"
build() {
@ -31,8 +25,6 @@ build() {
package() {
devicepkg_package $startdir $pkgname
install -Dm0644 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes
install -Dm0644 "$srcdir"/pointercal "$pkgdir"/etc/pointercal
install -Dm0644 "$srcdir"/30-gpu-firmware.files "$pkgdir"/usr/share/mkinitfs/files/30-gpu-firmware.files
}
@ -42,35 +34,13 @@ nonfree_firmware() {
mkdir "$subpkgdir"
}
kernel_downstream() {
pkgdesc="Downstream kernel"
depends="linux-xiaomi-daisy"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_mainline() {
pkgdesc="Mainline kernel"
depends="linux-postmarketos-qcom-msm8953"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
modem() {
depends="qrtr rmtfs rmtfs-openrc msm-modem-uim-selection"
install_if="$pkgname=$pkgver-r$pkgrel $pkgname-nonfree-firmware"
mkdir "$subpkgdir"
}
phosh() {
install_if="$pkgname=$pkgver-r$pkgrel phosh"
mkdir "$subpkgdir"
install -Dm644 "$srcdir"/phoc.ini \
"$subpkgdir"/etc/phosh/phoc.ini
}
sha512sums="
788f712bae9468366eeffc46d20a5ceccbe35034dc7946d6662d1e52075819954a1daad14aab7ba6b12af3e6b410ffebf7ed73768c4a0ccc3f817c49b826581f deviceinfo
9b888f3a4ef3ed3c0b2e9c6a6e8a6c686909c530c3d95be797b47b4eb9deb55d64190b7a3736e44139630bfff5e295625a855052923369fdd37889060a3220ca fb.modes
4fa63c184f00033fbae2e4b140c9655061b3b662e337f7bdf5f8e26f7b57d6c66ad01fc93da05ce7d330f0f05bb0d36cc9b356ebfc7eb4200be4d4cc03afc975 pointercal
790152582c48be0a2b0f1be8b928da679e089abefebfccf771d03cf8dab74b3a7b3e5f2d7f89a1817767265ae7c4c94475c6258cb0ae7b3b0f9cbc04965dfb51 deviceinfo
302c0bec754bb79ef561c1a8d4ff34ba52b904c853bce6a15a79ba7b5b7a3d02c1c75bbe86d59be7b608a6dc744dd3e3c638eaa4539c53d20fa55fa5ea397d74 30-gpu-firmware.files
38409d4ce48db4624539dbfd695d3c6e1596a29fd7c3004a41368b28cba646495d05360420ad728f82c63d6ddeeca71d09944df06ebaca120aedd9cc2b436eb3 phoc.ini
"

View file

@ -8,31 +8,24 @@ deviceinfo_codename="xiaomi-daisy"
deviceinfo_year="2018"
deviceinfo_arch="aarch64"
# Mainline
deviceinfo_dtb_mainline="qcom/msm8953-xiaomi-daisy"
deviceinfo_append_dtb_mainline="true"
deviceinfo_modules_initfs_mainline="msm edt_ft5x06 panel_mdss_ili7807_fhdplus panel_himax_hx8399c_fhdplus"
deviceinfo_dtb_="qcom/msm8953-xiaomi-daisy"
deviceinfo_append_dtb_="true"
deviceinfo_modules_initfs_="msm edt_ft5x06 panel_mdss_ili7807_fhdplus panel_himax_hx8399c_fhdplus"
deviceinfo_gpu_accelerated="true"
deviceinfo_mesa_driver="msm"
# Downstream
deviceinfo_append_dtb_downstream="false"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2280"
deviceinfo_dev_touchscreen_downstream="/dev/input/event1"
deviceinfo_dev_touchscreen_calibration="/etc/pointercal"
deviceinfo_swap_size_recommended="1024"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_kernel_cmdline_mainline="earlycon console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_kernel_cmdline_downstream="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 androidboot.usbconfigfs=false loop.max_part=7 buildvariant=user veritykeyid=id:5560e7863b4d8118c2f1b065595cf93bb2447992"
deviceinfo_kernel_cmdline_="earlycon console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"

View file

@ -1,7 +0,0 @@
mode "1080x2160-60"
# D: 166.556 MHz, H: 132.187 kHz, V: 60.003 Hz
geometry 1080 2160 1080 2160 16
timings 6004 60 108 33 6 12 4
accel false
rgba 8/0,8/8,8/16,8/16
endmode

View file

@ -1,5 +0,0 @@
# /etc/phosh/phoc.ini
# Overwrites values set in /usr/share/phosh/phoc.ini
[output:DSI-1]
scale = 2.5

View file

@ -1 +0,0 @@
66503 -338 -779699 -332 65882 -586338 65536 1080 2160 0

View file

@ -1,80 +0,0 @@
From 92e3310d2db157deacb86ef5db8c8c8d38251312 Mon Sep 17 00:00:00 2001
From: Alexey Min <alexey.min@gmail.com>
Date: Wed, 11 Sep 2019 21:51:40 +0300
Subject: [PATCH 3/6] Add config option to fix bootloader cmdline args
Android bootloader passes some arguments in kernel command
line, that make booting custom OSes harder:
* skip_initramfs
* root=PARTUUID=...
* init=/init
Those parameters override default boot partition to hardcoded,
set init binary to /init, disable booting from initramfs.
If enabled, those parameters will be erased from bootloader's
command line, and custom OS can boot the way it likes.
Signed-off-by: Alexey Min <alexey.min@gmail.com>
---
arch/arm64/Kconfig | 17 +++++++++++++++++
drivers/of/fdt.c | 14 ++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2829edba6aa5..bd9f05f83c7e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1125,6 +1125,23 @@ config CMDLINE_FORCE
command-line options your boot loader passes to the kernel.
endchoice
+config CMDLINE_DROP_DANGEROUS_ANDROID_OPTIONS
+ bool "Drop certain dangerous options from cmdline"
+ default n
+ help
+ Android bootloader passes some arguments in kernel command
+ line, that make booting custom OSes harder:
+
+ * skip_initramfs
+ * root=PARTUUID=...
+ * init=/init
+
+ Those parameters override default boot partition to hardcoded,
+ set init binary to /init, disable booting from initramfs.
+
+ If enabled, those parameters will be erased from bootloader's
+ command line, and custom OS can boot the way it likes.
+
config EFI_STUB
bool
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index ca175710c4c8..fd8257589648 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1012,6 +1012,20 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
pr_debug("Command line is: %s\n", (char*)data);
+#ifdef CONFIG_CMDLINE_DROP_DANGEROUS_ANDROID_OPTIONS
+ pr_err("Replacing dangerous cmdline options...");
+ cmdline = strstr((const char *)data, "skip_initramfs");
+ if (cmdline)
+ *cmdline = '_';
+ cmdline = strstr((const char *)data, "root=");
+ if (cmdline)
+ *cmdline = '_';
+ cmdline = strstr((const char *)data, "init=");
+ if (cmdline)
+ *cmdline = '_';
+ pr_err("Command line now is: %s\n", (char*)data);
+#endif
+
/* break now */
return 1;
}
--
2.24.1

View file

@ -1,49 +0,0 @@
# Contributor: Matthew5pl <matteofo06@gmail.com>
# Maintainer: NotLugozzi <thomasbassi34@gmail.com>
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/msm8953-perf_defconfig
pkgname=linux-xiaomi-daisy
pkgver=4.9.220
pkgrel=2
pkgdesc="Xiaomi Mi A2 Lite kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="xiaomi-daisy"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl"
# Source
_repository="daisy_msm8953"
_commit="80aa9da8ef47805db4c0f987dbbda57a61832874"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/RebornDaisyProject/$_repository/archive/$_commit.tar.gz
$_config
config-xiaomi-daisy.aarch64
0003-Add-config-option-to-fix-bootloader-cmdline-args.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="8c71f6d3ec8076fe025c3b6506eda0678daf0e8eba0e6e2c5af8803487f760e4504b195cca3b281b8a6f7283136a05553589c73a50a616e41cdc8d4f60ea2ea5 linux-xiaomi-daisy-80aa9da8ef47805db4c0f987dbbda57a61832874.tar.gz
b94445c70ce4f4a63f376ab6fc0c187379885ee4dd3b9ac20c7cd7f018061235fc88d6befde26108e3c276f014d6126011397de1fea525d71fe05f3b33f261ba config-xiaomi-daisy.aarch64
b94445c70ce4f4a63f376ab6fc0c187379885ee4dd3b9ac20c7cd7f018061235fc88d6befde26108e3c276f014d6126011397de1fea525d71fe05f3b33f261ba config-xiaomi-daisy.aarch64
9ce867c4254b537ef5d2485780c26b72da8a3a8767ba71557f3b48d6c550e0e14c8c3e575b31bf65d2878f08a8a4926e48a1c2f1be534bf80a7a57f58313b0fd 0003-Add-config-option-to-fix-bootloader-cmdline-args.patch"

File diff suppressed because it is too large Load diff