Forum Discussion
Altera_Forum
Honored Contributor
20 years agouclinux boot failed !!!
hi all,
I am trying to boot uclinux kernel on 2s60es board, I am using build root. I have change memory map (ram and CF still remains same) and removed CF, perf monitor, sysid. While boot I am getting following prints and my kernel get crash with msg mm/vmscan.c(661): kernel BUG! Is it some thing to do with memory problem or size. I have 16 MB sdram on the development board. I think its sufficient for alteast boot uclinux with default file system given by hippo (which is working fine with default linux sof / ptf given by microtronix). Any one face this problem ???uClinux/Nios II
Altera Nios II support (C) 2004 Microtronix Datacom Ltd.
Built 1 zonelists
Kernel command line:
PID hash table entries: 128 (order: 7, 2048 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 15136k/16384k RAM, 0k/0k ROM (633k kernel code, 422k data)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Linux NoNET1.0 for Linux 2.6
NIOS serial driver version 0.0
ttyS0 (irq = 4) is a builtin NIOS UART
Serial: JTAG UART driver $Revision: 1.4 $
ttyJ0 at MMIO 0x80920800 (irq = 1) is a jtag_uart
io scheduler noop registered
io scheduler deadline registered
Freeing unused kernel memory: 340k freed (0x10a8000 - 0x10fc000)
mm/vmscan.c(661): kernel BUG!
mm/vmscan.c(661): kernel BUG!
mm/vmscan.c(661): kernel BUG!
.......6 Replies
- Altera_Forum
Honored Contributor
It looked like you enabled both serial uart and jtag uart.
Please try enable only one of them, eg jtag uart, and with console support. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@May 26 2006, 05:12 AM it looked like you enabled both serial uart and jtag uart.please try enable only one of them, eg jtag uart, and with console support.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15594)
--- quote end ---
--- Quote End --- hi hippo and all, thanks for the reply, I disabled jtag uart, doing so I am not getting any prints .... So I enable it again with debug prints on jtag uart disable, also I left debug prints enable on nios serial uart. One more change I made in /Device Drivers / Block Devices / I-O scheduler / I disabled deadline io scheduler and enabled Anticipatory io scheduler ... also I disable premptable kernel support and now its booting fine with ramdisk support as given by you. I don't have much understanding with this so I can't give you any reason why its working http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gif . One more thing, now I my trying to boot my ucllinux with NFS file system. So doing it ..... ************ config start ****** I have removed ramdisk path in my kernel config /Device Driver/Block devices / initramfs source file path.... Also I have enable networking support with SMC 91c111, TCP/IP support, ip from bootp and dhcp .... In Network file system I have enabled NFS file system support NFSV3 and 4 client support Allow direct I/O on NFS files and finally Root file system on NFS also Kernel automounter version 4 support is enable ********* config end ********* With this new configuration if I boot my kernel I am getting these msg with kernel crash
Any Idea why I am getting this. thanks AnkuruClinux/Nios II Altera Nios II support (C) 2004 Microtronix Datacom Ltd. setup_arch: No persistant network settings signature at 007F0000 Built 1 zonelists Kernel command line: PID hash table entries: 128 (order: 7, 2048 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory available: 14092k/16384k RAM, 0k/0k ROM (1598k kernel code, 501k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) NET: Registered protocol family 16 Initializing Cryptographic API NIOS serial driver version 0.0 ttyS0 (irq = 5) is a builtin NIOS UART Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x80920800 (irq = 1) is a jtag_uart io scheduler noop registered io scheduler deadline registered smc_probe: 50000 Khz Nios SMSC LAN91C111 Driver (v2.1), (Linux Kernel 2.6) eth0: SMC91C11xFD(rev:1) at 0x80910300 IRQ:6 MEMSIZE:8192b NOWAIT:0 ADDR: 00:07:ed:00:00:00 smc_probe: 50000 Khz Nios NET: Registered protocol family 2 IP: routing cache hash table of 512 buckets, 4Kbytes TCP established hash table entries: 1024 (order: 1, 8192 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) NET: Registered protocol family 1 NET: Registered protocol family 17 Freeing unused kernel memory: 364k freed (0x11a0000 - 0x11fa000) oom-killer: gfp_mask=0xd0 DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 cpu 0 cold: low 18959064, high 2, batch 1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 12488kB (0kB HighMem) Active:250 inactive:63 dirty:0 writeback:0 unstable:0 free:3122 slab:151 mapped:0 pagetables:0 DMA free:12488kB min:512kB low:640kB high:768kB active:1000kB inactive:252kB present:16384kB pages_scanned:66186 all_unreclaimable? yes lowmem_reserve: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve: 0 0 0 DMA: 0*4kB 1*8kB 2*16kB 2097663*32kB 2*64kB 2*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 2*4096kB = 67137672kB Normal: empty HighMem: empty oom-killer: gfp_mask=0xd0 DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 cpu 0 cold: low 18959064, high 2, batch 1 Normal per-cpu: empty HighMem per-cpu: empty - Altera_Forum
Honored Contributor
Please check wiki, (and help improve it)
http://nioswiki.jot.com/wikihome/operating...ux/nfsfilesytem (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/nfsfilesytem) - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@May 26 2006, 07:27 AM please check wiki, (and help improve it)http://nioswiki.jot.com/wikihome/operating...ux/nfsfilesytem (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/nfsfilesytem)
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15602)
--- quote end ---
--- Quote End --- hi hippo and all, Thanks for the help, also mean while I found the reason why it was happening. Actually I have DMA controller enabled in my hardware design and I did not enabled support for it my kernel configuration. **** menu config **** Processor type and features -> Support of DMA controller with Avalon interface. ******************** After adding this support now my kernel is booting fine with the file system you provided over the web. One more request ... can you share your experience on how you build busy-box for nios system. I have downloaded busybox-1.1.2 and I am building it for nios with your gcc binaries. thanks Ankur
- Altera_Forum
Honored Contributor
Busybox, .config for cross compile
I used this flags before, (but not now) EXTRA_CFLAGS_OPTIONS="-D__uClinux__ -Dfork=vfork" Busybox, Makefile add elf2flt flag## Build Options# CONFIG_STATIC=y# CONFIG_BUILD_LIBBUSYBOX is not set# CONFIG_FEATURE_FULL_LIBBUSYBOX is not set# CONFIG_FEATURE_SHARED_BUSYBOX is not set CONFIG_LFS=y USING_CROSS_COMPILER=y CROSS_COMPILER_PREFIX="nios2-linux-uclibc-" EXTRA_CFLAGS_OPTIONS="-Dfork=vfork -Ddaemon=clone"# CONFIG_BUILD_AT_ONCE is not set # # Installation Options# # CONFIG_INSTALL_NO_USR is not set CONFIG_INSTALL_APPLET_SYMLINKS=y# CONFIG_INSTALL_APPLET_HARDLINKS is not set# CONFIG_INSTALL_APPLET_DONT is not set PREFIX="/home/hippo/rootfs"
There is an important issue about busybox. It takes more memory on MMU-less arch. So I moved away from busybox a little. I use stand alone init, sash, and servers. I built others utils into busybox. see http://nioswiki.jot.com/wikihome/operating...nux/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist)busybox_unstripped: .depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(libraries-y) $(do_link) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) -Wl,-elf2flt="-s 16000" -Wl,-v -Wl,-d -o $@ -Wl,--start-group $(APPLETS_DEFINE) $(APPLET_SRC) $(BUSYBOX_DEFINE) $(BUSYBOX_SRC) $(libraries-y) $(LDBUSYBOX) $(LIBRARIES) -Wl,--end-group busybox: busybox_unstripped $(Q)cp busybox_unstripped busybox# $(do_strip) - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@May 27 2006, 09:26 PM busybox, .config for cross compile## build options# config_static=y# config_build_libbusybox is not set# config_feature_full_libbusybox is not set# config_feature_shared_busybox is not set config_lfs=y using_cross_compiler=y cross_compiler_prefix="nios2-linux-uclibc-" extra_cflags_options="-dfork=vfork -ddaemon=clone"# config_build_at_once is not set # # installation options# # config_install_no_usr is not set config_install_applet_symlinks=y# config_install_applet_hardlinks is not set# config_install_applet_dont is not set prefix="/home/hippo/rootfs"i used this flags before, (but not now)
extra_cflags_options="-d__uclinux__ -dfork=vfork"
busybox, makefile add elf2flt flag
busybox_unstripped: .depend $(libbusybox_soname) $(busybox_src) $(libraries-y) $(do_link) $(prog_cflags) $(prog_ldflags) $(cflags_combine) -wl,-elf2flt="-s 16000" -wl,-v -wl,-d -o $@ -wl,--start-group $(applets_define) $(applet_src) $(busybox_define) $(busybox_src) $(libraries-y) $(ldbusybox) $(libraries) -wl,--end-group busybox: busybox_unstripped $(q)cp busybox_unstripped busybox# $(do_strip)there is an important issue about busybox. it takes more memory on mmu-less arch.
so i moved away from busybox a little. i use stand alone init, sash, and servers. i built others utils into busybox. see http://nioswiki.jot.com/wikihome/operating...nux/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist)
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15621)</div> --- Quote End --- hi hippo and all, thanks for the help on busybox also, I did as you recommanded and its working fine. At present size is not an issue for me but later I will try as you have done, building init, sh stand alone. Next time I may bug you for building buildroot. thanks for all your support. Ankur