From: Jon Diekema <diekema@cideas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot v2009.08 & JFFS2 (NOR)
Date: Mon, 14 Sep 2009 21:36:41 -0400 [thread overview]
Message-ID: <1252978601.5167.2.camel@racer> (raw)
In-Reply-To: <ae09c2a40909141808m6a2ea23eq4313adc5330cef8c@mail.gmail.com>
On Mon, 2009-09-14 at 20:08 -0500, Tommy Wang wrote:
> Hello U-Boot Users,
>
> I am working on updating a EP8248 based board from a very old U-Boot
> 1.1.2 to v2009.08.
>
> The board has 2 banks of 32MB/256 sector NOR flash at 0xFC000000 and
> 0xFE000000. The (single) JFFS2 partition is located at 0xFE020000 to
> 0xFFEFFFFF.
>
> Using U-Boot 1.1.2, the files within the partition show up just fine
> w/ the ls command. Using U-Boot v2009.08, when booting Linux via
> TFTP, the JFFS2 partition can be mounted (mount -t jffs2
> /dev/mtdblock2 /mnt), and the files show up fine. I cannot seem to
> get U-Boot to recognize the JFFS2 partition, however.
>
> The existing JFFS2 configuration in U-Boot 1.1.2 is:
>
> #define CFG_JFFS2_FIRST_BANK 1
> #define CFG_JFFS2_FIRST_SECTOR 1
> #define CFG_JFFS2_NUM_BANKS 1
>
> In v2009.08, I have tried:
>
> #define CONFIG_SYS_JFFS2_FIRST_BANK 1
> #define CONFIG_SYS_JFFS2_FIRST_SECTOR 1
> #define CONFIG_SYS_JFFS2_NUM_BANKS 1
>
> My debug output shows me:
>
> start_phys: fc000000
> end_phys: fbffffff
> part->size: ffffffff
>
> Looking through code, I saw that the above macros were no longer used.
> The doc/README.JFFS2 seemed to be out of date. I tried copying from
> configurations that look like they may work from other platforms:
>
> #define CONFIG_JFFS2_DEV "nor1"
> #define CONFIG_JFFS2_PART_SIZE 0x01edffff
> #define CONFIG_JFFS2_PART_OFFSET 0x00020000
> #define CONFGI_SYS_JFFS2_SORT_FRAGMENTS
>
> This gives me the correct start and end address, but it still does not
> recognize the JFFS2 partition:
>
> => ls
> start_phys: fe020000
> end_phys: ffefffff
> part->size: 1edffff
> size: 131072
> Scanning JFFS2 FS: . add_node: malloc failed
> add_node failed!
> ls: Failed to scan JFFSv2 file structure
>
> Next, I tried setting up the mtd partitions:
>
> #define CONFIG_CMD_MTDPARTS
> #define CONFIG_MTD_DEVICE
> #define CONFIG_FLASH_CFI_MTD
> #define MTDIDS_DEFAULT "nor1=primary"
> #define MTDPARTS_DEFAULT "mtdparts=primary:31616k at 128k(mypart)"
> #define CONFIG_EXTRA_ENV_SETTINGS \
> "mtdids=nor1=primary \0" \
> "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0"
>
> But, again, the JFFS2 fails to load with the same error as above.
>
> I am kind of out of ideas. Can anyone give some advice?
How about using something like the following:
> #undef CONFIG_SYS_USE_UBI /* Define to use UBI */
> #undef CONFIG_SYS_USE_UBIFS /* Define to Use UBIFS */
> #define CONFIG_CMD_JFFS2 /* Turn on the "fsload", "ls", and "fsinfo" commands */
>
>
> #ifdef CONFIG_SYS_USE_UBIFS
>
> #define CONFIG_CMD_UBIFS /* Turn on the "ubifsmount", "ubifsls", */
> /* and "ubifsload" commands. */
> #define CONFIG_LZO /* Use LZO library - needed for UBIFS */
> #define CONFIG_SYS_USE_UBI /* Use UBI */
>
> #endif /* CONFIG_SYS_USE_UBIFS */
>
>
> #ifdef CONFIG_SYS_USE_UBI
>
> #ifdef CONFIG_SYS_MALLOC_LEN
> #undef CONFIG_SYS_MALLOC_LEN
> #endif
> #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 1 * (1024 * 1024))
>
> #define CONFIG_CMD_UBI /* Turn on the "ubi" command */
> #define CONFIG_RBTREE /* Red-black tree support - needed for UBI */
> #define CONFIG_MTD_UBI_DEBUG /* Enable UBI debugging */
> #define CONFIG_MTD_PARTITIONS /* Support MTD partitions */
>
> #endif /* CONFIG_SYS_USE_UBI */
>
>
> #ifdef CONFIG_CMD_JFFS2
> #ifndef CONFIG_MTD_PARTITIONS
> #define CONFIG_MTD_PARTITIONS /* Support MTD partitions */
> #define CONFIG_MTD_DEVICE /* Support MTD devices */
> #endif /* CONFIG_MTD_PARTITIONS */
> #endif /* CONFIG_CMD_JFFS2 */
>
>
> #ifdef CONFIG_MTD_PARTITIONS
>
> /* MTD partition support */
> #define CONFIG_FLASH_CFI_MTD /* Export CFI flash to the MTD layer */
> #define CONFIG_CMD_MTDPARTS /* Turn on the "chpart" and "mtdparts" commands */
>
> /* Default MTD partition table */
> #define MTDIDS_DEFAULT "nor0=yourBoard-0"
> #define MTDPARTS_DEFAULT "mtdparts=yourBoard-0:" \
> "384k(U-Boot),128k(U-Boot Env)," \
> "384k(Backup U-Boot),128k(Backup U-Boot Env)," \
> "13m(FIT Image)," \
> "2m(Backup JFFS),112m(Data JFFS);"
>
> #endif /* CONFIG_MTD_PARTITIONS */
prev parent reply other threads:[~2009-09-15 1:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-15 1:08 [U-Boot] U-Boot v2009.08 & JFFS2 (NOR) Tommy Wang
2009-09-15 1:36 ` Jon Diekema [this message]
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=1252978601.5167.2.camel@racer \
--to=diekema@cideas.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.