3

I am working on mpc8309-twr board with kernel 2.6.33.7, when i am creating my rootfs image with ramdisk file system (rootfs.ext2.gz.uboot) i am able to mount my file system and my board is able to boot successfully.

But, when i am trying with jffs2 filesystem it is saying "no init found",here is the kernel log.

VFS: Mounted root (jffs2 filesystem) on device 31:1. Freeing unused kernel memory: 168k init Warning: unable to open an initial console. Kernel panic - not syncing: No init found. Try passing init= option to kernel. Call Trace: [c782df40] [c0008484] 0xc0008484 (unreliable) [c782df70] [c0025320] 0xc0025320 [c782dfc0] [c0003b78] 0xc0003b78 [c782dfd0] [c03a2238] 0xc03a2238 [c782dff0] [c0011994] 0xc0011994

But init is present at /sbin/init location. can any one help me in this.

Thanks in advance...............!
  • can you tell which primary memory device this board is having, kernel command line argument and the part of dts file for memory device support – Samrat Das Mar 26 '16 at 13:10
  • 1
    @SamratDas i am using DDR2 primary memory and it is of 128MB, the bootargs are as follows bootargs=root=/dev/mtdblock1 rootfstype=jffs2 rw console=ttyS0,115200 and i am using the u-boot-2010.06 version. and i am using this /dev/mtdblock1 as my filesystem partition. – konduri praveen Mar 28 '16 at 05:24
  • memory device i mean storage memory? NAND/NOR, mmc/emmc or any other ? – Samrat Das Mar 28 '16 at 07:29
  • ok ok i am using NOR flash for storing images uImage , rootfs.jffs2, mpc8309twr.dtb. @SamratDas – konduri praveen Mar 28 '16 at 07:36
  • little more kernel log i need, where the kernel probe the flash memory and creates partitions – Samrat Das Mar 28 '16 at 07:42
  • @SamratDas please follow the link for kernel log -----> (https://drive.google.com/open?id=0B6NLYO9x28pfSmhrdF9XTE4yTTA) – konduri praveen Mar 28 '16 at 11:28
  • did you provided proper partition table in device blob tree? – Samrat Das Mar 28 '16 at 17:02

1 Answers1

1

While working with flash memories, we need to provide partition table to kernel manually through device tree blob. As RAM image have everything proper so booting in proper manner.
But when you try to boot with your NOR flash your kernel log says RedBoot partition parsing not available, which means the offset kernel using for loading the rootfs might not be same as exact where rootfs is present. Due to which kernel is unable to find your init as well as initial console as per your kernel log.

So add or change the offset of the partitions you are providing in the device tree structure file.
You can refer to this documentation for reference for adding mtd support in device tree file.

Samrat Das
  • 1,781
  • 1
  • 21
  • 33
  • 1
    thanks for your help @samratdas but the partition which you are mentioning aren't they same for both ramdisk and jffs2 filesystem?????? this **redboot partition parsing not availabe** is been present in ramdisk also but at that time there is no such error of **No init found**.......! – konduri praveen Mar 29 '16 at 05:29
  • partition size and offset may be same but the way how rootfs comes into picture in both cases are different in case of ram disk, your bootloader is responsible for loading ramdisk, in case of root partition is provided to kernel which came into the role after disk mounted as per partition. In case of booting with jffs2, kernel is creating random partition and loading as per given argument where offsets were wrong, whereas in ram disk bootloader taking it from proper offset and in this case proper partitioning for kernel dosn't matter. – Samrat Das Mar 29 '16 at 06:07
  • 1
    are you having any more documents or links that could give me more information on this........??? – konduri praveen Mar 30 '16 at 07:39
  • these things i learnt from experience, but general topics regarding these you can learn from - [The Linux Document Project](http://www.tldp.org/) (full of reference) | [Linux From Scratch](http://www.linuxfromscratch.org/) (you can learn how whole thing is working) | [Few general learning material](http://free-electrons.com/docs/) – Samrat Das Mar 30 '16 at 07:47