Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Linux on EP4CE10

Altera_Forum
Honored Contributor II
1,079 Views

Hello, 

 

I'm trying to run uClinux on DB_START_EP4CE10 board (EP4CE10 + 16MB SDRAM) 

I have only partial success. 

 

The kernel is 3.1.0-rc4 gitted as: 

git fetch origin 

git checkout -t origin/unstable-nios2mmu 

 

I've got 3 linux kernel compiles: 

1) no initramfs support, 

2) initramfs as it is in the trunk uClinux-dist git tree 

3) initramfs with some files deleted 

 

Only kernel one passes all the way to mounting the filesystem (it obviously hangs, 

as there is no filesystem): 

 

Linux version 3.1.0-rc4-01162-g45c9dd8 (root@debian) (gcc version 4.1.2)# 46 Mon Jan 24 12:59:31 EST 2011 bootconsole enabled early_console initialized at 0xe21208b0 On node 0 totalpages: 8192 free_area_init_node: node 0, pgdat c0186cd0, node_mem_map c0196a00 DMA zone: 64 pages used for memmap DMA zone: 0 pages reserved DMA zone: 8128 pages, LIFO batch:0 pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 pcpu-alloc: 0 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 Kernel command line: PID hash table entries: 128 (order: -3, 512 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory available: 30824k/1618k RAM (1177k kernel code, 440k data) NR_IRQS:32 Calibrating delay loop... 49.35 BogoMIPS (lpj=246784) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 bio: create slab <bio-0> at 0 Switching to clocksource timer msgmni has been set to 60 io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) ttyJ0 at MMIO 0x21208b0 (irq = 1) is a Altera JTAG UART console enabled, bootconsole disabled console enabled, bootconsole disabled List of all partitions: No filesystem could mount root, tried: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)  

 

Kernels 2 and 3 (with initramfs payload) lock themself during boot: 

 

Linux version 3.1.0-rc4-01162-g45c9dd8 (root@debian) (gcc version 4.1.2)# 48 Mon Jan 24 11:10:17 EST 2011 bootconsole enabled early_console initialized at 0xe21208b0 On node 0 totalpages: 8192 free_area_init_node: node 0, pgdat c067ecd0, node_mem_map c068ea00 DMA zone: 64 pages used for memmap DMA zone: 0 pages reserved DMA zone: 8128 pages, LIFO batch:0 pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 pcpu-alloc: 0 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 Kernel command line: PID hash table entries: 128 (order: -3, 512 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory available: 25736k/6706k RAM (1177k kernel code, 5528k data) NR_IRQS:32 Calibrating delay loop... 49.35 BogoMIPS (lpj=246784) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 bio: create slab <bio-0> at 0 Switching to clocksource timer msgmni has been set to 50 io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) ------------------------ WARNING: at /home/mic/nios2-ep4ce10/nios2-linux-2/linux-2.6/fs/sysfs/dir.c:455 sysfs_add_one+0xá!/0x !() sysfs: cannot create duplicate filename '/devices/virtual/tty/ttyd ' Modules linked in: Stack from á !: 00000 á !! !! !!! á · c c ¸ c á· ¸ !! á ¸ !cc ¸ ¸ á ¸¸ · !!! !! ¸¸¸¸ !!! c c ¸ 00000000 00000000 ¸ !! ¸ ¸ · ¸ 00000000 c á· ¸ · ¸ 00000000 00000000 ! !! · ¸ c ¸ ! á ¸¸ !c· ! 000000 ! c á· ¸ c á· ¸ ! !! ¸ Ḡ00000000 c á· ¸ ! 00000000 00000000 !! ¸¸ ¸ c á· ! c á· ! 00 !!! !! ¸·á! á ! !c ! á ¸¸ Call Trace: ------ failed for ttyd with -EEXIST, don't try to register things with the same name in the same directory. Stack from á ·¸: c ¸ ! !! ¸ · 00000000 c á· ¸ ! 00000000 00000000 !! ¸¸ ¸ c á· ! c á· ! 00 !!! !! ¸·á! á ! !c ! á ¸¸ á ¸¸ 0000000c 00 !!! c ¸ ! 00000000 00000000 · !!! c á· ! c á· ! 00 !!! 00000000 00000000 00000000 · !!! ! !á c !c·c! ! !ḷ! 0000000 000000 0000000 00000000 00000000 ··¸ ! !Ḡ¸ á ¸¸ á ¸¸ á ¸¸ !! ác á ¸¸ c¸á·á¸á¸ 000000 ! 00000000 00000000 Call Trace: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ea = 00000000, ra = !!!cá ¸, cause = 13 Kernel panic - not syncing: Oops  

 

Linux version 3.1.0-rc4-01162-g45c9dd8 (root@debian) (gcc version 4.1.2)# 52 Mon Jan 24 11:24:43 EST 2011 bootconsole enabled early_console initialized at 0xe21208b0 On node 0 totalpages: 8192 free_area_init_node: node 0, pgdat c07f6cd0, node_mem_map c0806a00 DMA zone: 64 pages used for memmap DMA zone: 0 pages reserved DMA zone: 8128 pages, LIFO batch:0 pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 pcpu-alloc: 0 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 Kernel command line: PID hash table entries: 128 (order: -3, 512 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory available: 24232k/8210k RAM (1177k kernel code, 7032k data) NR_IRQS:32 Calibrating delay loop... 49.35 BogoMIPS (lpj=246784) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512  

 

dts file: 

/* * This devicetree is generated by sopc2dts * Sopc2dts is written by Walter Goossens <waltergoossens@home.nl> * in cooperation with the nios2 community <Nios2-dev@sopc.et.ntust.edu.tw> */ /dts-v1/; / { model = "ALTR,niosII_cpu"; compatible = "ALTR,niosII_cpu"; # address-cells = < 1 >; # size-cells = < 1 >; cpus { # address-cells = < 1 >; # size-cells = < 0 >; cpu: cpu@0x0 { device_type = "cpu"; compatible = "ALTR,nios2-11.1"; reg = < 0x00000000 >; interrupt-controller; # interrupt-cells = < 1 >; clock-frequency = < 100000000 >; /* embeddedsw.CMacro.CPU_FREQ type NUMBER */ dcache-line-size = < 32 >; /* embeddedsw.CMacro.DCACHE_LINE_SIZE type NUMBER */ icache-line-size = < 32 >; /* embeddedsw.CMacro.ICACHE_LINE_SIZE type NUMBER */ dcache-size = < 4096 >; /* embeddedsw.CMacro.DCACHE_SIZE type NUMBER */ icache-size = < 4096 >; /* embeddedsw.CMacro.ICACHE_SIZE type NUMBER */ ALTR,implementation = "fast"; /* embeddedsw.CMacro.CPU_IMPLEMENTATION type STRING*/ ALTR,pid-num-bits = < 8 >; /* embeddedsw.CMacro.PROCESS_ID_NUM_BITS type NUMBER */ ALTR,tlb-num-ways = < 16 >; /* embeddedsw.CMacro.TLB_NUM_WAYS type NUMBER */ ALTR,tlb-num-entries = < 256 >; /* embeddedsw.CMacro.TLB_NUM_ENTRIES type NUMBER */ ALTR,tlb-ptr-sz = < 8 >; /* embeddedsw.CMacro.TLB_PTR_SZ type NUMBER */ ALTR,has-mul; /* embeddedsw.CMacro.HARDWARE_MULTIPLY_PRESENT type NUMBER*/ ALTR,reset-addr = < 0xd0000000 >; /* embeddedsw.CMacro.RESET_ADDR type NUMBER */ ALTR,fast-tlb-miss-addr = < 0xc0001000 >; /* embeddedsw.CMacro.FAST_TLB_MISS_EXCEPTION_ADDR type NUMBER */ ALTR,exception-addr = < 0xd0000020 >; /* embeddedsw.CMacro.EXCEPTION_ADDR type NUMBER */ }; //end cpu@0x0 (cpu) }; //end cpus memory@0 { device_type = "memory"; reg = < 0x10000000 0x01000000 0x00001000 0x00001000 0x00002000 0x00001000 >; }; //end memory@0 sopc@0 { ranges; # address-cells = < 1 >; # size-cells = < 1 >; device_type = "soc"; compatible = "ALTR,avalon", "simple-bus"; bus-frequency = < 100000000 >; jtag_uart: serial@0x21208b0 { compatible = "ALTR,juart-11.1", "ALTR,juart-1.0"; reg = < 0x021208B0 0x00000008 >; interrupt-parent = < &cpu >; interrupts = < 1 >; }; //end serial@0x21208b0 (jtag_uart) led_pio: gpio@0x2120870 { compatible = "ALTR,pio-11.1", "ALTR,pio-1.0"; reg = < 0x02120870 0x00000010 >; width = < 5 >; /* width type NUMBER */ resetvalue = < 0 >; /* resetValue type NUMBER */ }; //end gpio@0x2120870 (led_pio) sys_clk_timer: timer@0x2002000 { compatible = "ALTR,timer-11.1", "ALTR,timer-1.0"; reg = < 0x02002000 0x00000020 >; interrupt-parent = < &cpu >; interrupts = < 0 >; clock-frequency = < 100000000 >; }; //end timer@0x2002000 (sys_clk_timer) sysid: sysid@0x2002048 { compatible = "ALTR,sysid-11.1", "ALTR,sysid-1.0"; reg = < 0x02002048 0x00000008 >; }; //end sysid@0x2002048 (sysid) high_res_timer: timer@0x2120820 { compatible = "ALTR,timer-11.1", "ALTR,timer-1.0"; reg = < 0x02120820 0x00000020 >; interrupt-parent = < &cpu >; interrupts = < 4 >; clock-frequency = < 100000000 >; }; //end timer@0x2120820 (high_res_timer) }; //end sopc@0 chosen { bootargs = "debug console=ttyAL0,115200"; }; //end chosen }; //end /  

 

Quite frankly I have no idea, what is causing the problem. 

It seems, that it is memory related. Or maybe kernel version related??? 

 

-emve
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
356 Views

Success with kernel 3.1 (no -rc4) and TCM/cache settings according to bemicro board. 

 

Note the line: 

Memory available: 9484k/6714k RAM (1188k kernel code, 5526k data) 

the 3.1-rc4 on the same system said: 

Memory available: 25736k/6706k RAM (1177k kernel code, 5528k data) 

 

 

Linux version 3.1.0-01200-g1d99077 (root@debian) (gcc version 4.1.2)# 94 Wed Jan 26 14:32:50 EST 2011 bootconsole enabled early_console initialized at 0xe21208b0 On node 0 totalpages: 4096 free_area_init_node: node 0, pgdat d0680cd0, node_mem_map d0690b00 DMA zone: 32 pages used for memmap DMA zone: 0 pages reserved DMA zone: 4064 pages, LIFO batch:0 pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 pcpu-alloc: 0 Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064 Kernel command line: PID hash table entries: 64 (order: -4, 256 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 9484k/6714k RAM (1188k kernel code, 5526k data) NR_IRQS:32 Calibrating delay loop... 49.35 BogoMIPS (lpj=246784) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 bio: create slab <bio-0> at 0 Switching to clocksource timer msgmni has been set to 18 io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) ttyJ0 at MMIO 0x21208b0 (irq = 1) is a Altera JTAG UART console enabled, bootconsole disabled console enabled, bootconsole disabled Freeing unused kernel memory: 5164k freed (0xd012a000 - 0xd0635000) ifconfig: socket: Function not implemented Welcome to ____ _ _ / __| ||_| _ _| | | | _ ____ _ _ _ _ | | | | | | || | _ \| | | |\ \/ / | |_| | |__| || | | | | |_| |/ | ___\____|_||_|_| |_|\____|\_/\_/ | | |_| For further information check: BusyBox v1.16.2 (2011-01-11 11:39:28 EST) hush - the humble shell Enter 'help' for a list of built-in commands. root:/>
0 Kudos
Reply