public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v2 8/8] meta-isar: Switch VisionFive 2 to mainline kernel
Date: Tue,  9 Jan 2024 08:33:24 +0100	[thread overview]
Message-ID: <894e1bfc61dcda239d38cf9ca64442cd55fe916b.1704785604.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1704785604.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

Using 6.6 as baseline means dropping support for PCIe (M.2), timer
(alternative clocksource), PWM, CAN, PWMDAC, Display, ISP (camera). We
still get a connected and generally working board this way, and we no
longer need to maintain a separate recipe. Also the example-module now
builds fine.

As mainline is fine with the DT provided by mainline U-Boot, stop using
the kernel's DT.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../conf/machine/starfive-visionfive2.conf    |  6 +-----
 .../linux/files/starfive2_extra.cfg           |  6 +++---
 .../linux/linux-mainline_6.6.10.bb            |  2 ++
 .../linux/linux-starfive_5.15-visionfive2.bb  | 19 -------------------
 .../canned-wks/starfive-visionfive2.wks.in    |  2 +-
 5 files changed, 7 insertions(+), 28 deletions(-)
 delete mode 100644 meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb

diff --git a/meta-isar/conf/machine/starfive-visionfive2.conf b/meta-isar/conf/machine/starfive-visionfive2.conf
index c7f72bb3..baae7ed8 100644
--- a/meta-isar/conf/machine/starfive-visionfive2.conf
+++ b/meta-isar/conf/machine/starfive-visionfive2.conf
@@ -5,7 +5,7 @@
 
 DISTRO_ARCH = "riscv64"
 
-KERNEL_NAME ?= "starfive"
+KERNEL_NAME ?= "mainline"
 
 IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "starfive-visionfive2.wks.in"
@@ -13,7 +13,3 @@ IMAGER_INSTALL:wic += " \
     u-boot-starfive-visionfive2 \
     ${SYSTEMD_BOOTLOADER_INSTALL}"
 IMAGER_BUILD_DEPS += "u-boot-starfive-visionfive2"
-
-# DTB file for booting
-DTB_VISIONFIVE2 = "jh7110-visionfive-v2.dtb"
-DTB_FILES = "starfive/${DTB_VISIONFIVE2}"
diff --git a/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg b/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
index d11c28de..d7c42d73 100644
--- a/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
+++ b/meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg
@@ -1,3 +1,3 @@
-# additional configuration to support stock debian userlands
-CONFIG_BINFMT_MISC=y
-CONFIG_SQUASHFS=m
+# still needed in 6.6, see commit 07863871dfb162965b21bb8c2e4861bdb0019da3
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_STARFIVE=y
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_6.6.10.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.10.bb
index 059b8534..649e1e86 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_6.6.10.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.10.bb
@@ -16,6 +16,8 @@ SRC_URI += " \
     file://subdir/no-ubifs-fs.cfg \
     file://no-root-nfs.cfg;apply=no"
 
+SRC_URI:append:riscv64 = " file://starfive2_extra.cfg"
+
 SRC_URI[sha256sum] = "9ee627e4c109aec7fca3eda5898e81d201af2c7eb2f7d9d7d94c1f0e1205546c"
 
 S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
diff --git a/meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb b/meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
deleted file mode 100644
index e9e0bf4a..00000000
--- a/meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) Siemens AG, 2023
-#
-# SPDX-License-Identifier: MIT
-
-require recipes-kernel/linux/linux-custom.inc
-
-SRC_URI += " \
-    git://github.com/starfive-tech/linux.git;protocol=https;branch=JH7110_VisionFive2_devel;destsuffix=linux-visionfive-${PV} \
-    file://starfive2_extra.cfg"
-SRCREV = "a87c6861c6d96621026ee53b94f081a1a00a4cc7"
-
-S = "${WORKDIR}/linux-visionfive-${PV}"
-
-KERNEL_DEFCONFIG = "starfive_visionfive2_defconfig"
-
-LINUX_VERSION_EXTENSION = "-isar"
-
-COMPATIBLE_MACHINE = "starfive-visionfive2"
diff --git a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
index ed8a3b71..2600580a 100644
--- a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
+++ b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in
@@ -16,7 +16,7 @@ part --source rawcopy --sourceparams "file=/usr/lib/u-boot/starfive-visionfive2/
 # U-Boot FIT
 part --source rawcopy --sourceparams "file=/usr/lib/u-boot/starfive-visionfive2/u-boot.itb" --fixed-size 4M --part-type BC13C2FF-59E6-4262-A352-B275FD6F7172
 # EFI
-part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot,dtb=${DTB_VISIONFIVE2}" --use-uuid --label efi --part-type EF00 --align 1024
+part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot" --use-uuid --label efi --part-type EF00 --align 1024
 # rootfs
 part / --source rootfs --use-uuid --fstype ext4 --mkfs-extraopts "-T default" --label image --active --align 1024 --exclude-path=boot/
 
-- 
2.35.3


  parent reply	other threads:[~2024-01-09  7:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09  7:33 [PATCH v2 0/8] Restore cross-build for RISC-V, update VisionFive 2 Jan Kiszka
2024-01-09  7:33 ` [PATCH v2 1/8] crossvars: Account for PACKAGE_ARCH = "${BUILD_ARCH}" Jan Kiszka
2024-01-09  7:33 ` [PATCH v2 2/8] meta-isar: jh7110-u-boot-spl-tool: Use BPN instead of PN Jan Kiszka
2024-01-09  7:33 ` [PATCH v2 3/8] meta-isar: starfive-visionfive2: Use kernel DTB Jan Kiszka
2024-01-09  7:33 ` [PATCH v2 4/8] meta-isar: jh7110-u-boot-spl-tool: Rework Jan Kiszka
2024-01-09  7:33 ` [PATCH v2 5/8] meta-isar: starfive-visionfive2: Switch to upstream U-Boot Jan Kiszka
2024-01-09  7:33 ` [PATCH v2 6/8] meta-isar: starfive-visionfive2: Drop obsolete recipes Jan Kiszka
2024-01-09  7:33 ` [PATCH v2 7/8] meta-isar: linux-mainline: Update to 6.6.10 Jan Kiszka
2024-01-09  7:33 ` Jan Kiszka [this message]
2024-01-16 11:08   ` [PATCH v2 8/8] meta-isar: Switch VisionFive 2 to mainline kernel Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=894e1bfc61dcda239d38cf9ca64442cd55fe916b.1704785604.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox