update kernel

This commit is contained in:
MeexReay 2025-05-16 01:49:26 +03:00
parent 4c22de20b6
commit 26d6a21212
10 changed files with 53 additions and 41 deletions

View File

@ -8,14 +8,14 @@ This port also might work on angelica (without NFC) and other phones on MT6765 p
- [ ] SSH
- [ ] Screen
## How to add device to pmbootstrap
## How to install
```bash
PMAPORTS=~/.local/var/pmbootstrap/cache_git/pmaports
git clone https://github.com/MeexReay/pmos-xiaomi-angelican.git /tmp/pmosxan
mv -r /tmp/pmosxan/linux-xiaomi-angelican $PMAPORTS/device/testing
mv -r /tmp/pmosxan/device-xiaomi-angelican $PMAPORTS/device/testing
rm -r /tmp/pmosxan
PMAPORTS=~/.local/var/pmbootstrap/cache_git/pmaports # change this to your pmaports path
git clone https://github.com/MeexReay/pmos-xiaomi-angelican.git
cd pmos-xiaomi-angelican
ln -s $PWD/linux-xiaomi-angelican $PMAPORTS/device/testing
ln -s $PWD/device-xiaomi-angelican $PMAPORTS/device/testing
```
## How to flash

View File

@ -27,6 +27,6 @@ package() {
}
sha512sums="
f08561b0a50faf534ea034dab162ed18c6502a309b9a35ea44e50b47b1dcd008ae3f63cd327b276cad5114dec746ae2034cfcd1721e689fe26b742c538218994 deviceinfo
373de17bc82f9689ac4692c7fe1d331ebcf57f7bf455f62941003c2fcf2119794c97ddfb868ff5529fd3fc75002a9eaf091c52ce8351ea0d854f7d9799f318b9 deviceinfo
e70bae17df23dcaaaea0e2d3616556f04baa23f8ee1357785c0f539bf97282d8ddff53953e155b72689bb73beb38c2da3d08de2a61e866684edfa10a6593885d modules-initfs
"

View File

@ -9,11 +9,10 @@ deviceinfo_codename="xiaomi-angelican"
deviceinfo_year="2020"
deviceinfo_dtb=""
deviceinfo_arch="aarch64"
deviceinfo_gpu_accelerated=true
# Device related
deviceinfo_chassis="handset"
deviceinfo_external_storage="false"
deviceinfo_external_storage="true"
# Bootloader related
deviceinfo_flash_method="fastboot"
@ -21,3 +20,11 @@ deviceinfo_kernel_cmdline=""
deviceinfo_generate_bootimg="true"
deviceinfo_flash_pagesize="2048"
deviceinfo_dtb_second="false"
# Fastboot related
deviceinfo_generate_bootimg="true"
deviceinfo_flash_offset_kernel=""
deviceinfo_flash_offset_ramdisk=""
deviceinfo_flash_offset_second=""
deviceinfo_flash_offset_tags=""
deviceinfo_flash_pagesize=""

View File

@ -0,0 +1,25 @@
From 534180ab69fa6290a002d324401aec8ed5a953f4 Mon Sep 17 00:00:00 2001
From: MeexReay <meexreay@gmail.com>
Date: Fri, 16 May 2025 01:24:31 +0300
Subject: [PATCH] extern yylloc
---
scripts/dtc/dtc-lexer.lex.c_shipped | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
index ba525c2f9fc2..a2fe8dbc0fd3 100644
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -637,7 +637,7 @@ char *yytext;
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
+extern YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
--
2.49.0

View File

@ -1,8 +1,8 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/(CHANGEME!)
# Reference: <https://github.com/xiaomi-mt6765/android_kernel_xiaomi_mt6765>
# Kernel config based on: arch/arm64/configs/k62v1_64_bsp_defconfig
pkgname=linux-xiaomi-angelican
pkgver=4.9.190
pkgver=4.9.119
pkgrel=0
pkgdesc="Xiaomi Redmi 9C NFC kernel fork"
arch="aarch64"
@ -11,7 +11,6 @@ _flavor="xiaomi-angelican"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
gpu_accelerated=true
makedepends="
bash
bc
@ -24,43 +23,26 @@ makedepends="
"
# Source
_author="droidian-mt6765"
_repository="kernel-xiaomi-mt6765"
_commit="d31e916b28ccf4419c00e6e774841e7d65df06c5"
_author="xiaomi-mt6765"
_repository="android_kernel_xiaomi_mt6765"
_commit="31dbe7b6881b35094fa220a68f6c476c615f10dc"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/$_author/$_repository/archive/$_commit.tar.gz
$_config::https://raw.githubusercontent.com/$_author/$_repository/$_commit/arch/$_carch/configs/angelican_defconfig
$_config
0001-extern-yylloc.patch
"
# gcc7-give-up-on-ilog2-const-optimizations.patch
# gcc8-fix-put-user.patch
# gcc10-extern_YYLOC_global_declaration.patch
# kernel-use-the-gnu89-standard-explicitly.patch
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
# export PY2_PREFIX="$srcdir/python2"
# mkdir -p "$PY2_PREFIX"
# wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz -O "$srcdir/Python-2.7.18.tgz"
# tar -xzf "$srcdir/Python-2.7.18.tgz" -C "$srcdir"
# cd "$srcdir/Python-2.7.18"
# ./configure --prefix="$PY2_PREFIX" --enable-optimizations
# make -j$(nproc)
# make install
# export PATH="$PY2_PREFIX/bin:$PATH"
# cd "$builddir"
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
# export PATH="$srcdir/python2/bin:$PATH"
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
@ -71,6 +53,7 @@ package() {
}
sha512sums="
0f57f5b30e76949b9b8835dac5d1d1eedbc8602605f76106f7c9425a4844f2bc01c9736c84c64388cc884a4812d04e4e16597b1d930f0c0cd5cca0ac77802291 linux-xiaomi-angelican-d31e916b28ccf4419c00e6e774841e7d65df06c5.tar.gz
ce3893cf439868f4b0a6ed5a47de99cc6e2a3cd68cb132e3c43d64bf1ef509a6df9a38d0984cb0f36d0c4ee5170e07185532f4749f61c33dd3e2c5d8385cdfd2 config-xiaomi-angelican.aarch64
c543d691eac482c6bef8c6b5c42cf2643e53745ac437c659de6b31720e5e879cc5ecfab1ac63c60eea24acb7a9e40db5e54d3ac5a461c6136d073bdc1ff3560f linux-xiaomi-angelican-31dbe7b6881b35094fa220a68f6c476c615f10dc.tar.gz
f3781cbb4e9e190df38c3fe7fa80ba69bf6f9dbafb158e0426dd4604f2f1ba794450679005a38d0f9f1dad0696e2f22b8b086b2d7d08a0f99bb4fd3b0f7ed5d8 config-xiaomi-angelican.aarch64
160f8b4031caeae8c760c7c35c474a87dffce8ca44b9c8ca2efefab60243c12f40ccfd5427dbcede8a534e139b246334949450bbb560a5e21909eea7c5b526f5 0001-extern-yylloc.patch
"

View File

@ -0,0 +1 @@
404: Not Found

View File

@ -1 +0,0 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

View File

@ -1 +0,0 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch

View File

@ -1 +0,0 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch

View File

@ -1 +0,0 @@
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch