initrd rootfs ramdisk
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · On Wed, 6 Jul 2005 [email protected] wrote:
i solved my problem with u-boot and linux. Now i have my rootfs ramdisk mounted and functioning. But one output is weird.
Can I ask what what you had to change to get your initrd RAM disk working? I'm having a very similar problem.
Thanks, Tom Ziomek
Signature · 4 lines
/"\ ASCII Ribbon Campaign | Email to user 'CTZ001' \ / | at 'email.mot.com' X Against HTML | / \ in e-mail & news |
Quoted 5 lines
Quoted 2 lines
i solved my problem with u-boot and linux. Now i have my rootfs ramdisk mounted and functioning. But one output is weird.
Can I ask what what you had to change to get your initrd RAM disk working? I'm having a very similar problem.
Sure! :)
1. I used the ramdisk provided by ELDK from www.denx.de. A good description is here
http://www.denx.de/twiki/bin/view/DULG/RootFileSystemDesignAndBuilding
2. Write ramdisk into flash at any address.
3. Configuring u-boot for command line parameters in /u-boot/include/configs/<board.h>. These definitions i have made. BOOTARGS are the command line parameters which u-boot passes to linux. BOOTCOMMAND is not really necessary, but you only type bootd and not "bootm <linux_flash_address> <ramdisk_flash_address>". So you don?t spend much time for typing. ;) BOOTDELAY is disabled, because i actually don?t want an autoboot of the linux kernel.
#define CONFIG_BOOTARGS "console=ttyS1,115200 root=/dev/ram rw"
#define CONFIG_BOOTCOMMAND "bootm ff000000 ff800000" /* autoboot command
*/
#define CONFIG_BOOTDELAY -1 /* disable autoboot?? */
4. Now configuring linux kernel for ramdisk support. Following options are needed.
CONFIG_CMDLINE_BOOL=yCONFIG_CMDLINE=""
Enables command line parameters in linux kernel.
I also set following options to enable ramdisk support. Maybe there are some more options which don?t concerns to ramdisk 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_COW_COMMON is not setCONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not setCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_COUNT=16CONFIG_BLK_DEV_RAM_SIZE=4096CONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set
# CONFIG_CDROM_PKTCDVD 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
#
# 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
That?s all i think.
Best regards,
David
Quoted 8 lines · David Grab
Quoted 6 lines
Quoted 3 lines
i solved my problem with u-boot and linux. Now i have my rootfs ramdisk mounted and functioning. But one output is weird.
Can I ask what what you had to change to get your initrd RAM disk working? I'm having a very similar problem.
Sure! :)
Sigh...found it, after weeks of on-and-off work... Our board has 64 MB of RAM but I'm passing "mem=32M" to the kernel because we want our app to man- age the high 32 MB.
U-Boot defaults to copying an initrd into the highest available RAM. That put it in an area outside of Linux's knowledge, D'OH. All I had to do was set U-Boot's 'initrd_high' env var and things work.
Thanks for the info anyway; I've saved it.
Tom
Signature · 4 lines
/"\ ASCII Ribbon Campaign | Email to user 'CTZ001' \ / | at 'email.mot.com' X Against HTML | / \ in e-mail & news |
Quoted 8 lines · In message <[email protected]> you wrote:
Sigh...found it, after weeks of on-and-off work... Our board has 64 MB of RAM but I'm passing "mem=32M" to the kernel because we want our app to man- age the high 32 MB.
U-Boot defaults to copying an initrd into the highest available RAM. That put it in an area outside of Linux's knowledge, D'OH. All I had to do was set U-Boot's '
initrd_high' env var and things work.
Note: if you want the content of this reserved area to survice warmboots you can enable the "protected RAM" feature in U-Boot (CONFIG_PRAM), and it will not touch this area at all. Useful for
things like pramfs for example :-)
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Never worry about theory as long as the machinery does what it's supposed to do. - R. A. Heinlein