Hello List,
for my bachelor project I'm trying to run Android and Linux parallel on an i.MX53 Board. While the first approach with KVM seemed not to be the right way to go L4 looks promising.
While I found many interesting and helpful topics in this list I still have some questions. I tried to first build the "Hello World" example which worked fine but failed in building other examples because of not fulfilled dependencies (first to note io). I already checked out "l4linux_requirements". What else do I need?
The board is a custom board with very little documentation. I have some Linux drivers for the connected hardware. Is it possible to use them with L4Linux or would I have to get/write drivers for L4 itself?
Sorry about these very basic questions. I've just started working with L4.
Regards Tobi
Hi,
On Mon Mar 05, 2012 at 10:41:03 +0100, Tobias Fink wrote:
for my bachelor project I'm trying to run Android and Linux parallel on an i.MX53 Board. While the first approach with KVM seemed not to be the right way to go L4 looks promising.
While I found many interesting and helpful topics in this list I still have some questions. I tried to first build the "Hello World" example which worked fine but failed in building other examples because of not fulfilled dependencies (first to note io). I already checked out "l4linux_requirements". What else do I need?
If something is missing, just go to l4/pkg and get the package with 'svn up name'. Or get the snapshot downloaded which has everything (the same that is available via svn).
The board is a custom board with very little documentation. I have some Linux drivers for the connected hardware. Is it possible to use them with L4Linux or would I have to get/write drivers for L4 itself?
It depends on the device and how you want to use those. You mention Android which likely means you want a screen and input driver independent of any Linux. Usually those are not too big and writing them is doable.
Adam
Hi,
2012/3/5 Adam Lackorzynski adam@os.inf.tu-dresden.de
If something is missing, just go to l4/pkg and get the package with 'svn up name'. Or get the snapshot downloaded which has everything (the same that is available via svn).
Thank you that worked well and I got everything to build.
The board is a custom board with very little documentation. I have some Linux drivers for the connected hardware. Is it possible to use them with L4Linux or would I have to get/write drivers for L4 itself?
It depends on the device and how you want to use those. You mention Android which likely means you want a screen and input driver independent of any Linux. Usually those are not too big and writing them is doable.
It has a touchscreen attached and I will look into the drivers when I got the basic system up and running. I ran into some problems getting L4 to run with the i.MX53. Right now I'm stuck at too points:
1. On the i.MX53 the boot process comes as far as "Starting kernel ..." and then stops. I built L4Re with the parameters I thought was the best fit for the i.MX53 with 0x70000000 as start address and 512 as memory size. I'm using a uboot that came with the board and successfully starts Linux from the same board with the same parameters. Could there be a Serial Port mismatch of any kind so that L4 is starting but doesn't give any output to the Serial Interface?
2. When I was stuck there at first I figured I could try some other board to verify that my kernel had no other flaws. So I grabbed an IGEP Board with an OMAP3 Cortex-A8 processor. There L4 is booting and starting L4Linux with the following output:
Starting kernel ...
L4 Bootstrapper Build: #44 Mo 12. M�är 12:23:32 CET 2012, 4.5.1 Scanning up to 128 MB RAM Memory size is 128MB (80000000 - 88000000) RAM: 0000000080000000 - 0000000087ffffff: 131072kB Total RAM: 128MB mod09: 814aa000-817aa000: ramdisk-arm.rd mod08: 811f0000-814a9448: vmlinuz.arm mod07: 811ef000-811ef0bd: arm-rv.io mod06: 81114000-811eeb58: io mod05: 81113000-81113174: l4lx_tf.cfg mod04: 810bf000-811121b8: ned mod03: 810a5000-810be428: l4re mod02: 8106b000-810a45f0: moe mod01: 81061000-8106a33c: sigma0 mod00: 81015000-81060e5c: fiasco Moving 10 modules to 81100000 with offset eb000 moving module 10 { 814aa000-817aa000 } -> { 81595000-81895000 } moving module 09 { 811f0000-814a9448 } -> { 812db000-81594448 } moving module 08 { 811ef000-811ef0bd } -> { 812da000-812da0bd } moving module 07 { 81114000-811eeb58 } -> { 811ff000-812d9b58 } moving module 06 { 81113000-81113174 } -> { 811fe000-811fe174 } moving module 05 { 810bf000-811121b8 } -> { 811aa000-811fd1b8 } moving module 04 { 810a5000-810be428 } -> { 81190000-811a9428 } moving module 03 { 8106b000-810a45f0 } -> { 81156000-8118f5f0 } moving module 02 { 81061000-8106a33c } -> { 8114c000-8115533c } moving module 01 { 81015000-81060e5c } -> { 81100000-8114be5c } Scanning fiasco -serial_esc Scanning sigma0 Scanning moe rom/l4lx_tf.cfg Relocated mbi to [0x8100f000-0x8100f163] Loading fiasco Loading sigma0 Loading moe find kernel info page... found kernel info page at 0x80002000 Regions of list regions [ 80001000, 800019ff] { a00} Kern fiasco [ 80002000, 8005cfff] { 5b000} Kern fiasco [ 80090000, 8009e17b] { e17c} Sigma0 sigma0 [ 80140000, 801717ab] { 317ac} Root moe [ 80178000, 8018eec7] { 16ec8} Root moe [ 81000000, 810143eb] { 143ec} Boot bootstrap [ 8100f000, 8100f260] { 261} Root Multiboot info [ 81190000, 81894fff] { 705000} Root Modules Memory API Version: (87) experimental Sigma0 config ip:800900e0 sp:81013044 Roottask config ip:80140178 sp:00000000 Starting kernel fiasco at 80001000 Hello from Startup::stage2 Initialize page table Vmem_alloc::init() Cache config: ON ID_PFR0: 00001131 ID_PFR1: 00000011 ID_DFR0: 00010400 ID_AFR0: 00000000 ID_MMFR0: 01100003 ID_MMFR1: 20000000 ID_MMFR2: 01202000 ID_MMFR3: 00000211 SERIAL ESC: allocated IRQ 74 for serial uart Not using serial hack in slow timer handler. Welcome to Fiasco.OC (arm)! L4/Fiasco.OC arm microkernel (C) 1998-2011 TU Dresden Rev: r38 compiled with gcc 4.5.1 for Beagleboard [] Build: #2 Fr 9. M�är 13:57:35 CET 2012
Calibrating timer loop... done. SIGMA0: Hello! KIP @ 80002000 allocated 4KB for maintenance structures SIGMA0: Dump of all resource maps RAM:------------------------ [0:80000000;80000fff] [0:8005d000;8008ffff] [0:8009f000;8013ffff] [4:80140000;80171fff] [0:80172000;80177fff] [4:80178000;8018efff] [0:8018f000;8100efff] [4:8100f000;8100ffff] [0:81010000;8118ffff] [4:81190000;81894fff] [0:81895000;86ffffff] IOMEM:---------------------- [0:0;7fffffff] [0:88000000;ffffffff] MOE: Hello world MOE: found 106776 KByte free memory MOE: found RAM from 80000000 to 87000000 MOE: allocated 112 KByte for the page array @0x8005d000 MOE: virtual user address space [0-bfffffff] MOE: rom name space cap -> [C:501000] BOOTFS: [81190000-811a9428] [C:503000] l4re BOOTFS: [811aa000-811fd1b8] [C:504000] ned BOOTFS: [811fe000-811fe174] [C:505000] l4lx_tf.cfg BOOTFS: [811ff000-812d9b58] [C:506000] io BOOTFS: [812da000-812da0bd] [C:507000] arm-rv.io BOOTFS: [812db000-81594448] [C:508000] vmlinuz.arm BOOTFS: [81595000-81895000] [C:509000] ramdisk-arm.rd MOE: cmdline: moe rom/l4lx_tf.cfg MOE: Starting: rom/ned rom/l4lx_tf.cfg MOE: loading 'rom/ned' Ned says: Hi World! Ned: loading file: 'rom/l4lx_tf.cfg' l4linux | libio: Warning: Query of 'vbus' failed! l4linux | PH 0 (t: 1) offs=00008000 vaddr=00100000 vend=0041d8d4 l4linux | phys=00100000 ephys=0041d8d4 l4linux | f_sz=0029e39c memsz=0031d8d4 flgs=rwx l4linux | PH 1 (t: 4) offs=002a6378 vaddr=0039e378 vend=0039e39c l4linux | phys=0039e378 ephys=0039e39c 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 0x11c300, argc=7 argv=0x80007f8c *argv=0xb1007ff0 argv0=rom/vmlinuz.arm l4linux | External resolver is at 0xa8000650 l4linux | ======> L4Linux 2.6 starting... <======== l4linux | Linux version 3.0.0-l4-svn23 (xi@tobi-Opti) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #7 Fri Mar 9 13:56:46 CET 2012 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: 00100000 - 00500000 [4096 KiB]. l4linux | Areas: Text: 00100000 - 00382000 [2568kB] (a bit longer) l4linux | Data: 00382000 - 00399460 [93kB] l4linux | Initdata: 00100000 - 0011b000 [108kB] l4linux | BSS: 0039e39c - 0041d8d4 [509kB] l4linux | Device scan: l4linux | l4lx_thread_create: Created thread 413 (cpu0) (u:b3000400, v:b3000600, sp:00383ff0) l4linux | main thread will be 413 l4linux | l4x_register_pointer_section: addr = 00100000 size = 3268608 l4linux | section-with-init: virt: 0x100000 to 0x41d8d3 [3190 KiB] l4linux | section-with-init: Phys: 0x80233000 to 0x805508d4, Size: 3266772 l4linux | l4x_linux_startup: thread 413. l4linux | Main thread running, waiting... l4linux | main thread: received startup message. l4linux | l4x_setup_memory: Forcing superpages for main memory l4linux | l4re_global_env: 0xb1007f0c l4linux | Main memory size: 64MB l4linux | Main memory: virt: 0x500000 to 0x44fffff [65536 KiB] l4linux | Main memory: Phys: 0x81900000 to 0x85900000, Size: 67108864 l4linux | Filling lower ptabs... l4linux | Done (480 entries). l4linux | l4x_register_pointer_section: addr = 004ff000 size = 4096 l4linux | end: virt: 0x4ff000 to 0x4fffff [4 KiB] l4linux | end: Phys: 0x80552000 to 0x80553000, Size: 4096 l4linux | l4x_rd_path: rom/ramdisk-arm.rd l4linux | Loading: rom/ramdisk-arm.rd l4linux | INITRD: Size of RAMdisk is 3072KiB l4linux | RAMdisk from 0c600000 to 0c900000 [3072KiB] l4linux | l4lx_thread_create: Created thread 419 (timer.i0) (u:b3000800, v:00000000, sp:003b9ff4) Linux version 3.0.0-l4-svn23 (xi@tobi-Opti) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #7 Fri Mar 9 13:56:46 CET 2012 CPU: Fiasco [860f0001] revision 1 (ARMvundefined/unknown), cr=00000000 l4linux | timer_irq_thread: Starting timer IRQ thread. CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache cpu_arm926_proc_init Machine: L4 Memory policy: ECC disabled, Data cache writeback arm926_flush_kern_cache_all() INITRD: 0c600000 - 0c900000 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 17271 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: 0MB 68MB = 68MB total Memory: 64808k/64808k available, 4828k reserved, 0K highmem Virtual kernel memory layout: vector : 0xbffff000 - 0xc0000000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xffc00000 - 0xffe00000 ( 2 MB) vmalloc : 0x04600000 - 0x0c600000 ( 128 MB) lowmem : 0x00000000 - 0x04500000 ( 69 MB) modules : 0xff100000 - 0x00100000 ( 16 MB) .init : 0x00100000 - 0x0011b000 ( 108 kB) .text : 0x0011c000 - 0x00380c40 (2452 kB) .data : 0x00382000 - 0x00399460 ( 94 kB) .bss : 0x0039e39c - 0x0041d8d4 ( 510 kB) NR_IRQS:220 l4lx_irq_init: l4lx_irq_max = 220 l4lx_irq_dev_startup_timer(0) Console: colour dummy device 80x30 console [ttyLv0] enabled Calibrating delay loop... 537.39 BogoMIPS (lpj=2686976) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 bio: create slab <bio-0> at 0 Failed to create "l4x" debugfs directory: 1 Switching to clocksource kip NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) 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. 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 = 210) is a L4 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. VFS: Mounted root (ext2 filesystem) readonly on device 1:0. Freeing init memory: 108K /bin/sh: can't access tty; job control turned off
At this point it stops and doesn't respond to any input. I found out that Busybox comes up with that message when it is started on the incorrect console device. If I put in anything but console=ttyLv0 in the L4Linux .cfg file it stops with Kernel panic. Can somebody give my a hint on where to look for a solution? Is there any written documentation on how to use and configure L4Linux and L4? All I found was this Mailinglist and the TUDOS-Wiki which helps as a starting point but could not help me with the problems I'm having right now.
Best regards Tobi
Hi,
On 03/12/2012 02:03 PM, Tobias Fink wrote:
Hi,
2012/3/5 Adam Lackorzynski adam@os.inf.tu-dresden.de
[...]
Right now I'm stuck at too points:
- On the i.MX53 the boot process comes as far as "Starting kernel
..." and then stops. I built L4Re with the parameters I thought was the best fit for the i.MX53 with 0x70000000 as start address and 512 as memory size. I'm using a uboot that came with the board and successfully starts Linux from the same board with the same parameters. Could there be a Serial Port mismatch of any kind so that L4 is starting but doesn't give any output to the Serial Interface?
I think the UART is not working correctly. "Starting kernel ..." is the last message of the platform bootloader. The L4 bootstrapper is already silent. You should check that you are using the right UART driver.
[...]
At this point it stops and doesn't respond to any input. I found out that Busybox comes up with that message when it is started on the incorrect console device. If I put in anything but console=ttyLv0 in the L4Linux .cfg file it stops with Kernel panic. Can somebody give my a hint on where to look for a solution?
Have you started Fiasco with the "-serial_esc" option?
Matthias.
Is there any written documentation on how to use and configure L4Linux and L4? All I found was this Mailinglist and the TUDOS-Wiki which helps as a starting point but could not help me with the problems I'm having right now.
Best regards Tobi
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Hi,
2012/3/15 Matthias Lange mlange@sec.t-labs.tu-berlin.de:
I think the UART is not working correctly. "Starting kernel ..." is the last message of the platform bootloader. The L4 bootstrapper is already silent. You should check that you are using the right UART driver.
I'll look into that thank you!
At this point it stops and doesn't respond to any input. I found out that Busybox comes up with that message when it is started on the incorrect console device. If I put in anything but console=ttyLv0 in the L4Linux .cfg file it stops with Kernel panic. Can somebody give my a hint on where to look for a solution?
Have you started Fiasco with the "-serial_esc" option?
Yes it was started with the right option. To my embarressment I have to admit that the problem must have been some hardware connection issue which wasn't obvious because I could configure uboot through the same connection. Now it works even though I reversed all changes I made.
So far so good I have a working shell with one L4Linux instance I'm trying to find out more about the way that the hardware is passed through to L4Linux. Still all the documentation that I could find were some guides on how to compile the basic system and the L4Re documentation which to be honest doesn't help an awfull lot to get started. The IGEP-Board has two serial port which would be perfect to give each of the two instances I'd like to run one serial port to communicate. As I can't find any configuration setting in L4Re or Fiasco on which COM-Port it uses I'm again kind of suck. Any piece of advice is appreciated.
Regards Tobi
Hi,
I hope I'm not rude asking again for help on the same topic. I'm still using the IGEP Board with an OMAP3 processor. I'm using the following configuration:
entry L4TF kernel fiasco -serial_esc roottask moe rom/l4lx_tf.cfg module iol4lx_tf.io module ankh module l4re module ned module l4lx_tf.cfg module io module vmlinuz.arm module ramdisk-arm.rd
The second Serial Interface seems to initialize. Is my approach correct? How can I attach the interface to a process so it gives the output to that interface?
Any help would be appreciated.
Regards Tobi
Hi,
On Sun Apr 15, 2012 at 20:58:48 +0200, Tobias Fink wrote:
I hope I'm not rude asking again for help on the same topic. I'm still using the IGEP Board with an OMAP3 processor. I'm using the following configuration:
entry L4TF kernel fiasco -serial_esc roottask moe rom/l4lx_tf.cfg module iol4lx_tf.io module ankh module l4re module ned module l4lx_tf.cfg module io module vmlinuz.arm module ramdisk-arm.rd
The second Serial Interface seems to initialize. Is my approach correct? How can I attach the interface to a process so it gives the output to that interface?
Do I understand correctly that L4Linux talks successfully to the UART? (You're only showing parts of the iol4lx_tf.io file?) Then this would be a pure Linux thing. Something like this: prog </dev/ttyLv1 >/dev/ttyLv1 2&>1
[-- octet-filter file type: "ASCII text" --]
hw-root { NIC => new Device() { .hid = "smsc911x"; new-res Mmio(0x4e000000 .. 0x4e000fff); new-res Irq(41); }
ttyLv1 => new Device() { .hid = "2nd Console"; new-res Mmio(0x49020000 .. 0x49020fff); new-res Irq(74); } } # Network device Test l4linux => new System_bus() { NIC => wrap(hw-root.NIC); }
# Console 2 Test
l4linux => new System_bus() { Lv1 => wrap(hw-root.ttyLv1); }
You should put both devices into the same bus, otherwise the first one will not appear.
Adam
Hi,
Do I understand correctly that L4Linux talks successfully to the UART? (You're only showing parts of the iol4lx_tf.io file?) Then this would be a pure Linux thing. Something like this: prog </dev/ttyLv1 >/dev/ttyLv1 2&>1
I'm showing the full .io file. I have just used another cfg (without starting the L4Linux) for testing. Well L4Linux talks to the UART that it detects automatically. A Linux kernel sees that one as follows: [ 0.969085] serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
L4 says during startup: SERIAL ESC: allocated IRQ 74 for serial uart
and L4Linux: console [ttyLv0] enabled .. ttyLv0 at MMIO 0x1 (irq = 210) is a L4
What I'm trying to do is to use another UART to communicate with a second L4Linux on top of L4. This is the UART I'm trying to use [ 0.598999] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654 (note that there was a mistake in my .io file where the other UART was initialized. I changed that without any effect).
So as I understand it I have to initialize the second interface and give it to the second L4Linux when booting with "console=....". Is there more documentation on the cfg files other then on http://os.inf.tu-dresden.de/L4Re/doc/l4re_getting_started.html ? I can't find any and have to work with the examples I find in this List and the sources.
You should put both devices into the same bus, otherwise the first one will not appear.
I changed that with no change as far as I can see.
Regards Tobi
On Tue Apr 17, 2012 at 12:09:36 +0200, Tobias Fink wrote:
Do I understand correctly that L4Linux talks successfully to the UART? (You're only showing parts of the iol4lx_tf.io file?) Then this would be a pure Linux thing. Something like this: prog </dev/ttyLv1 >/dev/ttyLv1 2&>1
I'm showing the full .io file. I have just used another cfg (without starting the L4Linux) for testing. Well L4Linux talks to the UART that it detects automatically. A Linux kernel sees that one as follows: [ 0.969085] serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
L4 says during startup: SERIAL ESC: allocated IRQ 74 for serial uart
and L4Linux: console [ttyLv0] enabled .. ttyLv0 at MMIO 0x1 (irq = 210) is a L4
What I'm trying to do is to use another UART to communicate with a second L4Linux on top of L4. This is the UART I'm trying to use [ 0.598999] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654 (note that there was a mistake in my .io file where the other UART was initialized. I changed that without any effect).
So as I understand it I have to initialize the second interface and give it to the second L4Linux when booting with "console=....".
Early in L4Linux's boot-up messages there's a device scan, i.e. a list of all resources L4Linux is getting from io. Is 0x4806a000 in this list? io is also outputting device trees for each client and for the whole hardware, check that the resources of the serial device are also there (use more -v's for io if necessary).
Adam
Hi,
On 03/05/2012 10:41 AM, Tobias Fink wrote: [...]
The board is a custom board with very little documentation. I have some Linux drivers for the connected hardware. Is it possible to use them with L4Linux or would I have to get/write drivers for L4 itself?
In general it is possible to let L4Linux drive devices directly. You need to give L4Linux access to the device in the respective io configuration and make the driver run within L4Linux.
Regards, Matthias.
Sorry about these very basic questions. I've just started working with L4.
Regards Tobi
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
l4-hackers@os.inf.tu-dresden.de