[SOLVED] Creating initramfs as inbuilt to the kernel and as permanent rootfs
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Creating initramfs as inbuilt to the kernel and as permanent rootfs
Hi!
I request your suggestions on the following scenario.
In our eval board we have the 16MB NOR and 16MB SDRAM. in which redboot is used as bootloader and jffs2 rootfs is used.
boot script in eval board is : exec -b 0xC8040000 -l 0x200000 -c "console=ttymxc0 rootfstype=jffs2 ramdisk_size=9400 root=/dev/mtdblock3"
But in our newly fabricated board(with same size of SDRAM and NOR) we are facing problem with NOR access. Because of that we are not able to use the jffs2 rootfs. So For testing the kernel drivers we want to use initramfs as inbuild to the Kernel by giving the path to kernel config as (/home/ram/bsp/ltib/ltib-imx27ads-20061115_eraser/rootfs.tmp) Initramfs source file(s)
in kernel menuconfig.
But I dont have answer for
1. what should be the cmdline arguments that has to be passed if the inbuilt initramfs is supposed to be permanent rootfs?
2. I gave path of rootfs.tmp(which is uncompressed form of jffs2 image) as the source for the initramfs, Is there any modifications required in init script or any where else?
Our ultimate aim is booting the kernel without any non volatile memory.
Note : Board has no ethernet support in the kernel level(So NFS is ruled out).
Your responses will be greatly appreciated.
Last edited by ramalingampc2008; 11-11-2010 at 07:26 AM.
I request your suggestions on the following scenario.
In our eval board we have the 16MB NOR and 16MB SDRAM. in which redboot is used as bootloader and jffs2 rootfs is used.
boot script in eval board is : exec -b 0xC8040000 -l 0x200000 -c "console=ttymxc0 rootfstype=jffs2 ramdisk_size=9400 root=/dev/mtdblock3"
But in our newly fabricated board(with same size of SDRAM and NOR) we are facing problem with NOR access. Because of that we are not able to use the jffs2 rootfs. So For testing the kernel drivers we want to use initramfs as inbuild to the Kernel by giving the path to kernel config as (/home/ram/bsp/ltib/ltib-imx27ads-20061115_eraser/rootfs.tmp) Initramfs source file(s)
in kernel menuconfig.
But I dont have answer for
1. what should be the cmdline arguments that has to be passed if the inbuilt initramfs is supposed to be permanent rootfs?
Code:
root=/dev/ram0 rw
Quote:
2. I gave path of rootfs.tmp(which is uncompressed form of jffs2 image) as the source for the initramfs, Is there any modifications required in init script or any where else?
May be you should compress 'rootfs.tmp' with gzip.
Quote:
Our ultimate aim is booting the kernel without any non volatile memory.
Note : Board has no ethernet support in the kernel level(So NFS is ruled out).
I am not successful with the creation of initramfs as inbuild. so I created the ramdisk and facing some prob. Please have a look at the next post and throw some light on that..
thank you!
Last edited by ramalingampc2008; 11-17-2010 at 02:01 AM.
Redboot> exec -b 0xC0400000 -l 0x200000 -c "console=ttymxc0 root=/dev/ram0 initrd=0xC0600000 ramdisk_size=2417"
entry=0xc0008000, target=0xc0008000
Uncompressing Linux.................................................................... done, booting the kernel.
Linux version 2.6.18.1 (ram@emmys0082.emsys.net) (gcc version 4.1.1) #19 PREEMPT Tue Nov 16 10:36:27 IST 2010
CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
Machine: Freescale i.MX21ADS
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 4096
Kernel command line: console=ttymxc0 root=/dev/ram0 initrd=0xC0600000 ramdisk_size=2417
MXC IRQ initialized
PID hash table entries: 128 (order: 7, 512 bytes)
WARNING: Can't generate CLOCK_TICK_RATE at 7388890 Hz
Actual CLOCK_TICK_RATE is 7388890 Hz
Console: colour dummy device 80x30
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 14076KB available (1704K code, 333K data, 84K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MXC GPIO hardware
AIPI VA base: 0xe4000000
mx21ads.c: registering mxc keypad device...
CSPI: mxc_spi-1 probed
mxc_spi mxc_spi.1: registering loopback device 'spi'
CSPI: mxc_spi-2 probed
mxc_spi mxc_spi.2: registering loopback device 'spi'
usbcore: registered new driver usbfs
usbcore: registered new driver hub
MXC I2C driver
MX21: Power management module initialized
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
In _enable_graphic_window
mxc_sdc_fb mxc_sdc_fb.0: fb0: DISP0 BG fb device registered successfully.
Writing to ext RTC successful 2
Real TIme clock Driver v1.0
MixCOM watchdog driver v0.1, watchdog port at 0x 0
Serial: MXC Internal UART driver
mxcintuart.0: ttymxc0 at MMIO 0x1000a000 (irq = 20) is a Freescale MXC
mxcintuart.1: ttymxc1 at MMIO 0x1000b000 (irq = 19) is a Freescale MXC
mxcintuart.2: ttymxc2 at MMIO 0x1000c000 (irq = 18) is a Freescale MXC
RAMDISK driver initialized: 16 RAM disks of 2417K size 1024 blocksize
loop: loaded (max 8 devices)
MXC MTD nor Driver 2.0
mxc_nor_flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
mxc_nor_flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Creating 8 MTD partitions on "mxc_nor_flash.0":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x001c0000 : "nor.Kernel1"
0x001c0000-0x00340000 : "nor.kernel2"
0x00340000-0x00940000 : "nor.rootfs1"
0x00940000-0x00f40000 : "nor.rootfs2"
0x00f40000-0x00f80000 : "Parameter"
0x00fe0000-0x00fe3000 : "FIS directory"
0x00fff000-0x01000000 : "Redboot config"
Registering the SPI Driver
Device spi1.4 probed
Device spi2.4 probed
usbmon: debugfs is not available
MX2 OTG Driver ver. 1.0 built on 10:35:50 Nov 16 2010
imx21hcd: driver imx21-hcd, 2007 May 27
imx21-hcd imx21-hcd.0: USB Host Controller
imx21-hcd imx21-hcd.0: new USB bus registered, assigned bus number 1
imx21-hcd imx21-hcd.0: irq 55, io mem 0x10024000
usb usb1: Product: USB Host Controller
usb usb1: Manufacturer: Linux 2.6.18.1 imx21-hcd
usb usb1: SerialNumber: imx21-hcd.0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
roothubb 00070000
hub 1-0:1.0: 3 ports detected
FeatPwr0
usbcore: registered new driver usbmb
drivers/usb/class/magicbox.c: v0.13: USB TNT12000 Vendor Specific Device Class driver
udc: mx21_udc version 18 April 2007
TNT12000 Gadget: mb_req_free ep0=c033c460 buf=c0391be0
TNT12000 Gadget: TNT12000 Gadget, version: 0.1.2 05/21/2007
TNT12000 Gadget: using mx21_udc, OUT ep2out-bulk IN ep1in-bulk
MXC keypad loaded
input: mxckpd as /class/input/input0
i2c /dev entries driver
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ramdisk_execute_command <NULL>
TNT12000 Gadget: suspend
No filesystem could mount root, tried: ext3 ext2 romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
1. Is there any problem with the bootargument? And also Is there any guide to guide what I should pass as bootargs for ramdisk usage?
2. For ramdisk implementation, only bootargs are enough or any kernel configurations are required?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.