L4Android and L4Linux parallel on an i.MX53
Tobias Fink
tobias.fink at stud.h-da.de
Mon Mar 12 14:03:00 CET 2012
Hi,
2012/3/5 Adam Lackorzynski <adam at 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 at 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 at 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
More information about the l4-hackers
mailing list