iMX28: NAND boot "no init found"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX28: NAND boot "no init found"

9,481 Views
SteveO1z
Contributor II

Hi, all. After some difficulty, I was able to get the UBIFS file system to mount on the iMX28 EVK when booting from NAND. However, it seems that there is an issue reading from the file system, as I'm getting the following:

 

UBIFS: mounted UBI device 0, volume 0, name "rootfs0"

UBIFS: file system size:   99422208 bytes (97092 KiB, 94 MiB, 783 LEBs)

UBIFS: journal size:       4952064 bytes (4836 KiB, 4 MiB, 39 LEBs)

UBIFS: media format:       w4/r0 (latest is w4/r0)

UBIFS: default compressor: lzo

UBIFS: reserved for root:  4695956 bytes (4585 KiB)

VFS: Mounted root (ubifs filesystem) on device 0:14.

Freeing init memory: 160K

Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

 

I'm running out of ideas. Has anyone else experienced this, and can you help?

 

Thanks,

 

Steve O

Labels (1)
0 Kudos
31 Replies

889 Views
SteveO1z
Contributor II

Appreciate your help, Mike thanks.

I was finally successful in getting the UBIFS file system to work from NAND. However, I had to go outside of the documented methods: 

What I had to do was to move the entire file system on my host machine to a temporary directory, then manually remove the boot, man pages, locale, etc.. directories to get the file system to a manageable size. Then I created a tar file (with no parent directories included - that's important) from this temporary file system. Once I had that I was successful in programming the NAND both from the console and also using the MFG tool. 

I never was able to get the ".img" file created by LTIB (or Ubuntu, I tried both) to expand into a directory structure on the target. The result was always that the file system would mount, but all it contained was a file named "rootfs.ubifs.img". Therefore the init file was not found in the expected place, and a kernel panic was generated. 

I would like to be able to use the image file created by LTIB, as the above process is time consuming and prone to errors, so if anyone finds a solution I would be interested in it. In the meantime, our system is now functioning from NAND.

 

Steve O

0 Kudos

889 Views
SteveO1z
Contributor II
The device reports lzo as compression type, but I told LTIB to build a non-compressed image. I'll try the ubiupdatevol command with the original uncompressed image. That might be it. Thx!

Mike Morrell said:

Ah, looking at your boot messages again, I see that your image is named rootfs0, so change the line above to...

 

ubimkvol /dev/ubi0 -N rootfs0 -m

 

Also, this is a non-compressed image. I see that you are using lzo compression. Have you tried non-compressed?


Mike Morrell said:

Create the UBIFS image with

 

mkfs.ubifs -x none -m 2048 -e 126976 -c 5000 -r rootfs rootfs.ubifs

Boot evk from SD card and then reflash as follows. Make sure imx28_ivt_linux.sb for NAND boot and rootfs.ubifs are on your SD card or mount a thumb drive with those files.

 

flash_eraseall /dev/mtd0

kobs-ng init imx28_ivt_linux.sb

flash_eraseall /dev/mtd1 ubiattach /dev/ubi_ctrl -d 0 -m 1

ubimkvol /dev/ubi0 -N rootfs -m

ubiupdatevol /dev/ubi0_0 rootfs.ubifs sync

 

The name in the ubimkvol command above must match your kernel command line boot options. I couldn't see it in your attached file because you left that out so it may be different than what I posted here. Change your DIP switches for NAND boot and try it. Hope that helps.

0 Kudos

889 Views
iMxGuy
Contributor II

Ah, looking at your boot messages again, I see that your image is named rootfs0, so change the line above to...

 

ubimkvol /dev/ubi0 -N rootfs0 -m

 

Also, this is a non-compressed image. I see that you are using lzo compression. Have you tried non-compressed?


Mike Morrell said:

Create the UBIFS image with

 

mkfs.ubifs -x none -m 2048 -e 126976 -c 5000 -r rootfs rootfs.ubifs

Boot evk from SD card and then reflash as follows. Make sure imx28_ivt_linux.sb for NAND boot and rootfs.ubifs are on your SD card or mount a thumb drive with those files.

 

flash_eraseall /dev/mtd0

kobs-ng init imx28_ivt_linux.sb

flash_eraseall /dev/mtd1 ubiattach /dev/ubi_ctrl -d 0 -m 1

ubimkvol /dev/ubi0 -N rootfs -m

ubiupdatevol /dev/ubi0_0 rootfs.ubifs sync

 

The name in the ubimkvol command above must match your kernel command line boot options. I couldn't see it in your attached file because you left that out so it may be different than what I posted here. Change your DIP switches for NAND boot and try it. Hope that helps.

0 Kudos

889 Views
iMxGuy
Contributor II

Create the UBIFS image with

 

mkfs.ubifs -x none -m 2048 -e 126976 -c 5000 -r rootfs rootfs.ubifs

Boot evk from SD card and then reflash as follows. Make sure imx28_ivt_linux.sb for NAND boot and rootfs.ubifs are on your SD card or mount a thumb drive with those files.

 

flash_eraseall /dev/mtd0

kobs-ng init imx28_ivt_linux.sb

flash_eraseall /dev/mtd1 ubiattach /dev/ubi_ctrl -d 0 -m 1

ubimkvol /dev/ubi0 -N rootfs -m

ubiupdatevol /dev/ubi0_0 rootfs.ubifs sync

 

The name in the ubimkvol command above must match your kernel command line boot options. I couldn't see it in your attached file because you left that out so it may be different than what I posted here. Change your DIP switches for NAND boot and try it. Hope that helps.

0 Kudos

889 Views
SteveO1z
Contributor II

Thanks again for the help, Mike. I saw your earlier postings about NAND size, so I changed from a 2Gbit part to a 1GBit part. The chip has an entry in the required tables in the source, and appears to be recognized correctly by the target. Some more detail:

I tried to program the NAND 2 ways: using the Freescale MFG tool with my own imx28_ivt_linux.sb file and ubifs image (which I tarred and zipped to make it as close to the default for the tool as possible), and also using the command line method detailed in some other postings from the imxcommunity.org. Both methods appeared to succeed, but I got the exact same result when trying to boot. Here's the settings I used to create the file system:

 

PEB size: 128KiB

LEB size: 126976

LEB count: 1024

Min I/O size: 2048

 

I've attached what I think you're looking for. I'm also working with some FAE's, so hopefully someone will be able to tell me what I'm doing wrong.

0 Kudos

889 Views
iMxGuy
Contributor II
What I was trying to say is boot from the NAND and then copy and paste all the terminal output from boot up until where the kernel panics. I was interested in seeing what your flash geometry was. If your UBIFS is not created to match the device geometry, you will have boot problems. Did you check the geometry with settings used in LTIB to create the image? Also, I ran into a problem with large size NAND deivices. The driver from Freescale needed a patch to use NAND devices larger than 1Gbit I think.

Steve Otzman said:

Thanks for the replies, guys. Are you asking for the output of dmesg from my host machine? Otherwise I can boot the target from SD or NFS and get that output, but on boot from NAND kernel panic stops everything.

 

Mike, it sounds like you had an issue with the mtd-utils package on Ubuntu 10.10? I was looking into it and it does seem that the package used for the 10.10 release had problems.

 

To add a little, I was able to get the EVK to boot from NAND using JFFS2, but unless the file system was read-only, subsequent boots would start to show increasing ECC errors. This was verified by a Freescale FAE who said JFFS2 wouldn't work on the iMX28 BSP.

 

 

0 Kudos

889 Views
SteveO1z
Contributor II

Thanks for the replies, guys. Are you asking for the output of dmesg from my host machine? Otherwise I can boot the target from SD or NFS and get that output, but on boot from NAND kernel panic stops everything.

 

Mike, it sounds like you had an issue with the mtd-utils package on Ubuntu 10.10? I was looking into it and it does seem that the package used for the 10.10 release had problems.

 

To add a little, I was able to get the EVK to boot from NAND using JFFS2, but unless the file system was read-only, subsequent boots would start to show increasing ECC errors. This was verified by a Freescale FAE who said JFFS2 wouldn't work on the iMX28 BSP.

0 Kudos

889 Views
iMxGuy
Contributor II
Can you attach the output of dmesg here?
0 Kudos

890 Views
Balaji_ng
Contributor III
I think your rootfs has not been copied properly to NAND or it is corrupted. Try a correct RootFS
0 Kudos

890 Views
SteveO1z
Contributor II

Actually, the rootfs is mounting (that was a struggle in itself), but that's as far as it gets. It appears that the device can't get the /sbin/init file.

I'm using Ubuntu 10.10 as host. I'm new to Linux, so sorry if this is a silly question, but you mean the source for mkfs.ubifs? Once I get the source, how to I rebuild the utility? Thanks!

0 Kudos

890 Views
iMxGuy
Contributor II

Hi Steve,

So you are getting the kernel to load but it fails when it tries to mount the rootfs? What host OS are you building the UBIFS with? Ubuntu 10.10 has a bug in mkfs.ubifs. You need to grab the latest source and replace it.

0 Kudos