Skip to contentSkip to conversation

configs/nezha_defconfig: bump versions for uboot, sbi and linux kernel

PATCH In review Indrek Kruusa 4 participants 20 messages Dec 11, 2022 – Dec 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 configs/nezha_defconfig: bump versions for uboot, sbi and linux kernel

kernel: bump to version 6.1.0-rc3 in d1/wip branch
u-boot: use the version with full SPL support from d1-wip branch
opensbi: take in the latest fixes from d1-wip branch

Other:
remove patches directory definition as no patches are needed anymore update linux headers version
update binary name as the new uboot generates it

---
 configs/nezha_defconfig | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
configs/nezha_defconfig +5 -6
index 5d0948a013..428c443d65 100644
@@ -1,13 +1,12 @@
 BR2_riscv=y
-BR2_GLOBAL_PATCH_DIR="board/nezha/patches"
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_19=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_0=y
 BR2_SYSTEM_DHCP="eth0"
 BR2_ROOTFS_OVERLAY="board/nezha/overlay"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/nezha/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
-BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,linux,fe178cf0153d98b71cb01a46c8cc050826a17e77)/linux-fe178cf0153d98b71cb01a46c8cc050826a17e77.tar.gz"
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,linux,ca67838d84af4c9f85d06311c9e98e1adf46308f)/linux-ca67838d84af4c9f85d06311c9e98e1adf46308f.tar.gz"
 BR2_LINUX_KERNEL_DEFCONFIG="nezha"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun20i-d1-nezha"
@@ -17,14 +16,14 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"
 BR2_TARGET_OPENSBI_PLAT="generic"
 # BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
 BR2_TARGET_SUN20I_D1_SPL=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
-BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,u-boot,d1-2022-05-26)/uboot-d1-2022-05-26.tar.gz"
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,u-boot,528ae9bc6c55edd3ffe642734b4132a8246ea777)/uboot-528ae9bc6c55edd3ffe642734b4132a8246ea777.tar.gz"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nezha"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
@@ -33,5 +32,5 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
 BR2_TARGET_UBOOT_NEEDS_OPENSBI=y
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
 BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
-BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.toc1"
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
 BR2_PACKAGE_HOST_GENIMAGE=y
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/5 board/nezha/genimage.cfg: remove boot0 from genimage.cfg

---
 board/nezha/genimage.cfg | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)
board/nezha/genimage.cfg +3 -22
index 783391fb99..5763b40cd4 100644
@@ -4,34 +4,15 @@ image sdcard.img {
 	hdimage {
 	}
 
-	partition boot0-1 {
-		in-partition-table = "no"
-		image = "boot0_sdcard_sun20iw1p1.bin"
-		offset = 8K
-	}
-
-	partition boot0-2 {
-		in-partition-table = "no"
-		image = "boot0_sdcard_sun20iw1p1.bin"
-		offset = 128K
-	}
-
 	partition u-boot-1 {
 		in-partition-table = "no"
-		image = "u-boot.toc1"
-		offset = 12M
-	}
-
-	partition u-boot-2 {
-		in-partition-table = "no"
-		image = "u-boot.toc1"
-		offset = 16400K
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 128K
 	}
-
 	partition rootfs {
 		partition-type = 0x83
 		image = "rootfs.ext4"
 		bootable = "true"
-		offset = 18M
+		offset = 2M
 	}
 }
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/5] board/nezha/genimage.cfg: remove boot0 from genimage.cfg

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa <[email protected]> writes:

---
 board/nezha/genimage.cfg | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

board/nezha/genimage.cfg image sdcard.img { · line 16

Quoted 7 lines
board/nezha/genimage.cfg +1 -2
-
 	partition rootfs {
 		partition-type = 0x83
 		image = "rootfs.ext4"
 		bootable = "true"
-		offset = 18M
+		offset = 2M

Any specific reason to use 2MB? u-boot-sunxi-with-spl.bin is only 768KB.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 2/5] board/nezha/genimage.cfg: remove boot0 from genimage.cfg

Kontakt Peter Korsgaard (<[email protected]>) kirjutas kuupäeval E, 12. detsember 2022 kell 09:24:

Quoted 15 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa <[email protected]> writes:

---
 board/nezha/genimage.cfg | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

board/nezha/genimage.cfg image sdcard.img { · line 16

Quoted 7 lines
board/nezha/genimage.cfg +1 -2
-
     partition rootfs {
             partition-type = 0x83
             image = "rootfs.ext4"
             bootable = "true"
-            offset = 18M
+            offset = 2M
Quoted 2 lines

Any specific reason to use 2MB? u-boot-sunxi-with-spl.bin is only 768KB.

I was shy enough when fine tuning that space. Yes, it fits into 1MB.

Quoted 4 lines

--
Bye, Peter Korsgaard

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

PATCH 3/5 board/nezha/overlay/boot/extlinux/extlinux.conf: activate framebuffer console on HDMI

In reply to Indrek Kruusa

Replace serial console with the framebuffer console on HDMI. Limit resolution to 1280x800 as the framebuffer is really slow.

---
 board/nezha/overlay/boot/extlinux/extlinux.conf | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
board/nezha/overlay/boot/extlinux/extlinux.conf +1 -2
index 91b2298628..4bf66ee8c4 100644
@@ -1,4 +1,3 @@
 label linux
   kernel /boot/Image
-  # use devicetree from u-boot
-  append console=ttyS0,115200 root=/dev/mmcblk0p1 ro rootwait
+  append console=tty0 video=HDMI-A-1:1280x800 root=/dev/mmcblk0p1 ro rootwait
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH 3/5] board/nezha/overlay/boot/extlinux/extlinux.conf: activate framebuffer console on HDMI

Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa <[email protected]> writes:

Replace serial console with the framebuffer console on HDMI. Limit resolution to 1280x800 as the framebuffer is really slow.

---
 board/nezha/overlay/boot/extlinux/extlinux.conf | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
board/nezha/overlay/boot/extlinux/extlinux.conf +0 -0
index 91b2298628..4bf66ee8c4 100644

board/nezha/overlay/boot/extlinux/extlinux.conf line 3

Quoted 5 lines
board/nezha/overlay/boot/extlinux/extlinux.conf +1 -2
@@ -1,4 +1,3 @@
 label linux
   kernel /boot/Image
-  # use devicetree from u-boot
-  append console=ttyS0,115200 root=/dev/mmcblk0p1 ro rootwait
+  append console=tty0 video=HDMI-A-1:1280x800 root=/dev/mmcblk0p1 ro rootwait

Why? We generally use serial console in the defconfigs, or at least run the console and a getty on both the serial port and the video output like on raspberrypi.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

Re: [Buildroot] [PATCH 3/5] board/nezha/overlay/boot/extlinux/extlinux.conf: activate framebuffer console on HDMI

Kontakt Peter Korsgaard (<[email protected]>) kirjutas kuupäeval E, 12. detsember 2022 kell 09:30:

Quoted 23 lines

Review

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa <[email protected]> writes:

Replace serial console with the framebuffer console on HDMI. Limit resolution to 1280x800 as the framebuffer is really slow.

---
 board/nezha/overlay/boot/extlinux/extlinux.conf | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
(quoted diff) +0 -0

b/board/nezha/overlay/boot/extlinux/extlinux.conf

board/nezha/overlay/boot/extlinux/extlinux.conf line 3

Quoted 9 lines

index 91b2298628..4bf66ee8c4 100644

board/nezha/overlay/boot/extlinux/extlinux.conf +1 -2
@@ -1,4 +1,3 @@
 label linux
   kernel /boot/Image
-  # use devicetree from u-boot
-  append console=ttyS0,115200 root=/dev/mmcblk0p1 ro rootwait
+  append console=tty0 video=HDMI-A-1:1280x800 root=/dev/mmcblk0p1 ro

rootwait

Quoted 4 lines

Why? We generally use serial console in the defconfigs, or at least run the console and a getty on both the serial port and the video output like on raspberrypi.

Well, I was thinking that a working HDMI console fits for a wider audience. But this is subjective indeed. Will take that into account in the future.

Quoted 4 lines

--
Bye, Peter Korsgaard

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#7 lore raw

PATCH 4/5 board/nezha/patches: delete obsolete patches for uboot

In reply to Indrek Kruusa
---
 ...pport-building-u-boot.toc1-for-nezda.patch | 54 -------------------
 1 file changed, 54 deletions(-)
 delete mode 100644 board/nezha/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-nezda.patch
board/nezha/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-nezda.patch deleted +0 -54
deleted file mode 100644
index 6e89a921df..0000000000
@@ -1,54 +0,0 @@
-From 4a923e0e4ef6d2b41cb89d658e269adada847573 Mon Sep 17 00:00:00 2001
-From: Peter Korsgaard <[email protected]>
-Date: Thu, 4 Nov 2021 22:32:04 +0100
-Subject: [PATCH] Makefile: HACK: Support building u-boot.toc1 for nezda board
-
-For easier integration into Buildroot.  The boot0 / toc1 logic is WIP until
-U-Boot gains SPL support for the D1, so add a hack to make it easier to
-integrate in Buildroot as-is.
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- Makefile  | 9 +++++++++
- nezha.cfg | 9 +++++++++
- 2 files changed, 18 insertions(+)
- create mode 100644 nezha.cfg
-
-diff --git a/Makefile b/Makefile
-index f911f70344..259d93bf80 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1084,6 +1084,15 @@ endif
- .binman_stamp: FORCE
- 	@touch $@
- 
-+fw_dynamic.bin: $(OPENSBI)
-+	$(call if_changed,copy)
-+
-+MKIMAGEFLAGS_u-boot.toc1 = -T sunxi_toc1
-+u-boot.toc1: nezha.cfg fw_dynamic.bin inputs
-+	$(call if_changed,mkimage)
-+
-+all: u-boot.toc1
-+
- ifeq ($(CONFIG_DEPRECATED),y)
- 	$(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
- endif
-diff --git a/nezha.cfg b/nezha.cfg
-new file mode 100644
-index 0000000000..2d23b9b388
---- /dev/null
-+++ b/nezha.cfg
-@@ -0,0 +1,9 @@
-+[opensbi]
-+file = fw_dynamic.bin
-+addr = 0x40000000
-+[dtb]
-+file = arch/riscv/dts/sun20i-d1-nezha.dtb
-+addr = 0x44000000
-+[u-boot]
-+file = u-boot-nodtb.bin
-+addr = 0x4a000000
--- 
-2.20.1
-
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw
In reply to Indrek Kruusa
Quoted 9 lines · On Sun, 11 Dec 2022 22:17:00 +0200 Indrek Kruusa <[email protected]>…

kernel: bump to version 6.1.0-rc3 in d1/wip branch
u-boot: use the version with full SPL support from d1-wip branch
opensbi: take in the latest fixes from d1-wip branch

Other:
remove patches directory definition as no patches are needed anymore update linux headers version
update binary name as the new uboot generates it

Quoted 4 lines
---
 configs/nezha_defconfig | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Thanks for this patch series, however PATCH 3/5 has apparently not made its way to the mailing list. Could you double-check?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

PATCH 5/5 board/nezha/readme.txt: update readme.txt about framebuffer console on HDMI

In reply to Indrek Kruusa
---
 board/nezha/readme.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/nezha/readme.txt +1 -1
index fd4c6707de..8d207ced74 100644
@@ -20,5 +20,5 @@ Copy the bootable "sdcard.img" onto an SD card with "dd":
 
   $ sudo dd if=output/images/sdcard.img of=/dev/sdX
 
-Connect a TTL UART to the debug connector, insert the microSD card and
+Connect display cable to the HDMI connection port, insert the microSD card and
 plug in a USB-C cable to the PWR connector to boot the system.
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw
In reply to Indrek Kruusa
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa <[email protected]> writes:

kernel: bump to version 6.1.0-rc3 in d1/wip branch
u-boot: use the version with full SPL support from d1-wip branch
opensbi: take in the latest fixes from d1-wip branch

Other:
remove patches directory definition as no patches are needed anymore update linux headers version
update binary name as the new uboot generates it

Thanks. Funny enough I was just working on doing pretty much the same thing here. I've CC'ed you on the patch series I just sent.

This patch does a bunch of different things, but it doesn't do enough - E.G. it doesn't update genimage.cfg so the build is broken after this commit - So that is not good. Maybe have a look at my series where I update each component (U-Boot/OpenSBI/Linux) separately.

configs/nezha_defconfig BR2_TARGET_ROOTFS_EXT2_4=y · line 19

Quoted 8 lines
configs/nezha_defconfig +1 -1
@@ -17,14 +16,14 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"

Why still use this custom opensbi? There is D1 support in version 1.1 as mentioned on https://linux-sunxi.org/Allwinner_Nezha

configs/nezha_defconfig BR2_TARGET_ROOTFS_EXT2_4=y · line 22

Quoted 3 lines
configs/nezha_defconfig +0 -0
 BR2_TARGET_OPENSBI_PLAT="generic"
 # BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
 BR2_TARGET_SUN20I_D1_SPL=y

You are still enabling the old sun20i-d1-spl even though you change to use U-Boot SPL?

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa [email protected] writes:

BR2_TARGET_OPENSBI=y

BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y

Quoted 8 lines

configs/nezha_defconfig BR2_TARGET_ROOTFS_EXT2_4=y · line 19

Quoted 3 lines
configs/nezha_defconfig +1 -1
-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"
 
+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"

Why still use this custom opensbi? There is D1 support in version 1.1 as mentioned on https://linux-sunxi.org/Allwinner_Nezha

Just in case it helps, I've been testing both the Korsgaard and Kruusa patches on a MangoPI MQ Pro. This board is close, but not exactly like the Nezha, so I expect differences.

Using OpenSBI 1.1 results in a non-booting Linux kernel for me. Here's the error:

```
Unhandled exception: Store/AMO access fault
EPC: 000000005ff8f838 RA: 000000005ffb6346 TVAL: 0000000040040000
EPC: 0000000042e01838 RA: 0000000042e28346 reloc adjusted

Code: b383 0385 be03 0405 be83 0485 bf03 0505 (e110)
```

If I use riscv-software-src/opensbi master, Linux boots again. From my point of view, the Linux Sunxi wiki is correct that forks don't need to be used, but something appears to have been fixed after 1.1.

As a second note, I added the following based on the Sunxi wiki:

BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES="FW_PIC=y"

It's not clear to me that it makes a difference.

It doesn't seem right for me to add a Tested-By to the patch series since I have a different board. However, the Linux 6.1.0-rc3 update and U-Boot updates appear to be working well in my testing so far. My setup is closer to the Korsgaard patch set since I'm not using the HDMI output change. The OpenSBI issue with 1.1 is the only snag I hit.

Thank you both for your Nezha updates.

-Frank

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#12 lore raw

Kontakt Frank Hunleth (<[email protected]>) kirjutas kuupäeval E, 12. detsember 2022 kell 17:32:

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa [email protected] writes:

BR2_TARGET_OPENSBI=y

Quoted 12 lines
Quoted 3 lines
Quoted 3 lines

BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y

-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"

Quoted 2 lines
Quoted 2 lines

+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"

Quoted 5 lines

Why still use this custom opensbi? There is D1 support in version 1.1 as mentioned on https://linux-sunxi.org/Allwinner_Nezha

Ahh, I didn't catch that one. Very nice, will check!

Quoted 6 lines

Just in case it helps, I've been testing both the Korsgaard and Kruusa patches on a MangoPI MQ Pro. This board is close, but not exactly like the Nezha, so I expect differences.

Nice, then we can prepare support for more boards and test it properly :) Actually I did my "it boots" testing on Lichee dock. Also known as Lichee RV dock. The naming of this carrier board or SOM combo is a mess. The official product is just Lichee dock AFAIK. But none is calling it like that. Anyway, I can help to prepare support for this board also.

@Angelo Compagnucci <[email protected]> , any chance you could update your Lichee RV patches to the latest "known" goodies? :)

Quoted 28 lines

Using OpenSBI 1.1 results in a non-booting Linux kernel for me. Here's the error:

```
Unhandled exception: Store/AMO access fault
EPC: 000000005ff8f838 RA: 000000005ffb6346 TVAL: 0000000040040000
EPC: 0000000042e01838 RA: 0000000042e28346 reloc adjusted

Code: b383 0385 be03 0405 be83 0485 bf03 0505 (e110)
```

If I use riscv-software-src/opensbi master, Linux boots again. From my point of view, the Linux Sunxi wiki is correct that forks don't need to be used, but something appears to have been fixed after 1.1.

As a second note, I added the following based on the Sunxi wiki:

BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES="FW_PIC=y"

It's not clear to me that it makes a difference.

It doesn't seem right for me to add a Tested-By to the patch series since I have a different board. However, the Linux 6.1.0-rc3 update and U-Boot updates appear to be working well in my testing so far. My setup is closer to the Korsgaard patch set since I'm not using the HDMI output change. The OpenSBI issue with 1.1 is the only snag I hit.

Quoted 5 lines

Thank you both for your Nezha updates.

-Frank

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#13 lore raw
Quoted 31 lines · Indrek Kruusa

Kontakt Frank Hunleth (<[email protected]>) kirjutas kuupäeval E, 12. detsember 2022 kell 17:32:

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa [email protected] writes:

BR2_TARGET_OPENSBI=y

Quoted 12 lines
Quoted 3 lines
Quoted 3 lines

BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y

-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"

Quoted 2 lines
Quoted 2 lines

+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"

Quoted 5 lines

Why still use this custom opensbi? There is D1 support in version 1.1 as mentioned on https://linux-sunxi.org/Allwinner_Nezha

Ahh, I didn't catch that one. Very nice, will check!

Quoted 6 lines

Just in case it helps, I've been testing both the Korsgaard and Kruusa patches on a MangoPI MQ Pro. This board is close, but not exactly like the Nezha, so I expect differences.

Quoted 9 lines

Nice, then we can prepare support for more boards and test it properly :) Actually I did my "it boots" testing on Lichee dock. Also known as Lichee RV dock. The naming of this carrier board or SOM combo is a mess. The official product is just Lichee dock AFAIK. But none is calling it like that. Anyway, I can help to prepare support for this board also.

@Angelo Compagnucci <[email protected]> , any chance you could update your Lichee RV patches to the latest "known" goodies? :)

Got a bad flu, I'll try to work on them ASAP.

Quoted 36 lines
Quoted 36 lines

Using OpenSBI 1.1 results in a non-booting Linux kernel for me. Here's the error:

```
Unhandled exception: Store/AMO access fault
EPC: 000000005ff8f838 RA: 000000005ffb6346 TVAL: 0000000040040000
EPC: 0000000042e01838 RA: 0000000042e28346 reloc adjusted

Code: b383 0385 be03 0405 be83 0485 bf03 0505 (e110)
```

If I use riscv-software-src/opensbi master, Linux boots again. From my point of view, the Linux Sunxi wiki is correct that forks don't need to be used, but something appears to have been fixed after 1.1.

As a second note, I added the following based on the Sunxi wiki:

BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES="FW_PIC=y"

It's not clear to me that it makes a difference.

It doesn't seem right for me to add a Tested-By to the patch series since I have a different board. However, the Linux 6.1.0-rc3 update and U-Boot updates appear to be working well in my testing so far. My setup is closer to the Korsgaard patch set since I'm not using the HDMI output change. The OpenSBI issue with 1.1 is the only snag I hit.

Thank you both for your Nezha updates.

-Frank

Signature · 15 lines
Angelo Compagnucci

Software Engineer

[email protected]
__________________________________
Amarula Solutions SRL

Via le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 (0)42 243 5310
[email protected]

www.amarulasolutions.com
[`as] https://www.amarulasolutions.com|

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#14 lore raw

Kontakt Angelo Compagnucci (<[email protected]>) kirjutas kuupäeval E, 12. detsember 2022 kell 18:55:

Quoted 43 lines
Quoted 38 lines · Indrek Kruusa

Kontakt Frank Hunleth (<[email protected]>) kirjutas kuupäeval E, 12. detsember 2022 kell 17:32:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa [email protected] writes:

BR2_TARGET_OPENSBI=y

BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y

-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

Quoted 10 lines

github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"

Quoted 2 lines
Quoted 2 lines

+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"

Quoted 3 lines

Why still use this custom opensbi? There is D1 support in version 1.1

as

Quoted 2 lines

mentioned on https://linux-sunxi.org/Allwinner_Nezha

Ahh, I didn't catch that one. Very nice, will check!

Quoted 6 lines

Just in case it helps, I've been testing both the Korsgaard and Kruusa patches on a MangoPI MQ Pro. This board is close, but not exactly like the Nezha, so I expect differences.

Nice, then we can prepare support for more boards and test it properly :) Actually I did my "it boots" testing on Lichee dock. Also known as Lichee RV dock. The naming of this carrier board or SOM combo is a mess. The official product is just Lichee dock AFAIK. But none is calling it like that. Anyway, I can help to prepare support for this board also.

Quoted 6 lines
Quoted 3 lines

@Angelo Compagnucci <[email protected]> , any chance you could update your Lichee RV patches to the latest "known" goodies? :)

Got a bad flu, I'll try to work on them ASAP.

Oh, get well soon!

Quoted 49 lines
Quoted 33 lines
Quoted 33 lines

Using OpenSBI 1.1 results in a non-booting Linux kernel for me. Here's the error:

```
Unhandled exception: Store/AMO access fault
EPC: 000000005ff8f838 RA: 000000005ffb6346 TVAL: 0000000040040000
EPC: 0000000042e01838 RA: 0000000042e28346 reloc adjusted

Code: b383 0385 be03 0405 be83 0485 bf03 0505 (e110)
```

If I use riscv-software-src/opensbi master, Linux boots again. From my point of view, the Linux Sunxi wiki is correct that forks don't need to be used, but something appears to have been fixed after 1.1.

As a second note, I added the following based on the Sunxi wiki:

BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES="FW_PIC=y"

It's not clear to me that it makes a difference.

It doesn't seem right for me to add a Tested-By to the patch series since I have a different board. However, the Linux 6.1.0-rc3 update and U-Boot updates appear to be working well in my testing so far. My setup is closer to the Korsgaard patch set since I'm not using the HDMI output change. The OpenSBI issue with 1.1 is the only snag I hit.

Quoted 5 lines
Quoted 5 lines

Thank you both for your Nezha updates.

-Frank

--

Angelo Compagnucci

Software Engineer

[email protected]
__________________________________
Amarula Solutions SRL

Quoted 8 lines

Via le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 (0)42 243 5310
[email protected]

www.amarulasolutions.com
[`as] https://www.amarulasolutions.com|

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#15 lore raw
In reply to Frank Hunleth via buildroot
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Frank" == Frank Hunleth <[email protected]> writes:

Hi,

Quoted 17 lines
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa [email protected] writes:

BR2_TARGET_OPENSBI=y

BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y

-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"

Quoted 7 lines
Quoted 2 lines

+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"

Why still use this custom opensbi? There is D1 support in version 1.1 as mentioned on https://linux-sunxi.org/Allwinner_Nezha

Quoted 5 lines

Just in case it helps, I've been testing both the Korsgaard and Kruusa patches on a MangoPI MQ Pro. This board is close, but not exactly like the Nezha, so I expect differences.

Using OpenSBI 1.1 results in a non-booting Linux kernel for me. Here's the error:

Just to be sure, is this with the 5.19 based kernel we used to use (fe178cf0153d98b71cb01a46c8cc050826a17e77) or the "new" 6.1-rc3 based one (ca67838d84af4c9f85d06311c9e98e1adf46308f)?

Quoted 5 lines

Unhandled exception: Store/AMO access fault
EPC: 000000005ff8f838 RA: 000000005ffb6346 TVAL: 0000000040040000
EPC: 0000000042e01838 RA: 0000000042e28346 reloc adjusted

Code: b383 0385 be03 0405 be83 0485 bf03 0505 (e110)

Sounds like access to an invalid address to me. When does this trigger? Early doing Linux boot?

I see the mangopi mq-pro only has 512MB RAM. 0x5xxx.xxxx is at the very end of that (memory starts at 0x4xxx.xxxx), did you update the memory size in the device tree passed to OpenSBI?

I just did a clean rebuild of nezha_defconfig here, and it boots without any issues:

U-Boot SPL 2022.10 (Dec 12 2022 - 17:20:45 +0100)
sunxi_ram_probe: dram-controller@3102000: probing
DRAM only have internal ZQ!!
ddr_efuse_type: 0x0
[AUTO DEBUG] two rank and full DQ!
ddr_efuse_type: 0x0
[AUTO DEBUG] rank 0 row = 15
[AUTO DEBUG] rank 0 bank = 8
[AUTO DEBUG] rank 0 page size = 2 KB
[AUTO DEBUG] rank 1 row = 15
[AUTO DEBUG] rank 1 bank = 8
[AUTO DEBUG] rank 1 page size = 2 KB
rank1 config same as rank0
DRAM BOOT DRIVE INFO: V0.24
DRAM CLK = 792 MHz
DRAM Type = 3 (2:DDR2,3:DDR3)
DRAMC ZQ value: 0x7b7bfb
DRAM ODT value: 0x42.
ddr_efuse_type: 0x0
DRAM SIZE =1024 M
DRAM simple test OK.
mxstatus=0xc0408000 mhcr=0x00000109 mcor=0x00000003 mhint=0x00004000 Trying to boot from MMC1
PLL reg = 0xf8216300, freq = 1200000000
SPL size = 81920, sector = 160
sunxi_ram_get_info: dram-controller@3102000: getting info

OpenSBI v1.1
____ _____ ____ _____

  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name : Allwinner D1 Nezha
Platform Features : medeleg
Platform HART Count : 1
Platform IPI Device : ---
Platform Timer Device : --- @ 0Hz
Platform Console Device : uart8250
Platform HSM Device : sun20i-d1-ppu
Platform Reboot Device : sunxi-wdt-reset
Platform Shutdown Device : ---
Firmware Base : 0x40000000
Firmware Size : 288 KB
Runtime SBI Version : 1.0

Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000040000000-0x000000004007ffff ()
Domain0 Region01 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000042e00000
Domain0 Next Arg1 : 0x0000000042e8b978
Domain0 Next Mode : S-mode
Domain0 SysReset : yes

Boot HART ID : 0
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdcvx
Boot HART ISA Extensions : time
Boot HART PMP Count : 8
Boot HART PMP Granularity : 2048
Boot HART PMP Address Bits: 38
Boot HART MHPM Count : 0
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109
sunxi_set_gate: (CLK#24) unhandled

U-Boot 2022.10 (Dec 12 2022 - 17:20:45 +0100) Allwinner Technology

..

Starting kernel ...

[    0.000000] Linux version 6.1.0-rc3 (peko@dell) (riscv64-buildroot-linux-gnu-gcc.br_real (Buildroot 2022.11-477-g5cb74c92f7) 11.3.0, GNU ld (GNU Binutils) 2.38) #1 PREEMPT Mon Dec 12 17:28:21 CET 2022

..

# uptime
 00:07:05 up 6 min,  load average: 0.00, 0.00, 0.00
Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#16 lore raw

Kontakt Peter Korsgaard (<[email protected]>) kirjutas kuupäeval E, 12. detsember 2022 kell 19:56:

Quoted 137 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Frank" == Frank Hunleth <[email protected]> writes:

Hi,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa [email protected] writes:

BR2_TARGET_OPENSBI=y

BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y

-BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz"

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

+BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call

github,smaeul,opensbi,5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3)/opensbi-5307908fb651a01cc6a2f3fd9fc7b9b471bbccb3.tar.gz"

Quoted 3 lines
Quoted 3 lines

Why still use this custom opensbi? There is D1 support in version 1.1

as

Quoted 8 lines
Quoted 2 lines

mentioned on https://linux-sunxi.org/Allwinner_Nezha

Just in case it helps, I've been testing both the Korsgaard and Kruusa patches on a MangoPI MQ Pro. This board is close, but not exactly like the Nezha, so I expect differences.

Using OpenSBI 1.1 results in a non-booting Linux kernel for me. Here's

the error:

Just to be sure, is this with the 5.19 based kernel we used to use (fe178cf0153d98b71cb01a46c8cc050826a17e77) or the "new" 6.1-rc3 based one (ca67838d84af4c9f85d06311c9e98e1adf46308f)?

Quoted 5 lines

Unhandled exception: Store/AMO access fault
EPC: 000000005ff8f838 RA: 000000005ffb6346 TVAL: 0000000040040000
EPC: 0000000042e01838 RA: 0000000042e28346 reloc adjusted

Code: b383 0385 be03 0405 be83 0485 bf03 0505 (e110)

Sounds like access to an invalid address to me. When does this trigger? Early doing Linux boot?

I see the mangopi mq-pro only has 512MB RAM. 0x5xxx.xxxx is at the very end of that (memory starts at 0x4xxx.xxxx), did you update the memory size in the device tree passed to OpenSBI?

I just did a clean rebuild of nezha_defconfig here, and it boots without any issues:

U-Boot SPL 2022.10 (Dec 12 2022 - 17:20:45 +0100)
sunxi_ram_probe: dram-controller@3102000: probing
DRAM only have internal ZQ!!
ddr_efuse_type: 0x0
[AUTO DEBUG] two rank and full DQ!
ddr_efuse_type: 0x0
[AUTO DEBUG] rank 0 row = 15
[AUTO DEBUG] rank 0 bank = 8
[AUTO DEBUG] rank 0 page size = 2 KB
[AUTO DEBUG] rank 1 row = 15
[AUTO DEBUG] rank 1 bank = 8
[AUTO DEBUG] rank 1 page size = 2 KB
rank1 config same as rank0
DRAM BOOT DRIVE INFO: V0.24
DRAM CLK = 792 MHz
DRAM Type = 3 (2:DDR2,3:DDR3)
DRAMC ZQ value: 0x7b7bfb
DRAM ODT value: 0x42.
ddr_efuse_type: 0x0
DRAM SIZE =1024 M
DRAM simple test OK.
mxstatus=0xc0408000 mhcr=0x00000109 mcor=0x00000003 mhint=0x00004000 Trying to boot from MMC1
PLL reg = 0xf8216300, freq = 1200000000
SPL size = 81920, sector = 160
sunxi_ram_get_info: dram-controller@3102000: getting info

OpenSBI v1.1
____ _____ ____ _____

  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name : Allwinner D1 Nezha
Platform Features : medeleg
Platform HART Count : 1
Platform IPI Device : ---
Platform Timer Device : --- @ 0Hz
Platform Console Device : uart8250
Platform HSM Device : sun20i-d1-ppu
Platform Reboot Device : sunxi-wdt-reset
Platform Shutdown Device : ---
Firmware Base : 0x40000000
Firmware Size : 288 KB
Runtime SBI Version : 1.0

Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000040000000-0x000000004007ffff ()
Domain0 Region01 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000042e00000
Domain0 Next Arg1 : 0x0000000042e8b978
Domain0 Next Mode : S-mode
Domain0 SysReset : yes

Boot HART ID : 0
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdcvx
Boot HART ISA Extensions : time
Boot HART PMP Count : 8
Boot HART PMP Granularity : 2048
Boot HART PMP Address Bits: 38
Boot HART MHPM Count : 0
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109
sunxi_set_gate: (CLK#24) unhandled

U-Boot 2022.10 (Dec 12 2022 - 17:20:45 +0100) Allwinner Technology

..

Starting kernel ...

[    0.000000] Linux version 6.1.0-rc3 (peko@dell)
(riscv64-buildroot-linux-gnu-gcc.br_real (Buildroot
2022.11-477-g5cb74c92f7) 11.3.0, GNU ld (GNU Binutils) 2.38) #1 PREEMPT Mon
Dec 12 17:28:21 CET 2022
Quoted 5 lines

..

# uptime
 00:07:05 up 6 min,  load average: 0.00, 0.00, 0.00

I also did a clean build with Peter's patches and the Lichee RV dock is fine with it. Some snippets from output below. I will drop my patch series as Peter's series is superior.

U-Boot SPL 2022.10 (Dec 13 2022 - 21:00:50 +0200)
sunxi_ram_probe: dram-controller@3102000: probing
DRAM only have internal ZQ!!
ddr_efuse_type: 0x0
[AUTO DEBUG] single rank and full DQ!
ddr_efuse_type: 0x0
[AUTO DEBUG] rank 0 row = 15
[AUTO DEBUG] rank 0 bank = 8
[AUTO DEBUG] rank 0 page size = 2 KB
DRAM BOOT DRIVE INFO: V0.24
DRAM CLK = 792 MHz
DRAM Type = 3 (2:DDR2,3:DDR3)
DRAMC ZQ value: 0x7b7bfb
DRAM ODT value: 0x42.
ddr_efuse_type: 0x0
DRAM SIZE =512 M
DRAM simple test OK.
mxstatus=0xc0408000 mhcr=0x00000109 mcor=0x00000003 mhint=0x00004000 Trying to boot from MMC1
PLL reg = 0xf8216300, freq = 1200000000
SPL size = 81920, sector = 160
sunxi_ram_get_info: dram-controller@3102000: getting info

OpenSBI v1.1
____ _____ ____ _____

  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name : Allwinner D1 Nezha
Platform Features : medeleg
Platform HART Count : 1
Platform IPI Device : ---
Platform Timer Device : --- @ 0Hz
Platform Console Device : uart8250
Platform HSM Device : sun20i-d1-ppu
Platform Reboot Device : sunxi-wdt-reset
Platform Shutdown Device : ---
Firmware Base : 0x40000000
Firmware Size : 288 KB
Runtime SBI Version : 1.0

...

U-Boot 2022.10 (Dec 13 2022 - 21:00:50 +0200) Allwinner Technology

DRAM:  512 MiB
sunxi_set_gate: (CLK#24) unhandled
Core:  54 devices, 20 uclasses, devicetree: separate

...

Moving Image from 0x41000000 to 0x40200000, end=4162d000
## Flattened Device Tree blob at 5fd3e320
Booting using the fdt blob at 0x5fd3e320
Working FDT set to 5fd3e320
Loading Device Tree to 0000000042df2000, end 0000000042dffa9f ... OK
Working FDT set to 42df2000

Starting kernel ...

[    0.000000] Linux version 6.1.0-rc3 (indrek@stuudio)
(riscv64-buildroot-linux-gnu-gcc.br_real (Buildroot
2022.11-518-gd3d1d5a2da-dirty) 11.3.0, GNU ld (GNU Binutils) 2.38) #1
PREEMPT Tue Dec 13 21:06:48 EET 2022
[    0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000
[    0.000000] Machine model: Allwinner D1 Nezha

...

# uptime
 00:32:39 up 32 min,  load average: 0.00, 0.00, 0.00
# cat /proc/iomem
02000000-020007ff : 2000000.pinctrl pinctrl@2000000
02000c00-02000fff : 2000c00.pwm pwm@2000c00
02001000-02001fff : 2001000.clock-controller clock-controller@2001000
02008000-020083ff : 2008000.led-controller led-controller@2008000
02009400-020097ff : 2009400.temperature-sensor temperature-sensor@2009400
02009800-02009bff : 2009800.keys keys@2009800
02010000-0201ffff : 2010000.iommu iommu@2010000
02030000-02030fff : 2030000.audio-codec audio-codec@2030000
02500000-0250001f : serial
02500400-0250041f : serial
02502800-02502bff : 2502800.i2c i2c@2502800
03000000-03000fff : 3000000.syscon syscon@3000000
03002000-03002fff : 3002000.dma-controller dma-controller@3002000
03006000-03006fff : 3006000.efuse efuse@3006000
03040000-030407ff : 3040000.crypto crypto@3040000
04020000-04020fff : 4020000.mmc mmc@4020000
04021000-04021fff : 4021000.mmc mmc@4021000
04025000-04025fff : 4025000.spi spi@4025000
04026000-04026fff : 4026000.spi spi@4026000
04100000-041003ff : usb@4100000
  04100000-041003ff : musb-hdrc.4.auto usb@4100000
04100400-041004ff : 4100400.phy phy_ctrl
04101000-041010ff : 4101000.usb usb@4101000
04101400-041014ff : 4101400.usb usb@4101400
04101800-041018ff : 4100400.phy pmu0
04200000-042000ff : 4200000.usb usb@4200000
04200400-042004ff : 4200400.usb usb@4200400
04200800-042008ff : 4100400.phy pmu1
05000000-0500ffff : 5000000.clock-controller clock-controller@5000000
05100000-051fffff : 5100000.mixer mixer@5100000
05200000-052fffff : 5200000.mixer mixer@5200000
05451000-05451fff : 5451000.phy phy@5451000
05460000-05460fff : 5460000.tcon-top tcon-top@5460000
05461000-05461fff : 5461000.lcd-controller lcd-controller@5461000
05470000-05470fff : 5470000.lcd-controller lcd-controller@5470000
05500000-0550ffff : 5500000.hdmi hdmi@5500000
05510000-0551ffff : 5510000.phy phy@5510000
06011000-0601101f : 6011000.watchdog watchdog@6011000
07010000-070103ff : 7010000.clock-controller clock-controller@7010000
07090000-070903ff : 7090000.rtc rtc@7090000
40000000-4007ffff : Reserved
40200000-5fffffff : System RAM
  40202000-4162c4cb : Kernel image
    40202000-409df031 : Kernel code
    40e00000-411fffff : Kernel rodata
    41400000-415dafff : Kernel data
    415db000-4162c4cb : Kernel bss
Quoted 4 lines

--
Bye, Peter Korsgaard

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#17 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Indrek" == Indrek Kruusa <[email protected]> writes:

Hi,

Quoted 3 lines

I also did a clean build with Peter's patches and the Lichee RV dock is fine with it. Some snippets from output below. I will drop my patch series as Peter's series is superior.

Great, thanks for the feedback!

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#18 lore raw
In reply to Peter Korsgaard

Peter, Indrek,

------- Original Message -------

Quoted 4 lines · Peter Korsgaard
Quoted 3 lines

Just in case it helps, I've been testing both the Korsgaard and Kruusa

patches on a MangoPI MQ Pro. This board is close, but not exactly like

Quoted 17 lines
Quoted 3 lines

the Nezha, so I expect differences.

Using OpenSBI 1.1 results in a non-booting Linux kernel for me. Here's the error:

Just to be sure, is this with the 5.19 based kernel we used to use (fe178cf0153d98b71cb01a46c8cc050826a17e77) or the "new" 6.1-rc3 based one (ca67838d84af4c9f85d06311c9e98e1adf46308f)?

Quoted 7 lines

Unhandled exception: Store/AMO access fault

EPC: 000000005ff8f838 RA: 000000005ffb6346 TVAL: 0000000040040000

EPC: 0000000042e01838 RA: 0000000042e28346 reloc adjusted

Code: b383 0385 be03 0405 be83 0485 bf03 0505 (e110)

I am able to run fine on a 512MB MangoPi MQ-Pro now. This is with the patches that were just merged and with the U-Boot defconfig and Linux DTS witched to the Mango Pi MQ-Pro options.

I don't have an understanding of the store/AMO access fault above. I had an unintended change to my Linux configuration that just happens to require a later version of OpenSBI. I just wanted to follow up in case anyone stumbles on this thread that the simple U-Boot defconfig and dts switch to the MangoPi versions works.

-Frank
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#19 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Frank" == Frank Hunleth <[email protected]> writes:

Hi,

Quoted 9 lines

I am able to run fine on a 512MB MangoPi MQ-Pro now. This is with the patches that were just merged and with the U-Boot defconfig and Linux DTS witched to the Mango Pi MQ-Pro options.

I don't have an understanding of the store/AMO access fault above. I had an unintended change to my Linux configuration that just happens to require a later version of OpenSBI. I just wanted to follow up in case anyone stumbles on this thread that the simple U-Boot defconfig and dts switch to the MangoPi versions works.

Ok, great to hear!

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot