Gist · 7 / URL: https://gist.050821.xyz/7
Public Gist
Expires: Never
goodspeed - created 5 months and 15 days ago
updated file: 0001-Add-orangepi-zero-2w-support-form-mainline-linux.patch
0001-Add-orangepi-zero-2w-support-form-mainline-linux.patch
From 6c024623ad0bab223bf2a66ff62a912ab91eac3d Mon Sep 17 00:00:00 2001
From: William Goodspeed <goodspeed@mailo.cat>
Date: Wed, 24 Jul 2024 22:58:00 +0800
Subject: [PATCH] Add orangepi zero 2w support form mainline linux

---
 conf/machine/orange-pi-zero2w.conf            | 16 ++++++++++++++++
 recipes-bsp/u-boot/u-boot_2024.07.bb          |  7 +++++++
 recipes-kernel/linux/linux-mainline_6.10.1.bb | 13 +++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 conf/machine/orange-pi-zero2w.conf
 create mode 100644 recipes-bsp/u-boot/u-boot_2024.07.bb
 create mode 100644 recipes-kernel/linux/linux-mainline_6.10.1.bb

diff --git a/conf/machine/orange-pi-zero2w.conf b/conf/machine/orange-pi-zero2w.conf
new file mode 100644
index 0000000..e08105e
--- /dev/null
+++ b/conf/machine/orange-pi-zero2w.conf
@@ -0,0 +1,16 @@
+#@TYPE: Machine
+#@NAME: orange-pi-zero-2w
+#@DESCRIPTION: Machine configuration for the orange-pi-zero-2w, based on Allwinner H618 CPU
+
+require conf/machine/include/sun50i-h6.inc
+
+PREFERRED_VERSION_linux-mainline ?= "6.10.1"
+PREFERRED_VERSION_u-boot ?= "2024.07"
+KERNEL_DEVICETREE = "allwinner/sun50i-h618-orangepi-zero2w.dtb"
+UBOOT_MACHINE = "orangepi_zero2w_defconfig"
+
+SPL_BINARY = "u-boot-sunxi-with-spl.bin"
+
+MACHINE_FEATURES:append = "bluetooth wifi"
+
+MACHINE_EXTRA_RRECOMMENDS = "uwe5622-firmware"
diff --git a/recipes-bsp/u-boot/u-boot_2024.07.bb b/recipes-bsp/u-boot/u-boot_2024.07.bb
new file mode 100644
index 0000000..4671fa2
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_2024.07.bb
@@ -0,0 +1,7 @@
+require recipes-bsp/u-boot/u-boot-common.inc
+require recipes-bsp/u-boot/u-boot.inc
+
+SRCREV = "3f772959501c99fbe5aa0b22a36efe3478d1ae1c"
+SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master"
+
+DEPENDS += "bc-native dtc-native python3-pyelftools-native"
diff --git a/recipes-kernel/linux/linux-mainline_6.10.1.bb b/recipes-kernel/linux/linux-mainline_6.10.1.bb
new file mode 100644
index 0000000..8e4cad1
--- /dev/null
+++ b/recipes-kernel/linux/linux-mainline_6.10.1.bb
@@ -0,0 +1,13 @@
+require linux-mainline.inc
+
+DESCRIPTION = "Mainline Longterm Linux kernel"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+SRC_URI[sha256sum] = "70109dfd1cd1c5f8a58eb1cb37122b9bf93f9c6a6280bf91019263c7339cf76b"
+
+SRC_URI = "https://www.kernel.org/pub/linux/kernel/v${KRELEASE}.x/linux-${PV}.tar.xz \
+	file://defconfig \
+"
+
+LINUX_VERSION = "6.10.1"
-- 
2.43.0