[U-Boot] Boot from jffs2 filesystem problem

[Previously posted in the wrong mail list, sorry]
Hello everybody,
I'm finding some problems trying to boot a TQM5200 board using a jffs2 image as filesystem.
The u-boot version I'm using is 1.3.1 (self compiled) and Linux Kernel 2.6.23.1.
It is possible to boot it with a stored kernel uImage and the oftree in the flash using a nfs filesystem, but I can't not boot it using the jffs2 image. I've read a lot of documentation from denx.de and this is my configuration at the moment:
mtdparts=mtdparts=TQM5200-0:512k(uboot),256k(environment),3328k(kernel),20m(jffs2),256k(oftree) bootargs_mtd=setenv bootargs ${bootargs} ${mtdparts} bootargs_flash=setenv bootargs ${bootargs} root=/dev/mtdblock4 rw rootfstype=jffs2 (even tried with root=/dev/mtdblock3, I'm not sure if 0 counts or not) bootargs_base=setenv bootargs console=ttyPSC0,115200 bootcmd_flash=run bootargs_base bootargs_flash bootargs_mtd;bootm fC0C0000 – fD800000
I've defined the partitions myself and double checked the numbers, first myself, then using the mtdparts command. The kernel image, oftree, and jffs2 filesystem are stored in the flash. The problem comes at booting. Even when "root=/dev/mtdblock4 rw rootfstype=jffs2" is passed to the kernel, it always tries to boot from a Ramdisk image. This is the output when I run bootcmd_flash command:
=> run bootcmd_flash ## Booting image at fc0c0000 ... Image Name: Linux-2.6.23.1-rt5-pcm030-1trunk Created: 2008-09-02 11:48:23 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1534856 Bytes = 1.5 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Loading RAMDisk Image at 00000000 ... Bad Magic Number
It seems to me that U-boot is trying to boot from RAMDisk instead of booting the kernel, but I'm not sure. The same kernel is working properly on a phytec board and 1.2.0 U-boot, so it's not a problem with jffs2 support within the kernel. Any hint how to boot from jffs2 filesystem? The example in U-Boot documentation doesn't use oftree and so, bootm ${kernel_addr} is used, but TQM5200 requieres FDT description to boot linux as you'll know. Maybe should I compile the U-boot using some CONFIG_ parameter?
Thanks in advance.
Pedro L. Dominguez.
_________________________________________________________________ Prueba los prototipos de los últimos en MSN Motor http://motor.es.msn.com/

On Thu, Sep 04, 2008 at 02:04:42PM +0200, Pedro Luis D. L. wrote:
It seems to me that U-boot is trying to boot from RAMDisk instead of booting the kernel, but I'm not sure. The same kernel is working properly on a phytec board and 1.2.0 U-boot, so it's not a problem with jffs2 support within the kernel. Any hint how to boot from jffs2 filesystem? The example in U-Boot documentation doesn't use oftree and so, bootm ${kernel_addr} is used, but TQM5200 requieres FDT description to boot linux as you'll know. Maybe should I compile the U-boot using some CONFIG_ parameter?
Sounds like maybe you're trying to pass the FDT address as the second bootm parameter? It needs to be the third parameter, and you pass - as the second parameter if there's no initrd.
-Scott

On Thu, 4 Sep 2008 10:09:57 -0500 Scott wrote:
On Thu, Sep 04, 2008 at 02:04:42PM +0200, Pedro Luis D. L. wrote:
It seems to me that U-boot is trying to boot from RAMDisk instead of booting the kernel, but I'm not sure. The same kernel is working properly on a phytec board and 1.2.0 U-boot, so it's not a problem with jffs2 support within the kernel. Any hint how to boot from jffs2 filesystem? The example in U-Boot documentation doesn't use oftree and so, bootm ${kernel_addr} is used, but TQM5200 requieres FDT description to boot linux as you'll know. Maybe should I compile the U-boot using some CONFIG_ parameter?
Sounds like maybe you're trying to pass the FDT address as the second bootm parameter? It needs to be the third parameter, and you pass - as the second parameter if there's no initrd.
I've already tried with: - bootm ${kernel_addr} - ${fdt_addr} - bootm ${kernel_addr} ${fdt_addr} - bootm ${kernel_addr} ${jffs2_addr} ${fdt_addr} - bootm ${kernel_addr} ${fdt_addr} ${jffs2_addr}
And always with the same result...
Pedro.
-Scott
_________________________________________________________________ ¿Sigue el calor? Consulta MSN El tiempo http://eltiempo.es.msn.com/

On Thu, Sep 04, 2008 at 05:21:57PM +0200, Pedro Luis D. L. wrote:
I've already tried with:
- bootm ${kernel_addr} - ${fdt_addr}
This is the correct one.
And always with the same result...
Are you sure it's exactly the same? How could u-boot fail when loading the initrd if there is none specified?
-Scott

On Thu, 4 Sep 2008 11:12:46 -0500, Scott wrote:
I've already tried with:
- bootm ${kernel_addr} - ${fdt_addr}
This is the correct one.
And always with the same result...
Are you sure it's exactly the same? How could u-boot fail when loading the initrd if there is none specified?
Yes, I'm afraid so. Take a look. It tries to load RAMDisk Image and then reboots.
=> setenv mtdparts mtdparts=TQM5200-0:512k(uboot),256k(environment),3328k(kernel),20m(jffs2),256k(oftree) => setenv bootargs_mtd 'setenv bootargs ${bootargs} ${mtdparts}'; => setenv bootargs_flash 'setenv bootargs ${bootargs} root=/dev/mtdblock4 rw rootfstype=jffs2'; => setenv bootargs_base 'setenv bootargs console=ttyPSC0,115200'; => setenv bootcmd_flash 'run bootargs_base bootargs_flash bootargs_mtd;bootm fC0C0000 - fD800000'; => run bootcmd_flash ## Booting image at fc0c0000 ... Image Name: Linux-2.6.23.1-rt5-pcm030-1trunk Created: 2008-09-04 13:14:40 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1537868 Bytes = 1.5 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Loading RAMDisk Image at 00000000 ... Bad Magic Number
U-Boot 1.2.0 (Sep 4 2008 - 15:35:31)
CPU: MPC5200 v2.2, Core v1.4 at 396 MHz Bus 132 MHz, IPB 132 MHz, PCI 66 MHz Board: TQM5200 (TQ-Components GmbH) on a STK52xx carrier board I2C: 85 kHz, ready DRAM: 128 MB FLASH: 32 MB
I don't understand why U-boot tries to load a RAMDisk when root/dev/mtdblock4 and rootfstype=jffs2 is used. But I should be doing something wrong, because I've tried with 1.2.0, 1.3.3 and 1.3.4 U-Boot versions and still have the same problem.
Pedro.
-Scott
_________________________________________________________________ Prueba los prototipos de los últimos en MSN Motor http://motor.es.msn.com/

Hi everybody,
All the problems I had seemed to be a hardware issue. I can't explain myself why, but the micro tried to boot from jffs2 once I changed it to another board. I've been working with TQM5200 B module on a STK52XX board. Maybe we screwed something with the board, because I've been experimenting another strange issues with the board lately. We have developed another board our own for the project and when I plugged the TQM5200 module in our board it tried to boot using the jffs2 filesystem flashed on the board. It didn't boot completely, but that's another issue, at least now it tries booting from jffs2.
How is the hardware interfering with the U-boot? I don't know, but I also noticed that any U-boot version above 1.2.0 was having problems loading files from the tftp when plugged on the STK board, but work properly when plugged on our developed board.
Thanks everybody,
Pedro.
_________________________________________________________________ ¿Eres un cotilla? Disfruta de todas las novedades en MSN Corazón http://entretenimiento.es.msn.com/corazon/

On Fri, Sep 05, 2008 at 09:39:50AM +0200, Pedro Luis D. L. wrote:
Are you sure it's exactly the same? How could u-boot fail when loading the initrd if there is none specified?
Yes, I'm afraid so. Take a look. It tries to load RAMDisk Image and then reboots.
Are you sure that your u-boot has fdt support? What do you get if you type "help bootm"?
-Scott
participants (2)
-
Pedro Luis D. L.
-
Scott Wood