This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ramdisk to be used?

I am trying to boot the linux kernel through usbboot. What is the ramdisk.img exactly to be used? Am getting

[    2.217437] Unhandled fault: imprecise external abort (0x406) at 0x00000000
[    2.225708] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000007

after freeing init memory. Ramdisk got mounted successfully.



  • Hi Gowthami,

    Ramdisk is virtual volatile memory which you use in your os,

    More information how to create one suck disk for your device can be found here:

    http://processors.wiki.ti.com/index.php/Creating_a_RAMDISK

    Regards,

    Boyko

  • Hi Boyko,

    Ramdisk is getting mounted successfully. When the kernel tries to start the init process, it throws abort in kernel_init. I am using my own ramdisk image. Am I missing something? Is there any default ramdisk image available to verify?

    Thanks,

    Gowthami

  • What kind of setup are you having there?

    This is the ramdisk I use:

    2055.ramdisk.zip

    Creating Boot Image command:

    ./mkbootimg --kernel  kernel --ramdisk initrd.img --cmdline "no_console_suspend=1 console=ttyO2,115200n8 androidboot.console=ttyO2 omap_wdt.timer_margin=30 vmalloc=496M omapfb.fb_opt=-1,-1,-1,1,1280,720 console=ttyO2,115200n8 mem=1024M androidboot.console=ttyO2 vram=20M omapfb.vram=0:16M earlyprintk  loglevel=7" --base 0x80000000 --output  boot.img

    Regards,

    Boyko

  • The kernel is picking the default command line which is "root=/dev/mmcblk0p2 rootwait console=ttyO2,115200". I changed the root option to pick initrd. If I empty out the command line  (CONFIG_CMDLINE) in ./.config, kernel is not booting up and no log comes in the screen.

    Thanks,

    Gowthami

  • [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 3.8.13-00017-g3b75548-dirty (root@gokul-laptop) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.33
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine: Generic OMAP5 (Flattened Device Tree), model: TI OMAP5 uEVM board
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] OMAP5432 ES2.0
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16000
    [    0.000000] Kernel command line: root=/dev/ram initrd=0x81000000,8M ramdisk_size=8192 rootwait console=ttyO2,11520
    [    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
    [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] __ex_table already sorted, skipping sort
    [    0.000000] Memory: 62MB 1MB = 63MB total
    [    0.000000] Memory: 41336k/41336k available, 24200k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0789c08   (7688 kB)
    [    0.000000]       .init : 0xc078a000 - 0xc07de958   ( 339 kB)
    [    0.000000]       .data : 0xc07e0000 - 0xc08a58d8   ( 791 kB)
    [    0.000000]        .bss : 0xc08a58d8 - 0xc0dfdde0   (5474 kB)
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [    0.000000] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000000] Architected local timer running at 6.14MHz (virt).
    [    0.000000] XXX: arch timer setup
    [    0.000000] read_scr = c07bcd34
    [    0.000000] Switching to timer-based delay loop
    [    0.000000] Console: colour dummy device 80x30
    [    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
    [    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
    [    0.000000] ... MAX_LOCK_DEPTH:          48
    [    0.000000] ... MAX_LOCKDEP_KEYS:        8191
    [    0.000000] ... CLASSHASH_SIZE:          4096
    [    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
    [    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
    [    0.000000] ... CHAINHASH_SIZE:          16384
    [    0.000000]  memory used by lock dependency info: 3695 kB
    [    0.000000]  per task-struct memory footprint: 1152 bytes
    [    0.000701] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.30 BogoMIPS (lpj=48000)
    [    0.000701] pid_max: default: 32768 minimum: 301
    [    0.000885] Security Framework initialized
    [    0.000946] Mount-cache hash table entries: 512
    [    0.011383] CPU: Testing write buffer coherency: ok
    [    0.012115] Setting up static identity map for 0x8053bd58 - 0x8053bdc8
    [    0.014526] devtmpfs: initialized
    [    0.085632] omap_hwmod: dss_dispc: cannot be enabled for reset (3)
    [    0.087646] omap_hwmod: dss_dsi1_a: cannot be enabled for reset (3)
    [    0.089630] omap_hwmod: dss_dsi1_b: cannot be enabled for reset (3)
    [    0.091613] omap_hwmod: dss_dsi1_c: cannot be enabled for reset (3)
    [    0.093566] omap_hwmod: dss_hdmi: cannot be enabled for reset (3)
    [    0.095581] omap_hwmod: dss_rfbi: cannot be enabled for reset (3)
    [    0.190979] omap_i2c_reset: i2c3: softreset failed (waited 10000 usec)
    [    0.238342] pinctrl core: initialized pinctrl subsystem
    [    0.241638] regulator-dummy: no parameters
    [    0.242797] NET: Registered protocol family 16
    [    0.243103] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.243743] omap-gpmc omap-gpmc: GPMC revision 6.0
    [    0.243835] omap-gpmc omap-gpmc: failed to reserve memory
    [    0.243865] omap-gpmc: probe of omap-gpmc failed with error -16
    [    0.384826] omap_create_clk_alias: couldn't find device phandle for 'auxclk1_ck'
    [    0.385375] No ATAGs?
    [    0.385375] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.385406] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.389007] OMAP DMA hardware revision 0.0
    [    0.392669] pinctrl-single 4a002840.pinmux: 219 pins at pa fc002840 size 438
    [    0.393280] pinctrl-single 4ae0c840.pinmux: 28 pins at pa fce0c840 size 56
    [    0.437805] bio: create slab <bio-0> at 0
    [    0.440338] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
    [    0.440368] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
    [    0.489471] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver
    [    0.490661] vmmcsd_fixed: 3000 mV
    [    0.497589] SCSI subsystem initialized
    [    0.499969] usbcore: registered new interface driver usbfs
    [    0.500274] usbcore: registered new interface driver hub
    [    0.500701] usbcore: registered new device driver usb
    [    0.502777] omap_i2c 48070000.i2c: did not get pins for i2c error: -19
    [    0.503814] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.508666] palmas 0-0048: Muxing GPIO 2, PWM 0, LED 0
    [    0.509246] palmas 0-0048: Product ID c035
    [    0.509552] palmas 0-0048: Product Design Rev 3
    [    0.509796] palmas 0-0048: Product SW Rev a1
    [    0.512786] smps123: 600 <--> 1500 mV at 1060 mV
    [    0.514739] smps45: 600 <--> 1310 mV at 880 mV
    [    0.517150] smps6: 1200 mV
    [    0.519561] smps7: 1800 mV
    [    0.521453] smps8: 600 <--> 1310 mV at 1040 mV
    [    0.524047] smps9: 2100 mV
    [    0.526062] smps10: 5000 mV
    [    0.527923] ldo1: 1500 mV
    [    0.530151] ldo2: 2900 mV
    [    0.532226] ldo3: 3000 mV
    [    0.534484] ldo4: 2200 mV
    [    0.536437] ldo5: 1800 mV
    [    0.538543] ldo6: 1500 mV
    [    0.540832] ldo7: 1500 mV
    [    0.542907] ldo8: 1500 mV
    [    0.544525] ldo9: 1800 <--> 3300 mV at 900 mV
    [    0.546478] ldoln: 1800 mV
    [    0.548461] ldousb: 3250 mV
    [    0.559387] Switching to clocksource arch_sys_counter
    [    0.638275] NET: Registered protocol family 2
    [    0.639343] TCP established hash table entries: 512 (order: 0, 4096 bytes)
    [    0.639495] TCP bind hash table entries: 512 (order: 2, 18432 bytes)
    [    0.639709] TCP: Hash tables configured (established 512 bind 512)
    [    0.639801] TCP: reno registered
    [    0.639831] UDP hash table entries: 256 (order: 2, 20480 bytes)
    [    0.640045] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
    [    0.640655] NET: Registered protocol family 1
    [    0.641418] RPC: Registered named UNIX socket transport module.
    [    0.641418] RPC: Registered udp transport module.
    [    0.641418] RPC: Registered tcp transport module.
    [    0.641448] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.642944] Trying to unpack rootfs image as initramfs...
    [    0.657043] rootfs image is not initramfs (junk in compressed archive); looks like an initrd
    [    0.681671] Freeing initrd memory: 8192K
    [    0.681762] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.840576] VFS: Disk quotas dquot_6.5.2
    [    0.840637] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.842071] NFS: Registering the id_resolver key type
    [    0.842346] Key type id_resolver registered
    [    0.842376] Key type id_legacy registered
    [    0.842468] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    [    0.842834] msgmni has been set to 96
    [    0.845153] io scheduler noop registered
    [    0.845153] io scheduler deadline registered
    [    0.845184] io scheduler cfq registered (default)
    [    0.853759] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [    0.858551] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0
    [    0.859802] omap_uart 4806c000.serial: did not get pins for uart1 error: -19
    [    0.859954] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1
    [    0.861175] 48020000.serial: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2
    [    1.622894] console [ttyO2] enabled
    [    1.627380] omap_uart 4806e000.serial: did not get pins for uart3 error: -19
    [    1.634918] 4806e000.serial: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3
    [    1.643768] 48066000.serial: ttyO4 at MMIO 0x48066000 (irq = 137) is a OMAP UART4
    [    1.652435] omap_uart 48068000.serial: did not get pins for uart5 error: -19
    [    1.660003] 48068000.serial: ttyO5 at MMIO 0x48068000 (irq = 138) is a OMAP UART5
    [    1.669921] [drm] Initialized drm 1.1.0 20060810
    [    1.692016] brd: module loaded
    [    1.705657] loop: module loaded
    [    1.711425] /ocp/i2c@48070000/twl@4b: could not find phandle
    [    1.723999] palmas-pwm palmas_pwm.16: there are no PWMs muxed
    [    1.730010] palmas-pwm: probe of palmas_pwm.16 failed with error -22
    [    1.740661] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.748321] OneNAND driver initializing
    [    1.752868] omap2_mcspi 48098000.spi: pins are not configured from the driver
    [    1.767730] usbcore: registered new interface driver asix
    [    1.773712] usbcore: registered new interface driver cdc_ether
    [    1.780212] usbcore: registered new interface driver smsc95xx
    [    1.786529] usbcore: registered new interface driver net1080
    [    1.792724] usbcore: registered new interface driver cdc_subset
    [    1.799224] usbcore: registered new interface driver zaurus
    [    1.805389] usbcore: registered new interface driver cdc_ncm
    [    1.812225] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    1.819091] ehci-omap: OMAP-EHCI Host Controller driver
    [    1.825347] usbcore: registered new interface driver cdc_wdm
    [    1.831237] Initializing USB Mass Storage driver...
    [    1.836669] usbcore: registered new interface driver usb-storage
    [    1.842956] USB Mass Storage support registered.
    [    1.848114] usbcore: registered new interface driver usbtest
    [    1.855285] mousedev: PS/2 mouse device common for all mice
    [    1.868499] palmas-rtc palmas_rtc.11: rtc core: registered palmas_rtc.11 as rtc0
    [    1.878265] i2c /dev entries driver
    [    1.883239] Driver for 1-wire Dallas network protocol.
    [    1.893188] omap_hsmmc_probe
    [    1.987701] omap-dma-engine 4a056000.dma-controller: allocating channel for 62
    [    1.995330] omap-dma-engine 4a056000.dma-controller: allocating channel for 61
    [    2.003143] omap_hsmmc 4809c000.mmc: pins are not configured from the driver
    [    2.122100] omap_hsmmc_probe
    [    2.125274] omap-dma-engine 4a056000.dma-controller: allocating channel for 48
    [    2.132843] omap-dma-engine 4a056000.dma-controller: allocating channel for 47
    [    2.140655] omap_hsmmc 480b4000.mmc: pins are not configured from the driver
    [    2.216400] leds-gpio leds.7: pins are not configured from the driver
    [    2.223114] /leds/led@1: could not find phandle
    [    2.227874] /leds/led@1: could not find phandle
    [    2.232635] leds-gpio leds.7: Skipping unavailable LED gpio -22 (omap5:blue:usr1)
    [    2.240875] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.248107] usbcore: registered new interface driver usbhid
    [    2.253906] usbhid: USB HID core driver
    [    2.260711] oprofile: no performance counters
    [    2.266540] oprofile: using timer interrupt.
    [    2.271423] TCP: cubic registered
    [    2.274871] Initializing XFRM netlink socket
    [    2.279418] NET: Registered protocol family 17
    [    2.284118] NET: Registered protocol family 15
    [    2.289001] Key type dns_resolver registered
    [    2.293487] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    2.301513] mux: Failed to setup hwmod io irq -22
    [    2.310272] Power Management for TI OMAP4PLUS devices.
    [    2.315795] ThumbEE CPU extension supported.
    [    2.324005] palmas-rtc palmas_rtc.11: setting system clock to 2013-07-01 15:24:18 UTC (1372692258)
    [    2.334838] RAMDISK: gzip image found at block 0
    [    2.350921] List of all partitions:
    [    2.354614] No filesystem could mount root, tried:  ext3 ext2 ext4 cramfs vfat msdos
    [    2.362884] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

    I have used the same ramdisk as you mentioned. I am getting the above mentioned error.

  • How is your SD card formatted and partitioned?

    the above kernel panic happens mostly when you do something wrong in the boot.scrroot=/dev/mmcblk0pX )

    Regards,

    Boyko

  • I have used the default script mksdboot.sh which comes with glsdk to partition the mmc card. Right now it has two partitions 65MB FAT partition and 3.9 GB EXT4 partition(4GB mmc card).

    When I tried to boot the image from mmc card, it is booting properly. But when am trying the same through usbboot, it is not detecting the mmc card.

  • Perhaps this file is to be used with the glsdk:

    2350.ramdisk.zip

  • Still am getting the same issue. Can u provide the kernel command line?  Did u give the one which was used to make the boot.img. I can use the same initrd.img which is in cpio format right? Am I missing any of the drivers needed? Because the only change I made is the device tree. I removed some of the devices from device tree and kept only the necessary devices. 

    Regards,

    Gowthami

  • Hi Bokyo,

    Could you please tell what is being passed to the kernel? Atag or device tree! I guess the initrd.img you provided expects the mmc card or emmc to be active and initialized. Because it mounts and starts the init from there. In my device tree if I use the default device tree, am ending in alignment error and the kernel doesnt get booted. Even after adding mmc to the device tree, I couldnt find the mmc driver log in the kernel console log. What are the dependencies needed to make the mmc driver getting initialized?

    Thanks,

    Gowthami