aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2020-02-10 19:51:01 +0000
committerAriadne Conill <ariadne@dereferenced.org>2020-02-14 17:02:43 +0000
commitb92af9eeab52534b1eafe4a0ba9d5423fdf38573 (patch)
tree96329158e30f05c5478992acf0223ef5b99d4253
parentc58cad27dbad5d4d852c74abf787f176bec8b794 (diff)
downloadaports-b92af9eeab52534b1eafe4a0ba9d5423fdf38573.tar.bz2
aports-b92af9eeab52534b1eafe4a0ba9d5423fdf38573.tar.xz
main/linux-octeon: use different strategy for SDIO underclock
-rw-r--r--main/linux-octeon/APKBUILD7
-rw-r--r--main/linux-octeon/ubnt-e200-sdio-underclock.patch47
2 files changed, 43 insertions, 11 deletions
diff --git a/main/linux-octeon/APKBUILD b/main/linux-octeon/APKBUILD
index 559782a1ab..09cf306c2c 100644
--- a/main/linux-octeon/APKBUILD
+++ b/main/linux-octeon/APKBUILD
@@ -7,7 +7,7 @@ case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=$pkgver;;
esac
-pkgrel=0
+pkgrel=1
pkgdesc="Linux lts kernel (for Octeon)"
url="http://kernel.org"
depends="mkinitfs"
@@ -148,6 +148,9 @@ _package() {
install -D include/config/kernel.release \
"$_outdir"/usr/share/kernel/$_buildflavor/kernel.release
+
+ mv "$_outdir"/boot/vmlinux* "$_outdir"/boot/vmlinux.64
+ md5sum "$_outdir"/boot/vmlinux.64 | cut -c1-32 > "$_outdir"/boot/vmlinux.64.md5
}
# main flavor installs in $pkgdir
@@ -212,6 +215,6 @@ _dev() {
sha512sums="9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f linux-5.4.tar.xz
39d145b7afd3297d9572e7c37eb40b58c3b0d7f30cc361bdf6c89e6bb54a6072f79dea979f4b4fc24d06fe06c406d10949cbf79d373e1ba82514a2f1bb0a6255 octeon-rd_name.patch
a2c0d901188570ebba6917b727cdb4823bda5dbe29a559ed2055db21b4f5dd4990f623b94f07072bcbf69647f250afb52d1771d706bdc072e2cfb00003e257b4 octeon-disable-devicetree-deprecation-warning.patch
-0fa567bdc29f63e7c9da43a0eefd2daa239791ecd3281257033027b70ebb424d85e55a289b4b59439393cfb199a0dc89994de495cf215df501aa83a5accd0adb ubnt-e200-sdio-underclock.patch
+c227cd4a0c9712a75d62211becb8591fccd15a93ae4483835f1ec69aabca51aaf8254c37e6315bbd5a08b1f521b369269bfe973700eb993ec6a629b7167e75f7 ubnt-e200-sdio-underclock.patch
e8f70a32a17af6524bda22ddc1a66f265b9a9fe76cfe8c9a92340dcce9a23b740ef342cf450a5ed710777905650cff795af71ae52ef9b413bc8905dd85bcfc3a config-octeon.mips64
751b3d46f3d3b6bb994a793bb74ca12abe1f9b6d4e45bff6eaab4e3839b8f37a1e4d4dec28ba68648a5c25098ac027995eaebbab13bdebb1f490da379bbaa079 patch-5.4.17.xz"
diff --git a/main/linux-octeon/ubnt-e200-sdio-underclock.patch b/main/linux-octeon/ubnt-e200-sdio-underclock.patch
index 1b6c34e956..423917ac52 100644
--- a/main/linux-octeon/ubnt-e200-sdio-underclock.patch
+++ b/main/linux-octeon/ubnt-e200-sdio-underclock.patch
@@ -1,13 +1,19 @@
-Cleaned up patch which underclocks the SDIO bus on E200 boards,
-derived from UBNT GPL sources (ubnt_prune_device_tree).
+Underclock the SDIO bus on E200 devices.
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
---- linux-5.4.orig/arch/mips/cavium-octeon/octeon-platform.c
-+++ linux-5.4/arch/mips/cavium-octeon/octeon-platform.c
-@@ -1128,6 +1128,20 @@
+Upstream-status: Not yet submitted
+
+--- a/arch/mips/cavium-octeon/octeon-platform.c
++++ b/arch/mips/cavium-octeon/octeon-platform.c
+@@ -760,6 +760,28 @@
}
- #endif
+ }
++int __init alpine_prune_device_tree(void)
++{
++ if (fdt_check_header(initial_boot_params))
++ panic("Corrupt Device Tree.");
++
+ /* UBNT underclocks the SDIO bus on E200. We do the same here. */
+ if (octeon_bootinfo->board_type == CVMX_BOARD_TYPE_UBNT_E200 || octeon_bootinfo->board_type == CVMX_BOARD_TYPE_UBNT_E220) {
+ int mmc_slot0;
@@ -22,11 +28,34 @@ Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
+ }
+ }
+
- return 0;
++ return 0;
++}
++
+ int __init octeon_prune_device_tree(void)
+ {
+ int i, max_port, uart_mask;
+--- a/arch/mips/cavium-octeon/setup.c
++++ b/arch/mips/cavium-octeon/setup.c
+@@ -1184,6 +1184,7 @@
}
---- linux-5.4.orig/arch/mips/include/asm/octeon/cvmx-bootinfo.h
-+++ linux-5.4/arch/mips/include/asm/octeon/cvmx-bootinfo.h
+ void __init octeon_fill_mac_addresses(void);
++int alpine_prune_device_tree(void);
+
+ void __init device_tree_init(void)
+ {
+@@ -1219,6 +1220,9 @@
+ octeon_prune_device_tree();
+ pr_info("Using internal Device Tree.\n");
+ }
++
++ alpine_prune_device_tree();
++
+ if (fill_mac)
+ octeon_fill_mac_addresses();
+ unflatten_and_copy_device_tree();
+--- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h
++++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h
@@ -295,6 +295,9 @@
*/
CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001,