Re: Adding a new platform: renesas rz

2023-11-03 Thread Michele Bisogno
Hi Matt,

> Does the Renesas/RZ U-boot have EFI support enabled ('bootefi' command)?
> Could you try an armsr/armv8 image and see if it boots?

I've just tried:

=> fatload mmc 1:1 0x4800 openwrt-armsr-armv8-generic-initramfs-kernel.bin
32223744 bytes read in 2669 ms (11.5 MiB/s)
=> bootefi 0x4800
Scanning disk s...@11c0.blk...
Scanning disk s...@11c1.blk...
Found 13 disks
No EFI system partition
Booting /openwrt-armsr-armv8-generic-initramfs-kernel.bin
EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable
EFI stub: ERROR: FIRMWARE BUG: kernel image not aligned on 64k boundary
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...

And it hangs here.
I suppose there are still some missing bits in u-boot to make it
happen. I'm investigating.

Kind regards,
Michele

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-11-03 Thread Michele Bisogno
Torsten,

> The question then is: are they similar enough to build from one kernel
> source, or will they require different sets of patches?

RZ includes different subseries, as of today: RZ/G, RZ/V and some new
RZ/T run Linux.
Renesas official SW package is based on the CIP Linux, even though the
support of the devices is regularly upstreamed in the Linux kernel.
I kind of know that the maintainers are trying to keep things
consistent and usually the same kernel image works for all the
supported devices, requiring just a different device tree.
My idea at the moment is to add the devices that are supported in Linux 6.1.


> Have you looked at the peripherials on the SoCs? Is RZ/Five identical
> to RZ/Arm in that respect? I've seen this at WinChipHead, for
> microcontrollers. The reasoning again would be whether it could be
> built from the same source code base.

RZ/Five is basically a RZ/G2UL with a RISC-V CPU instead of Arm.
Of course for RZ/Five the same kernel binary cannot work.
On top of that, it's a pity that the RZ/Five started to be supported
from 6.2, I'm not sure what to do with it.

> If not, how about "rzarm", leaving room for future "rzfive"? I know this
> sounds like bike shedding, but it might actually save some renaming
> work in the future. Naming it just "renesas" does not feel right, IMHO.

Honestly I am fine with any naming, that's why I am here asking and
discussing it.

Kind regards,
Michele

On Fri, 3 Nov 2023 at 09:04, Michele Bisogno  wrote:
>
> > Renesas offers different architectures in their portfolio[1], I haven't
> > dug into the OpenWRT build system for this issue yet to tell whether it
> > is able to handle that at this folder level. Much of the above is
> > "legacy" and does not run OpenWRT(?), but they also seem to aim for
> > Risc-V. There is a platform called "ramips" and the broadcoms each have
> > their own subdirectory. None of them have punctuation yet. Maybe call it
> > "renesasrz"? They're also offering other ARM-based SoCs, and building
> > common kernels might become difficult.
> > Torsten
> > [1] 
> > https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/other-mcus-mpus
>
> Hi Torsten,
>
> what is listed there is old stuff. Renesas MPUs are now all under the
> RZ umbrella.
> Well, actually there are also the rcar devices, but these are automotive SoCs.
> Yes, there is an RZ device that is not Arm: RZ/Five. For now it is a
> single device based on a Andes core.
>
> Kind regards,
> Michele

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-11-03 Thread Torsten Duwe
Hi Michele,

On Fri, 3 Nov 2023 09:04:08 +0100
Michele Bisogno  wrote:

> > is able to handle that at this folder level. Much of the above is
> > "legacy" and does not run OpenWRT(?), but they also seem to aim for
> > Risc-V. There is a platform called "ramips" and the broadcoms each
> > have their own subdirectory.
[...]
> 
> what is listed there is old stuff.

I thought so, thanks for the confirmation.

> Renesas MPUs are now all under the RZ umbrella.

The question then is: are they similar enough to build from one kernel
source, or will they require different sets of patches?

> Well, actually there are also the rcar devices, but these are
> automotive SoCs. Yes, there is an RZ device that is not Arm: RZ/Five.
> For now it is a single device based on a Andes core.

Have you looked at the peripherials on the SoCs? Is RZ/Five identical
to RZ/Arm in that respect? I've seen this at WinChipHead, for
microcontrollers. The reasoning again would be whether it could be
built from the same source code base.

If not, how about "rzarm", leaving room for future "rzfive"? I know this
sounds like bike shedding, but it might actually save some renaming
work in the future. Naming it just "renesas" does not feel right, IMHO.

Torsten



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-11-03 Thread Michele Bisogno
> Renesas offers different architectures in their portfolio[1], I haven't
> dug into the OpenWRT build system for this issue yet to tell whether it
> is able to handle that at this folder level. Much of the above is
> "legacy" and does not run OpenWRT(?), but they also seem to aim for
> Risc-V. There is a platform called "ramips" and the broadcoms each have
> their own subdirectory. None of them have punctuation yet. Maybe call it
> "renesasrz"? They're also offering other ARM-based SoCs, and building
> common kernels might become difficult.
> Torsten
> [1] 
> https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/other-mcus-mpus

Hi Torsten,

what is listed there is old stuff. Renesas MPUs are now all under the
RZ umbrella.
Well, actually there are also the rcar devices, but these are automotive SoCs.
Yes, there is an RZ device that is not Arm: RZ/Five. For now it is a
single device based on a Andes core.

Kind regards,
Michele

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-11-02 Thread Torsten Duwe
On Mon, 30 Oct 2023 21:40:02 +0100
Robert Marko  wrote:

> On Mon, 30 Oct 2023 at 10:40, Michele Bisogno
>  wrote:
> >
> > Hi,
> >
> > I've been a happy OpenWRT user for many years now, always buying
> > routers that could allow me to run it easily.

Same here :-)

[...]
> >
> > For example, naming (renesas? renesas-rz? rz?) and structure of the
> > subfolders. There are other variants I would like to add: RZ/G2LC,
> > RZ/G2UL and maybe others.
> 
> To me, just "renesas" sounds good and then you can introduce the
> individual SoC families as subtargets.

Renesas offers different architectures in their portfolio[1], I haven't
dug into the OpenWRT build system for this issue yet to tell whether it
is able to handle that at this folder level. Much of the above is
"legacy" and does not run OpenWRT(?), but they also seem to aim for
Risc-V. There is a platform called "ramips" and the broadcoms each have
their own subdirectory. None of them have punctuation yet. Maybe call it
"renesasrz"? They're also offering other ARM-based SoCs, and building
common kernels might become difficult.

Torsten

[1]
https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/other-mcus-mpus

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-11-02 Thread Michele Bisogno
Hi Matt,

> Does the Renesas/RZ U-boot have EFI support enabled ('bootefi' command)?
> Could you try an armsr/armv8 image and see if it boots?

It does support it but I have never tried it.

> (You will need to start U-Boot from qspi or sd card and OpenWrt from a USB or 
> different sd card)
>
> If that works, or if we can figure out the necessary changes, a new top level 
> target may not be needed.

Yes, let me try.

> I understand Renesas has developed a standard firmware for another CPU in the 
> series (/G2M), but not sure about the /G2L
> https://www.renesas.com/us/en/blogs/renesas-rzg2m-awarded-arm-systemready-ir-11-certification

This is a very good point.
RZ/G2M is a very different device, even though it has got a similar name.
However RZ/G2L may be SR IR compliant, or at least not so far away.

Kind regards,
Michele

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-11-01 Thread Mathew McBride
Hi Michele,

On Mon, Oct 30, 2023, at 8:39 PM, Michele Bisogno wrote:
> Hi,
> 
> I've been a happy OpenWRT user for many years now, always buying
> routers that could allow me to run it easily.
> 
> I've been working (actually only in my free time as a hobby) on
> porting OpenWRT onto this Renesas board:
> https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz
> -mpus/rzg2l-evkit-rzg2l-evaluation-board-kit
> which features this Arm Cortex-A55 based device:
> https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz
> -mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-gh
> z-cpus-and-single-core-arm-cortex-m33
> 
> I guess this is a new platform, since it does not really fit in any of
> the already supported ones.

Does the Renesas/RZ U-boot have EFI support enabled ('bootefi' command)?
Could you try an armsr/armv8 image and see if it boots?

(You will need to start U-Boot from qspi or sd card and OpenWrt from a USB or 
different sd card)

If that works, or if we can figure out the necessary changes, a new top level 
target may not be needed.

I understand Renesas has developed a standard firmware for another CPU in the 
series (/G2M), but not sure about the /G2L
https://www.renesas.com/us/en/blogs/renesas-rzg2m-awarded-arm-systemready-ir-11-certification

> I got it working and I am polishing the patch before submitting it.
> The support of this device is already mainlined in the Linux kernel,
> so I am using 6.1 as is with the appropriate config.
> Arm Trusted Firmware and u-boot are instead taken from the respective
> Renesas forks, available on github.
At the moment armsr does not have support for building whole machine firmware 
images with ATF and U-Boot but we could figure out some way to do that if 
needed.

Best Regards,
Matt


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-10-31 Thread Michele Bisogno
On Tue, 31 Oct 2023 at 10:06, Robert Marko  wrote:
>
> To me, the most sense would be to provide one or 2 boards as part of the 
> initial
> target but with multiple boot options supported so later boards can be
> easily added.
>
> Personally, GH PR-s are rather good for adding new stuff as it makes
> commenting on
> things much easier and cleaner, and we can let CI do its thing as well.
>

OK, then 2 boards, sd card + QSPI and use github pull requests.

Thanks,
Michele

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-10-31 Thread Robert Marko
On Tue, 31 Oct 2023 at 09:56, Michele Bisogno  wrote:
>
> Hi Robert,
>
> thanks for the encouragement.
> I'll go for plain "renesas" then.
>
> I am a bit hesitating on when / how to submit patches.
> At the moment the image generated is for the sd card (similar to
> Raspberry Pi) and for a single device (RZ/G2L)
> However I am planning to support more boot memories (definitely QSPI
> NOR) and more device from the same "family", i.e. very similar and
> from OpenWRT point of view probably it's just a device tree change.
>
> Shall I focus on one device first and later on submit the rest?
> I am still a newbie, I might discover that things should have been
> done in a specific way only after the first review, that I know it
> will be a disaster... :)

To me, the most sense would be to provide one or 2 boards as part of the initial
target but with multiple boot options supported so later boards can be
easily added.

Personally, GH PR-s are rather good for adding new stuff as it makes
commenting on
things much easier and cleaner, and we can let CI do its thing as well.

Regards,
Robert
>
> Regards,
> Michele
>
> On Mon, 30 Oct 2023 at 21:40, Robert Marko  wrote:
> >
> > On Mon, 30 Oct 2023 at 10:40, Michele Bisogno  
> > wrote:
> > >
> > > Hi,
> > >
> > > I've been a happy OpenWRT user for many years now, always buying
> > > routers that could allow me to run it easily.
> >
> > Hi, nice to hear this.
> >
> > >
> > > I've been working (actually only in my free time as a hobby) on
> > > porting OpenWRT onto this Renesas board:
> > > https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-evkit-rzg2l-evaluation-board-kit
> > > which features this Arm Cortex-A55 based device:
> > > https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-and-single-core-arm-cortex-m33
> > >
> > > I guess this is a new platform, since it does not really fit in any of
> > > the already supported ones.
> > >
> > > I got it working and I am polishing the patch before submitting it.
> > > The support of this device is already mainlined in the Linux kernel,
> > > so I am using 6.1 as is with the appropriate config.
> > > Arm Trusted Firmware and u-boot are instead taken from the respective
> > > Renesas forks, available on github.
> >
> > Great, these Reneas SoC-s are rather well supported in respective
> > upstream projects.
> >
> > >
> > > However this is the first time I do that, and I am still reading and
> > > learning, so I would like to get opinions, hints, why not constructive
> > > criticism and hopefully encouragement.
> >
> > I definitively encourage people to contribute towards more HW support,
> > especially HW which is mostly upstream.
> >
> > >
> > > For example, naming (renesas? renesas-rz? rz?) and structure of the
> > > subfolders. There are other variants I would like to add: RZ/G2LC,
> > > RZ/G2UL and maybe others.
> >
> > To me, just "renesas" sounds good and then you can introduce the individual
> > SoC families as subtargets.
> >
> > Regards,
> > Robert
> > >
> > > System
> > >
> > > HostnameOpenWrt
> > > ModelRenesas SMARC EVK based on r9a07g044l2
> > > ArchitectureARMv8 Processor rev 0
> > > Target Platformrz/g2l
> > > Firmware VersionOpenWrt SNAPSHOT r24187-bb8fd41f9a / LuCI Master
> > > git-23.294.26440-30a8a0d
> > > Kernel Version6.1.59
> > > Local Time2023-10-29 07:44:17
> > > Uptime0h 9m 11s
> > > Load Average0.13, 0.08, 0.05
> > >
> > > ___
> > > openwrt-devel mailing list
> > > openwrt-devel@lists.openwrt.org
> > > https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-10-31 Thread Michele Bisogno
Hi Robert,

thanks for the encouragement.
I'll go for plain "renesas" then.

I am a bit hesitating on when / how to submit patches.
At the moment the image generated is for the sd card (similar to
Raspberry Pi) and for a single device (RZ/G2L)
However I am planning to support more boot memories (definitely QSPI
NOR) and more device from the same "family", i.e. very similar and
from OpenWRT point of view probably it's just a device tree change.

Shall I focus on one device first and later on submit the rest?
I am still a newbie, I might discover that things should have been
done in a specific way only after the first review, that I know it
will be a disaster... :)

Regards,
Michele

On Mon, 30 Oct 2023 at 21:40, Robert Marko  wrote:
>
> On Mon, 30 Oct 2023 at 10:40, Michele Bisogno  
> wrote:
> >
> > Hi,
> >
> > I've been a happy OpenWRT user for many years now, always buying
> > routers that could allow me to run it easily.
>
> Hi, nice to hear this.
>
> >
> > I've been working (actually only in my free time as a hobby) on
> > porting OpenWRT onto this Renesas board:
> > https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-evkit-rzg2l-evaluation-board-kit
> > which features this Arm Cortex-A55 based device:
> > https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-and-single-core-arm-cortex-m33
> >
> > I guess this is a new platform, since it does not really fit in any of
> > the already supported ones.
> >
> > I got it working and I am polishing the patch before submitting it.
> > The support of this device is already mainlined in the Linux kernel,
> > so I am using 6.1 as is with the appropriate config.
> > Arm Trusted Firmware and u-boot are instead taken from the respective
> > Renesas forks, available on github.
>
> Great, these Reneas SoC-s are rather well supported in respective
> upstream projects.
>
> >
> > However this is the first time I do that, and I am still reading and
> > learning, so I would like to get opinions, hints, why not constructive
> > criticism and hopefully encouragement.
>
> I definitively encourage people to contribute towards more HW support,
> especially HW which is mostly upstream.
>
> >
> > For example, naming (renesas? renesas-rz? rz?) and structure of the
> > subfolders. There are other variants I would like to add: RZ/G2LC,
> > RZ/G2UL and maybe others.
>
> To me, just "renesas" sounds good and then you can introduce the individual
> SoC families as subtargets.
>
> Regards,
> Robert
> >
> > System
> >
> > HostnameOpenWrt
> > ModelRenesas SMARC EVK based on r9a07g044l2
> > ArchitectureARMv8 Processor rev 0
> > Target Platformrz/g2l
> > Firmware VersionOpenWrt SNAPSHOT r24187-bb8fd41f9a / LuCI Master
> > git-23.294.26440-30a8a0d
> > Kernel Version6.1.59
> > Local Time2023-10-29 07:44:17
> > Uptime0h 9m 11s
> > Load Average0.13, 0.08, 0.05
> >
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-10-30 Thread Robert Marko
On Mon, 30 Oct 2023 at 10:40, Michele Bisogno  wrote:
>
> Hi,
>
> I've been a happy OpenWRT user for many years now, always buying
> routers that could allow me to run it easily.

Hi, nice to hear this.

>
> I've been working (actually only in my free time as a hobby) on
> porting OpenWRT onto this Renesas board:
> https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-evkit-rzg2l-evaluation-board-kit
> which features this Arm Cortex-A55 based device:
> https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-and-single-core-arm-cortex-m33
>
> I guess this is a new platform, since it does not really fit in any of
> the already supported ones.
>
> I got it working and I am polishing the patch before submitting it.
> The support of this device is already mainlined in the Linux kernel,
> so I am using 6.1 as is with the appropriate config.
> Arm Trusted Firmware and u-boot are instead taken from the respective
> Renesas forks, available on github.

Great, these Reneas SoC-s are rather well supported in respective
upstream projects.

>
> However this is the first time I do that, and I am still reading and
> learning, so I would like to get opinions, hints, why not constructive
> criticism and hopefully encouragement.

I definitively encourage people to contribute towards more HW support,
especially HW which is mostly upstream.

>
> For example, naming (renesas? renesas-rz? rz?) and structure of the
> subfolders. There are other variants I would like to add: RZ/G2LC,
> RZ/G2UL and maybe others.

To me, just "renesas" sounds good and then you can introduce the individual
SoC families as subtargets.

Regards,
Robert
>
> System
>
> HostnameOpenWrt
> ModelRenesas SMARC EVK based on r9a07g044l2
> ArchitectureARMv8 Processor rev 0
> Target Platformrz/g2l
> Firmware VersionOpenWrt SNAPSHOT r24187-bb8fd41f9a / LuCI Master
> git-23.294.26440-30a8a0d
> Kernel Version6.1.59
> Local Time2023-10-29 07:44:17
> Uptime0h 9m 11s
> Load Average0.13, 0.08, 0.05
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Adding a new platform: renesas rz

2023-10-30 Thread Michele Bisogno
Hi,

I've been a happy OpenWRT user for many years now, always buying
routers that could allow me to run it easily.

I've been working (actually only in my free time as a hobby) on
porting OpenWRT onto this Renesas board:
https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-evkit-rzg2l-evaluation-board-kit
which features this Arm Cortex-A55 based device:
https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-and-single-core-arm-cortex-m33

I guess this is a new platform, since it does not really fit in any of
the already supported ones.

I got it working and I am polishing the patch before submitting it.
The support of this device is already mainlined in the Linux kernel,
so I am using 6.1 as is with the appropriate config.
Arm Trusted Firmware and u-boot are instead taken from the respective
Renesas forks, available on github.

However this is the first time I do that, and I am still reading and
learning, so I would like to get opinions, hints, why not constructive
criticism and hopefully encouragement.

For example, naming (renesas? renesas-rz? rz?) and structure of the
subfolders. There are other variants I would like to add: RZ/G2LC,
RZ/G2UL and maybe others.

System

HostnameOpenWrt
ModelRenesas SMARC EVK based on r9a07g044l2
ArchitectureARMv8 Processor rev 0
Target Platformrz/g2l
Firmware VersionOpenWrt SNAPSHOT r24187-bb8fd41f9a / LuCI Master
git-23.294.26440-30a8a0d
Kernel Version6.1.59
Local Time2023-10-29 07:44:17
Uptime0h 9m 11s
Load Average0.13, 0.08, 0.05

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel