Forum Discussion
Altera_Forum
Honored Contributor
20 years agounable to load cramfs
hello friends
i am using cramfs .i have compressed kernel . i have stored u-boot at 0x0 ,cramfs at 0x00100000 and kernel image at 0x00020000. my flash is 2MB(0x00000000 to 0x00200000).and sdram is 8Mb(0x00800000 to 0x00f00000). but when give command " bootm 0x0002000" on hyperterminel then i get o/p on console like: 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: 6948k/8192k RAM, 0k/0k ROM (883k kernel code, 241k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Linux NoNET1.0 for Linux 2.6 Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x80220820 (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 ALTERA map: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 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 up3 development partition definition Creating 2 MTD partitions on "ALTERA": 0x00100000-0x00200000 : "romfs" 0x00000000-0x00100000 : "loader/kernel" Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)12 Replies
- Altera_Forum
Honored Contributor
Hi slsnios,
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0) There are many possible causes. First, make sure you don't have the broken cramfs code. See: http://forum.niosforum.com/forum/index.php...=2383&hl=cramfs (http://forum.niosforum.com/forum/index.php?showtopic=2383&hl=cramfs) Once you're sure your cramfs code is clean, you might want to enable jffs2/cramfs support in u-boot. This will allow you to list and load jffs2/cramfs files into ram and view some file system information -- it's a good way to ensure you have a clean filesystem image _before_ you boot the kernel. And, of course, double-check your kernel configuration to ensure you have cramfs support enabled ;-) Regards, --Scott - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by smcnutt@Jun 30 2006, 06:07 PM hi slsnios,> kernel panic - not syncing: vfs: unable to mount root fs on unknown-block(31,0)
there are many possible causes.
first, make sure you don't have the broken cramfs code. see:
http://forum.niosforum.com/forum/index.php...=2383&hl=cramfs (http://forum.niosforum.com/forum/index.php?showtopic=2383&hl=cramfs)
once you're sure your cramfs code is clean, you might want to enable jffs2/cramfs support in
u-boot. this will allow you to list and load jffs2/cramfs files into ram and view some file system
information -- it's a good way to ensure you have a clean filesystem image _before_ you boot
the kernel.
and, of course, double-check your kernel configuration to ensure you have cramfs support
enabled ;-)
regards,
--scott
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16571)
--- quote end ---
--- Quote End --- hi scott thans but i have already changed cramfs code. i selected cramfs option. i checked image of cramfs which is genereted by mkcram command. now i got sam problem.. please help me,what should be my next step?
- Altera_Forum
Honored Contributor
Hi slsnios,
Try adding the following to the kernel command line: rootfstype=cramfs Regards, --Scott - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by smcnutt@Jul 7 2006, 02:04 AM hi slsnios,try adding the following to the kernel command line:
rootfstype=cramfs[/b] Regards, --Scott <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16692) --- Quote End --- [/b] --- Quote End --- Thanks scott but can you tell me where i have to insert tis line at source code or project folder ,..where is kernel command line..
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by slsnios+jul 7 2006, 04:45 pm--><div class='quotetop'>quote (slsnios @ jul 7 2006, 04:45 pm)</div>--- quote start ---
<!--quotebegin-smcnutt@Jul 7 2006, 02:04 AM hi slsnios,
try adding the following to the kernel command line:
rootfstype=cramfs[/b] Regards, --Scott <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16692) --- Quote End --- [/b] --- Quote End --- Thanks scott but can you tell me where i have to insert tis line at source code or project folder ,..where is kernel command line.. <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16704)</div> [/b] --- Quote End --- In kernel menuconfig, Processor type and features --> () Default kernel command string root=/dev/mtdblock0 ro rootfstype=cramfs
- Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
Hi slsnios,
> ./mkcramfs -n cramfs -z -r ./dir cramfs.img > then it is giving following error, ... snip ... > cramfs.img: invalid cramfs--wrong magic You're reversing the endian order (-r option) & cramfschk does not have similar option. Endian order reversal should not be necessary. Regards, --Scott - Altera_Forum
Honored Contributor
hi scott
so,am i wrong or right? where am i doing mistake ? with regard slsnios - Altera_Forum
Honored Contributor
Hi slsnios,
> so,am i wrong or right? If you're creating the cramfs image on a little endian machine (like a PC) don't use the -r option. Regards, --Scott - Altera_Forum
Honored Contributor
hi scott
so much thanks.......infinite atleast ,now kernel is able to find which is fs is there. but still now i have problem now, i got massegs on terminal like 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: 7040k/8192k RAM, 0k/0k ROM (800k kernel code, 235k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Linux NoNET1.0 for Linux 2.6 Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x80221080 (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 UP3 map: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 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 development partition definition Creating 2 MTD partitions on "altera map": 0x00100000-0x00200000 : "romfs" 0x00000000-0x00100000 : "loader/kernel" VFS: Mounted root (cramfs filesystem) readonly. Freeing unused kernel memory: 48k freed (0x8e4000 - 0x8ef000) Warning: unable to open an initial console. Kernel panic - not syncing: No init found. Try passing init= option to kernel. if i think init is not there ,then it should be not worked when same fs is used as romfs.bin because i got kernel o/p ,when i used same fs without compress as romfs. please help me.