Re: How to L4Re on the S32G

2025-02-26 Thread Adam Lackorzynski
Hi Qiang,

So if there's ttyAMA0 also mentioned on Xen's command line I'd think it
should be supported. Could you send the initrd to me (privately, too big
for the list) that I can have a look?

Yes, indeed, the booting is quite similar. For L4Re we just have one
image plus the device tree, so we just need to load two in this case.
All the commands listed in the file seem to be related to Xen, so none
of it is needed for L4Re.


Adam

On Tue Feb 25, 2025 at 15:38:17 +0800, qiang xu wrote:
> I'm still not sure how to check if *'/dev/console'* or *'/dev/ttyAMA0'*
> exist in the initrd, since these devices might require drivers to be loaded
> at runtime before they can appear in the *'/dev'* directory. However, I
> noticed that a normal Xen boot process executes a script during the U-Boot
> stage. This script loads all the necessary files into memory, selects the
> node, provides the system settings to Xen, and then U-Boot boots Xen.
> Finally, Xen boots the Kernel image. The script mentions '*vpl011*' and '
> *console=ttyAMA0*'. Does this imply that the initrd supports '*ttyAMA0*'?
> 
> When I run L4Re, I didn't execute this step, which causes it to boot the
> Xen VM instead of L4Re. This seems to be somewhat similar to the
> functionality of L4Re. Did I miss something or confuse anything here?
> 
> I have changed the script's file extension and placed it in the attachment.
> 
> Regards,
> 
> Qiang
> 
> On Tue, Feb 25, 2025 at 2:01 PM Adam Lackorzynski  wrote:
> 
> > Hi Qiang,
> >
> > good idea with looking at the initcalls. I guess it is normal that some
> > of the are failing as they, for example, look for a device which is not
> > there.
> >
> > With the initrd coming from Xen, maybe they way input/output is done is
> > specific to Xen. So is there a /dev/console, or /dev/ttyAMA0, in the
> > initrd such that the shell can make its output visible? As the output
> > just stops but also nothing more is happening, maybe we just do not see
> > it.
> >
> > For your last question, I do not think this is in conflict, quite the
> > contrary as the Linux is aware of running in a virtual environment.
> > However, if something specific to Xen is being done that won't work on
> > L4Re and needs to be figured out and changes.
> > And don't worry, no question is silly :)
> >
> >
> > Adam
> >
> > On Mon Feb 24, 2025 at 17:17:00 +0800, qiang xu wrote:
> > > Hi Adam,
> > >
> > > When I changed from 'init' to '/bin/sh', I did not enter the expected
> > > shell. To print more information, I changed the ‘*bootargs*‘ to
> > ‘*bootargs
> > > = "console=ttyAMA0 init=/bin/sh debug ignore_loglevel loglevel=8
> > > initcall_debug"*’. The printed information is in the log file. I noticed
> > > that several initcalls returned abnormal values. I'm not sure if these
> > > anomalies are affecting my issue.
> > >
> > > Additionally, I want to mention that I saw someone in the S32G community
> > > <
> > https://community.nxp.com/t5/S32G/Hypervisor-support-on-S32G/m-p/1550392>
> > > asking about L4Re. So, when creating the S32G Linux image, I referenced
> > the
> > > Xen Hypervisor Dom0less section. In the ‘*uvmm-io.ned*’ file, I specified
> > > the rootfs via ‘*rd=fsl-image-dom0less-s32g274aevb.cpio.gz*’. It could be
> > > because I used the Dom0less method to build the image that it caused some
> > > Xen-related exceptions in the initcalls. Finally, I double-checked that
> > > both 'init' and '/bin/sh' exist and have the correct permissions.
> > >
> > > I have one more question: Xen is a hypervisor, and Fiasco in L4Re is
> > also a
> > > hypervisor. Will this conflict, or am I misunderstanding something? I
> > > apologize if these are naive questions, I'm not very familiar with this
> > > area, and I might be asking a lot of silly questions.
> > >
> > > Regards,
> > > Qiang
> > >
> > > On Sat, Feb 22, 2025 at 2:54 PM Adam Lackorzynski  wrote:
> > >
> > > > Hi Qiang,
> > > >
> > > > what should the initrd, i.e., /init, actually do? Any change when you
> > > > write init=/bin/sh instead of init=/init?
> > > >
> > > >
> > > > Adam
> > > >
> > > > On Fri Feb 21, 2025 at 11:27:07 +0800, qiang xu wrote:
> > > > > Hi Philipp,
> > > > >
> > > > > Thank you very much for the advice you provided. I have changed it to
> > > > 512M.
> > > > > It now runs without errors, but it gets stuck at:
> > > > >
> > > > > *vm1 | [ 1.753286] Freeing unused kernel memory: 1344K.*
> > > > > Regards,
> > > > > Qiang
> > > > >
> > > > > => fatload mmc 0 0x8000e000 l4re_uvmm-io.uimage
> > > > > 46235855 bytes read in 1972 ms (22.4 MiB/s)
> > > > > => fatload mmc 0 0x8000 s32g2xxa-evb.dtb1
> > > > > 54149 bytes read in 16 ms (3.2 MiB/s)
> > > > > => bootm 0x8000e000 - 0x8000
> > > > > ## Booting kernel from Legacy Image at 8000e000 ...
> > > > >Image Name:   L4 Image #27
> > > > >Image Type:   AArch64 Linux Kernel Image (uncompressed)
> > > > >Data Size:46235791 Bytes = 44.1 MiB
> > > > >Load Address: 9100
> > > > >Entry Point:  91

Re: How to L4Re on the S32G

2025-02-24 Thread Adam Lackorzynski
Hi Qiang,

good idea with looking at the initcalls. I guess it is normal that some
of the are failing as they, for example, look for a device which is not
there.

With the initrd coming from Xen, maybe they way input/output is done is
specific to Xen. So is there a /dev/console, or /dev/ttyAMA0, in the
initrd such that the shell can make its output visible? As the output
just stops but also nothing more is happening, maybe we just do not see
it.

For your last question, I do not think this is in conflict, quite the
contrary as the Linux is aware of running in a virtual environment.
However, if something specific to Xen is being done that won't work on
L4Re and needs to be figured out and changes.
And don't worry, no question is silly :)


Adam

On Mon Feb 24, 2025 at 17:17:00 +0800, qiang xu wrote:
> Hi Adam,
> 
> When I changed from 'init' to '/bin/sh', I did not enter the expected
> shell. To print more information, I changed the ‘*bootargs*‘ to ‘*bootargs
> = "console=ttyAMA0 init=/bin/sh debug ignore_loglevel loglevel=8
> initcall_debug"*’. The printed information is in the log file. I noticed
> that several initcalls returned abnormal values. I'm not sure if these
> anomalies are affecting my issue.
> 
> Additionally, I want to mention that I saw someone in the S32G community
> 
> asking about L4Re. So, when creating the S32G Linux image, I referenced the
> Xen Hypervisor Dom0less section. In the ‘*uvmm-io.ned*’ file, I specified
> the rootfs via ‘*rd=fsl-image-dom0less-s32g274aevb.cpio.gz*’. It could be
> because I used the Dom0less method to build the image that it caused some
> Xen-related exceptions in the initcalls. Finally, I double-checked that
> both 'init' and '/bin/sh' exist and have the correct permissions.
> 
> I have one more question: Xen is a hypervisor, and Fiasco in L4Re is also a
> hypervisor. Will this conflict, or am I misunderstanding something? I
> apologize if these are naive questions, I'm not very familiar with this
> area, and I might be asking a lot of silly questions.
> 
> Regards,
> Qiang
> 
> On Sat, Feb 22, 2025 at 2:54 PM Adam Lackorzynski  wrote:
> 
> > Hi Qiang,
> >
> > what should the initrd, i.e., /init, actually do? Any change when you
> > write init=/bin/sh instead of init=/init?
> >
> >
> > Adam
> >
> > On Fri Feb 21, 2025 at 11:27:07 +0800, qiang xu wrote:
> > > Hi Philipp,
> > >
> > > Thank you very much for the advice you provided. I have changed it to
> > 512M.
> > > It now runs without errors, but it gets stuck at:
> > >
> > > *vm1 | [ 1.753286] Freeing unused kernel memory: 1344K.*
> > > Regards,
> > > Qiang
> > >
> > > => fatload mmc 0 0x8000e000 l4re_uvmm-io.uimage
> > > 46235855 bytes read in 1972 ms (22.4 MiB/s)
> > > => fatload mmc 0 0x8000 s32g2xxa-evb.dtb1
> > > 54149 bytes read in 16 ms (3.2 MiB/s)
> > > => bootm 0x8000e000 - 0x8000
> > > ## Booting kernel from Legacy Image at 8000e000 ...
> > >Image Name:   L4 Image #27
> > >Image Type:   AArch64 Linux Kernel Image (uncompressed)
> > >Data Size:46235791 Bytes = 44.1 MiB
> > >Load Address: 9100
> > >Entry Point:  9100
> > >Verifying Checksum ... OK
> > > ## Flattened Device Tree blob at 8000
> > >Booting using the fdt blob at 0x8000
> > >Loading Kernel Image
> > >Using Device Tree in place at 8000, end 80010384
> > >fixup: pfe0 set to 00:01:be:be:ef:11
> > >fixup: pfe1 set to 00:01:be:be:ef:22
> > >fixup: pfe2 set to 00:01:be:be:ef:33
> > >
> > > Starting kernel ...
> > >
> > >
> > > L4 Bootstrapper
> > >   Build: #27 Fri Feb 21 10:21:53 CST 2025, 11.4.0
> > >   RAM: 8000 - : 2097152kB
> > >   RAM: 00088000 - 0008dfff: 1572864kB
> > >   Total RAM: 3584MB
> > >   Scanning fiasco
> > >   Scanning sigma0
> > >   Scanning moe
> > >   Moving up to 15 modules behind 8130
> > >   moving module 00 { 9101f000-910e5fe7 } -> { 8600a000-860d0fe7 }
> > [815080]
> > >   moving module 01 { 910e6000-910ebcd7 } -> { 860d1000-860d6cd7 } [23768]
> > >   moving module 02 { 910ec000-9111e6cf } -> { 860d7000-861096cf }
> > [206544]
> > >   moving module 03 { 9111f000-9121258f } -> { 8610a000-861fd58f }
> > [996752]
> > >   moving module 04 { 91213000-9122e537 } -> { 861fe000-86219537 }
> > [111928]
> > >   moving module 05 { 9122f000-912b7aa7 } -> { 8621a000-862a2aa7 }
> > [559784]
> > >   moving module 06 { 912b8000-912c5384 } -> { 862a3000-862b0384 } [54149]
> > >   moving module 07 { 912c6000-92bd9a52 } -> { 862b1000-87bc4a52 }
> > [26294867]
> > >   moving module 08 { 92bda000-92bdb218 } -> { 87bc5000-87bc6218 } [4633]
> > >   moving module 09 { 92bdc000-92bdc29a } -> { 87bc7000-87bc729a } [667]
> > >   moving module 10 { 92bdd000-939bd807 } -> { 87bc8000-889a8807 }
> > [14551048]
> > >   moving module 11 { 939be000-93a03faf } -> { 889a9000-889eefaf }
> > [286640]
> > >   moving module 12 { 93a04000-93c

Re: How to L4Re on the S32G

2025-02-19 Thread Adam Lackorzynski
Hi Qiang,

what you did is good.

The messages shown are giving hints on the setup and are not generally
bad.
If the ioproxy says there's no resource it means that a device/resource
is listed in the device tree but not on the vbus, i.e. this resource is
not available for the VM. uvmm thus disables this node in the device
tree.
The platform_ctl cap message is coming from io, telling us that io
cannot offer the Platform_control API because no cap has been made
available.

Regarding the UART, there's also a hint, and I believe that is also the
reason why no output from Linux is seen. You already noticed as well.
pl011 and linflex are not compatible. What I would propose is that you
add a node in the DT for the pl011, as uvmm can emulate this UART type.
An example can be found in pkg/uvmm/configs/dts/vmm-devices-arm.dtsi.
This file contains two variants of a UART. The pl011 one which I just
mentioned and a virtio-console one. Both will work. You can take the
contents of this file as is, however pay attention to the MMIO ranges
and IRQs used. Choose a free range in the guest physical address space
of your guest (aka a range not used in the device tree) and change the
addresses accordingly. Similar with the interrupts, use one not used
previously.



Adam

On Tue Feb 18, 2025 at 18:02:32 +0800, qiang xu wrote:
> Hi Adam,
> 
> Thank you very much for your help. I selected the option "*Target
> configuration -> Use PSCI[]**" *in the Fiasco compile options and
> recompiled. Then, in the L4 compile options, I selected *"uvmm virtual
> machine monitor -> PSCI interface support[]*" and recompiled L4. After
> running it in boot, I encountered the overlap issue again. Later, I
> adjusted the `DEFAULT_RELOC_arm64`and resolved it. However, when I started,
> I encountered many VMM-related errors, such as:
> 
>- warning: could not register control interface at cap 'platform_ctl'
>- | HINT: Found console=ttyAMA on the command line but no
>arm,pl011/sbsa-uart device in device tree!
>- VMM[ioproxy]: No corresponding IO resource for 'pmu' IRQ 23
>- VMM[ioproxy]: No corresponding IO resource for 'shm@c000'.reg[0]
>(0xc000-0xc03f)
> 
> The detailed printout is as follows.
> 
> => fatload mmc 0 0x8000e000 l4re_uvmm-io.uimage
> 46235855 bytes read in 1971 ms (22.4 MiB/s)
> => fatload mmc 0 0x8000 s32g2xxa-evb.dtb
> 53414 bytes read in 17 ms (3 MiB/s)
> => bootm 0x8000e000 - 0x8000
> ## Booting kernel from Legacy Image at 8000e000 ...
>Image Name:   L4 Image #25
>Image Type:   AArch64 Linux Kernel Image (uncompressed)
>Data Size:46235791 Bytes = 44.1 MiB
>Load Address: 9100
>Entry Point:  9100
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 8000
>Booting using the fdt blob at 0x8000
>Loading Kernel Image
>Using Device Tree in place at 8000, end 800100a5
>fixup: pfe0 set to 00:01:be:be:ef:11
>fixup: pfe1 set to 00:01:be:be:ef:22
>fixup: pfe2 set to 00:01:be:be:ef:33
> 
> Starting kernel ...
> 
> 
> L4 Bootstrapper
>   Build: #25 Tue Feb 18 17:29:53 CST 2025, 11.4.0
>   RAM: 8000 - : 2097152kB
>   RAM: 00088000 - 0008dfff: 1572864kB
>   Total RAM: 3584MB
>   Scanning fiasco
>   Scanning sigma0
>   Scanning moe
>   Moving up to 15 modules behind 8130
>   moving module 00 { 9101f000-910e5fe7 } -> { 8600a000-860d0fe7 } [815080]
>   moving module 01 { 910e6000-910ebcd7 } -> { 860d1000-860d6cd7 } [23768]
>   moving module 02 { 910ec000-9111e6cf } -> { 860d7000-861096cf } [206544]
>   moving module 03 { 9111f000-9121258f } -> { 8610a000-861fd58f } [996752]
>   moving module 04 { 91213000-9122e537 } -> { 861fe000-86219537 } [111928]
>   moving module 05 { 9122f000-912b7aa7 } -> { 8621a000-862a2aa7 } [559784]
>   moving module 06 { 912b8000-912c50a5 } -> { 862a3000-862b00a5 } [53414]
>   moving module 07 { 912c6000-92bd9a52 } -> { 862b1000-87bc4a52 } [26294867]
>   moving module 08 { 92bda000-92bdb218 } -> { 87bc5000-87bc6218 } [4633]
>   moving module 09 { 92bdc000-92bdc299 } -> { 87bc7000-87bc7299 } [666]
>   moving module 10 { 92bdd000-939bd807 } -> { 87bc8000-889a8807 } [14551048]
>   moving module 11 { 939be000-93a03faf } -> { 889a9000-889eefaf } [286640]
>   moving module 12 { 93a04000-93c16a87 } -> { 889ef000-88c01a87 } [2173576]
>   moving module 13 { 93c17000-93c171ff } -> { 88c02000-88c021ff } [512]
>   moving module 14 { 93c18000-93c1808e } -> { 88c03000-88c0308e } [143]
>   Loading fiasco
>   found node 0 kernel info page (via ELF) at 0x80203000
>   Loading sigma0
>   Loading moe
>   found node 0 kernel options (via ELF) at 0x80204000
>   Sigma0 confignode: 0   ip:860003f4
>   Roottask config  node: 0   ip:80841904
> Regions of list 'regions'
> [ 3400,  3407] {8} Arch   pfebufs@3400
> [ 3408,  3409] {2} Arch   pfebufs@3408
> [ 8000,  8000dfff] { e000} Root   dtb
> [ 8000e00

Re: How to L4Re on the S32G

2025-02-17 Thread Adam Lackorzynski
Hi Qiang,

the location where it stops could be the one when it is tried to enable
cores. Do you have PSCI enabled in the microkernel configuration? Please
enable it if not.


Adam

On Mon Feb 17, 2025 at 10:03:53 +0800, qiang xu wrote:
> Hi Adam,
> 
> Sorry, I didn't explain clearly about jdb. I entered jdb after pressing
> 'esc'.
> 
> Regards,
> Qiang
> 
> On Sat, Feb 15, 2025 at 1:31 AM Adam Lackorzynski  wrote:
> 
> > Hi Qiang,
> >
> > On Wed Feb 12, 2025 at 11:55:30 +0800, qiang xu wrote:
> > > Hi Adam,
> > >
> > > Thank you for your professional insights. Following your suggestion, I
> > > added "DEFAULT_RELOC_arm64 = 0x0ec0" to the Makeconf.local file in
> > the
> > > root directory and then rebuilt the system. Upon checking the "Start
> > > address: 0x8600", I found that after rebuilding with 0x0ec0, the
> > > start address became 0x8ee0. So, I changed DEFAULT_RELOC_arm64 to
> > > 0x05e0, and after rebuilding, the start address was 0x8600, which
> > > meets the requirement.
> >
> > Thanks for the fix, of course it was 0x05e0.
> >
> > That's now interesting what is happening. Did it go into jdb itself or
> > did you press ESC to get to the jdb? If it was itself, was there any
> > message before that telling a reason maybe?
> >
> >
> > Adam
> >
> > > The contents of Makeconf.local are as follows:
> > >
> > > `/l4re-snapshot-24.08.0/obj/l4/builddir$ cat Makeconf.local
> > > CROSS_COMPILE:=aarch64-linux-gnu-
> > > DEFAULT_RELOC_arm64 = 0x05e0`
> > >
> > > Build information:
> > > `/l4re-snapshot-24.08.0/obj/l4/builddir$ make uimage E=uvmm-2vm PT=s32g
> > > make[1]: Entering directory
> > > '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
> > >   [bootstrap] ... Building Dependencies
> > >   [bootstrap - nofpu] ... Building Dependencies
> > > Building entry "uvmm-2vm".
> > > Merging images:
> > > mod00:
> > > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/fiasco/builddir/fiasco
> > > [796kB]
> > > mod01:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/sigma0
> > > [24kB]
> > > mod02:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/moe
> > > [202kB]
> > > mod03:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/uvmm
> > > [974kB]
> > > mod04:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/l4re
> > > [110kB]
> > > mod05:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/ned
> > > [547kB]
> > > mod06:
> > > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/s32g2xxa-evb.dtb
> > > [53kB]
> > > mod07:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/fsl-image-dom0less-s32g274aevb.cpio.gz
> > > [25679kB]
> > > mod08:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4/pkg/uvmm/configs/vmm.lua
> > > [5kB]
> > > mod09:
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/uvmm-2vm.ned
> > > [1kB]
> > > mod10: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/Image
> > > [14211kB]
> > > mod11:
> > >
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/cons
> > > [280kB]
> > >   [bootstrap - nofpu] ... Generating bootstrap.ld
> > >   [bootstrap - nofpu] ... Compiling startup.o
> > >   [bootstrap - nofpu] ==> Linking l4re.elf
> > >   [bootstrap] ==> Image post-processing l4re.elf
> > >   [bootstrap - nofpu] ==> l4re.elf built
> > >   ==> Installing l4re.elf in image directory
> > >   ==> Installing l4re_uvmm-2vm in image directory
> > >   ==> Installing l4re_uvmm-2vm.elf in image directory
> > >   [bootstrap - nofpu] ... Generating l4re.raw
> > >   ==> Installing l4re.raw in image directory
> > >   ==> Installing l4re_uvmm-2vm.raw in image directory
> > >   [bootstrap - nofpu] ... Generating l4re.uimage
> > > Image Name:   L4 Image #14
> > > Created:  Wed Feb 12 10:50:58 2025
> > > Image Type:   AArch64 Linux Kernel Image (uncompressed)
> > > Data Size:44056496 Bytes = 43023.92 KiB = 42.02 MiB
> > > Load Address: 8600
> > > Entry Point:  8600
> > >   ==> Installing l4re.uimage in image directory
> > >   ==> Installing l4re_uvmm-2vm.uimage in image directory
> > >   Image size(s) in bytes:
> > >   l4re_uvmm-2vm.elf:  44692328
> > >l4re.raw:  44056496
> > > l4re.uimage:  44056560
> > >   Start address:
> > >   --> Build-Nr: 14
> > >   [bootstrap - nofpu] ==> Installing l4re.elf to local build-tree
> > >   [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm to local build-tree
> > >   [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm.elf to local
> > build-tree
> > > make[1]: Leaving directory
> > > '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
> > >
> > > `
> > >
> > > I then placed it back onto the SD card to boot. Although this solved the
> > > previous overlap issue, it seems to hang and does

Re: How to L4Re on the S32G

2025-02-16 Thread qiang xu
Hi Adam,

Sorry, I didn't explain clearly about jdb. I entered jdb after pressing
'esc'.

Regards,
Qiang

On Sat, Feb 15, 2025 at 1:31 AM Adam Lackorzynski  wrote:

> Hi Qiang,
>
> On Wed Feb 12, 2025 at 11:55:30 +0800, qiang xu wrote:
> > Hi Adam,
> >
> > Thank you for your professional insights. Following your suggestion, I
> > added "DEFAULT_RELOC_arm64 = 0x0ec0" to the Makeconf.local file in
> the
> > root directory and then rebuilt the system. Upon checking the "Start
> > address: 0x8600", I found that after rebuilding with 0x0ec0, the
> > start address became 0x8ee0. So, I changed DEFAULT_RELOC_arm64 to
> > 0x05e0, and after rebuilding, the start address was 0x8600, which
> > meets the requirement.
>
> Thanks for the fix, of course it was 0x05e0.
>
> That's now interesting what is happening. Did it go into jdb itself or
> did you press ESC to get to the jdb? If it was itself, was there any
> message before that telling a reason maybe?
>
>
> Adam
>
> > The contents of Makeconf.local are as follows:
> >
> > `/l4re-snapshot-24.08.0/obj/l4/builddir$ cat Makeconf.local
> > CROSS_COMPILE:=aarch64-linux-gnu-
> > DEFAULT_RELOC_arm64 = 0x05e0`
> >
> > Build information:
> > `/l4re-snapshot-24.08.0/obj/l4/builddir$ make uimage E=uvmm-2vm PT=s32g
> > make[1]: Entering directory
> > '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
> >   [bootstrap] ... Building Dependencies
> >   [bootstrap - nofpu] ... Building Dependencies
> > Building entry "uvmm-2vm".
> > Merging images:
> > mod00:
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/fiasco/builddir/fiasco
> > [796kB]
> > mod01:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/sigma0
> > [24kB]
> > mod02:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/moe
> > [202kB]
> > mod03:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/uvmm
> > [974kB]
> > mod04:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/l4re
> > [110kB]
> > mod05:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/ned
> > [547kB]
> > mod06:
> > /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/s32g2xxa-evb.dtb
> > [53kB]
> > mod07:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/fsl-image-dom0less-s32g274aevb.cpio.gz
> > [25679kB]
> > mod08:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4/pkg/uvmm/configs/vmm.lua
> > [5kB]
> > mod09:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/uvmm-2vm.ned
> > [1kB]
> > mod10: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/Image
> > [14211kB]
> > mod11:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/cons
> > [280kB]
> >   [bootstrap - nofpu] ... Generating bootstrap.ld
> >   [bootstrap - nofpu] ... Compiling startup.o
> >   [bootstrap - nofpu] ==> Linking l4re.elf
> >   [bootstrap] ==> Image post-processing l4re.elf
> >   [bootstrap - nofpu] ==> l4re.elf built
> >   ==> Installing l4re.elf in image directory
> >   ==> Installing l4re_uvmm-2vm in image directory
> >   ==> Installing l4re_uvmm-2vm.elf in image directory
> >   [bootstrap - nofpu] ... Generating l4re.raw
> >   ==> Installing l4re.raw in image directory
> >   ==> Installing l4re_uvmm-2vm.raw in image directory
> >   [bootstrap - nofpu] ... Generating l4re.uimage
> > Image Name:   L4 Image #14
> > Created:  Wed Feb 12 10:50:58 2025
> > Image Type:   AArch64 Linux Kernel Image (uncompressed)
> > Data Size:44056496 Bytes = 43023.92 KiB = 42.02 MiB
> > Load Address: 8600
> > Entry Point:  8600
> >   ==> Installing l4re.uimage in image directory
> >   ==> Installing l4re_uvmm-2vm.uimage in image directory
> >   Image size(s) in bytes:
> >   l4re_uvmm-2vm.elf:  44692328
> >l4re.raw:  44056496
> > l4re.uimage:  44056560
> >   Start address:
> >   --> Build-Nr: 14
> >   [bootstrap - nofpu] ==> Installing l4re.elf to local build-tree
> >   [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm to local build-tree
> >   [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm.elf to local
> build-tree
> > make[1]: Leaving directory
> > '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
> >
> > `
> >
> > I then placed it back onto the SD card to boot. Although this solved the
> > previous overlap issue, it seems to hang and does not boot properly. I am
> > unsure if this is related to the message:
> > `Rev: unknown compiled with gcc 11.4.0 for NXP S32G`
> >
> > because my Linux kernel image was built on another computer using the
> Yocto
> > toolchain provided by NXP for S32G, while this machine
> > uses`CROSS_COMPILE:=aarch64-linux-gnu-`to compile Fiasco and the L4
> uImage.
> >
> > Boot log:
> >
> > `fatload mmc 0 0x8000e000 l4re_uvmm-2vm.uimage
> > 44056560 bytes read in 1871 ms (22.5 MiB/s)
> > => fatload 

Re: How to L4Re on the S32G

2025-02-14 Thread Adam Lackorzynski
Hi Qiang,

On Wed Feb 12, 2025 at 11:55:30 +0800, qiang xu wrote:
> Hi Adam,
> 
> Thank you for your professional insights. Following your suggestion, I
> added "DEFAULT_RELOC_arm64 = 0x0ec0" to the Makeconf.local file in the
> root directory and then rebuilt the system. Upon checking the "Start
> address: 0x8600", I found that after rebuilding with 0x0ec0, the
> start address became 0x8ee0. So, I changed DEFAULT_RELOC_arm64 to
> 0x05e0, and after rebuilding, the start address was 0x8600, which
> meets the requirement.

Thanks for the fix, of course it was 0x05e0.

That's now interesting what is happening. Did it go into jdb itself or
did you press ESC to get to the jdb? If it was itself, was there any
message before that telling a reason maybe?


Adam

> The contents of Makeconf.local are as follows:
> 
> `/l4re-snapshot-24.08.0/obj/l4/builddir$ cat Makeconf.local
> CROSS_COMPILE:=aarch64-linux-gnu-
> DEFAULT_RELOC_arm64 = 0x05e0`
> 
> Build information:
> `/l4re-snapshot-24.08.0/obj/l4/builddir$ make uimage E=uvmm-2vm PT=s32g
> make[1]: Entering directory
> '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
>   [bootstrap] ... Building Dependencies
>   [bootstrap - nofpu] ... Building Dependencies
> Building entry "uvmm-2vm".
> Merging images:
> mod00:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/fiasco/builddir/fiasco
> [796kB]
> mod01:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/sigma0
> [24kB]
> mod02:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/moe
> [202kB]
> mod03:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/uvmm
> [974kB]
> mod04:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/l4re
> [110kB]
> mod05:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/ned
> [547kB]
> mod06:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/s32g2xxa-evb.dtb
> [53kB]
> mod07:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/fsl-image-dom0less-s32g274aevb.cpio.gz
> [25679kB]
> mod08:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4/pkg/uvmm/configs/vmm.lua
> [5kB]
> mod09: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/uvmm-2vm.ned
> [1kB]
> mod10: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/Image
> [14211kB]
> mod11:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/cons
> [280kB]
>   [bootstrap - nofpu] ... Generating bootstrap.ld
>   [bootstrap - nofpu] ... Compiling startup.o
>   [bootstrap - nofpu] ==> Linking l4re.elf
>   [bootstrap] ==> Image post-processing l4re.elf
>   [bootstrap - nofpu] ==> l4re.elf built
>   ==> Installing l4re.elf in image directory
>   ==> Installing l4re_uvmm-2vm in image directory
>   ==> Installing l4re_uvmm-2vm.elf in image directory
>   [bootstrap - nofpu] ... Generating l4re.raw
>   ==> Installing l4re.raw in image directory
>   ==> Installing l4re_uvmm-2vm.raw in image directory
>   [bootstrap - nofpu] ... Generating l4re.uimage
> Image Name:   L4 Image #14
> Created:  Wed Feb 12 10:50:58 2025
> Image Type:   AArch64 Linux Kernel Image (uncompressed)
> Data Size:44056496 Bytes = 43023.92 KiB = 42.02 MiB
> Load Address: 8600
> Entry Point:  8600
>   ==> Installing l4re.uimage in image directory
>   ==> Installing l4re_uvmm-2vm.uimage in image directory
>   Image size(s) in bytes:
>   l4re_uvmm-2vm.elf:  44692328
>l4re.raw:  44056496
> l4re.uimage:  44056560
>   Start address:
>   --> Build-Nr: 14
>   [bootstrap - nofpu] ==> Installing l4re.elf to local build-tree
>   [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm to local build-tree
>   [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm.elf to local build-tree
> make[1]: Leaving directory
> '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
> 
> `
> 
> I then placed it back onto the SD card to boot. Although this solved the
> previous overlap issue, it seems to hang and does not boot properly. I am
> unsure if this is related to the message:
> `Rev: unknown compiled with gcc 11.4.0 for NXP S32G`
> 
> because my Linux kernel image was built on another computer using the Yocto
> toolchain provided by NXP for S32G, while this machine
> uses`CROSS_COMPILE:=aarch64-linux-gnu-`to compile Fiasco and the L4 uImage.
> 
> Boot log:
> 
> `fatload mmc 0 0x8000e000 l4re_uvmm-2vm.uimage
> 44056560 bytes read in 1871 ms (22.5 MiB/s)
> => fatload mmc 0 0x8000 s32g2xxa-evb.dtb
> 53414 bytes read in 17 ms (3 MiB/s)
> => boot
>   boot bootd bootefi bootelf booti bootm bootp bootvx
> => bootm 0x8000e000 - 0x8000
> ## Booting kernel from Legacy Image at 8000e000 ...
>Image Name:   L4 Image #14
>Image Type:   AArch64 Linux Kernel Image (uncompressed)
>Data Size:44056496 Bytes = 42 MiB
>Load Address: 8600
>Entry Point:  860

Re: How to L4Re on the S32G

2025-02-11 Thread qiang xu
Hi Adam,

Thank you for your professional insights. Following your suggestion, I
added "DEFAULT_RELOC_arm64 = 0x0ec0" to the Makeconf.local file in the
root directory and then rebuilt the system. Upon checking the "Start
address: 0x8600", I found that after rebuilding with 0x0ec0, the
start address became 0x8ee0. So, I changed DEFAULT_RELOC_arm64 to
0x05e0, and after rebuilding, the start address was 0x8600, which
meets the requirement.

The contents of Makeconf.local are as follows:

`/l4re-snapshot-24.08.0/obj/l4/builddir$ cat Makeconf.local
CROSS_COMPILE:=aarch64-linux-gnu-
DEFAULT_RELOC_arm64 = 0x05e0`

Build information:
`/l4re-snapshot-24.08.0/obj/l4/builddir$ make uimage E=uvmm-2vm PT=s32g
make[1]: Entering directory
'/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
  [bootstrap] ... Building Dependencies
  [bootstrap - nofpu] ... Building Dependencies
Building entry "uvmm-2vm".
Merging images:
mod00:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/fiasco/builddir/fiasco
[796kB]
mod01:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/sigma0
[24kB]
mod02:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/moe
[202kB]
mod03:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/uvmm
[974kB]
mod04:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/l4re
[110kB]
mod05:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/ned
[547kB]
mod06:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/s32g2xxa-evb.dtb
[53kB]
mod07:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/fsl-image-dom0less-s32g274aevb.cpio.gz
[25679kB]
mod08:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4/pkg/uvmm/configs/vmm.lua
[5kB]
mod09: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/uvmm-2vm.ned
[1kB]
mod10: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/Image
[14211kB]
mod11:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/cons
[280kB]
  [bootstrap - nofpu] ... Generating bootstrap.ld
  [bootstrap - nofpu] ... Compiling startup.o
  [bootstrap - nofpu] ==> Linking l4re.elf
  [bootstrap] ==> Image post-processing l4re.elf
  [bootstrap - nofpu] ==> l4re.elf built
  ==> Installing l4re.elf in image directory
  ==> Installing l4re_uvmm-2vm in image directory
  ==> Installing l4re_uvmm-2vm.elf in image directory
  [bootstrap - nofpu] ... Generating l4re.raw
  ==> Installing l4re.raw in image directory
  ==> Installing l4re_uvmm-2vm.raw in image directory
  [bootstrap - nofpu] ... Generating l4re.uimage
Image Name:   L4 Image #14
Created:  Wed Feb 12 10:50:58 2025
Image Type:   AArch64 Linux Kernel Image (uncompressed)
Data Size:44056496 Bytes = 43023.92 KiB = 42.02 MiB
Load Address: 8600
Entry Point:  8600
  ==> Installing l4re.uimage in image directory
  ==> Installing l4re_uvmm-2vm.uimage in image directory
  Image size(s) in bytes:
  l4re_uvmm-2vm.elf:  44692328
   l4re.raw:  44056496
l4re.uimage:  44056560
  Start address:
  --> Build-Nr: 14
  [bootstrap - nofpu] ==> Installing l4re.elf to local build-tree
  [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm to local build-tree
  [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm.elf to local build-tree
make[1]: Leaving directory
'/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'

`

I then placed it back onto the SD card to boot. Although this solved the
previous overlap issue, it seems to hang and does not boot properly. I am
unsure if this is related to the message:
`Rev: unknown compiled with gcc 11.4.0 for NXP S32G`

because my Linux kernel image was built on another computer using the Yocto
toolchain provided by NXP for S32G, while this machine
uses`CROSS_COMPILE:=aarch64-linux-gnu-`to compile Fiasco and the L4 uImage.

Boot log:

`fatload mmc 0 0x8000e000 l4re_uvmm-2vm.uimage
44056560 bytes read in 1871 ms (22.5 MiB/s)
=> fatload mmc 0 0x8000 s32g2xxa-evb.dtb
53414 bytes read in 17 ms (3 MiB/s)
=> boot
  boot bootd bootefi bootelf booti bootm bootp bootvx
=> bootm 0x8000e000 - 0x8000
## Booting kernel from Legacy Image at 8000e000 ...
   Image Name:   L4 Image #14
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:44056496 Bytes = 42 MiB
   Load Address: 8600
   Entry Point:  8600
   Verifying Checksum ... OK
## Flattened Device Tree blob at 8000
   Booting using the fdt blob at 0x8000
   Loading Kernel Image
   Using Device Tree in place at 8000, end 800100a5
   fixup: pfe0 set to 00:01:be:be:ef:11
   fixup: pfe1 set to 00:01:be:be:ef:22
   fixup: pfe2 set to 00:01:be:be:ef:33

Starting kernel ...

L4 Bootstrapper
  Build: #14 Wed Feb 12 10:50:58 CST 2025, 11.4.0
...
Cache config: ON  // Stuck here, no further execution.
`

I noticed that JDB had started, so I entered the t 

Re: How to L4Re on the S32G

2025-02-11 Thread Adam Lackorzynski
Hi Qiang,

looks to me that bootstrap image to load is just too big as it interferes
with the reserved PFE areas of the platform. It seems unfortunate that
u-boot allows this to be loaded and that those areas are there at those
locations.

Anyway, I would recommend to change the loading address of bootstrap. 
Please do this by creating a file Makeconf.local in the root directory
of your build-tree
(/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir) with
the content:
DEFAULT_RELOC_arm64 = 0x0ec0

Then build the image again. Please check the output as it needs to state
"Start address: 0x8600"


Adam

On Mon Feb 10, 2025 at 17:25:22 +0800, qiang xu wrote:
> Hi Adam,
> 
>1. I followed your suggestion and changed *"kernel fiasco.debug
>-serial_esc"* to *"kernel fiasco -serial_esc"*.
>2. The error *"DT: FDT sanity check failed: FDT_ERR_BADMAGIC (-9) Total
>RAM: 0MB"* disappeared after reloading the device tree (dtb).
>3. Below is the boot command I used.
> 
> `=> fatload mmc 0 0x8000 s32g2xxa-evb.dtb
> 53414 bytes read in 17 ms (3 MiB/s)
> => fatload mmc 0 0x8000e000 l4re_uvmm-2vm.uimage
> 44056560 bytes read in 1871 ms (22.5 MiB/s)
> => bootm 0x8000e000 - 0x8000
> ## Booting kernel from Legacy Image at 8000e000 ...
>Image Name:   L4 Image #10
>Image Type:   AArch64 Linux Kernel Image (uncompressed)
>Data Size:44056496 Bytes = 42 MiB
>Load Address: 8120
>Entry Point:  8120
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 8000
>Booting using the fdt blob at 0x8000
>Loading Kernel Image
>Using Device Tree in place at 8000, end 800100a5
>fixup: pfe0 set to 00:01:be:be:ef:11
>fixup: pfe1 set to 00:01:be:be:ef:22
>fixup: pfe2 set to 00:01:be:be:ef:33
> 
> Starting kernel ...
> 
> 
> L4 Bootstrapper
>   Build: #10 Mon Feb 10 10:06:07 CST 2025, 11.4.0
>   RAM: 8000 - : 2097152kB
>   RAM: 00088000 - 0008dfff: 1572864kB
>   Total RAM: 3584MB
>   New region for list regions:  [ 82ddd000,  83bbd807] {   de0808} Boot
>   Module
>   overlaps with:[ 8320,  835d] {   3e} Arch
>   pfebufs@8320
> Regions of list 'regions'
> [ 3400,  3407] {8} Arch   pfebufs@3400
> [ 3408,  3409] {2} Arch   pfebufs@3408
> [ 8000,  8000dfff] { e000} Root   dtb
> [ 8120,  8121d777] {1d778} Boot   bootstrap
> [ 81200158,  81200187] {   30} Root   cpu_boot
> [ 8121e1d0,  8121eac7] {  8f8} Boot   modinfo
> [ 8121f000,  812e5fe7] {c6fe8} Boot   Module
> [ 812e6000,  812ebcd7] { 5cd8} Boot   Module
> [ 812ec000,  8131e6cf] {326d0} Boot   Module
> [ 8131f000,  8141258f] {f3590} Boot   Module
> [ 81413000,  8142e537] {1b538} Boot   Module
> [ 8142f000,  814b7aa7] {88aa8} Boot   Module
> [ 814b8000,  814c50a5] { d0a6} Boot   Module
> [ 814c6000,  82dd9a52] {  1913a53} Boot   Module
> [ 82dda000,  82ddb218] { 1219} Boot   Module
> [ 82ddc000,  82ddc224] {  225} Boot   Module
> [ 8320,  835d] {   3e} Arch   pfebufs@8320
> [ 835e,  835f] {2} Arch   pfebufs@835e
> [ 8400,  843f] {   40} Arch   shm@8400
> [ 8500,  85000fff] { 1000} Arch   ddr@8500
> [ c000,  c03f] {   40} Arch   shm@c000
> [ c040,  c07f] {   40} Arch   shm@c040
> [ d000,  d07f] {   80} Arch   shm@d000
> [ d080,  d0ff] {   80} Arch   shm@d080
> [ ff80,  ff9f] {   20} Arch   atf@ff80
> region overlap
> 
> Key press reboots...
> `
> Please help me analyze where the issue might be. Thank you very much!
> 
> Regards,
> Qiang
> 
> On Mon, Feb 10, 2025 at 3:03 AM Adam Lackorzynski  wrote:
> 
> > Hi Qiang,
> >
> > thanks for the description and all the logs. Could you also please share
> > the command given in u-boot (bootm...)?
> >
> > From the logs, the following lines look suspicious:
> >
> > > DT: FDT sanity check failed: FDT_ERR_BADMAGIC (-9)
> > >   Total RAM: 0MB
> >
> > Indicating that something with the device tree is not ok.
> >
> > > kernel fiasco.debug -serial_esc
> >
> > Please use "fiasco" only. The fiasco.debug is considerably bigger to load
> > and could contribute to the region overlap.
> >
> >
> >
> > Adam
> >
> > On Thu Feb 06, 2025 at 19:53:49 +0800, qiang xu wrote:
> > > Hi Adam,
> > >   I encountered the error "region overlap" while running L4Re on S32G.
> > >
> > > First, I built the Linux BSP 38.0 using Yocto to generate the Image,
> > > s32g2xxa-evb.dtb, and fsl-image-dom0less-s32g274aevb.cpio.gz. Then, I
> > > compiled the S32G platform's L4Re image using the snapshots
> > >  method. In the
> > > modules.list, I added the following:
> > >
> > > `
> > > entry uvm

Re: How to L4Re on the S32G

2025-02-10 Thread qiang xu
Hi Adam,

   1. I followed your suggestion and changed *"kernel fiasco.debug
   -serial_esc"* to *"kernel fiasco -serial_esc"*.
   2. The error *"DT: FDT sanity check failed: FDT_ERR_BADMAGIC (-9) Total
   RAM: 0MB"* disappeared after reloading the device tree (dtb).
   3. Below is the boot command I used.

`=> fatload mmc 0 0x8000 s32g2xxa-evb.dtb
53414 bytes read in 17 ms (3 MiB/s)
=> fatload mmc 0 0x8000e000 l4re_uvmm-2vm.uimage
44056560 bytes read in 1871 ms (22.5 MiB/s)
=> bootm 0x8000e000 - 0x8000
## Booting kernel from Legacy Image at 8000e000 ...
   Image Name:   L4 Image #10
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:44056496 Bytes = 42 MiB
   Load Address: 8120
   Entry Point:  8120
   Verifying Checksum ... OK
## Flattened Device Tree blob at 8000
   Booting using the fdt blob at 0x8000
   Loading Kernel Image
   Using Device Tree in place at 8000, end 800100a5
   fixup: pfe0 set to 00:01:be:be:ef:11
   fixup: pfe1 set to 00:01:be:be:ef:22
   fixup: pfe2 set to 00:01:be:be:ef:33

Starting kernel ...


L4 Bootstrapper
  Build: #10 Mon Feb 10 10:06:07 CST 2025, 11.4.0
  RAM: 8000 - : 2097152kB
  RAM: 00088000 - 0008dfff: 1572864kB
  Total RAM: 3584MB
  New region for list regions:  [ 82ddd000,  83bbd807] {   de0808} Boot
  Module
  overlaps with:[ 8320,  835d] {   3e} Arch
  pfebufs@8320
Regions of list 'regions'
[ 3400,  3407] {8} Arch   pfebufs@3400
[ 3408,  3409] {2} Arch   pfebufs@3408
[ 8000,  8000dfff] { e000} Root   dtb
[ 8120,  8121d777] {1d778} Boot   bootstrap
[ 81200158,  81200187] {   30} Root   cpu_boot
[ 8121e1d0,  8121eac7] {  8f8} Boot   modinfo
[ 8121f000,  812e5fe7] {c6fe8} Boot   Module
[ 812e6000,  812ebcd7] { 5cd8} Boot   Module
[ 812ec000,  8131e6cf] {326d0} Boot   Module
[ 8131f000,  8141258f] {f3590} Boot   Module
[ 81413000,  8142e537] {1b538} Boot   Module
[ 8142f000,  814b7aa7] {88aa8} Boot   Module
[ 814b8000,  814c50a5] { d0a6} Boot   Module
[ 814c6000,  82dd9a52] {  1913a53} Boot   Module
[ 82dda000,  82ddb218] { 1219} Boot   Module
[ 82ddc000,  82ddc224] {  225} Boot   Module
[ 8320,  835d] {   3e} Arch   pfebufs@8320
[ 835e,  835f] {2} Arch   pfebufs@835e
[ 8400,  843f] {   40} Arch   shm@8400
[ 8500,  85000fff] { 1000} Arch   ddr@8500
[ c000,  c03f] {   40} Arch   shm@c000
[ c040,  c07f] {   40} Arch   shm@c040
[ d000,  d07f] {   80} Arch   shm@d000
[ d080,  d0ff] {   80} Arch   shm@d080
[ ff80,  ff9f] {   20} Arch   atf@ff80
region overlap

Key press reboots...
`
Please help me analyze where the issue might be. Thank you very much!

Regards,
Qiang

On Mon, Feb 10, 2025 at 3:03 AM Adam Lackorzynski  wrote:

> Hi Qiang,
>
> thanks for the description and all the logs. Could you also please share
> the command given in u-boot (bootm...)?
>
> From the logs, the following lines look suspicious:
>
> > DT: FDT sanity check failed: FDT_ERR_BADMAGIC (-9)
> >   Total RAM: 0MB
>
> Indicating that something with the device tree is not ok.
>
> > kernel fiasco.debug -serial_esc
>
> Please use "fiasco" only. The fiasco.debug is considerably bigger to load
> and could contribute to the region overlap.
>
>
>
> Adam
>
> On Thu Feb 06, 2025 at 19:53:49 +0800, qiang xu wrote:
> > Hi Adam,
> >   I encountered the error "region overlap" while running L4Re on S32G.
> >
> > First, I built the Linux BSP 38.0 using Yocto to generate the Image,
> > s32g2xxa-evb.dtb, and fsl-image-dom0less-s32g274aevb.cpio.gz. Then, I
> > compiled the S32G platform's L4Re image using the snapshots
> >  method. In the
> > modules.list, I added the following:
> >
> > `
> > entry uvmm-2vm
> > kernel fiasco.debug -serial_esc
> > roottask moe rom/uvmm-2vm.ned
> > module uvmm
> > module l4re
> > module ned
> > module s32g2xxa-evb.dtb
> > module fsl-image-dom0less-s32g274aevb.cpio.gz
> > module[shell] echo $SRC_BASE_ABS/pkg/uvmm/configs/vmm.lua
> > module uvmm-2vm.ned
> > module Image
> > module cons
> > `
> >
> > Finally, I ran the command make uimage E=uvmm-2vm PT=s32g in the
> > /l4re-snapshot-24.08.0/obj/l4/builddir directory, which showed the
> > following output:
> >
> > `
> > make[1]: Entering directory
> > '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
> > [bootstrap - nofpu] ... Building Dependencies
> > Building entry "uvmm-2vm".
> > Merging images:
> > mod00:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/fiasco/builddir/fiasco.debug
> > [27393kB -> 796kB]
> > mod01:
> >
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm

Re: How to L4Re on the S32G

2025-02-09 Thread Adam Lackorzynski
Hi Qiang,

thanks for the description and all the logs. Could you also please share
the command given in u-boot (bootm...)?

From the logs, the following lines look suspicious:

> DT: FDT sanity check failed: FDT_ERR_BADMAGIC (-9)
>   Total RAM: 0MB

Indicating that something with the device tree is not ok.

> kernel fiasco.debug -serial_esc

Please use "fiasco" only. The fiasco.debug is considerably bigger to load and 
could contribute to the region overlap.



Adam

On Thu Feb 06, 2025 at 19:53:49 +0800, qiang xu wrote:
> Hi Adam,
>   I encountered the error "region overlap" while running L4Re on S32G.
> 
> First, I built the Linux BSP 38.0 using Yocto to generate the Image,
> s32g2xxa-evb.dtb, and fsl-image-dom0less-s32g274aevb.cpio.gz. Then, I
> compiled the S32G platform's L4Re image using the snapshots
>  method. In the
> modules.list, I added the following:
> 
> `
> entry uvmm-2vm
> kernel fiasco.debug -serial_esc
> roottask moe rom/uvmm-2vm.ned
> module uvmm
> module l4re
> module ned
> module s32g2xxa-evb.dtb
> module fsl-image-dom0less-s32g274aevb.cpio.gz
> module[shell] echo $SRC_BASE_ABS/pkg/uvmm/configs/vmm.lua
> module uvmm-2vm.ned
> module Image
> module cons
> `
> 
> Finally, I ran the command make uimage E=uvmm-2vm PT=s32g in the
> /l4re-snapshot-24.08.0/obj/l4/builddir directory, which showed the
> following output:
> 
> `
> make[1]: Entering directory
> '/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
> [bootstrap - nofpu] ... Building Dependencies
> Building entry "uvmm-2vm".
> Merging images:
> mod00:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/fiasco/builddir/fiasco.debug
> [27393kB -> 796kB]
> mod01:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/sigma0
> [24kB]
> mod02:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/moe
> [202kB]
> mod03:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/uvmm
> [974kB]
> mod04:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/l4re
> [110kB]
> mod05:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/ned
> [547kB]
> mod06:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/s32g2xxa-evb.dtb
> [53kB]
> mod07:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/fsl-image-dom0less-s32g274aevb.cpio.gz
> [25679kB]
> mod08:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4/pkg/uvmm/configs/vmm.lua
> [5kB]
> mod09: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/uvmm-2vm.ned
> [1kB]
> mod10: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/Image
> [14211kB]
> mod11:
> /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/cons
> [280kB]
> [bootstrap - nofpu] ... Generating bootstrap.ld
> [bootstrap - nofpu] ... Compiling startup.o
> [bootstrap - nofpu] ==> Linking l4re.elf
> [bootstrap] ==> Image post-processing l4re.elf
> [bootstrap - nofpu] ==> l4re.elf built
> ==> Installing l4re.elf in image directory
> ==> Installing l4re_uvmm-2vm in image directory
> ==> Installing l4re_uvmm-2vm.elf in image directory
> [bootstrap - nofpu] ... Generating l4re.raw
> ==> Installing l4re.raw in image directory
> ==> Installing l4re_uvmm-2vm.raw in image directory
> [bootstrap - nofpu] ... Generating l4re.uimage
> Image Name:   L4 Image #9
> Created:  Thu Feb 6 19:29:02 2025
> Image Type:   AArch64 Linux Kernel Image (uncompressed)
> Data Size:44056496 Bytes = 43023.92 KiB = 42.02 MiB
> Load Address: 8120
> Entry Point:  8120
> ==> Installing l4re.uimage in image directory
> ==> Installing l4re_uvmm-2vm.uimage in image directory
> Image size(s) in bytes:
> l4re_uvmm-2vm.elf:  44692328
>  l4re.raw:  44056496
>   l4re.uimage:  44056560
> Start address:
> --> Build-Nr: 9
> [bootstrap - nofpu] ==> Installing l4re.elf to local build-tree
> [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm to local build-tree
> [bootstrap - nofpu] ==> Installing l4re_uvmm-2vm.elf to local build-tree
> `
> Finally, I tried loading the l4re_uvmm-2vm.uimage and s32g2xxa-evb.dtb
> files in U-Boot for booting, but it resulted in an error. Can you help me
> identify where the issue might be?
> 
> `
> L4 Bootstrapper
>   Build: #8 Thu Feb 6 14:58:40 CST 2025, 11.4.0
> DT: FDT sanity check failed: FDT_ERR_BADMAGIC (-9)
> 
> L4 Bootstrapper
>   Build: #8 Thu Feb 6 14:58:40 CST 2025, 11.4.0
>   Total RAM: 0MB
>   New region for list regions:  [ 82ddd000,  855979ff] {  27baa00} Boot
>   Module
>   overlaps with:[ 8320,  835d] {   3e} Arch
>   pfebufs@8320
> Regions of list 'regions'
> [ 3400,  3407] {8} Arch   pfebufs@3400
> [ 3408,  3409] {2} Arch   pfebufs@3408
> [ 8000,  8000d0a5] { d0a6} Root   dtb
> [ 8120,  8121d777] {1d

Re: How to L4Re on the S32G

2025-02-06 Thread qiang xu
Hi Adam,
  I encountered the error "region overlap" while running L4Re on S32G.

First, I built the Linux BSP 38.0 using Yocto to generate the Image,
s32g2xxa-evb.dtb, and fsl-image-dom0less-s32g274aevb.cpio.gz. Then, I
compiled the S32G platform's L4Re image using the snapshots
 method. In the
modules.list, I added the following:

`
entry uvmm-2vm
kernel fiasco.debug -serial_esc
roottask moe rom/uvmm-2vm.ned
module uvmm
module l4re
module ned
module s32g2xxa-evb.dtb
module fsl-image-dom0less-s32g274aevb.cpio.gz
module[shell] echo $SRC_BASE_ABS/pkg/uvmm/configs/vmm.lua
module uvmm-2vm.ned
module Image
module cons
`

Finally, I ran the command make uimage E=uvmm-2vm PT=s32g in the
/l4re-snapshot-24.08.0/obj/l4/builddir directory, which showed the
following output:

`
make[1]: Entering directory
'/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4'
[bootstrap - nofpu] ... Building Dependencies
Building entry "uvmm-2vm".
Merging images:
mod00:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/fiasco/builddir/fiasco.debug
[27393kB -> 796kB]
mod01:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/sigma0
[24kB]
mod02:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/moe
[202kB]
mod03:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/uvmm
[974kB]
mod04:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/l4re
[110kB]
mod05:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/ned
[547kB]
mod06:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/s32g2xxa-evb.dtb
[53kB]
mod07:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/fsl-image-dom0less-s32g274aevb.cpio.gz
[25679kB]
mod08:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/src/l4/pkg/uvmm/configs/vmm.lua
[5kB]
mod09: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/uvmm-2vm.ned
[1kB]
mod10: /home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/conf/Image
[14211kB]
mod11:
/home/qiangxu/prebuildl4/l4re-snapshot-24.08.0/obj/l4/builddir/bin/arm64_armv8a/l4f/cons
[280kB]
[bootstrap - nofpu] ... Generating bootstrap.ld
[bootstrap - nofpu] ... Compiling startup.o
[bootstrap - nofpu] ==> Linking l4re.elf
[bootstrap] ==> Image post-processing l4re.elf
[bootstrap - nofpu] ==> l4re.elf built
==> Installing l4re.elf in image directory
==> Installing l4re_uvmm-2vm in image directory
==> Installing l4re_uvmm-2vm.elf in image directory
[bootstrap - nofpu] ... Generating l4re.raw
==> Installing l4re.raw in image directory
==> Installing l4re_uvmm-2vm.raw in image directory
[bootstrap - nofpu] ... Generating l4re.uimage
Image Name:   L4 Image #9
Created:  Thu Feb 6 19:29:02 2025
Image Type:   AArch64 Linux Kernel Image (uncompressed)
Data Size:44056496 Bytes = 43023.92 KiB = 42.02 MiB
Load Address: 8120
Entry Point:  8120
==> Installing l4re.uimage in image directory
==> Installing l4re_uvmm-2vm.uimage in image directory
Image size(s) in bytes:
l4re_uvmm-2vm.elf:  44692328
 l4re.raw:  44056496
  l4re.uimage:  44056560
Start address:
--> Build-Nr: 9
[bootstrap - nofpu] ==> Installing l4re.elf to local build-tree
[bootstrap - nofpu] ==> Installing l4re_uvmm-2vm to local build-tree
[bootstrap - nofpu] ==> Installing l4re_uvmm-2vm.elf to local build-tree
`
Finally, I tried loading the l4re_uvmm-2vm.uimage and s32g2xxa-evb.dtb
files in U-Boot for booting, but it resulted in an error. Can you help me
identify where the issue might be?

`
L4 Bootstrapper
  Build: #8 Thu Feb 6 14:58:40 CST 2025, 11.4.0
DT: FDT sanity check failed: FDT_ERR_BADMAGIC (-9)

L4 Bootstrapper
  Build: #8 Thu Feb 6 14:58:40 CST 2025, 11.4.0
  Total RAM: 0MB
  New region for list regions:  [ 82ddd000,  855979ff] {  27baa00} Boot
  Module
  overlaps with:[ 8320,  835d] {   3e} Arch
  pfebufs@8320
Regions of list 'regions'
[ 3400,  3407] {8} Arch   pfebufs@3400
[ 3408,  3409] {2} Arch   pfebufs@3408
[ 8000,  8000d0a5] { d0a6} Root   dtb
[ 8120,  8121d777] {1d778} Boot   bootstrap
[ 81200158,  81200187] {   30} Root   cpu_boot
[ 8121e1d0,  8121eadf] {  910} Boot   modinfo
[ 8121f000,  812e5f7f] {c6f80} Boot   Module
[ 812e6000,  812ebcd7] { 5cd8} Boot   Module
[ 812ec000,  8131e6cf] {326d0} Boot   Module
[ 8131f000,  8141258f] {f3590} Boot   Module
[ 81413000,  8142e537] {1b538} Boot   Module
[ 8142f000,  814b7aa7] {88aa8} Boot   Module
[ 814b8000,  814c50a5] { d0a6} Boot   Module
[ 814c6000,  82dd9a52] {  1913a53} Boot   Module
[ 82dda000,  82ddb218] { 1219} Boot   Module
[ 82ddc000,  82ddc22a] {  22b} Boot   Module
[ 8320,  835d] {   3e} Arch   pfebufs@8320
[ 835e,  835f] {2} Arc

Re: How to L4Re on the S32G

2025-01-07 Thread qiang xu
Hi Adam,

Awesome, thanks for the info!

Regards,
Qiang

On Tue, Jan 7, 2025 at 10:03 PM Adam Lackorzynski  wrote:

> Hi Qiang,
>
> thanks for the great feedback.
>
> It's correct, the L4Re microerkernel Fiasco runs in EL2 only. It runs
> both VMs and L4Re applications side by side, so yes, it is a hypervisor
> too.
>
>
> Best regards,
> Adam
>
> On Tue Jan 07, 2025 at 19:34:20 +0800, qiang xu wrote:
> >   Hi Adam,
> >
> >  Thank you very much for your support. The explanation was very clear.
> From
> > the printed information, it seems to be running fine. I have one more
> > question: Can Fiasco be used as a hypervisor? From the example of
> > l4re_VM-multi, it seems to have the ability to run multiple operating
> > systems on a single platform, and in L4Re, only Fiasco runs in EL2
> > privilege level. I'm not sure if I understand this correctly, so I wanted
> > to confirm with you. If it cannot be used as a hypervisor, what
> > functionality does it lack that a hypervisor would typically have?
> >
> > Regards,
> > Qiang
> >
> >
> > On Tue, Jan 7, 2025 at 7:53 AM Adam Lackorzynski  wrote:
> >
> > > Hi Qiang,
> > >
> > > If I'm not mistaken, the provided BSP is using u-boot. With u-boot, the
> > > uimage file is a good fit. When booting up, you can stop at the u-boot
> > > prompt and do something like this:
> > > # fatload mmc 0 0x80f0 fsl-s32g274a-evb.dtb
> > > # fatload mmc 0 0x80c0 l4re_vm-multi-p2p_s32g.uimage
> > > # bootm 0x80c0  - 0x80f0
> > >
> > > You need to copy the l4re_vm-multi-p2p_s32g.uimage file to the mmc
> first
> > > of course, for example, through Linux.
> > > Alternative you could also load the elf-image or raw-image into memory
> > > via your hardware debugger, whatever method the debugger supports. Do
> it
> > > by intercepting at the u-boot prompt.
> > >
> > > A third option is to use the tftp network capabilities of u-boot to
> load
> > > the uimage via network.
> > >
> > >
> > >
> > > Adam
> > >
> > > On Mon Jan 06, 2025 at 11:04:35 +0800, qiang xu wrote:
> > > > Hi Adam,
> > > >
> > > > Thank you for your response.
> > > >
> > > > I found the following images in the L4Re pre-built images folder:
> > > > “l4re_vm-multi-p2p_s32g.efi,” “l4re_vm-multi-p2p_s32g.elf,” and
> > > > “l4re_vm-multi-p2p_s32g.uimage.” I would like to understand how these
> > > > images can be combined with the BSP built using Yocto and placed on
> the
> > > SD
> > > > card for booting.
> > > >
> > > >  I have been following the examples from the L4Re wiki
> > > >  to get
> > > started
> > > > with L4Re. These examples run very well on QEMU, but there is an
> issue—I
> > > am
> > > > unable to use GDB to debug the Fiasco kernel.I noticed that L4Re can
> also
> > > > run on the S32G platform, so I would like to run L4Re on S32G and
> use a
> > > > hardware debugging tool to debug the Fiasco kernel during its
> execution.
> > > > However, the wiki does not provide instructions on how to run L4Re on
> > > real
> > > > hardware.Therefore, I would like your guidance on how to run the
> examples
> > > > from the wiki <
> https://github.com/kernkonzept/manifest/wiki/MultipleVMs>
> > > on
> > > > the S32G platform and boot from an SD card.
> > > >
> > > > Regards,
> > > > Qiang
> > > >
> > > > On Mon, Jan 6, 2025 at 9:56 AM Adam Lackorzynski 
> wrote:
> > > >
> > > > > Hi Qiang,
> > > > >
> > > > > On Sat Jan 04, 2025 at 17:03:21 +0800, qiang xu wrote:
> > > > > > I would like to know how to run L4Re on the S32G. I couldn’t
> find any
> > > > > > related documentation. I’m a beginner in this technical field, so
> > > could
> > > > > you
> > > > > > provide friendly step-by-step instructions?
> > > > >
> > > > > One option is to use the snapshot from l4re.org as it has a
> > > menu-driven
> > > > > target selection which includes the S32G. This hides quite a few
> of the
> > > > > details but gives examples for the S32G right away.
> > > > > How do you boot your S32G?
>
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]


Re: How to L4Re on the S32G

2025-01-07 Thread Adam Lackorzynski
Hi Qiang,

thanks for the great feedback.

It's correct, the L4Re microerkernel Fiasco runs in EL2 only. It runs
both VMs and L4Re applications side by side, so yes, it is a hypervisor too.


Best regards,
Adam

On Tue Jan 07, 2025 at 19:34:20 +0800, qiang xu wrote:
>   Hi Adam,
> 
>  Thank you very much for your support. The explanation was very clear. From
> the printed information, it seems to be running fine. I have one more
> question: Can Fiasco be used as a hypervisor? From the example of
> l4re_VM-multi, it seems to have the ability to run multiple operating
> systems on a single platform, and in L4Re, only Fiasco runs in EL2
> privilege level. I'm not sure if I understand this correctly, so I wanted
> to confirm with you. If it cannot be used as a hypervisor, what
> functionality does it lack that a hypervisor would typically have?
> 
> Regards,
> Qiang
> 
> 
> On Tue, Jan 7, 2025 at 7:53 AM Adam Lackorzynski  wrote:
> 
> > Hi Qiang,
> >
> > If I'm not mistaken, the provided BSP is using u-boot. With u-boot, the
> > uimage file is a good fit. When booting up, you can stop at the u-boot
> > prompt and do something like this:
> > # fatload mmc 0 0x80f0 fsl-s32g274a-evb.dtb
> > # fatload mmc 0 0x80c0 l4re_vm-multi-p2p_s32g.uimage
> > # bootm 0x80c0  - 0x80f0
> >
> > You need to copy the l4re_vm-multi-p2p_s32g.uimage file to the mmc first
> > of course, for example, through Linux.
> > Alternative you could also load the elf-image or raw-image into memory
> > via your hardware debugger, whatever method the debugger supports. Do it
> > by intercepting at the u-boot prompt.
> >
> > A third option is to use the tftp network capabilities of u-boot to load
> > the uimage via network.
> >
> >
> >
> > Adam
> >
> > On Mon Jan 06, 2025 at 11:04:35 +0800, qiang xu wrote:
> > > Hi Adam,
> > >
> > > Thank you for your response.
> > >
> > > I found the following images in the L4Re pre-built images folder:
> > > “l4re_vm-multi-p2p_s32g.efi,” “l4re_vm-multi-p2p_s32g.elf,” and
> > > “l4re_vm-multi-p2p_s32g.uimage.” I would like to understand how these
> > > images can be combined with the BSP built using Yocto and placed on the
> > SD
> > > card for booting.
> > >
> > >  I have been following the examples from the L4Re wiki
> > >  to get
> > started
> > > with L4Re. These examples run very well on QEMU, but there is an issue—I
> > am
> > > unable to use GDB to debug the Fiasco kernel.I noticed that L4Re can also
> > > run on the S32G platform, so I would like to run L4Re on S32G and use a
> > > hardware debugging tool to debug the Fiasco kernel during its execution.
> > > However, the wiki does not provide instructions on how to run L4Re on
> > real
> > > hardware.Therefore, I would like your guidance on how to run the examples
> > > from the wiki 
> > on
> > > the S32G platform and boot from an SD card.
> > >
> > > Regards,
> > > Qiang
> > >
> > > On Mon, Jan 6, 2025 at 9:56 AM Adam Lackorzynski  wrote:
> > >
> > > > Hi Qiang,
> > > >
> > > > On Sat Jan 04, 2025 at 17:03:21 +0800, qiang xu wrote:
> > > > > I would like to know how to run L4Re on the S32G. I couldn’t find any
> > > > > related documentation. I’m a beginner in this technical field, so
> > could
> > > > you
> > > > > provide friendly step-by-step instructions?
> > > >
> > > > One option is to use the snapshot from l4re.org as it has a
> > menu-driven
> > > > target selection which includes the S32G. This hides quite a few of the
> > > > details but gives examples for the S32G right away.
> > > > How do you boot your S32G?
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]


Re: How to L4Re on the S32G

2025-01-07 Thread qiang xu
  Hi Adam,

 Thank you very much for your support. The explanation was very clear. From
the printed information, it seems to be running fine. I have one more
question: Can Fiasco be used as a hypervisor? From the example of
l4re_VM-multi, it seems to have the ability to run multiple operating
systems on a single platform, and in L4Re, only Fiasco runs in EL2
privilege level. I'm not sure if I understand this correctly, so I wanted
to confirm with you. If it cannot be used as a hypervisor, what
functionality does it lack that a hypervisor would typically have?

Regards,
Qiang


On Tue, Jan 7, 2025 at 7:53 AM Adam Lackorzynski  wrote:

> Hi Qiang,
>
> If I'm not mistaken, the provided BSP is using u-boot. With u-boot, the
> uimage file is a good fit. When booting up, you can stop at the u-boot
> prompt and do something like this:
> # fatload mmc 0 0x80f0 fsl-s32g274a-evb.dtb
> # fatload mmc 0 0x80c0 l4re_vm-multi-p2p_s32g.uimage
> # bootm 0x80c0  - 0x80f0
>
> You need to copy the l4re_vm-multi-p2p_s32g.uimage file to the mmc first
> of course, for example, through Linux.
> Alternative you could also load the elf-image or raw-image into memory
> via your hardware debugger, whatever method the debugger supports. Do it
> by intercepting at the u-boot prompt.
>
> A third option is to use the tftp network capabilities of u-boot to load
> the uimage via network.
>
>
>
> Adam
>
> On Mon Jan 06, 2025 at 11:04:35 +0800, qiang xu wrote:
> > Hi Adam,
> >
> > Thank you for your response.
> >
> > I found the following images in the L4Re pre-built images folder:
> > “l4re_vm-multi-p2p_s32g.efi,” “l4re_vm-multi-p2p_s32g.elf,” and
> > “l4re_vm-multi-p2p_s32g.uimage.” I would like to understand how these
> > images can be combined with the BSP built using Yocto and placed on the
> SD
> > card for booting.
> >
> >  I have been following the examples from the L4Re wiki
> >  to get
> started
> > with L4Re. These examples run very well on QEMU, but there is an issue—I
> am
> > unable to use GDB to debug the Fiasco kernel.I noticed that L4Re can also
> > run on the S32G platform, so I would like to run L4Re on S32G and use a
> > hardware debugging tool to debug the Fiasco kernel during its execution.
> > However, the wiki does not provide instructions on how to run L4Re on
> real
> > hardware.Therefore, I would like your guidance on how to run the examples
> > from the wiki 
> on
> > the S32G platform and boot from an SD card.
> >
> > Regards,
> > Qiang
> >
> > On Mon, Jan 6, 2025 at 9:56 AM Adam Lackorzynski  wrote:
> >
> > > Hi Qiang,
> > >
> > > On Sat Jan 04, 2025 at 17:03:21 +0800, qiang xu wrote:
> > > > I would like to know how to run L4Re on the S32G. I couldn’t find any
> > > > related documentation. I’m a beginner in this technical field, so
> could
> > > you
> > > > provide friendly step-by-step instructions?
> > >
> > > One option is to use the snapshot from l4re.org as it has a
> menu-driven
> > > target selection which includes the S32G. This hides quite a few of the
> > > details but gives examples for the S32G right away.
> > > How do you boot your S32G?
>
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]


Re: How to L4Re on the S32G

2025-01-06 Thread Adam Lackorzynski
Hi Qiang,

If I'm not mistaken, the provided BSP is using u-boot. With u-boot, the
uimage file is a good fit. When booting up, you can stop at the u-boot
prompt and do something like this:
# fatload mmc 0 0x80f0 fsl-s32g274a-evb.dtb
# fatload mmc 0 0x80c0 l4re_vm-multi-p2p_s32g.uimage
# bootm 0x80c0  - 0x80f0

You need to copy the l4re_vm-multi-p2p_s32g.uimage file to the mmc first
of course, for example, through Linux.
Alternative you could also load the elf-image or raw-image into memory
via your hardware debugger, whatever method the debugger supports. Do it
by intercepting at the u-boot prompt.

A third option is to use the tftp network capabilities of u-boot to load
the uimage via network.



Adam

On Mon Jan 06, 2025 at 11:04:35 +0800, qiang xu wrote:
> Hi Adam,
> 
> Thank you for your response.
> 
> I found the following images in the L4Re pre-built images folder:
> “l4re_vm-multi-p2p_s32g.efi,” “l4re_vm-multi-p2p_s32g.elf,” and
> “l4re_vm-multi-p2p_s32g.uimage.” I would like to understand how these
> images can be combined with the BSP built using Yocto and placed on the SD
> card for booting.
> 
>  I have been following the examples from the L4Re wiki
>  to get started
> with L4Re. These examples run very well on QEMU, but there is an issue—I am
> unable to use GDB to debug the Fiasco kernel.I noticed that L4Re can also
> run on the S32G platform, so I would like to run L4Re on S32G and use a
> hardware debugging tool to debug the Fiasco kernel during its execution.
> However, the wiki does not provide instructions on how to run L4Re on real
> hardware.Therefore, I would like your guidance on how to run the examples
> from the wiki  on
> the S32G platform and boot from an SD card.
> 
> Regards,
> Qiang
> 
> On Mon, Jan 6, 2025 at 9:56 AM Adam Lackorzynski  wrote:
> 
> > Hi Qiang,
> >
> > On Sat Jan 04, 2025 at 17:03:21 +0800, qiang xu wrote:
> > > I would like to know how to run L4Re on the S32G. I couldn’t find any
> > > related documentation. I’m a beginner in this technical field, so could
> > you
> > > provide friendly step-by-step instructions?
> >
> > One option is to use the snapshot from l4re.org as it has a menu-driven
> > target selection which includes the S32G. This hides quite a few of the
> > details but gives examples for the S32G right away.
> > How do you boot your S32G?
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]


Re: How to L4Re on the S32G

2025-01-05 Thread qiang xu
Hi Adam,

Thank you for your response.

I found the following images in the L4Re pre-built images folder:
“l4re_vm-multi-p2p_s32g.efi,” “l4re_vm-multi-p2p_s32g.elf,” and
“l4re_vm-multi-p2p_s32g.uimage.” I would like to understand how these
images can be combined with the BSP built using Yocto and placed on the SD
card for booting.

 I have been following the examples from the L4Re wiki
 to get started
with L4Re. These examples run very well on QEMU, but there is an issue—I am
unable to use GDB to debug the Fiasco kernel.I noticed that L4Re can also
run on the S32G platform, so I would like to run L4Re on S32G and use a
hardware debugging tool to debug the Fiasco kernel during its execution.
However, the wiki does not provide instructions on how to run L4Re on real
hardware.Therefore, I would like your guidance on how to run the examples
from the wiki  on
the S32G platform and boot from an SD card.

Regards,
Qiang

On Mon, Jan 6, 2025 at 9:56 AM Adam Lackorzynski  wrote:

> Hi Qiang,
>
> On Sat Jan 04, 2025 at 17:03:21 +0800, qiang xu wrote:
> > I would like to know how to run L4Re on the S32G. I couldn’t find any
> > related documentation. I’m a beginner in this technical field, so could
> you
> > provide friendly step-by-step instructions?
>
> One option is to use the snapshot from l4re.org as it has a menu-driven
> target selection which includes the S32G. This hides quite a few of the
> details but gives examples for the S32G right away.
> How do you boot your S32G?
>
>
>
> Adam
>
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]


Re: How to L4Re on the S32G

2025-01-05 Thread Adam Lackorzynski
Hi Qiang,

On Sat Jan 04, 2025 at 17:03:21 +0800, qiang xu wrote:
> I would like to know how to run L4Re on the S32G. I couldn’t find any
> related documentation. I’m a beginner in this technical field, so could you
> provide friendly step-by-step instructions?

One option is to use the snapshot from l4re.org as it has a menu-driven
target selection which includes the S32G. This hides quite a few of the
details but gives examples for the S32G right away.
How do you boot your S32G?



Adam
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]