Hi everybody,

 

I am actually trying to launch L4Linux on Fiasco.OC+L4RE on Xilinx Zynq using QEMU but I get an error at the end of the boot of L4Linux :

 

/bin/sh: can't access tty; job control turned off

/ #

 

Even if I have a shell prompt I can’t type anything, that’s why I am sending this email.

 

I am aware that my problem is very similar to this one  http://os.inf.tu-dresden.de/pipermail/l4-hackers/2013/005920.html but I tried every solution you suggested.

 

I am working under Ubuntu 64bits 14.04 and I am compiling with arm-linux-gnueabi-gcc 4.7.3.

 

To emulate the Xilinx Zynq, I’m using QEMU emulator version 2.0.50 configured this way :

 

./configure --target-list="arm-softmmu,microblazeel-softmmu" --enable-fdt --disable-kvm

 

To launch QEMU, here is my command line :

 

qemu-system-arm -M arm-generic-fdt -dtb ~/Documents/zynq-zc706.dtb -kernel ~/Documents/gitL4/l4-hypervisor/build/l4/images/bootstrap.elf -serial mon:stdio

 

Zynq is ARM  so I’m using this ramdisk :

 

http://os.inf.tu-dresden.de/download/ramdisk-arm.rd

 

You can find below my serial output, my modules.list file and my l4lx.cfg file.

 

Thanks in advance,

 

Louis.

 

Here is my serial output :

 

SPI device 0x7f7d798ea450

 

L4 Bootstrapper

  Build: #2 Fri Jan 30 10:04:49 CET 2015, 4.7.3

  Scanning up to 512 MB RAM

  Memory size is 512MB (00100000 - 200fffff)

  RAM: 0000000000100000 - 00000000200fffff: 524288kB

  Total RAM: 512MB

  mod09: 0166f000-0196f000: ramdisk-arm.rd

  mod08: 01325000-0166e47c: vmlinuz.arm

  mod07: 01324000-013240bd: arm-rv.io

  mod06: 0120e000-01323704: io

  mod05: 0120d000-0120d189: l4lx.cfg

  mod04: 011ba000-0120cbd4: ned

  mod03: 011a0000-011b9458: l4re

  mod02: 0116e000-0119f624: moe

  mod01: 01164000-0116d33c: sigma0

  mod00: 01115000-01163828: fiasco

  Moving up to 10 modules behind 1200000

  moving module 00 { 1115000-1163827 } -> { 1a5a000-1aa8827 } [321576]

  moving module 01 { 1164000-116d33b } -> { 1aa9000-1ab233b } [37692]

  moving module 02 { 116e000-119f623 } -> { 1ab3000-1ae4623 } [202276]

  moving module 03 { 11a0000-11b9457 } -> { 196f000-1988457 } [103512]

  moving module 04 { 11ba000-120cbd3 } -> { 1989000-19dbbd3 } [338900]

  moving module 05 { 120d000-120d188 } -> { 1200000-1200188 } [393]

  moving module 06 { 120e000-1323703 } -> { 1201000-1316703 } [1136388]

  moving module 07 { 1324000-13240bc } -> { 1317000-13170bc } [189]

  moving module 08 { 1325000-166e47b } -> { 1318000-166147b } [3445884]

  moving module 09 { 166f000-196efff } -> { 1662000-1961fff } [3145728]

  moving module 03 { 196f000-1988457 } -> { 1962000-197b457 } [103512]

  moving module 04 { 1989000-19dbbd3 } -> { 197c000-19cebd3 } [338900]

  Scanning fiasco -serial_esc

  Scanning sigma0

  Scanning moe rom/l4lx.cfg

  Relocated mbi to [0x110e000-0x110e15d]

  Loading fiasco

  Loading sigma0

  Loading moe

  find kernel info page...

  found kernel info page at 0x102000

Regions of list 'regions'

    [   101000,    101b3f] {      b40} Kern   fiasco

    [   102000,    15efff] {    5d000} Kern   fiasco

    [   190000,    1965fb] {     65fc} Sigma0 sigma0

    [   198000,    19e17b] {     617c} Sigma0 sigma0

    [   240000,    26cafb] {    2cafc} Root   moe

    [   270000,    286f0f] {    16f10} Root   moe

    [  1100000,   11143f3] {    143f4} Boot   bootstrap

    [  110a000,   110a121] {      122} Boot   mbi

    [  110e000,   110e25a] {      25b} Root   Multiboot info

    [  1114048,   111409f] {       58} Boot   mbi

    [  1200000,   19cebd3] {   7cebd4} Root   Module

  API Version: (87) experimental

  Sigma0 config    ip:00190100 sp:01113de4

  Roottask config  ip:00240260 sp:00000000

  Starting kernel fiasco at 001012fc

Hello from Startup::stage2

Number of IRQs available at this GIC: 96

Cache config: ON

ID_PFR[01]:  00001031 00000011 ID_[DA]FR0: 00000000 00000000

ID_MMFR[04]: 00100103 20000000 01230000 00002111

-----Gpt_ticks : 1638 -----

L2: ID=00000000 Type=00000000 Aux=00000000 WMask=ff S=1

L2: Type L2C-Unknown Size = 0kB

SERIAL ESC: allocated IRQ 82 for serial uart

Not using serial hack in slow timer handler.

Welcome to Fiasco.OC (arm)!

L4/Fiasco.OC arm microkernel (C) 1998-2013 TU Dresden                                                                  

Rev: 72df873 compiled with gcc 4.7.3 for zynq    []                                                                    

Build: #1 Fri Jan 30 09:52:25 CET 2015                                                                                  

 

Calibrating timer loop... done.

MDB: use page size: 20

MDB: use page size: 12

SIGMA0: Hello!

  KIP @ 102000

  allocated 4KB for maintenance structures

SIGMA0: Dump of all resource maps

RAM:------------------------

[0:100000;100fff]

[0:15f000;18ffff]

[0:197000;197fff]

[0:19f000;23ffff]

[4:240000;26cfff]

[0:26d000;26ffff]

[4:270000;286fff]

[0:287000;110dfff]

[4:110e000;110efff]

[0:110f000;11fffff]

[4:1200000;19cefff]

[0:19cf000;1f0fffff]

IOMEM:----------------------

[0:0;fffff]

[0:20100000;ffffffff]

MOE: Hello world

MOE: found 499200 KByte free memory

MOE: found RAM from 100000 to 1f100000

MOE: allocated 496 KByte for the page array @0x19f000

MOE: virtual user address space [0-bfffffff]

MOE: rom name space cap -> [C:501000]

  BOOTFS: [1962000-197b458] [C:503000] l4re

  BOOTFS: [197c000-19cebd4] [C:504000] ned

  BOOTFS: [1200000-1200189] [C:505000] l4lx.cfg

  BOOTFS: [1201000-1316704] [C:506000] io

  BOOTFS: [1317000-13170bd] [C:507000] arm-rv.io

  BOOTFS: [1318000-166147c] [C:508000] vmlinuz.arm

  BOOTFS: [1662000-1962000] [C:509000] ramdisk-arm.rd

MOE: cmdline: moe rom/l4lx.cfg

MOE: Starting: rom/ned rom/l4lx.cfg

MOE: loading 'rom/ned'

Ned says: Hi World!

Ned: loading file: 'rom/l4lx.cfg'

l4linux | libio: Warning: Query of 'vbus' failed!

l4linux | PH  0 (t:        1) offs=00008000 vaddr=02000000 vend=023b4f8c

l4linux |                     phys=02000000 ephys=023b4f8c

l4linux |                     f_sz=003303b6 memsz=003b4f8c flgs=rwx

l4linux | PH  1 (t:        4) offs=002f401c vaddr=022ec01c vend=022ec040

l4linux |                     phys=022ec01c ephys=022ec040

l4linux |                     f_sz=00000024 memsz=00000024 flgs=r-x

l4linux | PH  2 (t: 1685382481) offs=00000000 vaddr=00000000 vend=00000000

l4linux |                     phys=00000000 ephys=00000000

l4linux |                     f_sz=00000000 memsz=00000000 flgs=rwx

l4linux | Starting binary at 0x20002a0, argc=7 argv=0x80007f8c *argv=0xb1007ff0 argv0=rom/vmlinuz.arm

l4linux | External resolver is at 0xa8000788

l4linux | ======> L4Linux starting... <========

l4linux | Linux version 3.13.0-l4 (novasys@vmxub) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #1 Fri Jan 30 10:04:39 CET 2015                                                                                                          

l4linux | Binary name: rom/vmlinuz.arm

l4linux |    This is an AEABI build.

l4linux | Linux kernel command line (6 args): mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-arm.rd root=1:0 ramdisk_size=4000 init=/bin/sh                                                                                                         

l4linux | CPU mapping (l:p)[1]: 0:0

l4linux | Image: 02000000 - 02400000 [4096 KiB].

l4linux | Areas: Text:     02000000 - 0230a000 [3112kB] (a bit longer)

l4linux |        Data:     0230a000 - 0232b7c0 [133kB]

l4linux |        Initdata: 022ed000 - 02309d5c [115kB]

l4linux |        BSS:      023303b6 - 023b4f8c [530kB]

l4linux | Device scan:

l4linux | Device scan done.

l4linux | l4lx_thread_create: Created thread 413 (cpu0) (u:b3000e00, v:b3000c00, sp:0230bfa4)

l4linux | main thread will be 413

l4linux | l4x_register_pointer_section: addr = 02000000 size = 3887104

l4linux | section-with-init: Virt: 0x2000000 to 0x23b4f8b [3795 KiB]

l4linux | section-with-init: Phys: 0x0038d000 to 0x00741f8b, [3795 KiB]

l4linux | Main thread running, waiting...

l4linux | L4x: Memory size: 64MB

l4linux | L4x: Setting superpages for main memory

l4linux | L4x: Adjusted memory start: 02000000

l4linux |     Main memory: Virt: 0x2400000 to 0x63fffff [65536 KiB]

l4linux |     Main memory: Phys: 0x01a00000 to 0x059fffff, [65536 KiB]

l4linux | l4x: vmalloc area: 06400000 - 0e400000

l4linux | l4x_register_pointer_section: addr = 02000000 size = 3887104

l4linux |            text: Virt: 0x2000000 to 0x23b4f8b [3795 KiB]

l4linux |            text: Phys: 0x0038d000 to 0x00741f8b, [3795 KiB]

l4linux | l4x_rd_path: rom/ramdisk-arm.rd

l4linux | Loading: rom/ramdisk-arm.rd

l4linux | INITRD: Size of RAMdisk is 3072KiB

l4linux | RAMdisk from 00002000 to 00302000 [3072KiB]

l4linux | l4lx_thread_create: Created thread 418 (timer) (u:b3000a00, v:00000000, sp:0234dfa0)

Booting Linux on physical CPU 0x0

Linux version 3.13.0-l4 (novasys@vmxub) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #1 Fri Jan 30 10:04:39 CET 2015

CPU: Fiasco [410fc090] revision 0 (ARMv7), cr=00000000

CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache

Machine: L4

Memory policy: Data cache writeback

INITRD: 00002000 - 00302000

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 17209

Kernel command line: mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-arm.rd root=1:0 ramdisk_size=4000 init=/bin/sh

PID hash table entries: 512 (order: -1, 2048 bytes)

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

Memory: 64804K/69636K available (2328K kernel code, 133K rwdata, 664K rodata, 115K init, 530K bss, 4832K reserved)

Virtual kernel memory layout:

    vector  : 0xbffff000 - 0xc0000000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    vmalloc : 0x06400000 - 0x0e400000   ( 128 MB)

    lowmem  : 0x00000000 - 0x06400000   ( 100 MB)

    modules : Virtual kernel memory layout:

    vector  : 0xbffff000 - 0xc0000000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    vmalloc : 0x06400000 - 0x0e400000   ( 128 MB)

    lowmem  : 0x00000000 - 0x06400000   ( 100 MB)

    moNR_IRQS:220

l4timer: Using IRQ210

sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483648000ns

Console: colour dummy device 80x30

console [ttyLv0] enabled

Calibrating delay loop... 2636.18 BogoMIPS (lpj=13180928)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

Setting up static identity map for 0x222f940 - 0x222f940

NET: Registered protocol family 16

DMA: preallocated 256 KiB pool for atomic coherent allocations

bio: create slab <bio-0> at 0

Failed to create "l4x" debugfs directory: 1

Switched to clocksource l4kipclk

NET: Registered protocol family 2

TCP established hash table entries: 1024 (order: 0, 4096 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

TCP: reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

Trying to unpack rootfs image as initramfs...

rootfs image is not initramfs (junk in compressed archive); looks like an initrd

INITRD: Freeing memory.

l4x: Checks passed.

NetWinder Floating Point Emulator V0.97 (double precision)

msgmni has been set to 126

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

L4 serial driver

ttyLv0 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4

l4ser_shm: L4 shared mem serial driver

l4cdds: No name given, not starting.

brd: module loaded

l4bdds: No name given, not starting.

mousedev: PS/2 mouse device common for all mice

TCP: cubic registered

NET: Registered protocol family 17

RAMDISK: ext2 filesystem found at block 0

RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.

EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities

EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem

EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)

VFS: Mounted root (ext2 filesystem) readonly on device 1:0.

Freeing unused kernel memory: 112K (022ed000 - 02309000)

/bin/sh: can't access tty; job control turned off

/ #

 

Here is my modules.list :

 

modaddr 0x01100000

 

default-kernel fiasco -serial_esc

default-bootstrap bootstrap

 

entry L4Linux ARM

roottask moe rom/l4lx.cfg

module l4re

module ned

module l4lx.cfg

module io

module arm-rv.io

module vmlinuz.arm

module ramdisk-arm.rd

 

Here is my l4lx.cfg :

 

-- vim:set ft=lua:

 

local lxname = "vmlinuz";

if L4.Info.arch() == "arm" then

  lxname = "vmlinuz.arm";

end

 

L4.default_loader:start(

  { caps = {

      log = L4.Env.log:m("rws"),

    },

    l4re_dbg = L4.Dbg.Warn,

    log = { "l4linux", "yellow" },

  },

 "rom/" .. lxname .. " mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-" ..  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000 init=/bin/sh");

 

But I also tried this one :

 

-- vim:set ft=lua:

 

local lxname = "vmlinuz";

if L4.Info.arch() == "arm" then

  lxname = "vmlinuz.arm";

end

 

L4.default_loader:start(

  { caps = {

    },

    l4re_dbg = L4.Dbg.Warn,

    log = L4.Env.log,

  },

 "rom/" .. lxname .. " mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-" ..  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000 init=/bin/sh");