- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I created and build a Linux kernel and filesystem project guided by the file "Linux Quick Start Guide" located in :\altera\kits\nios2_60\documents\linux.Then I secelted tools->flash programmer in IDE,and click the apply-->program flash button to download the executable file:build/vmlinux . After that I download the .sof file into the development board.When it is done,I open Nios II SDK shell and type nios2-terminal in command line. [SOPC Builder]$ nios2-terminal The boot information is as follows: nios2-terminal: connected to hardware target using JTAG UART on cable nios2-terminal: "ByteBlasterII [LPT1]", device 1, instance 0 nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) Linux version 2.6.11-uc0 (lq1@lq) (gcc version 3.4.1 (Altera Nios II 5.1 b93))# 23 Mon Aug 14 16:36:53 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: 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: 14720k/16384k RAM, 0k/0k ROM (1228k kernel code, 260k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) NET: Registered protocol family 16 Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x821208d0 (irq = 1) is a jtag_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 smc_probe: 50000 Khz Nios SMSC LAN91C111 Driver (v2.1), (Linux Kernel 2.6) eth0: SMC91C11xFD(rev:1) at 0x82110300 IRQ:6 MEMSIZE:8192b NOWAIT:0 ADDR: 00:07:ed:0b:04:c9 smc_probe: 50000 Khz Nios uclinux[mtd]: RAM probe address=0x1174474 size=0x0 Creating 1 MTD partitions on "RAM": 0x00000000-0x00000000 : "ROMfs" mtd: partition "ROMfs" is out of reach -- disabled uclinux[mtd]: set ROMfs to be root filesystem Altera NDK flash (AMD): Found 1 x8 devices at 0x0 in 8-bit bank Amd/Fujitsu Extended Query Table at 0x0040 Altera NDK flash (AMD): 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 Altera NDK partition definition Creating 4 MTD partitions on "Altera NDK flash (AMD)": 0x00200000-0x00600000 : "romfs/jffs2" 0x00000000-0x00200000 : "loader/kernel" 0x00600000-0x00700000 : "User configuration" 0x00700000-0x00800000 : "safe configuration" microtronix[mtd]: RAM probe address=0x200000 size=0x0 Creating 1 MTD partitions on "RAM": 0x00000000-0x00000000 : "ROMfs" mtd: partition "ROMfs" is out of reach -- disabled microtronix[mtd]: set ROMfs to be root filesystem 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 end_request: I/O error, dev mtdblock0, sector 2 EXT2-fs: unable to read superblock end_request: I/O error, dev mtdblock0, sector 0 romfs: unable to read superblock Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0) Can anyone here explain the problem? Thank you very much!Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
make sure File systems->ROM file system support be selected, and
Device Drivers->Memory Technology Devices (MTD)->Mapping drivers for chip access-> Generic uClinux RAM/ROM filesystem support be disabled.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I give the final answer:
Actually, except the kernel project created and programmed into the flash, you also need to create a root file system and program it into the flash. Please follow the steps to create the kernel project and file system project according to the "Linux Quick Start Guide". After build them successfully, open the NiosII command shell and try to program both the ext_flash.flash and romfs.flash into flash: ------------------------------------------------------------ elf2flash --base=0x00000000 --end=0x7fffff --reset=0x0 --input=vmlinux --output=ext_flash.flash --boot =$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec nios2-flash-programmer --base=0x0000 ext_flash.flash nios2-flash-programmer --base=0x0000 romfs.flash ------------------------------------------------------------- The ext_flash.flash is generated through the elf2flash command. The input file is vmlinux.bin in the "build" folder under kernel project. The romfs.flash is generated automatically after building the file system project. Please note to go to the correct directory and input the commands.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page