How can I create TFFS at certain region and certain length in FLASH? - VxWorks

This is a discussion on How can I create TFFS at certain region and certain length in FLASH? - VxWorks ; Hi, I'm a new bie in VxWorks programming. I have a qustion now, I want to put more than one bootloader in the FLASH and this has been finished, after jumping to the right bootloader, the system can boot up, ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: How can I create TFFS at certain region and certain length in FLASH?

  1. How can I create TFFS at certain region and certain length in FLASH?

    Hi, I'm a new bie in VxWorks programming. I have a qustion now, I
    want to put more than one bootloader in the FLASH and this has been
    finished, after jumping to the right bootloader, the system can boot
    up, but the error message "tffsDevCreate failed" shows, I have modified
    some parameters in the bootrom below such as ROM_TEXT_BASE, cfi.top,
    vol.window.baseAddress, etc, but the problem still exist.
    I want to know, can it be viable that create true file system in
    the appointed address and appointed length?
    I use MIPS cpu, my flash type is AMD29LV, 8M FLASH, n*64K block
    size in the front and 8*8K BSP data at the end.
    Hope somebody help me, thanks very much.


  2. Re: How can I create TFFS at certain region and certain length in FLASH?


    george wrote:
    > Hi, I'm a new bie in VxWorks programming. I have a qustion now, I
    > want to put more than one bootloader in the FLASH and this has been
    > finished, after jumping to the right bootloader, the system can boot
    > up, but the error message "tffsDevCreate failed" shows, I have modified


    Hi george

    1) you can choose the disk start address with the raw space parameter
    (from format params)
    2) have you tested the tffsRawio access (are read/write/info ok)?

    Pascal


  3. Re: How can I create TFFS at certain region and certain length in FLASH?

    I've tested tffsRawio, it passed, the info is : ( I use tffsShowAll() )

    TFFS Version 2.2
    0: socket=RFA: type=0xffff, unitSize=0x10000, mediaSize=0x200000

    I think maybe the start address that I want to create TFFS is wrong, or
    the system don't support create TFFS at appointed address with
    appointed length. I get puzzled.

    pgdrum wrote:
    > Hi george
    >
    > 1) you can choose the disk start address with the raw space parameter
    > (from format params)
    > 2) have you tested the tffsRawio access (are read/write/info ok)?
    >
    > Pascal



  4. Re: How can I create TFFS at certain region and certain length in FLASH?

    I've tested tffsRawio, it passed, the info is : ( I use tffsShowAll() )

    TFFS Version 2.2
    0: socket=RFA: type=0xffff, unitSize=0x10000, mediaSize=0x200000

    I think maybe the start address that I want to create TFFS is wrong, or
    the system don't support creating TFFS at appointed address with
    appointed length. I get puzzled.

    pgdrum wrote:
    > Hi george
    >
    > 1) you can choose the disk start address with the raw space parameter
    > (from format params)
    > 2) have you tested the tffsRawio access (are read/write/info ok)?
    >
    > Pascal



  5. Re: How can I create TFFS at certain region and certain length in FLASH?

    Humm your type is a little bit strange. It seems that your identify
    method doesn't work correctly... As I remember the socket, unitSize,
    mediaSize are directly read from your driver configuration. The type is
    read from flash... Is 0xffff the right type?

    Pascal

    george wrote:
    > I've tested tffsRawio, it passed, the info is : ( I use tffsShowAll() )
    >
    > TFFS Version 2.2
    > 0: socket=RFA: type=0xffff, unitSize=0x10000, mediaSize=0x200000
    >
    > I think maybe the start address that I want to create TFFS is wrong, or
    > the system don't support creating TFFS at appointed address with
    > appointed length. I get puzzled.



  6. Re: How can I create TFFS at certain region and certain length in FLASH?

    I don't know if the 0xffff the right type.

    Now I can create file system succesully, the reason I got failed
    before is that I've disturbed the file system partion, when I use
    sysTffsFormat and set the right params.bootImageLen, the system boot up
    succesfully. But the new problem occurs,
    this time I create 4M file system, and tffsShowAll print
    "mediaSize=0x200000 " also, but when I use "ls" command on the console,
    there is only about 700K free. I upgrade an image file(about 1.2M), the
    error message shows that no enough space.

    Anywhere wrong?


  7. Re: How can I create TFFS at certain region and certain length in FLASH?


    Oh, I'm sorry, there's a mistake above.

    Should be "mediaSize=0x400000 "


  8. Re: How can I create TFFS at certain region and certain length in FLASH?

    How big is your bootImageLen... the free size is (+/-) the media
    size-bootImageLen.


  9. Re: How can I create TFFS at certain region and certain length in FLASH?

    The base address of my flash is 0xbe000000, the first bootrom start
    from 0xbe050000, the second bootrom start from 0xbe2f0000, so I set the
    bootImageLen to 0x2f0000+0x50000 (0x50000 is my bootrom size), since I
    want to boot the system with the second bootrom.

    Like you said, the free size is the media size-bootImageLen. I think I
    should change the media size to 8M. But I wonder if changing the media
    size and the bootImageLen can have a side effect.


  10. Re: How can I create TFFS at certain region and certain length in FLASH?

    I tested again, (the media size-bootImageLen) is about 4M, but the free
    space is still 600K,

    rfaSetWindow(FLSocket vol)
    {
    /* Physical base as a 4K page */
    vol.window.baseAddress = pgno(PHYS_TO_K1(AR531X_FLASH0+0x2F0000));
    /* george */
    flSetWindowSize(&vol, pgno(FLASH_BASE_LEN)); /* 16 M */
    }

    I resume the baseAddress to the origin value, then the free space is
    about 1M.
    rfaSetWindow(FLSocket vol)
    {
    /* Physical base as a 4K page */
    vol.window.baseAddress = pgno(PHYS_TO_K1(AR531X_FLASH0)); /*
    george */
    flSetWindowSize(&vol, pgno(FLASH_BASE_LEN)); /* 16 M */
    }

    The media size is 0x7f0000 (8M - 64K bsp data), the bootImageLen is
    0x340000.
    params.formatParams.bootImageLen = 0x50000+0x2F0000;
    baseAddress is:
    vol.window.baseAddress = PHYS_TO_K1(AR531X_FLASH0+0x2f0000) >> 12;
    /* george */
    But tge baseAddress seems to have no effect.

    Need I add some codes in the below function? Now it is empty.
    static void rfaSetMappingContext(FLSocket vol, unsigned page)
    {
    /* no mapping required */
    }


  11. Re: How can I create TFFS at certain region and certain length in FLASH?

    And should I add codes in vol.map()? Now the map function has not been
    defined.


  12. Re: How can I create TFFS at certain region and certain length in FLASH?

    I found that params.formatParams.bootImageLen is used only I format the
    system, so I think it no use setting it for creating TFFS. Is it right?


+ Reply to Thread