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.

initramfs, init not found



Hi All,

I am trying touse the initramfs in the evaluation on the DM365. I followed all the steps described in the wiki but it seems I had a problem with the init. When I compile the kernel it grows in size, having  filesystem embedded, compared to the kernel without the initramfs. I placed the fs in the /home/user/targetfs where an  executable init is defined as follows:

#!/bin/sh
echo This is the init.

Below some detail about my configuration and the booting problem.

in .config I have:

#
# General setup
#...
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="/home/user/targetfs"
...
...
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
...

 

This my environment:

bootdelay=4
baudrate=115200
ethaddr=00:0e:99:02:c9:bf
rootpath=/home/user/workdir/filesys
nfshost=192.168.0.129
bootfile=uImage
filesize=1F760C
fileaddr=80700000
ipaddr=192.168.0.130
serverip=192.168.0.129
netmask=255.255.255.0
gateway=192.168.0.1
bootcmd=tftp 0x80700000 uImage;bootm 0x80700000
bootargs=mem=76M console=ttyS0,115200n8 ip=192.168.0.130:192.168.0.129:255.255
:255.0 rootfstype=yaffs2 video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,405
0K dm365_imp.oper_mode=0 davinci_capture.device_type=4
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.3.4 (Mar  2 2009 - 11:50:39)

This my boot with the initramfs:

Linux version 2.6.18_pro500-davinci_evm-arm_v5t_le (user@user) (gcc version 4.
2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #1 PREEMPT Tue Feb 2 11:11:
39 CET 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci DM365 EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci DM0365 variant 0x0
PLL0: fixedrate: 24000000, commonrate: 121500000, vpssrate: 243000000
PLL0: vencrate_sd: 27000000, ddrrate: 243000000 mmcsdrate: 121500000
PLL1: armrate: 297000000, voicerate: 99000000, vencrate_hd: 74250000
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists.  Total pages: 19456
Kernel command line: mem=76M console=ttyS0,115200n8 ip=192.168.0.130:192.168.0
.129:255.255:255.0 rootfstype=yaffs2 video=davincifb:vid0=OFF:vid1=OFF:osd0=72
0x576x16,4050K dm365_imp.oper_mode=0 davinci_capture.device_type=4
PID hash table entries: 512 (order: 9, 2048 bytes)
Clock event device timer0_0 configured with caps set: 07
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 76MB = 76MB total
Memory: 67968KB available (3513K code, 729K data, 4768K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MUX: initialized SPI0_SCLK
MUX: initialized SPI0_SDO)
MUX: initialized SPI0_SDI
MUX: initialized SPI0_SDENA0
DaVinci: 104 gpio irqs
MUX: initialized GPIO20
MUX: initialized I2C_SCL
DM365 IPIPE initialized in Continuous mode
Generic PHY: Registered new driver
ch0 default output "COMPOSITE", mode "NTSC"
VPBE Encoder Initialized
LogicPD encoder initialized
Avnetlcd encoder initialized
dm365_afew_hw_init
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
yaffs Feb  2 2010 11:06:47 Installing.
SGI XFS with no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
LTT : ltt-facilities init
LTT : ltt-facility-core init in kernel
davincifb davincifb.0: dm_osd0_fb: Initial window configuration is invalid.
davincifb davincifb.0: dm_osd0_fb: 720x576x16@0,0 with framebuffer size 4050KB
davincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 1020KB
davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB
davincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KB
DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
facedetect major#: 253, minor# 0
facedetect driver registered
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfbc20000 (irq = 40) is a 16550
A
serial8250.0: ttyS1 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550
A
RAMDISK driver initialized: 1 RAM disks of 8192K size 1024 blocksize
Davinci EMAC MII Bus: probed
MAC address is 00:0e:99:02:c9:bf
TI DaVinci EMAC Linux version updated 4.0
netconsole: not configured, aborting
Linux video capture interface: v2.00
vpfe_init
starting ccdc_reset...<7>
End of ccdc_reset...<5>vpfe_probe
vpfe ccdc capture vpfe ccdc capture.1: vpif_register_decoder: decoder = MT9T00
1
vpfe ccdc capture vpfe ccdc capture.1: vpif_register_decoder: decoder = MT9P03
1
TVP514X : nummber of channels = 1
vpfe ccdc capture vpfe ccdc capture.1: vpif_register_decoder: decoder = TVP514
X
Trying to register davinci display video device.
layer=c4090600,layer->video_dev=c4090760
Trying to register davinci display video device.
layer=c4090400,layer->video_dev=c4090560
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
vpfe ccdc capture vpfe ccdc capture.1: vpif_register_decoder: decoder = TVP700
2
af major#: 250, minor# 0
AF Driver initialized
aew major#: 249, minor# 0
AEW Driver initialized
i2c /dev entries driver
dm_spi.0: davinci SPI Controller driver at 0xc501c000 (irq = 42) use_dma=0
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
musb_hdrc: version 6.0, cppi-dma, host, debug=0
MUX: initialized GPIO33
musb_hdrc musb_hdrc: No DMA interrupt line
musb_hdrc: USB Host mode controller at c501e000 using DMA, IRQ 12
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mice: PS/2 mouse device common for all mice
davinci-mmc davinci-mmc.0: Supporting 4-bit mode
davinci-mmc davinci-mmc.0: Using DMA mode
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:5
0 2006 UTC).
ASoC version 0.13.1
AIC3X Audio Codec 0.2
asoc: aic3x <-> davinci-i2s mapping ok
ALSA device list:
  #0: DaVinci DM365 EVM (aic3x)
IPv4 over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Time: timer0_1 clocksource has been installed.
Clock event device timer0_0 configured with caps set: 08
Switched to high resolution mode on CPU 0
IP-Config: Gateway not on directly connected network.
Freeing init memory: 4768K
Warning: unable to open an initial console.
Failed to execute /init
Kernel panic - not syncing: No init found.  Try passing init= option to kernel
.
Thank you.

Mario

  • Dear All,

        is there someone who is using the initramfs with success with the montavista kernel?

    If yes is there some mandatory configuration required which is not described here http://tiexpressdsp.com/index.php/Initrd.

    I tried for days and I am beginning to think that this mode is not supported by this kernel.

    Thank you.

     

  • I have successfully used Busybox init within an initramfs with the Montavista kernel.

    I suspect you can't use a script using #!/bin/sh for init.

    You also need to fix your initial console warning, with a kernel option "console=ttyS0,115200n8" to use the serial port for example.

  • Did you ever figure out this issue? I'm having the exact same problem with initramfs

     

    Thanks,

     

    Brent

  • I had this same issue on the DM6467. I did not have the proper libraries available in the filesystem. I added the /lib from the Arago filesystem that came with my EVM and this fixed the problem. Here is a listing of the /lib directory from my target_fs:

    bbergan@bbergan-laptop:~/target_fs/lib$ ls
    ld-2.8.so      libanl.so.1             libc-2.8.so     libcrypt-2.8.so  libdl-2.8.so   libm-2.8.so     libnsl-2.8.so         libnss_compat.so.2  libnss_files-2.8.so  libpthread.so.0   librt-2.8.so         libthread_db.so.1  libutil-2.8.so     libvolume_id.so.1.1.0
    ld-linux.so.3  libBrokenLocale-2.8.so  libcidn-2.8.so  libcrypt.so.1    libdl.so.2     libmemusage.so  libnsl.so.1           libnss_dns-2.8.so   libnss_files.so.2    libresolv-2.8.so  librt.so.1           libudev.so.0       libutil.so.1       modules
    libanl-2.8.so  libBrokenLocale.so.1    libcidn.so.1    libc.so.6        libgcc_s.so.1  libm.so.6       libnss_compat-2.8.so  libnss_dns.so.2     libpthread-2.8.so    libresolv.so.2    libthread_db-1.0.so  libudev.so.0.2.0   libvolume_id.so.1  udev
    bbergan@bbergan-laptop:~/target_fs/lib$

    Then I had a busybox issue with the inittab file. This ultimately had to do with how the ram disk was initialized. I added "rdinit=/sbin/init" to the bootargs and this fixed the issue.

  • Hi sorry, I didn't spend much time in this issue. Now I am using a normal ramdisk. 

    Bye

  • babs76 said:

    Then I had a busybox issue with the inittab file. This ultimately had to do with how the ram disk was initialized. I added "rdinit=/sbin/init" to the bootargs and this fixed the issue.

    Hi Babs,

    What was the ramdisk initialization issue? Was the issue in the creation of the ramdisk or the bootargs initialization of the ramdisk?

    I am having the same problem you did and mine may be related to the creation of the ramdisk.

    I am able to boot my custom file system when I install it on an SD card (beaglebone), but when I use the same file to create a ramdisk I get the "init not found error". So, I am confident I have all the libs installed and I did add the rdinit=/sbin/init to bootargs, but still see the issue.