Altera_Forum
Honored Contributor
20 years agouClinux Boot problem
Hi,
I am testing my own custom board with EP1C12Q240, Flash=16bit*4M, Sdram=32bit*2M. My system has NiosII/f Core, uart, jtag-uart, sdram, flash, epcs_controller, timer and some PIOs. I use U-Boot to boot uClinux of Microtronix 1.4. When I run bootm command to boot uClinux, there display <div class='quotetop'>QUOTE </div> --- Quote Start --- ==> bootm 0x50000 # # Booting image at 00050000 ... Image Name: Linux Kernel Image Image Type: Nios-II Linux Kernel Image (gzip compressed) Data Size: 458311 Bytes = 447.6 kB Load Address: 00800000 Entry Point: 00800000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK Linux version 2.6.11-uc0 (LiangYi@ciitec-liangyi) (gcc version 3.4.1 (Altera Nios II 5.0 b73))# 1 Thu Feb 23 15:45:58 2006 uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. Built 1 zonelists Kernel command line: root=/dev/mtdblock0 ro PID hash table entries: 64 (order: 6, 1024 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 7016k/8192k RAM, 0k/0k ROM (850k kernel code, 206k 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 = 3) is a builtin NIOS UART io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize Microtronix map: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 Microtronix map: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. cmdlinepart partition parsing not available RedBoot partition parsing not available Using Microtronix development partition definition Creating 2 MTD partitions on "Microtronix map": 0x00200000-0x00800000 : "romfs" 0x00000000-0x00200000 : "loader/kernel" VFS: Mounted root (romfs filesystem) readonly. Freeing unused kernel memory: 52k freed (0x8f0000 - 0x8fc000) expand: from=/ramfs.img to=/dev/ram0 expand: from=/ramfs.img to=/dev/ram1 SIOCSIFADDR=-1: 9 SIOCGIFFLAGS = -1: Bad file descriptor (9) SIOCADDRT=-1: 9 Unable to create socket close on exec: : Bad file descriptor setsockopt: : Function not implemented Unable to bind server socket: : Function not implemented Unable to listen to socket Unable to create socket close on exec: : Bad file descriptor setsockopt: : Function not implemented Unable to bind server socket: : Function not implemented Unable to listen to socket Unable to create socket close on exec: : Bad file descriptor setsockopt: : Function not implemented Unable to bind server socket: : Function not implemented Unable to listen to socket[/b] --- Quote End --- I do not know What is wrong? I use NiosII-IDE to generate vmlinux.bin and romfs.bin and do <div class='quotetop'>QUOTE </div> --- Quote Start --- $ gzip -9 vmlinux.bin $ mkimage -A nios2 -O linux -T kernel -C gzip -a 0x00800000 -e 0x00800000 -n 'Linux Kernel Image' -d vmlinux.bin.gz uImage.img $ bin2flash –flash=U5 –location=0x00050000 –input=uImage.img –output=uImage.flash $ nios2-flash-programmer –base=0x00800000 –input=uImage.flash –sof=<path to pgm sof> $ bin2flash --flash=U5 --location=0x00200000 --input=romfs.bin --output=romfs.flash $ nios2-flash-programmer –base=0x00800000 –input=romfs.flash –sof=<path to pgm sof>[/b] --- Quote End --- Then, run bootm and display above. Can someone help me? BTW, another question. When I use <div class='quotetop'>QUOTE </div> --- Quote Start --- $ mkimage -A nios2 -O linux -T filesystem -C none -a 0x00a00000 -e 0x00a00000 -n 'romfs' -d romfs.bin romfs.img $ bin2flash --flash=U5 --location=0x00200000 --input=romfs.img --output=romfs.flash $ nios2-flash-programmer –base=0x00800000 –input=romfs.flash –sof=<path to pgm sof>[/b] --- Quote End --- There display <div class='quotetop'>QUOTE </div> --- Quote Start --- uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. Built 1 zonelists Kernel command line: root=/dev/mtdblock0 ro PID hash table entries: 64 (order: 6, 1024 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 7016k/8192k RAM, 0k/0k ROM (850k kernel code, 206k 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 = 3) is a builtin NIOS UART io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize Microtronix map: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 Microtronix map: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. cmdlinepart partition parsing not available RedBoot partition parsing not available Using Microtronix development partition definition Creating 2 MTD partitions on "Microtronix map": 0x00200000-0x00800000 : "romfs" 0x00000000-0x00200000 : "loader/kernel" Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)[/b] --- Quote End --- I do not know what different between these two method and which is correct for me and how to deal with the problem. Thank you, LiangYi