Bug 1203558 - openSUSE support for Renesas RZ/G2M
Summary: openSUSE support for Renesas RZ/G2M
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: aarch64 openSUSE Leap 15.4
: P5 - None : Normal (vote)
Target Milestone: Current
Assignee: Matthias Brugger
QA Contact: E-mail List
URL: https://trello.com/c/L6wW7l3v
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-20 08:14 UTC by Duy Hua
Modified: 2023-07-31 22:24 UTC (History)
12 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
log boot openSUSE tumbleweed at board RZ/G2Mv3 (49.61 KB, text/plain)
2022-11-14 07:15 UTC, Duy Hua
Details
create ISO test (31.47 KB, text/plain)
2022-11-17 03:54 UTC, Duy Hua
Details
log boot ISO test (21.77 KB, text/plain)
2022-11-17 03:55 UTC, Duy Hua
Details
log boot openSUSE Leap 15.4 at board RZ/G2Mv3 (22.57 KB, text/plain)
2022-11-24 06:51 UTC, Duy Hua
Details

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Stefan Hundhammer 2022-09-20 08:48:52 UTC
So this is not at all about the installation, but about the kernel. Reassigning.
Comment 2 Matthias Brugger 2022-09-20 14:31:05 UTC
Do you know what the upstream status of the GPU support ist. On a first quick glance it seems quite OK, maybe we are just missing some config options.
Comment 3 Andreas Färber 2022-09-20 15:33:12 UTC
Since neither SUSE nor anyone in the openSUSE community at the time had any Renesas boards to test on, Dirk disabled virtually all Renesas platforms years ago when some driver failed to build (back for armv7hl).

If you can provide us with a list of Kconfig options to enable, we can look into enabling them in Tumbleweed for you to test.

Since Leap is reusing the SLE kernel, enabling new platforms in Leap 15.5 / 15.4 would be a business discussion to be had with SUSE (SLE feature requests).
Comment 4 Duy Hua 2022-09-21 03:34:43 UTC
As Senior Engineer of Renesas, you need to enable Rcar-du as a module and the required module will be inserted after initrd loaded.

CONFIG_DRM_RCAR_DU=m
CONFIG_DRM_RCAR_DW_HDMI=m
CONFIG_DRM_RCAR_MIPI_DSI=m
Comment 5 Dirk Mueller 2022-09-21 09:50:12 UTC
Thank you. I have added that into the pending tumbleweed update as enablement for arm64.
Comment 6 Duy Hua 2022-09-22 08:21:57 UTC
Excuse me, Did you know when we have an OS distro for a test?
Comment 7 Dirk Mueller 2022-09-23 09:20:16 UTC
(In reply to Duy Hua from comment #6)
> Excuse me, Did you know when we have an OS distro for a test?

my changes for tumbleweed are still under review. its a matter of days, hopefully.
Comment 8 Takashi Iwai 2022-10-04 11:30:02 UTC
The feature was enabled on TW kernel, so let's close.

Please reopen if the same problem persists even with the kernel including the fix.  Thanks.
Comment 9 Duy Hua 2022-10-05 03:02:46 UTC
I already download "openSUSE-Tumbleweed-DVD-aarch64-Snapshot20221001-Media.iso" and burn it to my USB. After that, I boot the image with this command in u-boot.

=> usb start;fatload usb 0:1 50000000 EFI/BOOT/BOOTAA64.EFI;bootefi 50000000

And serial terminal logs out:

Loading kernel ...
Loading initial ramdisk ...
EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...
Comment 10 Guillaume GARDET 2022-10-05 06:57:20 UTC
This will be part of the update to kernel 6.0 - https://build.opensuse.org/request/show/1007640

So, you still need to wait a bit.
Comment 11 Duy Hua 2022-10-18 04:16:23 UTC
I saw that request was approved but openSUSE-Tumbleweed-DVD-aarch64-Snapshot20221015-Media.iso still does not work with our chip.

Please support me check and respond for me.
Thank you.
Comment 12 Dirk Mueller 2022-10-18 19:34:23 UTC
Matthias, could you please help with troubleshooting?
Comment 13 Michal Suchanek 2022-10-18 22:01:27 UTC
If your board has a serial port it might be useful to use the serial console to get the kernel messages when the screen is not working.
Comment 14 Duy Hua 2022-10-20 02:09:06 UTC
It logs like the previous iso

Loading kernel ...
Loading initial ramdisk ...
EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...
Comment 15 Matthias Brugger 2022-10-20 08:48:25 UTC
(In reply to Duy Hua from comment #14)
> It logs like the previous iso
> 
> Loading kernel ...
> Loading initial ramdisk ...
> EFI stub: Booting Linux Kernel...
> EFI stub: EFI_RNG_PROTOCOL unavailable
> EFI stub: Using DTB from configuration table
> EFI stub: Exiting boot services...

Can you try to pass 'earlycon' as boot parameter to the kernel. If that does not help, then please provide the devicetree used for booting the device.
Comment 16 Duy Hua 2022-10-21 03:17:12 UTC
Here is Renensas dtb source:
> https://github.com/renesas-rz/rz_linux-cip/tree/rzg2-cip74/arch/arm64/boot/dts/renesas
Comment 17 Duy Hua 2022-10-21 03:40:12 UTC
At first, we need to run board G2Mv3.0 so we have "r8a774a3-hihope-rzg2m-ex-idk-1110wr.dts" config for this board.
Comment 26 Matthias Brugger 2022-10-26 10:33:40 UTC
(In reply to Duy Hua from comment #17)
> At first, we need to run board G2Mv3.0 so we have
> "r8a774a3-hihope-rzg2m-ex-idk-1110wr.dts" config for this board.

I realized that we are missing config options for the serial console driver. I queued the changes for tumbleweed. This should allow you to use earlycon to see what happens on the board. As always it will take some time to be published though. If you want I can provide you with a test kernel that you can use to test in advance.
Comment 27 Duy Hua 2022-10-28 04:34:46 UTC
(In reply to Matthias Brugger from comment #26) 
> I realized that we are missing config options for the serial console driver.
> I queued the changes for tumbleweed. This should allow you to use earlycon
> to see what happens on the board. As always it will take some time to be
> published though. If you want I can provide you with a test kernel that you
> can use to test in advance.

yes, please!
Comment 28 Matthias Brugger 2022-10-28 13:02:26 UTC
(In reply to Duy Hua from comment #27)
> (In reply to Matthias Brugger from comment #26) 
> > I realized that we are missing config options for the serial console driver.
> > I queued the changes for tumbleweed. This should allow you to use earlycon
> > to see what happens on the board. As always it will take some time to be
> > published though. If you want I can provide you with a test kernel that you
> > can use to test in advance.
> 
> yes, please!

You can download kernel-default-6.*.rpm package from the kernel of the day (KOT) repository: 
https://download.opensuse.org/repositories/Kernel:/stable/ARM/aarch64/

If you want to update the kernel in your ISO image [1] you can update that with the following command:
sudo mksusecd --create test.iso --kernel=path/to/your/kernel-default*.rpm -- path/to/your/openSUSE-Tumbleweed-DVD-aarch64-Current.iso

Hope that helps.

[1] https://download.opensuse.org/ports/aarch64/tumbleweed/iso/openSUSE-Tumbleweed-DVD-aarch64-Current.iso
Comment 29 Duy Hua 2022-11-14 07:15:36 UTC
Created attachment 862849 [details]
log boot openSUSE tumbleweed at board RZ/G2Mv3

In "openSUSE-Tumbleweed-DVD-aarch64-Snapshot20221108-Media.iso" our board can boot and install but still has problems while installing. You can see the log file for more detail.
Comment 30 Matthias Brugger 2022-11-14 13:06:11 UTC
(In reply to Duy Hua from comment #29)
> Created attachment 862849 [details]
> log boot openSUSE tumbleweed at board RZ/G2Mv3
> 
> In "openSUSE-Tumbleweed-DVD-aarch64-Snapshot20221108-Media.iso" our board
> can boot and install but still has problems while installing. You can see
> the log file for more detail.

At the first glance this looks like a memory issue which most probably is provoked by the boot firmware and not the kernel. Are you able to boot a plain upstream kernel?
Comment 31 Duy Hua 2022-11-16 02:41:06 UTC
(In reply to Matthias Brugger from comment #30) 
> At the first glance this looks like a memory issue which most probably is
> provoked by the boot firmware and not the kernel. Are you able to boot a
> plain upstream kernel?

We will try to test with kernel 5.10 same as current our kernel.
Comment 32 Matthias Brugger 2022-11-16 08:47:35 UTC
(In reply to Duy Hua from comment #31)
> (In reply to Matthias Brugger from comment #30) 
> > At the first glance this looks like a memory issue which most probably is
> > provoked by the boot firmware and not the kernel. Are you able to boot a
> > plain upstream kernel?
> 
> We will try to test with kernel 5.10 same as current our kernel.

So your downstream 5.10 kernel boots without any memory issues?
Comment 33 Duy Hua 2022-11-17 03:54:40 UTC
Created attachment 862940 [details]
create ISO test
Comment 34 Duy Hua 2022-11-17 03:55:14 UTC
Created attachment 862941 [details]
log boot ISO test
Comment 35 Duy Hua 2022-11-17 04:00:05 UTC
(In reply to Duy Hua from comment #34)
> Created attachment 862941 [details]
> log boot ISO test

- I build follow this link: https://tutorialforlinux.com/2021/01/05/step-by-step-build-kernel-opensuse-easy-guide/
- The ISO kernel panic happens, this I miss something?
Comment 36 Matthias Brugger 2022-11-17 08:46:07 UTC
(In reply to Duy Hua from comment #35)
> (In reply to Duy Hua from comment #34)
> > Created attachment 862941 [details]
> > log boot ISO test
> 
> - I build follow this link:
> https://tutorialforlinux.com/2021/01/05/step-by-step-build-kernel-opensuse-
> easy-guide/
> - The ISO kernel panic happens, this I miss something?

Yes it didn't found the init program to start userspace. See the last line:
No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
Comment 37 Duy Hua 2022-11-17 09:27:31 UTC
I had tried this bootargs below:
> setenv bootargs 'console=ttySC0,115200n8,earlyprintk=ttySC0,rootwait,init=/initrd'
> setenv bootargs 'console=ttySC0,115200n8,earlyprintk=ttySC0,rootwait,init=/sbin/init'
> setenv bootargs 'console=ttySC0,115200n8,earlyprintk=ttySC0,rootwait,init=/bin/init'

And all of this meets kernel panic.
Comment 38 Duy Hua 2022-11-22 07:40:20 UTC
- This we have any package kernel-default.rpm Tumbleweed for aarch64. I can't find out any package kernel 5, and kernel-default of Leap does not support our chip.  
- I seek on http://rpmfind.net/linux/rpm2html/search.php?query=kernel-default&submit=Search+...&system=&arch=aarch64
Comment 40 Matthias Brugger 2022-11-22 15:10:02 UTC
(In reply to Duy Hua from comment #37)
> I had tried this bootargs below:
> > setenv bootargs 'console=ttySC0,115200n8,earlyprintk=ttySC0,rootwait,init=/initrd'
> > setenv bootargs 'console=ttySC0,115200n8,earlyprintk=ttySC0,rootwait,init=/sbin/init'
> > setenv bootargs 'console=ttySC0,115200n8,earlyprintk=ttySC0,rootwait,init=/bin/init'
> 
> And all of this meets kernel panic.

What is the init binary on your initrd? It seems you use some modified initrd, correct?
Comment 41 Duy Hua 2022-11-23 03:18:33 UTC
(In reply to Matthias Brugger from comment #40) 
> What is the init binary on your initrd? It seems you use some modified
> initrd, correct?

Yes, I already rebuild initrd too, here is my command:
> sudo mksusecd --rebuild-initrd --create test.iso --kernel /usr/src/packages/RPMS/aarch64/kernel-5.10.154-1.aarch64.rpm -- openSUSE-Tumbleweed-DVD-aarch64-Snapshot20221112-Media.iso
Comment 42 Matthias Brugger 2022-11-23 12:03:23 UTC
(In reply to Duy Hua from comment #41)
> (In reply to Matthias Brugger from comment #40) 
> > What is the init binary on your initrd? It seems you use some modified
> > initrd, correct?
> 
> Yes, I already rebuild initrd too, here is my command:
> > sudo mksusecd --rebuild-initrd --create test.iso --kernel /usr/src/packages/RPMS/aarch64/kernel-5.10.154-1.aarch64.rpm -- openSUSE-Tumbleweed-DVD-aarch64-Snapshot20221112-Media.iso

I'd say it's better to stay with openSUSE Tumbleweed. I suppose your own v5.10 kernel has a lot of downstream patches. The errors you mentioned in comment #29 look like there is a problem with the memory. My first bet would be that somehow the boot firmware didn't initialize the memory controller correctly. Can you check with the board/SoC vendor if there is a newer boot FW to install?
Comment 43 Duy Hua 2022-11-24 06:43:16 UTC
Yes, I will check and update the latest source build u-boot. By the way, you can help me update distro Leap for support RZ/G2M. I saw that kernel of Leap 15.4 is 5.14.21 maybe it can run well with our chip. I already try to modify the kernel of Leap 15.4 and it can boot but the prosses is stuck in udev.
Comment 44 Duy Hua 2022-11-24 06:51:00 UTC
Created attachment 863086 [details]
log boot openSUSE Leap 15.4 at board RZ/G2Mv3
Comment 45 Matthias Brugger 2022-11-28 14:59:08 UTC
(In reply to Duy Hua from comment #44)
> Created attachment 863086 [details]
> log boot openSUSE Leap 15.4 at board RZ/G2Mv3

It seems that you are not using the openSUSE Leap kernel but your own kernel. We don't support that kind of setup. In any case it looks like with the new U-Boot the random memory errors are gone. So I'll close this issue as fixed. If you have any other issue, please open a new bug.
Comment 46 Huynh Thanh Hung 2022-12-01 10:46:31 UTC
Hello,

I'm from Renesas Electronics.

The memory issue is gone without modification, I don't know why.

About latest result of Duy Hua.
He used the ext4 partition and copy the live image content into that, then the initrd can not run the "loop" module with the right "root".

So actually, the installer process did not reach to "memory issue" section. It failed before that.

Anyway, thank you so much for helping us enable support for Renesas platform.

Best Regards,
Hung Huynh