Vybrid MFG TOOL issue

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

Vybrid MFG TOOL issue

Jump to solution
2,785 Views
yibinjin
Contributor III

   hi ,I have a custom board of Vybrid VF6xx (64X16 DDR3, X8 Nand ),

I downloaded  the  Vybrid manufacturing tool ,try to burn my own u-boot and kernel.

i have read some docs about MFG TOOL , and  I think before burning my own uboot and kernel ,

MFG TOOL will download  specific mfg u-boot and Kernel into the target RAM first.Yet in the zip file i downloaded ,I only found

mfg u-boot ,no kernel. And in the UCL2.xml, it has only CMD to download mfg u-boot, as follows:

<LIST name="vybrid-nand-uboot" desc="Boot Vybrid FW">

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot_nand.vybrid" >Loading U-boot</CMD>

    <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

  <CMD state="Updater" type="push" body="nandinit addr=0x80000">Initializing NAND</CMD>

    <CMD state="Updater" type="push" body="pipenand addr=0x80000" file="files/u-boot-nand.vybrid">Sending and writing NAND U-Boot</CMD>

    <CMD state="Updater" type="push" body="$ !">Done</CMD>

  </LIST>

i have checked the MFG tool for IMX, i found both mfg u-boot and kernel would be downloaded  .

now i am totally confused  ,  seems to me ,it's not like what the docs about MFG said ,

and what i have to do ,if i want to customize firmware for my own vybrid board?

thanks so much

0 Kudos
1 Solution
2,161 Views
yibinjin
Contributor III

Hi ,Alejandro,

    my nand can boot now . I set the wrong PAGECNT, In CPU MODE ,  NFC_CFG[PAGECNT] should be 1 , even if splitting 4096 page into 2 virtual pages, I set it 2.  and In DMA mode , it should be 2.  But why ?

View solution in original post

0 Kudos
22 Replies
2,065 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

As you already noticed, MFGtool only burns data as a single image so the ROM code is able to boot that image from NAND.

To burn other images like kernel and RFS you need to add the nandwrite command and do something similar to this:

HOWTO Boot from NAND on Vybrid Tower Board | Timesys Embedded Linux

But to do so, you need to modify and generate the U-boot source code.

Best Regards,

Alejandro

0 Kudos
2,065 Views
yibinjin
Contributor III

hi,Alejandro

thanks for your reply

i can burn the u-boot_nand.vybird and u-boot-nand.vybrid file in the zip file of Vybrid MFG TOOL.

but when i rebuild the u-boot using the u-boot source in the zip file , it just won't work, i didn't change anything of the source,just rebuild

here is part of the log, it seems nandinit failed:

ModuleID[2] LevelID[10]: CmdOpreation[0]--OnDeviceChangeNotify, m_p_usb_port is not NULL, so only refresh

ModuleID[2] LevelID[10]: CmdOpreation[0]--OnDeviceChangeNotify, Volume/Device Arrive

ModuleID[2] LevelID[1]: CmdOpreation[0]--set m_hDeviceArriveEvent.

ModuleID[2] LevelID[10]: CmdOpreation[0]--WaitforEvents device arrive1

ModuleID[2] LevelID[10]: CmdOperation[0] device chagned and reset to state 1

ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is nandinit addr=0x80000

ModuleID[2] LevelID[1]: PortMgrDlg(0)--MSCDevice--Command Push(no file) excute failed

ModuleID[2] LevelID[10]: CmdOperation[0], current command executed failed, so SetEvent(hDevCanDeleteEvent)

ModuleID[2] LevelID[10]: DeviceManager::DevChangeWnd::OnDeviceChange() - DEVICE_REMOVAL_EVT(\\?\USB#VID_066F&PID_37FF#6&2c24ce2e&0&5#{a5dcbf10-6530-11d2-901f-00c04fb951ed})

ModuleID[2] LevelID[10]: DeviceManager::DevChangeWnd::OnDeviceChange() - end

here is the log from uart:

U-Boot 2013.07-rc3 (May 12 2015 - 13:02:47)

CPU:   Freescale Vybrid VF610 at 396 MHz

Reset cause: WDOG

Board: vf610twr

DRAM:  256 KiB

WARNING: Caches not enabled

NAND:  0 MiB

MMC:   FSL_SDHC: 0

Using default environment

In:    serial

Out:   serial

Err:   serial

Net:   CPU Net Initialization Failed

No ethernet found.

Hit any key to stop autoboot:  0

no devices available

GADGET DRIVER: usb_dnl_ums

fsl-usb2-udc: bind to driver

\Type 0x0, tag 0x00000001, param 1

utp_handle_message: version request

Type 0x1, tag 0x00000002, param 0

utp_handle_message: EXEC

addr: 0x80000

nandinit 0x80000<NULL>

No NAND devices available

utp_exec: pass

-resetting ...

U-Boot 2013.07-rc3 (May 12 2015 - 13:02:47)

CPU:   Freescale Vybrid VF610 at 396 MHz

Reset cause: WDOG

Board: vf610twr

DRAM:  256 KiB

WARNING: Caches not enabled

NAND:  0 MiB

MMC:   FSL_SDHC: 0

Using default environment

In:    serial

Out:   serial

Err:   serial

Net:   CPU Net Initialization Failed

No ethernet found.

Hit any key to stop autoboot:  0

no devices available

GADGET DRIVER: usb_dnl_ums

fsl-usb2-udc: bind to driver

\Type 0x0, tag 0x00000002, param 1

utp_handle_message: version request

Type 0x1, tag 0x00000003, param 0

utp_handle_message: EXEC

addr: 0x80000

nandinit 0x80000<NULL>

No NAND devices available

utp_exec: pass

-resetting ...

0 Kudos
2,065 Views
alejandrolozan1
NXP Employee
NXP Employee

I have noticed this problem before trying to flash something to quadspi.

The rebuild u-boot did not work. It seems that the folder is incorrect.

Let me try to get the correct one.

/Alejandro

0 Kudos
2,065 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Can you please try with the attached file?

I think you have to apply the patches.

This file is the one I used the make the qspi work.

/Alejandro

0 Kudos
2,065 Views
yibinjin
Contributor III

hi ,Alejandro,

  the u-boot source works fine after I accidentally added 1ms delay in the code below, yet I don't know why .

drivers/usb/gadget/fsl_updater.c

struct utp_user_data *utp_interpret_message(struct utp_user_data *uud2r)

{

struct utp_user_data *answer;

    struct utp_message *msg = &uud2r->data;

    if (msg->flags & UTP_FLAG_COMMAND) {

    answer = utp_handle_command(msg->command, msg->payload);

                mdelay(1);

    if (answer)                  

  return answer;                    

  } else if (msg->flags & UTP_FLAG_DATA) {

        switch(pinfo.media_type) {

            case NAND:

                              utp_pipe_nand(msg->data, msg->bufsize);

                            break;

            case SD:

                          utp_pipe_sd(msg->data, msg->bufsize);

                          break;

            case QSPI:

                          utp_pipe_qspi(msg->data, msg->bufsize);

              default:

                          break;

            }

            }

  return NULL;

}

2,065 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I faced some similar problem with the fsl_updater.c file trying to make it work with the QSPI and other qspi module.

Thanks a lot for the information. Were you able to make it work?

/Alejandro

0 Kudos
2,065 Views
yibinjin
Contributor III

Hi, Alejandro,

  my board did not boot from nand ,after I pipenand my host u-boot image to flash using the MFG,here is the data I used to blow fuse:

OTP fuse bank0 word5: 0x00000280

                bank0 word6: 0x00000010

I used a different NAND chips from TWR board, which is X 8bit ,4096+224 bytes per page(micron MT29F8G08ABAC),

Does the u-boot for MFG support this chip ?

anyway ,I am still working on it , if you have any clue about it , please tell me ,thank you so much

0 Kudos
2,065 Views
alejandrolozan1
NXP Employee
NXP Employee

Also please do not blow the fuses, first try to use BOOT_CFG pins first.

0 Kudos
2,162 Views
yibinjin
Contributor III

Hi ,Alejandro,

    my nand can boot now . I set the wrong PAGECNT, In CPU MODE ,  NFC_CFG[PAGECNT] should be 1 , even if splitting 4096 page into 2 virtual pages, I set it 2.  and In DMA mode , it should be 2.  But why ?

0 Kudos
2,065 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Without your code I think I cannot give many details, but I wonder if you are setting the correct value in NFC_RPT[COUNT]. If this is set to 0 or 1 the command is issued only once and as fas as I understand the command should be issued once per virtual page.

If possible, could you share your code?

Best Regards,

Alejandro

0 Kudos
2,064 Views
yibinjin
Contributor III

hi, Alejandro

     please check the attachment.

0 Kudos
2,065 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I have to verify that. But I would star checking if data was writen correctly in NAND first.

Let me verify datasheet of the NAND chip.

/Alejandro

0 Kudos
2,063 Views
yibinjin
Contributor III

Hi,Alejandro

   I think the u-boot does not support 4k page NAND in Vybrid system. the Vybrid NFC have to split the 4k page into 2 2k virtual pages , and the splitting is kind of complex ,I did not find any driver to support this.

    anyway, I am trying to modify the driver to support this virtual page thing ,

yet I am confused about the NFC work flow in the Vybrid datasheet,

especially section 32.4.6 Orgnization of the Data in the Nand Flash,

1.How exactly is data in the NAND mapped into the two NFC Buffer?

2.why is the swap address 1984/8 in table 32-22 ,not just 1984?

3.if I set the swap address ,does that mean it only works in NFC Buffer 0?

0 Kudos
2,063 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,


My recommendation is to try this before HOWTO Boot from NAND on Vybrid Tower Board | Timesys Embedded Linux 

After this is working, I would try with the mfgtool verision. ​

Which RM version are you referring to? In the RM I see 4 NFC buffers not 2.

/Alejandro

0 Kudos
2,063 Views
yibinjin
Contributor III

I don't have sd card on my board,the only way to burn the image is UART or USB.

I know there are 4 buffers.  Now I only use 2 buffers, buffer0 for virtual page 0, and buffer1 for virtual page1.

it works fine when reading ,but when writing ,only the  data in buffer0 is programmed into the NAND,

0 Kudos
2,063 Views
yibinjin
Contributor III

I tried to add delay in somewhere else ,but it seems that it only works at just int he utp_interpret_message function.

0 Kudos
2,063 Views
yibinjin
Contributor III

   yes,once i add the mdelay(1), I can actually burn the host u-boot into the flash using MFG tools,

before that it is stuck at nandinit as I listed before.

  yet still I don't know what's really going on with the adding 1ms delay.

0 Kudos
2,063 Views
yibinjin
Contributor III

Hi,Alejandro,I have this error information when extract the u-boot.tar.gz

tar: u-boot/arch/arm/include/asm/arch: Cannot create symlink to `arch-vf610': File exists

tar: u-boot/arch/arm/include/asm/proc: Cannot create symlink to `proc-armv': File exists

tar: u-boot/include/asm/arch: Cannot hard link to `u-boot/arch/arm/include/asm/arch': File exists

tar: u-boot/include/asm/proc: Cannot hard link to `u-boot/arch/arm/include/asm/proc': File exists

tar: u-boot/include/asm: Cannot open: File exists

tar: Exiting with failure status due to previous errors

0 Kudos
2,063 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Can you try with this one?

0 Kudos
2,065 Views
yibinjin
Contributor III

Hi,Alejandro

do i have to apply all the patches?

i found that some patches applied failed , so i change the files manually,

and there is no vf610twr_nand.h, i use the old one ine the MFG zip

but still ,it won't work after rebuild.

0 Kudos