Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 1123bc2ede8bec9fa1d0e1a6e3506c26705b859b Mon Sep 17 00:00:00 2001
From: Rudolf Polzer <divVerent@gmail.com>
Date: Thu, 20 Aug 2020 08:35:53 -0400
Subject: [PATCH] Only build kernel for Rockchip.
Makes the kernel boot on C101PA again (now it's < 32 MiB again),
but obviously breaks other Chromebooks so not recommended to apply
as is.
---
core/linux-aarch64/9999-myarch.patch | 51 ++++++++++++++++++++++++++++
core/linux-aarch64/PKGBUILD | 6 ++++
2 files changed, 57 insertions(+)
create mode 100644 core/linux-aarch64/9999-myarch.patch
diff --git a/core/linux-aarch64/9999-myarch.patch b/core/linux-aarch64/9999-myarch.patch
new file mode 100644
index 000000000..e76891e92
--- /dev/null
+++ b/core/linux-aarch64/9999-myarch.patch
@@ -0,0 +1,51 @@
+--- ../../config 2020-08-19 20:40:03.500930565 -0400
++++ .config-manual 2020-08-20 07:53:17.141750747 -0400
+@@ -276,9 +276,9 @@
+ #
+ # CONFIG_ARCH_ACTIONS is not set
+ # CONFIG_ARCH_AGILEX is not set
+-CONFIG_ARCH_SUNXI=y
++# CONFIG_ARCH_SUNXI is not set
+ # CONFIG_ARCH_ALPINE is not set
+-CONFIG_ARCH_BCM2835=y
++# CONFIG_ARCH_BCM2835 is not set
+ # CONFIG_ARCH_BCM_IPROC is not set
+ # CONFIG_ARCH_BERLIN is not set
+ # CONFIG_ARCH_BITMAIN is not set
+@@ -287,26 +287,26 @@
+ # CONFIG_ARCH_K3 is not set
+ # CONFIG_ARCH_LAYERSCAPE is not set
+ # CONFIG_ARCH_LG1K is not set
+-CONFIG_ARCH_HISI=y
+-CONFIG_ARCH_MEDIATEK=y
+-CONFIG_ARCH_MESON=y
+-CONFIG_ARCH_MVEBU=y
+-CONFIG_ARCH_MXC=y
+-CONFIG_ARCH_QCOM=y
++# CONFIG_ARCH_HISI is not set
++# CONFIG_ARCH_MEDIATEK is not set
++# CONFIG_ARCH_MESON is not set
++# CONFIG_ARCH_MVEBU is not set
++# CONFIG_ARCH_MXC is not set
++# CONFIG_ARCH_QCOM is not set
+ # CONFIG_ARCH_REALTEK is not set
+ # CONFIG_ARCH_RENESAS is not set
+ CONFIG_ARCH_ROCKCHIP=y
+ # CONFIG_ARCH_S32 is not set
+-CONFIG_ARCH_SEATTLE=y
++# CONFIG_ARCH_SEATTLE is not set
+ # CONFIG_ARCH_STRATIX10 is not set
+ # CONFIG_ARCH_SYNQUACER is not set
+-CONFIG_ARCH_TEGRA=y
++# CONFIG_ARCH_TEGRA is not set
+ # CONFIG_ARCH_SPRD is not set
+ # CONFIG_ARCH_THUNDER is not set
+ # CONFIG_ARCH_THUNDER2 is not set
+ # CONFIG_ARCH_UNIPHIER is not set
+-CONFIG_ARCH_VEXPRESS=y
+-CONFIG_ARCH_XGENE=y
++# CONFIG_ARCH_VEXPRESS is not set
++# CONFIG_ARCH_XGENE is not set
+ # CONFIG_ARCH_ZX is not set
+ # CONFIG_ARCH_ZYNQMP is not set
+ # end of Platform selection
diff --git a/core/linux-aarch64/PKGBUILD b/core/linux-aarch64/PKGBUILD
index a74106bed..b42a1b235 100644
--- a/core/linux-aarch64/PKGBUILD
+++ b/core/linux-aarch64/PKGBUILD
@@ -20,6 +20,7 @@ source=("http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
'0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch'
'0003-arm64-dts-rockchip-add-usb3-controller-node-for-RK33.patch'
'0004-arm64-dts-rockchip-enable-usb3-nodes-on-rk3328-rock6.patch'
+ '9999-myarch.patch'
'config'
'kernel.its'
'kernel.keyblock'
@@ -32,6 +33,7 @@ md5sums=('0e5c4c15266218ef26c50fac0016095b'
'e85e2b7aa3bc42d7dd6b36c325d29e3f'
'2c36fb143c27ed46f498c4d4633ea0c6'
'2e3fe5b9053d6a2c5327113836409d13'
+ '700f092e057f3fb4dce9614187258401'
'cc2ae6ac43ab9e6170bfed62f73e4968'
'7f1a96e24f5150f790df94398e9525a3'
'61c5ff73c136ed07a7aadbf58db3d96a'
@@ -53,6 +55,7 @@ prepare() {
git apply ../0004-arm64-dts-rockchip-enable-usb3-nodes-on-rk3328-rock6.patch
cat "${srcdir}/config" > ./.config
+ patch .config ../9999-myarch.patch
# add pkgrel to extraversion
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
@@ -64,6 +67,9 @@ prepare() {
build() {
cd ${_srcname}
+ # Update config settings (make myarch.patch work)
+ make olddefconfig
+
# get kernel version
make prepare
--
2.28.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.