LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
LinkBack Search this Thread
Old 12-28-2010, 10:25 PM   #1
aprajam
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Rep: Reputation: 0
SMDK2450 - Linux kernel root file system mounting through CRAMFS


Hello all,

We have been trying hard to get Linux kernel with root file system up on SMDK2450 development board. The NAND flash in the board is not working (U-boot and kernel reports "No NAND device found!").

We are trying to boot the system using the root file system in memory. Can I get help on the procedure for this. I have cramfs file system created for the kernel.

Currently I am trying with bootargs root=/dev/ram rw console=ttySAC0,115200 initrd=0x30008000, 0x2077f0 init=/bin/bash

Here is the log:
U-Boot 1.1.6 (Dec 28 2010 - 10:13:13) for SMDK2416


CPU: S3C2416@400MHz
Fclk = 800MHz, Hclk = 133MHz, Pclk = 66MHz
Board: SMDK2416 Mobile SDRAM
DRAM: 64 MB
Flash: 1 MB
NAND: No NAND device found!!!
0 MB
Using default environment

In: serial
Out: serial
Err: serial
Net: Found CS8900@0x09000300
Hit any key to stop autoboot: 0
SMDK2416 # printenv nfsargs
nfsargs=setenv bootargs root=/dev/nfs ro nfsroot=${serverip}:${rootpath} console=ttySAC0,${baudrate}
SMDK2416 # printenv serverip
serverip=192.168.1.10
SMDK2416 # printenv ipaddr
ipaddr=192.168.1.20
SMDK2416 # ping 192.168.1.10
ping failed; host 192.168.1.10 is not alive
SMDK2416 # ping 192.168.1.10
host 192.168.1.10 is alive
SMDK2416 #
host 192.168.1.10 is alive
SMDK2416 # printenv ramargs
ramargs=setenv bootargs root=/dev/ram rw console=ttySAC0,115200 init=/bin/bash
SMDK2416 # ping 192.168.1.10
host 192.168.1.10 is alive
SMDK2416 # tftp 0x30008000 rootfs.cramfs
TFTP from server 192.168.1.10; our IP address is 192.168.1.20
Filename 'rootfs.cramfs'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
######
done
Bytes transferred = 6017024 (5bd000 hex)
SMDK2416 # tftp 0xc0108000 zImage
TFTP from server 192.168.1.10; our IP address is 192.168.1.20
Filename 'zImage'.
Load address: 0xc0108000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##########################
done
Bytes transferred = 2127856 (2077f0 hex)
SMDK2416 # setenv bootargs root=/dev/ram rw console=ttySAC0,115200 initrd=0x30008000, 0x2077f0 init=/bin/bash
SMDK2416 # bootm
Boot with zImage

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35-rc4 (rajam@rajam-desktop) (gcc version 4.2.2) #8 Tue Dec 28 19:55:35 IST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2416
Memory policy: ECC disabled, Data cache writeback
CPU S3C2416/S3C2450 (id 0x32450003)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
CPU: MPLL on 800.000 MHz, cpu 400.000 MHz, mem 133.333 MHz, pclk 66.666 MHz
CPU: EPLL on 96.000 MHz, usb-bus 48.000 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/ram rw console=ttySAC0,115200 initrd=0x30008000, 0x2077f0 init=/bin/bash
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60452k/60452k available, 5084k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc4800000 - 0xe0000000 ( 440 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0108000 - 0xc0131000 ( 164 kB)
.text : 0xc0131000 - 0xc050a000 (3940 kB)
.data : 0xc050a000 - 0xc0536820 ( 179 kB)
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:99
irq: clearing subpending status 06000193
irq: clearing subpending status 02000092
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2416: Initializing architecture
S3C2416: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 88
DMA channel 1 at c4808100, irq 89
DMA channel 2 at c4808200, irq 90
DMA channel 3 at c4808300, irq 91
DMA channel 4 at c4808400, irq 92
DMA channel 5 at c4808500, irq 93
s3c-adc s3c24xx-adc: attached adc driver
bio: create slab <bio-0> at 0
SCSI subsystem initialized
s3c-i2c s3c2410-i2c: slave address 0x10
s3c-i2c s3c2410-i2c: bus frequency set to 65 KHz
s3c-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.23.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY) ? 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
impA7robing 0x00800000 at 0x00000000
impA7robing 0x00800000 at 0x10000000
Generic platform RAM MTD, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2412-nand: Tacls=3, 22ns Twrph0=8 60ns, Twrph1=3 22ns
s3c24xx-nand s3c2412-nand: NAND soft ECC
No NAND device found.
dm9000 Ethernet Driver, V1.31
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
List of all partitions:
No filesystem could mount root, tried: ext3 ext2 cramfs vfat msdos iso9660 romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Backtrace:
[<c01351f0>] (dump_backtrace+0x0/0x10c) from [<c0135330>] (dump_stack+0x18/0x1c)
r6:c0129a5c r5:c3c9402a r4:c0537410
[<c0135318>] (dump_stack+0x0/0x1c) from [<c0155024>] (panic+0x60/0xec)
[<c0154fc4>] (panic+0x0/0xec) from [<c0109190>] (mount_block_root+0x1d4/0x21c)
r3:00000000 r2:00000020 r1:c3c19f60 r0:c04a5054
[<c0108fbc>] (mount_block_root+0x0/0x21c) from [<c010929c>] (mount_root+0xc4/0xfc)
[<c01091d8>] (mount_root+0x0/0xfc) from [<c0109440>] (prepare_namespace+0x16c/0x1cc)
r5:c0129a14 r4:c0536ad4
[<c01092d4>] (prepare_namespace+0x0/0x1cc) from [<c0108970>] (kernel_init+0x10c/0x14c)
r5:c012895c r4:c05368b8
[<c0108864>] (kernel_init+0x0/0x14c) from [<c0157f3c>] (do_exit+0x0/0x578)
r5:00000000 r4:00000000

Any help would greatly be appreciated.

Thanks and regards

Rajam
QMax Systems
 
Old 12-29-2010, 12:49 PM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hello,

Here is what I would try as bootargs:
Code:
setenv bootargs root=/dev/ram ro rootfstype=cramfs console=ttySAC0,115200 initrd=0x30008000, 0x2077f0 init=/bin/bash
But I'm not sure that it will work because it seems that your kernel tries to mount your rootfs as ext2, ext3, cramfs and many more.

Regards,

Oliv'
 
Old 12-30-2010, 04:11 AM   #3
aprajam
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
Hi,

Thanks a lot for the reply.

I tried the bootargs as per suggestion but that is also not working. Here is the log:

SMDK2416 # setenv bootargs root=/dev/ram ro rootfstype=cramfs console=ttySAC0,115200 initrd=0x30008000, 0x5bd000 init=/bin/bash
SMDK2416 # bootm
Boot with zImage

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35-rc4 (rajam@rajam-desktop) (gcc version 4.2.2) #9 Wed Dec 29 19:31:39 IST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2416
Memory policy: ECC disabled, Data cache writeback
CPU S3C2416/S3C2450 (id 0x32450003)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
CPU: MPLL on 800.000 MHz, cpu 400.000 MHz, mem 133.333 MHz, pclk 66.666 MHz
CPU: EPLL on 96.000 MHz, usb-bus 48.000 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/ram ro rootfstype=cramfs console=ttySAC0,115200 initrd=0x30008000, 0x5bd000 init=/bin/bash
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60604k/60604k available, 4932k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc4800000 - 0xe0000000 ( 440 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0108000 - 0xc0131000 ( 164 kB)
.text : 0xc0131000 - 0xc04e8000 (3804 kB)
.data : 0xc04e8000 - 0xc0510f00 ( 164 kB)
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:99
irq: clearing subpending status 06000193
irq: clearing subpending status 02000092
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2416: Initializing architecture
S3C2416: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 88
DMA channel 1 at c4808100, irq 89
DMA channel 2 at c4808200, irq 90
DMA channel 3 at c4808300, irq 91
DMA channel 4 at c4808400, irq 92
DMA channel 5 at c4808500, irq 93
s3c-adc s3c24xx-adc: attached adc driver
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2410-i2c: slave address 0x10
s3c-i2c s3c2410-i2c: bus frequency set to 65 KHz
s3c-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.23.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2412-nand: Tacls=3, 22ns Twrph0=8 60ns, Twrph1=3 22ns
s3c24xx-nand s3c2412-nand: NAND soft ECC
No NAND device found.
dm9000 Ethernet Driver, V1.31
usbmon: debugfs is not available
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
List of all partitions:
No filesystem could mount root, tried: cramfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Backtrace:
[<c01351f0>] (dump_backtrace+0x0/0x10c) from [<c0135330>] (dump_stack+0x18/0x1c)
r6:c0129a5c r5:c3c85007 r4:c0511af0
[<c0135318>] (dump_stack+0x0/0x1c) from [<c0155024>] (panic+0x60/0xec)
[<c0154fc4>] (panic+0x0/0xec) from [<c0109190>] (mount_block_root+0x1d4/0x21c)
r3:00000000 r2:00000020 r1:c3c19f60 r0:c0487c0c
[<c0108fbc>] (mount_block_root+0x0/0x21c) from [<c010929c>] (mount_root+0xc4/0xfc)
[<c01091d8>] (mount_root+0x0/0xfc) from [<c0109440>] (prepare_namespace+0x16c/0x1cc)
r5:c0129a14 r4:c05111b4
[<c01092d4>] (prepare_namespace+0x0/0x1cc) from [<c0108970>] (kernel_init+0x10c/0x14c)
r5:c0128cd8 r4:c0510f98
[<c0108864>] (kernel_init+0x0/0x14c) from [<c0157f3c>] (do_exit+0x0/0x578)
r5:00000000 r4:00000000
------------------------------------------------------------------------------------------------------------------------
As per the log, the list of partitions seem to be none. Will that be an issue?

Thanks and regards

Rajam
 
Old 01-19-2011, 09:38 AM   #4
aprajam
LQ Newbie
 
Registered: Dec 2010
Posts: 23

Original Poster
Rep: Reputation: 0
The issue is resolved by changing the bootargs to include ramdisk_size greater than 18MB which is the size of the ramfs being loaded.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMDK2450 board - Linux kernel root file system not getting mounted aprajam Linux - Embedded & Single-board computer 16 01-21-2011 02:05 AM
Problem mounting root cramfs on s3c2410 board swapnilborg Linux - Newbie 0 02-25-2008 04:59 AM
File system JFSS2 and cramfs reuben-decruz Linux - Newbie 1 08-09-2007 08:49 PM
Mounting root file system using NFS palanisaravanan Linux - General 5 01-03-2004 05:23 AM
Mounting nfs file system (but not as root) Sylhouette Linux - Networking 4 12-24-2001 03:38 AM


All times are GMT -5. The time now is 12:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration