initrd rootfs ramdisk
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=yCONFIG_RWSEM_XCHGADD_ALGORITHM=yCONFIG_HAVE_DEC_LOCK=yCONFIG_PPC=yCONFIG_PPC32=yCONFIG_GENERIC_NVRAM=y
#
# Code maturity level options
#CONFIG_EXPERIMENTAL=yCONFIG_CLEAN_COMPILE=y
# CONFIG_STANDALONE is not setCONFIG_BROKEN_ON_SMP=y
#
# General setup
#CONFIG_SWAP=yCONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not setCONFIG_SYSCTL=y
# CONFIG_AUDIT is not setCONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set
# CONFIG_IKCONFIG is not setCONFIG_EMBEDDED=yCONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not setCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_AS=yCONFIG_IOSCHED_DEADLINE=yCONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
#
# Loadable module support
#CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not setCONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not setCONFIG_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 setCONFIG_BOOKE=yCONFIG_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 setCONFIG_HIMA=yCONFIG_440GX=yCONFIG_440A=yCONFIG_IBM_OCP=yCONFIG_IBM_EMAC4=y
# CONFIG_PM is not setCONFIG_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 setCONFIG_KERNEL_ELF=yCONFIG_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=yCONFIG_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 setCONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_CARMEL is not setCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_SIZE=4096CONFIG_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=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_NR_UARTS=4CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not setCONFIG_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=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_LEGACY_PTYS=yCONFIG_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 setCONFIG_EXT3_FS=yCONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not setCONFIG_JBD=y
# CONFIG_JBD_DEBUG is not setCONFIG_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=yCONFIG_PROC_KCORE=yCONFIG_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 setCONFIG_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 setCONFIG_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 setCONFIG_BDI_SWITCH=yCONFIG_DEBUG_INFO=y
# CONFIG_SERIAL_TEXT_DEBUG is not setCONFIG_PPC_OCP=y
#
# Security options
#
# CONFIG_SECURITY is not set
#
# Cryptographic options
#
# CONFIG_CRYPTO is not set
Quoted 6 lines · 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).
Quoted 2 lines
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.
Quoted 1 line
Should the option
CONFIG_BOOT_LOADpoint on the address of the ramdisk? I
No.
Quoted 1 line
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
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] I perceive a possibility of an immediate chronological sequence of events which includes a violence. - Terry Pratchett, _The Dark Side of the Sun_
Quoted 10 lines
Quoted 6 lines
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).
Quoted 1 line
configuration) and the command line parameter root=/dev/ram rw. But the
boot
Quoted 3 lines
Quoted 1 line
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.
Quoted 3 lines
Quoted 1 line
Should the option
CONFIG_BOOT_LOADpoint on the address of the ramdisk? INo.
ok
Quoted 4 lines
Quoted 1 line
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=yCONFIG_EXT3_FS=yCONFIG_EXT3_FS_XATTR=yCONFIG_JBD=yCONFIG_FS_MBCACHE=y
also declared:
#
# Block devices
#CONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_SIZE=4096CONFIG_BLK_DEV_INITRD=y
and:
#
# Pseudo filesystems
#CONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_SYSFS=yCONFIG_RAMFS=y
Quoted 5 lines · In message <000801c58153$54af2400$f201a8c0@SN7606> you wrote:
Quoted 2 lines
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?
Quoted 2 lines
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.
Quoted 6 lines
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 optionKernel panic - not syncing: VFS: Unable to mount root fs onunknown-block(3,1)
Block device 3, 1 is /dev/hda1 - is your ramdisk known to be working?
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] "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
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
But the kernel prints the boot parameters just fine.
Maybe because i defined it in kernel configuration! But from u-boot i
don´t
Quoted 4 lines
Quoted 1 line
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".
Quoted 5 lines
Quoted 2 lines
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.
Quoted 8 lines
Quoted 6 lines
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 optionKernel panic - not syncing: VFS: Unable to mount root fs onunknown-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
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