linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* initrd rootfs ramdisk
@ 2005-07-05  6:36 David Grab
  2005-07-05  8:18 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: David Grab @ 2005-07-05  6:36 UTC (permalink / raw)
  To: linuxppc-embedded

Good morning,

i solved my problem last problem and now i get console output. :) So next
step is to setup the root file system. I want to use an image loaded into
ramdisk, but seems i´m missing something. I´m using u-boot to load the
ramdisk and linux kernel. Actually i don´t know how the kernel gets the
location of the loaded ramdisk. I only added the support (see Kernel
configuration) and the command line parameter root=/dev/ram rw. But the boot
command arguments from u-boot seems not recognized from the linux kernel.
Should the option CONFIG_BOOT_LOAD point on the address of the ramdisk? I
hope someone could help me to trigger out my problem.

Thanks and Best regards,

David



Console output:

## Booting image at ff000000 ...
   Image Name:   Linux-2.6.11.6
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    657688 Bytes = 642.3 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Current stack ends at 0x1FF9DB40 => set upper limit to 0x00800000
## cmdline at 0x007FFF00 ... 0x007FFF10
bd address  = 0x1FF9DF54
memstart    = 0x00000000
memsize     = 0x20000000
flashstart  = 0xFF000000
flashsize   = 0x01000000
flashoffset = 0x00000000
sramstart   = 0x00000000
sramsize    = 0x00000000
bootflags   = 0x0A080007
intfreq     =    500 MHz
busfreq     = 166.666 MHz
ethaddr     = 00:04:AC:E3:28:8A
eth1addr    = 00:04:AC:E3:28:8B
eth2addr    = 00:04:AC:E3:28:8C
eth3addr    = 00:04:AC:E3:28:8D
IP addr     = 192.168.0.116
baudrate    = 115200 bps
## Loading RAMDisk Image at ff800000 ...
   Image Name:   Test Ramdisk
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    1629365 Bytes =  1.6 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## initrd at 0xFF800040 ... 0xFF98DCF4 (len=1629365=0x18DCB5)
   Loading Ramdisk to 1fe0f000, end 1ff9ccb5 ... OK
## Transferring control to Linux (at address 00000000) ...
Linux version 2.6.11.6 (david@FedoraDG) (gcc-Version 3.3.3 (DENX ELDK 3.1
3.3.3-8)) #1 Mon Jul 4 07:34:21 CEST 2005
IBM
Built 1 zonelists
Kernel command line: root=/dev/ram rw ip=on console=ttyS1,115200
PID hash table entries: 4096 (order: 12, 65536 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 517760k available (996k kernel code, 352k data, 96k init, 0k
highmem)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Linux NoNET1.0 for Linux 2.6
PCI: Probing PCI hardware
SCSI subsystem initialized
Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing enabled
ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(1,0)
 <0>Rebooting in 180 seconds..


Kernel configuration:

#
# Automatically generated make config: don't edit
#
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_HAVE_DEC_LOCK=y
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_GENERIC_NVRAM=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
# CONFIG_STANDALONE is not set
CONFIG_BROKEN_ON_SMP=y

#
# General setup
#
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set
# CONFIG_IKCONFIG is not set
CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y

#
# Processor
#
# CONFIG_6xx is not set
# CONFIG_40x is not set
CONFIG_44x=y
# CONFIG_POWER3 is not set
# CONFIG_POWER4 is not set
# CONFIG_8xx is not set
# CONFIG_E500 is not set
CONFIG_BOOKE=y
CONFIG_PTE_64BIT=y
# CONFIG_MATH_EMULATION is not set
# CONFIG_CPU_FREQ is not set
CONFIG_4xx=y

#
# IBM 4xx options
#
# CONFIG_EBONY is not set
# CONFIG_OCOTEA is not set
CONFIG_HIMA=y
CONFIG_440GX=y
CONFIG_440A=y
CONFIG_IBM_OCP=y
CONFIG_IBM_EMAC4=y
# CONFIG_PM is not set
CONFIG_NOT_COHERENT_CACHE=y

#
# Platform options
#
# CONFIG_PC_KEYBOARD is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_HIGHMEM is not set
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="root=/dev/ram rw ip=on console=ttyS1,115200"

#
# Bus options
#
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_NAMES is not set

#
# Advanced setup
#
# CONFIG_ADVANCED_OPTIONS is not set

#
# Default settings for advanced configuration options are used
#
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_CONSISTENT_START=0xff100000
CONFIG_CONSISTENT_SIZE=0x00200000
CONFIG_BOOT_LOAD=0x01000000

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_DEBUG_DRIVER is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play support
#

#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_CARMEL is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
# CONFIG_LBD is not set


#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y

#
# SCSI device support
#
CONFIG_SCSI=y

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#

#
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Macintosh device drivers
#

#
# Networking support
#
# CONFIG_NET=y

#
# Networking options
#
# CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
# CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
# CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
# CONFIG_IP_PNP_BOOTP=y
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set

#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
#

# IP: Netfilter Configuration
#
# CONFIG_IP_NF_CONNTRACK is not set
# CONFIG_IP_NF_QUEUE is not set
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
# CONFIG_NET_CLS_ROUTE is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set

#
# ARCnet devices
#
# CONFIG_ARCNET is not set

#
# Ethernet (10 or 100Mbit)
#
# CONFIG_NET_ETHERNET=y
# CONFIG_MII=y
# CONFIG_OAKNET is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set


#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_EMAC=y
# CONFIG_IBM_EMAC_ERRMSG is not set
# CONFIG_IBM_EMAC_RXB=128
# CONFIG_IBM_EMAC_TXB=128
# CONFIG_IBM_EMAC_FGAP=8
# CONFIG_IBM_EMAC_SKBRES=0
# CONFIG_NET_PCI is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set

#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set

#
# Token Ring devices
#
# CONFIG_TR is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set

#
# ISDN subsystem
#
# CONFIG_ISDN is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# Input device support
#
# CONFIG_INPUT is not set

#
# Userland interfaces
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
# CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
# CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
# CONFIG_SOUND_GAMEPORT is not set
# CONFIG_SERIO is not set
# CONFIG_SERIO_I8042 is not set
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set

#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Character devices
#
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not set
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_RSA is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_QIC02_TAPE is not set

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set

#
# I2C support
#
# CONFIG_I2C is not set

#
# Misc devices
#

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set

#
# Graphics support
#
# CONFIG_FB is not set

#
# Sound
#
# CONFIG_SOUND is not set

#
# USB support
#
# CONFIG_USB is not set

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set

#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
# CONFIG_FAT_FS is not set
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set
# CONFIG_TMPFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
# CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
# CONFIG_NFSD is not set
# CONFIG_ROOT_NFS=y
# CONFIG_LOCKD=y
# CONFIG_EXPORTFS is not set
# CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y


#
# Native Language Support
#
# CONFIG_NLS is not set

#
# Library routines
#
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set

#
# Profiling support
#
# CONFIG_PROFILING is not set

#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SLAB is not set
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
CONFIG_BDI_SWITCH=y
CONFIG_DEBUG_INFO=y
# CONFIG_SERIAL_TEXT_DEBUG is not set
CONFIG_PPC_OCP=y

#
# Security options
#
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: initrd rootfs ramdisk
  2005-07-05  6:36 initrd rootfs ramdisk David Grab
@ 2005-07-05  8:18 ` Wolfgang Denk
  2005-07-05 11:18   ` AW: " David Grab
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2005-07-05  8:18 UTC (permalink / raw)
  To: David Grab; +Cc: linuxppc-embedded

In message <000001c5812b$eb088c70$f201a8c0@SN7606> you wrote:
> 
> i solved my problem last problem and now i get console output. :) So next
> step is to setup the root file system. I want to use an image loaded into
> ramdisk, but seems i´m missing something. I´m using u-boot to load the
> ramdisk and linux kernel. Actually i don´t know how the kernel gets the
> location of the loaded ramdisk. I only added the support (see Kernel

It gets passed in registers r4 (start address) and r5 (end address).

> configuration) and the command line parameter root=/dev/ram rw. But the boot
> command arguments from u-boot seems not recognized from the linux kernel.

But the kernel prints the boot parameters just fine.

> Should the option CONFIG_BOOT_LOAD point on the address of the ramdisk? I

No.

> hope someone could help me to trigger out my problem.

Are you sure that you have ext2 filesystem support  enabled  in  your
kernel configuration?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
I perceive a possibility of an immediate  chronological  sequence  of
events which includes a violence.
                        - Terry Pratchett, _The Dark Side of the Sun_

^ permalink raw reply	[flat|nested] 6+ messages in thread

* AW: initrd rootfs ramdisk
  2005-07-05  8:18 ` Wolfgang Denk
@ 2005-07-05 11:18   ` David Grab
  2005-07-05 16:01     ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: David Grab @ 2005-07-05 11:18 UTC (permalink / raw)
  To: wd; +Cc: linuxppc-embedded


>> i solved my problem last problem and now i get console output. :) So next
>> step is to setup the root file system. I want to use an image loaded into
>> ramdisk, but seems i´m missing something. I´m using u-boot to load the
>> ramdisk and linux kernel. Actually i don´t know how the kernel gets the
>> location of the loaded ramdisk. I only added the support (see Kernel

>It gets passed in registers r4 (start address) and r5 (end address).

>> configuration) and the command line parameter root=/dev/ram rw. But the
boot
>> command arguments from u-boot seems not recognized from the linux kernel.

>But the kernel prints the boot parameters just fine.

Maybe because i defined it in kernel configuration! But from u-boot i don´t
get any arguments.

CONFIG_CMDLINE="initrd=0x1fe0f000 root=/dev/ram rw ip=on
console=ttyS1,115200"

I thougt i can give the linux kernel position from u-boot where initrd is
located, but i have the same problem.

u-boot starts well, and the declarations for boot arguments are defined:

#define CONFIG_BOOTARGS		"root=/dev/ram rw"
#define CONFIG_BOOTCOMMAND	"bootm ff000000 ff800000"    /* autoboot command
*/

But the linux kernel seems not get them. With CONFIG_CMDLINE="ip=on
console=ttyS1,115200" in the kernel settings to see if the kernel gets the
command line parameters from u-boot as mentioned above, i got this error:

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
VFS: Cannot open root device "<NULL>" or unknown-block(3,1)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(3,1)

I also read the FAQ
http://www.denx.de/twiki/bin/view/DULG/LinuxHangsAfterUncompressingKernel,
but there are even no CFG_IMMR declaration for any ppc440 board. And i also
don´t know what address to define there to hit my board, so i left them out.
The bd_info strucure in linux-2.6.11.6\include\asm-ppc\ppcboot.h and
u-boot-1.1.2\include\asm-ppc\u-boot.h is the same.

>> Should the option CONFIG_BOOT_LOAD point on the address of the ramdisk? I

>No.

ok

>> hope someone could help me to trigger out my problem.

>Are you sure that you have ext2 filesystem support  enabled  in  your
>kernel configuration?

Yes it´s selected as mentioned in kernel configuration parameters in my
first mail.

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_JBD=y
CONFIG_FS_MBCACHE=y

also declared:

#
# Block devices
#
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y

and:

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
CONFIG_RAMFS=y

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AW: initrd rootfs ramdisk
  2005-07-05 11:18   ` AW: " David Grab
@ 2005-07-05 16:01     ` Wolfgang Denk
  2005-07-06  9:07       ` AW: " David Grab
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2005-07-05 16:01 UTC (permalink / raw)
  To: David Grab; +Cc: linuxppc-embedded

In message <000801c58153$54af2400$f201a8c0@SN7606> you wrote:
> 
> >But the kernel prints the boot parameters just fine.
> 
> Maybe because i defined it in kernel configuration! But from u-boot i don´t
> get any arguments.

Then you must be using a wrong image type. Are you sure you use "make
uImage" to build your kernel image for U-Boot?

> I thougt i can give the linux kernel position from u-boot where initrd is
> located, but i have the same problem.

You don;t. U-Boot passes this information automatically.

> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
> loop: loaded (max 8 devices)
> VFS: Cannot open root device "<NULL>" or unknown-block(3,1)
> Please append a correct "root=" boot option
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(3,1)

Block device 3, 1 is /dev/hda1 - is your ramdisk known to be working?


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"The majority of the stupid is  invincible  and  guaranteed  for  all
time.  The  terror  of their tyranny, however, is alleviated by their
lack of consistency."                               - Albert Einstein

^ permalink raw reply	[flat|nested] 6+ messages in thread

* AW: AW: initrd rootfs ramdisk
  2005-07-05 16:01     ` Wolfgang Denk
@ 2005-07-06  9:07       ` David Grab
  2005-07-06 10:30         ` David Grab
  0 siblings, 1 reply; 6+ messages in thread
From: David Grab @ 2005-07-06  9:07 UTC (permalink / raw)
  To: wd; +Cc: linuxppc-embedded

>> >But the kernel prints the boot parameters just fine.
>>
>> Maybe because i defined it in kernel configuration! But from u-boot i
don´t
>> get any arguments.

>Then you must be using a wrong image type. Are you sure you use "make
>uImage" to build your kernel image for U-Boot?

No, i´m using kernel 2.6.11.6 from kernel.org. It´s compiled with the actual
ELDK and made with "make uImage".

>> I thougt i can give the linux kernel position from u-boot where initrd is
>> located, but i have the same problem.

>You don;t. U-Boot passes this information automatically.

>> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
>> loop: loaded (max 8 devices)
>> VFS: Cannot open root device "<NULL>" or unknown-block(3,1)
>> Please append a correct "root=" boot option
>> Kernel panic - not syncing: VFS: Unable to mount root fs on
>> unknown-block(3,1)

>Block device 3, 1 is /dev/hda1 - is your ramdisk known to be working?

Ramdisk is from ELDK build with mkimage like mentioned in FAQ.


I debugged to see what happens. First of all machine init in
\arch\ppc\kernel\setup.c is called. In this function a call to platform_init
is made. But the platform init of my own board files are called not the
implementation of setup.c which is only available if
CONFIG_PPC_MULTIPLATFORM is set. In my own platform_init is only a call to
find_bootinfo which is resulting in NULL because rec->tag is 0. That´s the
reason why parse_bootinfo don´t set the CMD_LINE, etc..

struct bi_record *find_bootinfo(void)
{
	struct bi_record *rec;

	rec = (struct bi_record *)_ALIGN((ulong)__bss_start+(1<<20)-1,(1<<20));
	if ( rec->tag != BI_FIRST ) {
		/*
		 * This 0x10000 offset is a terrible hack but it will go away when
		 * we have the bootloader handle all the relocation and
		 * prom calls -- Cort
		 */
		rec = (struct bi_record
*)_ALIGN((ulong)__bss_start+0x10000+(1<<20)-1,(1<<20));
		if ( rec->tag != BI_FIRST )
			return NULL;
	}
	return rec;
}

In this line rec is set to 0xc0300000
rec = (struct bi_record *)_ALIGN((ulong)__bss_start+(1<<20)-1,(1<<20));

if definitions are in both lines true because rec->tag is 0

in this line rec address is also 0xc0300000
rec = (struct bi_record
*)_ALIGN((ulong)__bss_start+0x10000+(1<<20)-1,(1<<20));


The following line in my own board.c platform_init gets the board
information. So u-boot pass the informations quite well.

	if (r3)
		__res = *(bd_t *)(r3 + KERNELBASE);

So what is wrong with my find_bootinfo function? Why is rec->tag zero?

Thx for advice,

David

^ permalink raw reply	[flat|nested] 6+ messages in thread

* AW: AW: initrd rootfs ramdisk
  2005-07-06  9:07       ` AW: " David Grab
@ 2005-07-06 10:30         ` David Grab
  0 siblings, 0 replies; 6+ messages in thread
From: David Grab @ 2005-07-06 10:30 UTC (permalink / raw)
  To: linuxppc-embedded

i solved my problem with u-boot and linux. Now i have my rootfs ramdisk
mounted and functioning. But one output is weird.

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 1024) 4194304
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 96k init
ifconfig: socket: Function not implemented
### Application running ...
BusyBox v0.60.5 (2004.11.10-15:02+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
# ls
bin   dev   etc   ftp   home  lib   proc  sbin  tmp   usr   var
#

why incomplete write? RAMDISK: incomplete write (-28 != 1024) 4194304

Thx for help,

David

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-06 10:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-05  6:36 initrd rootfs ramdisk David Grab
2005-07-05  8:18 ` Wolfgang Denk
2005-07-05 11:18   ` AW: " David Grab
2005-07-05 16:01     ` Wolfgang Denk
2005-07-06  9:07       ` AW: " David Grab
2005-07-06 10:30         ` David Grab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).