This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

about eccpos in UBL and U-BOOT

Dear all,

  My hardware is dm365-evm. sw is dvsdk4.00.

  In UBL, eccpos is in 0, 16, 32, 48,  source in flash_utils/DM36x/Common/src/device_nand.c

DEVICE_NAND_MAX_SPAREBYTES_PER_OP, // bytesPerOp 
       {0*16  ,1*16  ,2*16  ,3*16  ,      // spareOffsets
        4*16  ,5*16  ,6*16  ,7*16  ,
        8*16  ,9*16  ,10*16 ,11*16 ,
        12*16 ,13*16 ,14*16 ,15*16
       }

 

 In UBOOT/kernel, ecc pos is form 24-64, source in uboot/drivers/mtd/nand/davinci_nand.c

.eccpos = {
                24, 25, 26, 27, 28,
                29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
                39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
                49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
                59, 60, 61, 62, 63,
                },
        .oobfree = {
                {.offset = 2, .length = 22, },
        },

 

 So if I want to flash u-boot/ubl  in the u-boot/kernel, I need to change one.

 If I changed the ubl codes, the evm can't boot; if I changed the UBOOT and kernel, the bad block table can't read correct.

Please help, thanks!

  Wei Jiang

 

  • Wei Jiang,

    If you want to be able to flash ubl from u-boot or when running the linux kernel, you will have to match the ecc positions assumed by RBL.  You will have to make these changes in both u-boot and the kernel since neither of them match the RBL implementation.  Most people don't flash ubl without using the serial flash loader so they don't have to worry about this.  It can be done.  Let me know if you have any more questions.

     

  • Dear Luke,

      Thanks for your reply.

      I don't want to flash ubl.

     But I want to flash u-boot sometimes. As current u-boot doesn't support "go" command neither, It will be not easy to development the u-boot for our board. Everytime I changed the u-boot src, I need to use the serial flash loader to flash the u-boot.bin.

      Plz give me your advice, thanks again.

      Wei Jiang

  • UBL is expecting the ecc layout the same way that the serial flash loader programs it in.  In order to have u-boot or the kernel program u-boot, you will have to modify the ecc layout in both to match what the serial flash loader does.

     

    What's so bad about using the serial flash loader?  Doing u-boot development is necessarily tedious in this regard.