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.

OMAP 3530 : Can't boot Linux (Unable to open initial console, no init found ...)

Other Parts Discussed in Thread: ADS7846

We have a board here that is very similar to Mistral EVM, nearly identical equipment aside from the PoP memory on the OMAP.

I've used basically the default U-Boot and uImage, with only minor modifications. Our Ethernet device is not functioning yet (SMSC9118), so that is removed and the USB device support is also removed.

Comparing the boot logs for both the Mistral EVM and our board, it is almost the same, as expected. Identical except for missing Ethernet messages and USB.

Bootargs are basically identical. The file system should be flashed into NAND... but right at the very end, it complains about being unable to open an initial console, then I get a Kernel panic about no init found and hangs. This is the last bit of the boot output

=================

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
serial8250.0: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
serial8250.0: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: module loaded
Linux video capture interface: v2.00
i2c /dev entries driver
OMAP HDQ Hardware Revision 0.5. Driver in interrupt mode.
omap2-nand driver initializing

 NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-bit)
Creating 5 MTD partitions on "omap2-nand.0":
0x00000000-0x00080000 : "X-Loader-NAND"
0x00080000-0x00240000 : "U-Boot-NAND"
0x00240000-0x00280000 : "Boot Env-NAND"
0x00280000-0x00780000 : "Kernel-NAND"
0x00780000-0x20000000 : "File System - NAND"
input: omap_twl4030keypad as /class/input/input0
ads7846 spi1.0: touchscreen, irq 335
input: ADS784x Touchscreen as /class/input/input1
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
OMAP3430 TWL4030 Audio Support: Chip Rev[0x2f] Initialized
audio support initialized
ALSA device list:
#0: TWL4030
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
Buffer Size = 3686400
omap24xxvout: registered device video1 [v4l2]
Buffer Size = 3686400
omap24xxvout: registered device video2 [v4l2]
cpuidle: using governor menu
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 108K
Warning: unable to open an initial console.
/sbin/init exit code: -2
/etc/init exit code: -2
/bin/init exit code: -2
/bin/sh exit code: -2
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

=================

This output is virtually identical to the Mistral EVM, except our Mistral board has the Samsung OneNAND and of course, it doesn't panic, it completes booting.

Earlier on in the boot, you can see it finds all serial ports and on our board, it is hooked up to exactly the same pins as Mistral EVM.

Any idea what might be wrong here or where I should start looking to debug?

  • IsaacLeung said:
    Any idea what might be wrong here or where I should start looking to debug?

    It sounds like there is something wrong with the filesystem, when it cannot find init that usually means that the filesystem is corrupted or missing, if I remember correctly last I saw this was when I copied a filesystem without maintaining symbolic links. If you could post your U-Boot environment we could take a look at that and see if anything sticks out there. If you have the SD interface on your board it may be worth trying to boot entirely out of SD to see if you can get it going that way as an alternative since you dont have Ethernet or USB yet.

  • This is my U-Boot environment variables:

    ================================

     baudrate=115200
    ipaddr=192.168.0.81
    serverip=192.168.0.92
    preboot=
    gatewayip=192.168.0.2
    netmask=255.255.255.0
    bootfile="uImage"
    get_kernel=run nand_kernel
    get_initrd=run nand_initrd
    nand_kernel=nand read.i 0x80000000 280000 200000
    nand_initrd=nand read.i 0x81600000 780000 1000000
    tftp_kernel=tftpboot 0x80000000 uImage
    tftp_initrd=tftpboot 0x81600000 ramdisk.gz
    bootargs_rd=mem=128M console=ttyS0,115200n8 root=/dev/ram0 initrd=0x81600000,40M ramdisk_size=40960
    bootargs_nfs=mem=128M console=ttyS0,115200n8 noinitrd rw root=/dev/nfs nfsroot=/mnt/nfs,nolock
    addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:on
    boot_rd=run get_kernel; run get_initrd; setenv bootargs $(bootargs_rd); run addip; bootm 0x80000000
    boot_nfs=run get_kernel; setenv bootargs $(bootargs_nfs); run addip; bootm 0x80000000
    bootdelay=20
    ethaddr=00:00:00:00:00:00
    flash_end=nand unlock; nand erase 0x80000 0x80000; nand ecc sw; nand write.i 0x80000000 80000 80000
    flash_start=mw.b 0x80000000 0xFF 0x100000; loadb 0x80000000
    bootargs=mem=88M console=ttyS0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2
    bootargs_fs=mem=88M console=ttyS0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2
    boot_fs=run get_kernel; setenv bootargs $(bootargs_fs); run addip; bootm 0x80000000
    filesize=D0515F
    bootcmd=run boot_rd
    stdin=serial
    stdout=serial
    stderr=serial
    mmcboot=mmcinit;fatload mmc 0 0x80000000 uImage;fatload mmc 0 0x81600000 ramdisk.gz;bootm 0x80000000
    ================================

    (I changed the bootcmd temporarily for testing).

     

    Actually, I'm now thinking it might be a bad transfer of the filesystem. A colleague here claims he managed to get it to boot from SD. I've also since run a couple of more tests and I've been able to boot with both the min and full RAMDISK image, so it probably rules out my U-Boot and kernel.

    However, I did notice one curious little note in the Getting Started Guide, which recommends NOT to use JFFS2 for Micron PoP as it is slow to boot and has warnings (or should that be errors?). Anyone can shed any more light on this comment?

    I will try JFFS2 again, but since we do not have Ethernet or USB up yet, it is a very long transfer via Serial connection to get the rootfs.jffs2 file over.

  • Hi,

    Can you make sure there is a ttyS0 file under dev directory in the filesystem?Also did you check the permissions on /dev/ttyS0 file in the filesystem?

    Thanks,

    Prathap.

     

  • I had a similar experience when the file system path I specified in my bootargs did not match the one specified in my host's /etc/exports file. 

  • Aaah yes, perhaps this should've been obvious.

    No, there is no ttyS0 under /dev

    BTW, this is the default rootfs.jffs2 and nfs.tar.gz that shipped with the 1.0.2 kit. I just assumed these should be working and correct...I guess not.

    How do I go about making sure ttyS0 gets created?

  • Did you get any errors in your login shell when you copied the filesystem?  You need to do this as 'root', as a user shell will not have the permissions to create the /dev nodes.

  • No errors, but I'm not sure what you're getting at. When I upload "rootfs.jffs2" to the OMAP board, it is just a single file and I'm doing it within the U-Boot environment, I'm not in Linux yet.

    As for creating "rootfs.jffs2", well, I'm not doing that. I'm using the default one from the 1.0.2 PSP, which I assumed would be complete.