Re: Problems Compiling L4RE with L4Linux
Or Becker <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <CAPVkcT97RK8NHtUbWV6XwPg70xJ48_EAAa_vQEoQ_pGYxvNtwA@mail.gmail.com> |
Hi!
Thank you for the quick reply,
I changed my Ned script and used the l4.loader
I followed the tutorial and used the default Ned script:
local L4 = require "L4";
L4.default_loader:startv({
log = L4.Env.log,
caps = {
ram = L4.Env.user_factory:create(
L4.Proto.Dataspace,
128 * 1024 * 1024, -- size in MB
L4.Mem_alloc_flags.Continuous |
L4.Mem_alloc_flags.Pinned |
L4.Mem_alloc_flags.Super_pages,
21 -- alignment
):m("rws");
}
}, "rom/uvmm", "--dtb", "rom/virt-arm_virt.dtb",
"--ramdisk", "rom/ramdisk-armv8.cpio.gz", "--kernel", "rom/Image.gz",
"--cmdline", "console=hvc0 earlyprintk=1 rdinit=/bin/sh");
~
My module.list looks like this (The default one from the tutorial):
entry uvmm-basic
kernel fiasco -serial_esc
roottask moe rom/uvmm-basic.ned
module uvmm
module l4re
module ned
module virt-arm_virt.dtb
module ramdisk-armv8.cpio.gz
module uvmm-basic.ned
module Image.gz
Without using the uvmm.lua, the previous problem was solved but a new error
has occurred regarding the Arm GIC:
make[1]: Entering directory '/tr/new/trunk/l4'
[bootstrap] ... Building Dependencies
Building entry "uvmm-basic".
Merging image /tr/new/trunk/build-fiasco-aarch64/fiasco to mod00 [293kB]
Merging image /tr/new/trunk/build-aarch64/bin/arm64_armv8a/l4f/sigma0 to
mod01 [1011kB]
Merging image /tr/new/trunk/build-aarch64/bin/arm64_armv8a/l4f/moe to mod02
[6691kB]
Merging image /tr/new/trunk/build-aarch64/bin/arm64_armv8a/l4f/uvmm to
mod03 [12332kB]
Merging image /tr/new/trunk/build-aarch64/bin/arm64_armv8a/l4f/l4re to
mod04 [2589kB]
Merging image /tr/new/trunk/build-aarch64/bin/arm64_armv8a/l4f/ned to mod05
[4735kB]
Merging image
/tr/new/trunk/build-aarch64/lib/arm64_armv8a/l4f/virt-arm_virt.dtb to mod06
[2kB]
Merging image /tr/new/trunk/ramdisk/ramdisk-armv8.cpio.gz to mod07 [1188kB]
Merging image /tr/new/trunk/conf/uvmm-basic.ned to mod08 [1kB]
Merging image /tr/new/trunk/build-linux-aarch64/arch/arm64/boot//Image.gz
to mod09 [7919kB]
[bootstrap] ... Generating bootstrap.ld
[bootstrap] ... Compiling ARCH-arm64/crt0.o
[bootstrap] ... Compiling exec.o
[bootstrap] ... Compiling module.o
[bootstrap] ... Compiling region.o
[bootstrap] ... Compiling startup.o
[bootstrap] ... Compiling init_kip_f.o
[bootstrap] ... Compiling libc_support+.o
[bootstrap] ... Compiling patch.o
[bootstrap] ... Compiling koptions.o
[bootstrap] ... Compiling platform_common.o
[bootstrap] ... Compiling memory.o
[bootstrap] ... Compiling boot_modules.o
[bootstrap] ... Compiling platform/arm_virt.o
[bootstrap] ... Compiling ARCH-arm/reboot.o
[bootstrap] ... Compiling ARCH-arm64/head.o
[bootstrap] ==> Linking bootstrap.elf
==> Post-processing bootstrap.elf
[bootstrap] ==> bootstrap.elf built
==> Installing bootstrap.elf in image directory
==> Installing bootstrap_uvmm-basic in image directory
==> Installing bootstrap_uvmm-basic.elf in image directory
Image size(s) in bytes:
bootstrap_uvmm-basic.elf: 23196864
Start address: 0x41000000
--> Build-Nr: 4
[bootstrap] ==> Installing bootstrap.elf to local build-tree
[bootstrap] ==> Installing bootstrap_uvmm-basic to local build-tree
[bootstrap] ==> Installing bootstrap_uvmm-basic.elf to local build-tree
QEMU-cmd: qemu-system-aarch64 -kernel
/tr/new/trunk/build-aarch64/images/bootstrap.elf -serial stdio -M
virt,virtualization=true -cpu cortex-a57 -m 1024 -display none
L4 Bootstrapper
Build: #4 Sun Mar 29 00:50:24 IDT 2020, 7.5.0
Scanning up to 1024 MB RAM, starting at offset 64MB
Memory size is 1024MB (40000000 - 7fffffff)
RAM: 0000000040000000 - 000000007fffffff: 1048576kB
Total RAM: 1024MB
Scanning fiasco
Scanning sigma0
Scanning moe
Moving up to 10 modules behind 41100000
moving module 02 { 425c2000-4260f23f } -> { 426b0000-426fd23f } [315968]
moving module 01 { 425a8000-425c103f } -> { 42696000-426af03f } [102464]
moving module 00 { 4255e000-425a70cf } -> { 4264c000-426950cf } [299216]
moving module 09 { 41367000-4255d9ff } -> { 41455000-4264b9ff } [18835968]
moving module 08 { 41366000-41366241 } -> { 41454000-41454241 } [578]
moving module 07 { 4115a000-413655ff } -> { 41248000-414535ff } [2143744]
moving module 06 { 41159000-411595ad } -> { 41247000-412475ad } [1454]
moving module 05 { 410d7000-411586b7 } -> { 411c5000-412466b7 } [530104]
moving module 04 { 410aa000-410d6e6f } -> { 41198000-411c4e6f } [183920]
moving module 03 { 41012000-410a977f } -> { 41100000-4119777f } [620416]
Loading fiasco
Loading sigma0
Loading moe
find kernel info page...
found kernel info page (via ELF) at 40003000
Regions of list 'regions'
[ 40000000, 40000197] { 198} Root mbi_rt
[ 40001000, 40053fff] { 53000} Kern fiasco
[ 400f0000, 40108a43] { 18a44} Sigma0 sigma0
[ 40118a48, 4011c2ef] { 38a8} Sigma0 sigma0
[ 40130000, 4017aa4f] { 4aa50} Root moe
[ 4018aa50, 40197d67] { d318} Root moe
[ 41000000, 41011683] { 11684} Boot bootstrap
[ 41100000, 4264bfff] { 154c000} Root Module
found kernel options (via ELF) at 40004000
Sigma0 config ip:401002bc sp:00000000
Roottask config ip:4014127c sp:00000000
Starting kernel fiasco at 40001748
Hello from Startup::stage2
Number of IRQs available at this GIC: 288
Detecting PSCI ...
Detected PSCI v0.2
PSCI: TOS: Not present or not required.
ARM generic timer: freq=62500000 interval=62500 cnt=3015775
SERIAL ESC: allocated IRQ 33 for serial uart
Not using serial hack in slow timer handler.
Welcome to L4/Fiasco.OC!
L4/Fiasco.OC microkernel on arm
Rev: r83 compiled with gcc 7.5.0 for QEMU Virtual Platform []
Build: #1 Sun Mar 29 00:49:24 IDT 2020
Allocate ARM PPI 25 to virtual 0
Allocate ARM PPI 27 to virtual 1
Allocate ARM PPI 25 to virtual 0
Allocate ARM PPI 27 to virtual 1
Calibrating timer loop... done.
MDB: use page size: 30
MDB: use page size: 21
MDB: use page size: 12
SIGMA0: Hello!
KIP @ 40003000
allocated 4KB for maintenance structures
SIGMA0: Dump of all resource maps
RAM:------------------------
[4:40000000;40000fff]
[0:40054000;400effff]
[0:40109000;40117fff]
[0:4011d000;4012ffff]
[4:40130000;4017afff]
[0:4017b000;40189fff]
[4:4018a000;40197fff]
[0:40198000;410fffff]
[4:41100000;4264bfff]
[0:4264c000;7effffff]
IOMEM:----------------------
[0:0;3fffffff]
[0:80000000;ffffffffffffffff]
MOE: Hello world
MOE: found 1009576 KByte free memory
MOE: found RAM from 40000000 to 7f000000
MOE: allocated 1008 KByte for the page array @0x40198000
MOE: virtual user address space [0-7fffffffff]
MOE: rom name space cap -> [C:103000]
MOE: rwfs name space cap -> [C:105000]
BOOTFS: [41100000-41197780] [C:107000] uvmm
BOOTFS: [41198000-411c4e70] [C:109000] l4re
BOOTFS: [411c5000-412466b8] [C:10b000] ned
BOOTFS: [41247000-412475ae] [C:10d000] virt-arm_virt.dtb
BOOTFS: [41248000-41453600] [C:10f000] ramdisk-armv8.cpio.gz
BOOTFS: [41454000-41454242] [C:111000] uvmm-basic.ned
BOOTFS: [41455000-4264ba00] [C:113000] Image.gz
MOE: cmdline: moe rom/uvmm-basic.ned
MOE: Starting: rom/ned rom/uvmm-basic.ned
MOE: loading 'rom/ned'
Ned says: Hi World!
Ned: loading file: 'rom/uvmm-basic.ned'
VMM[vmbus]: 'vbus' capability not found. Hardware access not possible for
VM.
VMM[main]: Hello out there.
VMM: FATAL: ERROR: ARM GIC virtualization does not work without passing the
virtual GICC via the vbus
VMM[vm]: Device creation for virtual device virtio_uart@20000 failed.
Disabling device.
VMM[]: [email protected],virtiocap: capability net is invalid.
VMM[vm]: Device creation for virtual device virtio_net@10000 failed.
Disabling device.
VMM: FATAL: ERROR: ARM GIC virtualization does not work without passing the
virtual GICC via the vbus
VMM[vm]: Device creation for virtual device interrupt-controller failed.
Disabling device.
VMM: FATAL: Parsing timer interrupt: Argument out of range
I saw a similar question previously on your mailing list:
http://os.inf.tu-dresden.de/pipermail/l4-hackers/2019/008398.html
But the answer was that by using the newest version you don’t need to put
the GIC on the vbus and I DO use the newest version downloaded from the SVN
: https://svn.l4re.org/repos/oc/l4re/trunk/
Can you please help me understand why did it happened? (Don’t know if its
relevant but I use an ubuntu VM running on VirtualBox).
Thanks again :)
Or
On Fri, Mar 27, 2020 at 11:51 PM Matthias Lange <
[email protected]> wrote:
> Hi,
>
> the error tells you that the boot module "vmm.lua" could not be found. As
> it
> is not part of your boot FS (see log output) you have to add it to your
> modules.list entry.
>
> Please be aware that the vmm lua library cannot be used to start L4Linux.
> There you have to use the "traditional" way of using an instance of
> L4.Loader.
>
> Regards,
> Matthias.
>
>
> On [25-03-2020 17:39], Or Becker wrote:
> > Hi,
> >
> > I'm trying to compile L4RE with L4Linux and execute it with qemu.
> > I followed the Github tutorial but the default Ned script didn't work
> > (since I'm using the L4Linux I guess), so I used a different Ned script I
> > found online (In the future I will have multiple VMs so I thought to do
> it
> > in advanced).
> >
> > My Ned script is simple:
> >
> > package.path = "rom/?.lua";
> >
> >
> >
> > local L4 = require "L4";
> >
> > local vmm = require "vmm";
> >
> >
> >
> > vmm.start_vm({
> >
> > id = 1,
> >
> > mem = 128,
> >
> > mon = false,
> >
> > rd = "rom/ramdisk-armv8.cpio.gz",
> >
> > fdt = "rom/virt-arm_virt.dtb",
> >
> > bootargs = "console=hvc0 earlyprintk=1 rdinit=/bin/sh",
> >
> > kernel = "rom/Image.gz",
> >
> > log = L4.Env.log
> >
> > });
> >
> > But when I try to execute "make E=uvmm1 qemu", an error occurred:
> >
> > Allocate ARM PPI 25 to virtual 0
> >
> > Allocate ARM PPI 27 to virtual 1
> >
> > Allocate ARM PPI 25 to virtual 0
> >
> > Allocate ARM PPI 27 to virtual 1
> >
> > Calibrating timer loop... done.
> >
> > MDB: use page size: 30
> >
> > MDB: use page size: 21
> >
> > MDB: use page size: 12
> >
> > SIGMA0: Hello!
> >
> > KIP @ 40003000
> >
> > allocated 4KB for maintenance structures
> >
> > SIGMA0: Dump of all resource maps
> >
> > RAM:------------------------
> >
> > [4:40000000;40000fff]
> >
> > [0:40054000;400effff]
> >
> > [0:40109000;40117fff]
> >
> > [0:4011d000;4012ffff]
> >
> > [4:40130000;4017afff]
> >
> > [0:4017b000;40189fff]
> >
> > [4:4018a000;40197fff]
> >
> > [0:40198000;410fffff]
> >
> > [4:41100000;4264bfff]
> >
> > [0:4264c000;7effffff]
> >
> > IOMEM:----------------------
> >
> > [0:0;3fffffff]
> >
> > [0:80000000;ffffffffffffffff]
> >
> > MOE: Hello world
> >
> > MOE: found 1009576 KByte free memory
> >
> > MOE: found RAM from 40000000 to 7f000000
> >
> > MOE: allocated 1008 KByte for the page array @0x40198000
> >
> > MOE: virtual user address space [0-7fffffffff]
> >
> > MOE: rom name space cap -> [C:103000]
> >
> > MOE: rwfs name space cap -> [C:105000]
> >
> > BOOTFS: [41100000-41197700] [C:107000] uvmm
> >
> > BOOTFS: [41198000-411c4e70] [C:109000] l4re
> >
> > BOOTFS: [411c5000-41246690] [C:10b000] ned
> >
> > BOOTFS: [41247000-412475ae] [C:10d000] virt-arm_virt.dtb
> >
> > BOOTFS: [41248000-41453600] [C:10f000] ramdisk-armv8.cpio.gz
> >
> > BOOTFS: [41454000-41454138] [C:111000] uvmm1.ned
> >
> > BOOTFS: [41455000-4264ba00] [C:113000] Image.gz
> >
> > MOE: cmdline: moe rom/uvmm1.ned
> >
> > MOE: Starting: rom/ned rom/uvmm1.ned
> >
> > MOE: loading 'rom/ned'
> >
> > Ned says: Hi World!
> >
> > Ned: loading file: 'rom/uvmm1.ned'
> >
> > lua error: rom/uvmm1.ned:4: module 'vmm' not found:
> >
> > no field package.preload['vmm']
> >
> > no file 'rom/vmm.lua'
> >
> > no file '/usr/local/lib/lua/5.3/vmm.so'
> >
> > no file '/usr/local/lib/lua/5.3/loadall.so'
> >
> > no file './vmm.so'.
> >
> > qemu-system-aarch64: terminating on signal 2
> >
> > Makefile:6: recipe for target 'do-all-make-goals' failed
> >
> > make: *** [do-all-make-goals] Interrupt
> > I tried to add more paths to the package.path but the error stays the
> same
> > (even if uvmm.lua exists in the path)
> > Can you please help me?
> >
> > Thank you,
> > Or
>
> > _______________________________________________
> > l4-hackers mailing list
> > [email protected]
> > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
>
_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers