Thank you very much Adam! I pressed entered but no matter what I do it just hang there without loading the Linux kernel. It is the same situation on both QEMU and VMware.

I think it might be somehow related to the virtual environment (QEMU or VMware). After I tried that I decided to test on a real board, then it works (even though it shows some weird problems). I think it might be helpful to post here, in case there are newbies like me who is also confused (I’m sure lots of people in this community knew this already). My test board is a BeagleBone Black (BBB).

1. I first compiled the fiasco kernel: (Architecture -> ARM processor family, Platform -> TI OMAP, CPU -> ARM Cortex-A8 CPU) 
# make B=build-armx335
# cd build-arm335
# make config CROSS_COMPILE=arm-linux-gnueabi-

2. Compiled L4re: (Target Architecture -> ARM, CPU variant -> ARMv7A type CPU, Platform Selection -> TI OMAP AM33x)
# make O=builddir config CROSS_COMPILE=arm-linux-gnueabi-

3. Compiled L4Linux: (setup L4Linux Configuration path, Target architecture -> ARM architecture, System type -> Build type -> Use ARMv7)
# make O=build-arm arm_defconfig
# make O=build-arm menuconfig

4. build uboot-able image
copy all modules (fiasco + vmlinuz + cfg + modules.list + ramdisk-arm.rd + arm-rv.io, etc.) to ${L4re/buildDir/bin/arm_armv7a}
make uimage O=build-arm MODULE_SEARCH_PATH=${L4re/buildDir/bin/arm_armv7a} CROSS_COMPILE=arm-linux-gnueabi-

5. make a new FAT32 SD card, then copy the new built bootstrap_L4Linux-basic.uimage into the SD card (BBB already has a built-in uboot-SPL in ROM).

6. boot the BBB and press enter to interrupt the uboot default procedure (initially I was using uboot go command, that does not work).
# fathead mmc 0 ${loadaddr} bootstrap_L4Linux-basic.uimage
# bootm ${loadaddr

Finally I see the L4Linux gets boot (attached log). But I’m not sure if I did anything wrong or because the hardware issue. After the L4Linux boot, in 5 seconds the terminal print out the following and reboot into the onboard Linux (see the attached log file):

# _fat_os: error reading image args, err - -1
# reading u-boot.img
# reading u-boot.img

Have anyone see this issue? Any further advice would be much appreciated!

Other Questions: 
1. Assume I got the L4Linux how can i further build a full fledge Linux environment with Libraries and drivers, I assume those things will need to somehow get into the RAMDISK, is that right? (Sorry I’m a newbie I’m not familiar with this)
2. I want to create a native app on Fiasco+L4re and communicate with the L4Linux Ethernet driver, is there any references for constructing communication between the VM and native apps? 


Thanks
-Dan
U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)

I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0
U-Boot#
U-Boot# fatload mmc 0 0x80001000 bootstrap_L4Linux-basic.uimage
reading bootstrap_L4Linux-basic.uimage
8536128 bytes read in 467 ms (17.4 MiB/s)
U-Boot# bootm 0x80001000
## Booting kernel from Legacy Image at 80001000 ...
   Image Name:   L4 Image #7
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    8536064 Bytes = 8.1 MiB
   Load Address: 81000000
   Entry Point:  81000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...


L4 Bootstrapper
  Build: #7 Thu Jun 22 18:21:44 EDT 2017, 4.7.3
  Scanning up to 256 MB RAM, starting at offset 32MB
  Memory size is 256MB (80000000 - 8fffffff)
  RAM: 0000000080000000 - 000000008fffffff: 262144kB
  Total RAM: 256MB
  Scanning fiasco
  Scanning sigma0
  Scanning moe
  Moving up to 8 modules behind 81100000
  moving module 02 { 817f2000-8182349f } -> { 818e2000-8191349f } [201888]
  moving module 01 { 817e0000-817f133b } -> { 818d0000-818e133b } [70460]
  moving module 00 { 8175f000-817dff97 } -> { 8184f000-818cff97 } [528280]
  moving module 07 { 8145f000-8175efff } -> { 8154f000-8184efff } [3145728]
  moving module 06 { 8108d000-8145e47b } -> { 8117d000-8154e47b } [4002940]
  moving module 05 { 8102b000-8108c6ab } -> { 8111b000-8117c6ab } [399020]
  moving module 04 { 81011000-8102a463 } -> { 81101000-8111a463 } [103524]
  moving module 03 { 81010000-8101012c } -> { 81100000-8110012c } [301]
  Loading fiasco
  Loading sigma0
  Loading moe
  find kernel info page...
  found kernel info page (via ELF) at 80002000
Regions of list 'regions'
    [ 80000000,  80000137] {      138} Root   mbi_rt
    [ 80001000,  80001b7f] {      b80} Kern   fiasco
    [ 80002000,  8008efff] {    8d000} Kern   fiasco
    [ 800c0000,  800c9fbb] {     9fbc} Sigma0 sigma0
    [ 800d0000,  800d6177] {     6178} Sigma0 sigma0
    [ 80140000,  80169717] {    29718} Root   moe
    [ 80170000,  80176ff3] {     6ff4} Root   moe
    [ 81000000,  8100f553] {     f554} Boot   bootstrap
    [ 81100000,  8184efff] {   74f000} Root   Module
  found kernel options (via ELF) at 80003000
  API Version: (87) experimental
  Sigma0 config    ip:800c0100 sp:00000000
  Roottask config  ip:80140260 sp:00000000
  Starting kernel fiasco at 80001350
Hello from Startup::stage2
FPU: Initialize
FPU0: Subarch: 3, Part: 30, Rev: 3, Var: c, Impl: 41
SERIAL ESC: allocated IRQ 72 for serial uart
Not using serial hack in slow timer handler.
Welcome to L4/Fiasco.OC!
L4/Fiasco.OC microkernel on arm
Rev: unknown compiled with gcc 4.7.3 for AM33xx    []
Build: #1 Thu Jun 22 17:24:39 EDT 2017

Calibrating timer loop... done.
MDB: use page size: 20
MDB: use page size: 12
SIGMA0: Hello!
  KIP @ 80002000
  allocated 4KB for maintenance structures
SIGMA0: Dump of all resource maps
RAM:------------------------
[4:80000000;80000fff]
[0:8008f000;800bffff]
[0:800ca000;800cffff]
[0:800d7000;8013ffff]
[4:80140000;80169fff]
[0:8016a000;8016ffff]
[4:80170000;80176fff]
[0:80177000;810fffff]
[4:81100000;8184efff]
[0:8184f000;8effffff]
IOMEM:----------------------
[0:0;7fffffff]
[0:90000000;ffffffff]
MOE: Hello world
MOE: found 237440 KByte free memory
MOE: found RAM from 80000000 to 8f000000
MOE: allocated 240 KByte for the page array @0x800d7000
MOE: virtual user address space [0-bfffffff]
MOE: rom name space cap -> [C:103000]
  BOOTFS: [81100000-8110012d] [C:105000] l4lx.cfg
  BOOTFS: [81101000-8111a464] [C:107000] l4re
  BOOTFS: [8111b000-8117c6ac] [C:109000] ned
  BOOTFS: [8117d000-8154e47c] [C:10b000] vmlinuz
  BOOTFS: [8154f000-8184f000] [C:10d000] 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'
libio: Warning: Query of 'vbus' failed!
PH  0 offs=00008000 flags=rwx PH-type=0x1
      virt=02000000 evirt=0243d43c
      phys=02000000 ephys=0243d43c
      f_sz=003b43d5 memsz=0043d43c
PH  1 offs=0036dfe8 flags=r-x PH-type=0x4
      virt=02365fe8 evirt=0236600c
      phys=02365fe8 ephys=0236600c
      f_sz=00000024 memsz=00000024
PH  2 offs=00000000 flags=rwx PH-type=0x6474e551
      virt=00000000 evirt=00000000
      phys=00000000 ephys=00000000
      f_sz=00000000 memsz=00000000
Starting binary at 0x2000310, argc=6 argv=0xafff4f8c *argv=0xb1007ff4 
argv0=rom/vmlinuz
External resolver is at 0xa8000818
======> L4Linux starting... <========
Linux version 4.7.0-l4 (daniel@daniel-ubuntu14) (gcc version 4.7.3 
(Ubuntu/Linaro 4.7.3-12ubuntu1) ) #2 Thu Jun 22 17:51:07 EDT 2017
Binary name: rom/vmlinuz
   This is an AEABI build.
Linux kernel command line (5 args): mem=64M console=ttyLv0 
l4x_rd=rom/ramdisk-arm.rd root=1:0 ramdisk_size=4000
CPU mapping (l:p)[1]: 0:0
Image: 02000000 - 02600000 [6144 KiB].
Areas: Text:     02000000 - 0236600c [3480kB]
       RO-Data:  02291000 - 0234e000 [756kB]
       Data:     0238c000 - 023af040 [140kB]
       Init:     02367000 - 0238c000 [148kB]
       BSS:      023b43d5 - 0243d43c [548kB]
Device scan:
Device scan done.
l4lx_thread_create: Created thread 41a (cpu0) (u:b3000e00, v:b3000c00, 
sp:0238dfa4)
main thread will be 41a
L4x: section-with-init(-data): Virt: 0x2000000 to 0x243dfff [4344 KiB]
L4x: section-with-init-text: Virt: 0x2000000 to 0x243dfff [4344 KiB]
L4x: Main thread running, waiting...
L4x: Memory size: 64MB
L4x: Setting superpages for main memory
L4x: Adjusted memory start: 02000000
L4x:     Main memory: Virt: 0x2600000 to 0x65fffff [65536 KiB]
l4x: vmalloc area: 06600000 - 0e600000
L4x:            text: Virt: 0x2000000 to 0x243dfff [4344 KiB]
Loading: rom/ramdisk-arm.rd
INITRD: Size of RAMdisk is 3072KiB
RAMdisk from 00002000 to 00302000 [3072KiB]
l4lx_thread_create: Created thread 41f (timer0) (u:b3000a00, v:00000000, 
sp:023d5fa0)
Booting Linux on physical CPU 0x0
Linux version 4.7.0-l4 (daniel@daniel-ubuntu14) (gcc version 4.7.3 
(Ubuntu/Linaro 4.7.3-12ubuntu1) ) #2 Thu Jun 22 17:51:07 EDT 2017
CPU: Fiasco [413fc082] revision 2 (ARMv7), cr=00400000
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: L4
Ignoring unrecognised tag 0x00000000
Memory policy: Data cache writealloc
CPU: All CPU(s) started in SVC mode.
INITRD: 00002000 - 00302000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 17717
Kernel command line: mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-arm.rd root=1:0 
ramdisk_size=4000
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: 64772K/71684K available (2724K kernel code, 140K rwdata, 756K rodata, 
148K init, 548K bss, 6912K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xbffff000 - 0xc0000000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0x06600000 - 0x0e600000   ( 128 MB)
    lowmem  : 0x00000000 - 0x06600000   ( 102 MB)
    modules : 0x01010000 - 0x02000000   (  15 MB)
      .text : 0x02000000 - 0x0236600c   (3481 kB)
      .init : 0x02367000 - 0x0238c000   ( 148 kB)
      .data : 0x0238c000 - 0x023af040   ( 141 kB)
       .bss : 0x023b43d5 - 0x0243d43c   ( 549 kB)
NR_IRQS:282
l4x: Cannot query L4ICU: -2004
clocksource: l4kipclk: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, 
max_idle_ns: 3526361616960 ns
l4timer: Using IRQ210
sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
Console: colour dummy device 80x30
console [ttyLv0] enabled
Calibrating delay loop... 990.41 BogoMIPS (lpj=4952064)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x2000000 - 0x2000000
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 
19112604462750000 ns
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Failed to create "l4x" debugfs directory: 1
clocksource: 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)
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)
futex hash table entries: 256 (order: -1, 3072 bytes)
workingset: timestamp_bits=29 max_order=14 bucket_order=0
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
L4 serial driver
serial-ttyLv.0: ttyLv0 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4-vcon
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
NET: Registered protocol family 17
L4IRQ: set irq type of 211 to 1
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: 148K (02367000 - 0238c000)
This architecture does not have kernel memory protection.

Please press Enter to activate this console.
/ # ls
bin         etc         lost+found  sbin        tmp
dev         linuxrc     proc        sys         usr
/ # uname -a
Linux l4box 4.7.0-l4 #2 Thu Jun 22 17:51:07 EDT 2017 armv7l GNU/Linux
/ #
/ #
/ #
_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img

On Jun 22, 2017, at 5:44 PM, Adam Lackorzynski <a...@os.inf.tu-dresden.de> wrote:


On Wed Jun 21, 2017 at 16:25:01 -0500, Daniel (Xiaolong) Wang wrote:
I’m sorry to bother, again… But I keep getting problems hope you can give me some advice.

I’m trying to test out L4re +L4Linux on X86 and ARM i.MX6. I downloaded the newest l4re-snapshot-2006082114. I built Fiasco with Intel Pentium Pro and Virtualization (did not change anything else).
I built L4re with Pentium Pro type CPU (everything else are default settings). Then I built L4Linux with the L4re builddir. I turned off 64-bit kernel, CPU selected Pentium-Pro, turned off most of the settings as the warning instructed.

These are the settings of L4Linux that I enabled:

Processor type and features:
* DMA memory allocation support
* Processor feature human-readable name
* Fast CPU feature tests
* Support for extended X86 platform
* Single-depth WCHAN output
* High memory support is OFF
* Enable bounce buffers
* X86 architectural random number generator
* Enable seccomp to safety compute untrusted bytecode
* Enable the LDT

Power Management and ACPI options:
* Suspend to RAM and standby
* device power management core functionality
* CPU Frequency scaling is OFF
Bus Options:
* PCI support
* PCI access mode is Direct

That's ok. You can also use one of the defconfigs, e.g.
x86_32-mp_vPCI_defconfig.

I was able to compile all three parts and build both iso image (for vmware fusion on macOS) and qemu simulator. I first tested hello, hello-cfg, hello-shared, frame buffer-example-x86, all of those works as expected.

Ok, good.

However when I tried to build L4Linux-basic and L4Linux-mag-x86. Not of them works.

for L4Linux-mag-x86 the system shows a diagram “system is booting” then hang forever.

In such a case it is essential to have the serial output to see what's
going on as we won't see anything on the graphical screen in this case.

for L4Linux-basic the image boot but freeze soon. The screen shows:

l4cdds: No name given, not starting
brd: module loaded
l4cdds: no name given, not starting
moused: ps/2 mouse device common for all mice
l4x: Faking dummy RTC
rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
rtc_cmos rtc_cmos: only 24-hr supported
rtc_l4x: l4x-rtc: Could not find ‘rtc’ cap
rtc_l4x: probe of rtc-l4x failed with error -2
NET: Registered protocol family 17
L4IRQ: set irq type of 64 to 1
     RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 3072KiB [1 disk] into ram disk… done.
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing unused kernel memory 188K (00494000 - 004c3000)
Write protecting the kernel text: 2684K
Write protecting the kernel read-only data 768k
rodata_test: test data was not read only

Please press Enter to activate this console. clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2845e81c5f6, max-idle_ns: 440795276432 ns
clocksource: Switched to clocksource tsc

That actually looks good. It finished booting as it is supposed to do.
Is input not working, i.e. pressing enter?



Adam

_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Reply via email to