public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot-Users] Boot from Jffs2 filesystem problem
Date: Thu, 04 Sep 2008 13:51:21 +0200	[thread overview]
Message-ID: <m2d4jkf7t2.fsf@ohwell.denx.de> (raw)
In-Reply-To: <BLU106-W51C0F015A7EE52537B9DA8CA5E0@phx.gbl> (Pedro Luis D. L.'s message of "Wed, 3 Sep 2008 16:32:26 +0200")

Hi Pedro,

the SourceForge mailing list is deprecated, please use the one at
lists.denx.de.

[This time, the new address is correct]

> 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.

Yes, indeed.  It looks like the "bootm fc0c0000 - fd800000" is not
evaluated properly.  In v1.3.1 code the code lines were
(common/cmd_bootm.c:622)

#if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
        /* Look for a '-' which indicates to ignore the ramdisk argument
        */
        if (argc >= 3 && strcmp(argv[2], "-") ==  0) {
                        debug ("Skipping initrd\n");
                        len = data = 0;
                }
        else
#endif

So The upstream v1.3.1 config for TQM5200 also has CONFIG_OF_LIBFDT
defined:

$ git-show v1.3.1:include/configs/TQM5200.h | grep CONFIG_OF_LIBFDT
#define CONFIG_OF_LIBFDT         1

So if you did not change that, my last explanation is that you have
hidden escape characters in the definition of bootcmd_flash.  Check with
'md' on the environment sectors to find out.

Cheers
  Detlev

-- 
Shin: a device for finding furniture in the dark.
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

           reply	other threads:[~2008-09-04 11:51 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <BLU106-W51C0F015A7EE52537B9DA8CA5E0@phx.gbl>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2d4jkf7t2.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox