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.

Problem updating in ARM Uboot in NAND FLASH

Other Parts Discussed in Thread: 66AK2H14

Hi,

We have designed board with ARM (66AK2H14) processor and 512MB NAND FLASH

Built the u-boot using commands,

make clean
make k2hk_evm_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
make u-boot-nand.gph ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-


And in bare board, i was able to load the u-boot for first time and it booted up properly,

U-Boot 2015.07-00080-g68db1b0-dirty (Mar 04 2016 - 10:55:28 +0530)

CPU: 66AK2Hx SR2.0
I2C:   ready
DRAM:  DDR3 PLL (PLL2) Setup ... 
DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
DDR3A initialization c

U-Boot 2015.07-00080-g68db1b0-dirty (Mar 04 2016 - 10:55:28 +0530)

CPU: 66AK2Hx SR2.0
I2C:   ready
DRAM:  DDR3 PLL (PLL2) Setup ... 
DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
DDR3A initialization complete 
2 GiB
NAND:  
*maf_id 2c *dev_id ac512 MiB
*** Warning - bad CRC, using default environment

Net:   
 link_type_name sgmii0_link_type
 Mdio clkdiv 188 3a980000 2625a0
 @@@ address 15 reg 2 bus->priv feeff010
 @@@ address 15 reg 3 bus->priv feeff010
 @@@ address 15 reg 0 bus->priv feeff010
 address 15 reg 0 bus->priv feeff010
 @@@ address 15 reg 0 bus->priv feeff010
 @@@ address 15 reg 1 bus->priv feeff010
 @@@ address 15 reg 4 bus->priv feeff010
 @@@ address 15 reg 0 bus->priv feeff010
 @@@ address 15 reg 0 bus->priv feeff010
 address 15 reg 0 bus->priv feeff010K2HK_EMAC
Warning: K2HK_EMAC using MAC address from net device

Hit any key to stop autoboot:  1  0 

After customizing the u-boot, i followed up nand erase procedure and flashed u-boot in in NAND,

nand erase.part bootloader; nand write ${addr_uboot} bootloader ${filesize}

When i restarted the board, i could see only old uboot and not the updated uboot.. Verified with the time and date .

To cross check this, i loaded the uboot through CCS and executed,

I could get the updated u-boot prompt,

CPU: 66AK2Hx SR2.0
I2C:   ready
DRAM:  DDR3 PLL (PLL2) Setup ... 
DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
DDR3A initialization complete 
1 GiB
NAND:  512 MiB
*** Warning - bad CRC, using default environment

Net:   
 link_type_name sgmii0_link_typeK2HK_EMAC
Warning: K2HK_EMAC using MAC address from net device

Hit any key to stop autoboot:  1  0 

But when the same uboot when flashed in NAND ,it boots with old uboot image and not with updated uboot.

I suspect, uboot is booting from location which is not erased.

How to check it.

Please guide to solve this issue.


  • But when the same uboot when flashed in NAND ,it boots with old uboot image and not with updated uboot.

    I suspect, uboot is booting from location which is not erased.

    Yes, you are right.
    Bootloader size is declared for 1MiB, so you can manually erase the 1MiB NAND blocks and write it.

    Before nand write, dump the NAND page to make sure that NAND page is erased.
    As we know, always, we should erase the NAND block before write.

    I'm able to update the u-boot in NAND flash on K2H EVM board.

    nand dump 0
    nand erase 0 0x100000
    nand dump 0 (Here you should see 0xFFs)
    tftpboot 0x82000000 $tftp_root/u-boot-nand-k2hk-evm.gph
    nand write 0x82000000 0 0x100000
    nand dump 0 (you should see non FFs)
  • Hi,

    I have tried this and its same.

    I am using  u-boot-2015.07+gitAUTOINC+5922e09363 source,


    Attached log,

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.05.11 12:06:15 =~=~=~=~=~=~=~=~=~=~=~=
    
    U-Boot 2015.07-00080-g68db1b0-dirty (Mar 04 2016 - 10:55:28 +0530)
    
    CPU: 66AK2Hx SR2.0
    I2C:   ready
    DRAM:  DDR3 PLL (PLL2) Setup ...
    DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
    DDR3A initialization complete
    2 GiB
    NAND:
    *maf_id 2c *dev_id ac512 MiB
    Net:
     link_type_name sgmii0_link_type
     Mdio clkdiv 188 3a980000 2625a0
     @@@ address 15 reg 2 bus->priv feefef80
     @@@ address 15 reg 3 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 1 bus->priv feefef80
     @@@ address 15 reg 4 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     address 15 reg 0 bus->priv feefef80K2HK_EMAC
    Hit any key to stop autoboot:  0
    
    U-Boot# 
    U-Boot# tftp 10  82000000 arm-u-boot-nand.gph
    
    TFTP from server 172.17.1.146; our IP address is 172.17.1.57
    Filename 'arm-u-boot-nand.gph'.
    Load address: 0x82000000
    Loading: #######################################
      174.8 KiB/s
    done
    Bytes transferred = 379952 (5cc30 hex)
    U-Boot#  
    U-Boot# 
    U-Boot# nand dump 0
    Page 00000000 dump:
    00 05 cc 20 0c 00 10 00  be 00 00 ea 14 f0 9f e5
    14 f0 9f e5 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5
    14 f0 9f e5 14 f0 9f e5  60 10 00 0c c0 10 00 0c
    20 11 00 0c 80 11 00 0c  e0 11 00 0c 40 12 00 0c
    a0 12 00 0c ef be ad de  de c0 ad 0b 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  28 d0 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    50 20 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 3b 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  88 d0 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    b0 20 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 29 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  e8 d0 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    10 21 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 17 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  48 d1 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    70 21 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 05 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  a8 d1 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    d0 21 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 f3 01 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  08 d2 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    30 22 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 e7 01 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  68 d2 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    90 22 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 c9 01 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  10 00 00 ea 00 00 0f e1
    1f 10 00 e2 1a 00 31 e3  1f 00 c0 13 13 00 80 13
    c0 00 80 e3 00 f0 29 e1  10 0f 11 ee 02 0a c0 e3
    10 0f 01 ee 6c 00 9f e5  10 0f 0c ee 68 00 00 eb
    15 0f 07 ee 9a 0f 07 ee  95 0f 07 ee 1e ff 2f e1
    ed ff ff ea 00 00 a0 e3  17 0f 08 ee 15 0f 07 ee
    d5 0f 07 ee 9a 0f 07 ee  95 0f 07 ee 10 0f 11 ee
    02 0a c0 e3 07 00 c0 e3  02 00 80 e3 02 0b 80 e3
    01 0a 80 e3 10 0f 01 ee  0e 50 a0 e1 10 1f 10 ee
    21 3a a0 e1 0f 30 03 e2  0f 40 01 e2 03 22 a0 e1
    02 20 84 e1 05 f0 a0 e1  00 10 00 0c 70 47 70 47
    70 47 70 47 70 47 00 23  07 ee 15 3f 07 ee d5 3f
    bf f3 4f 8f bf f3 6f 8f  70 47 70 47 70 47 10 b5
    04 46 00 f0 5a fa 00 f0  63 fb ff f7 ec ff e3 07
    06 d5 00 f0 69 fb ff f7  f0 ff ff f7 df ff 05 e0
    ff f7 dd ff ff f7 df ff  00 f0 48 fb ff f7 e6 ff
    00 20 10 bd 03 20 ff f7  e2 bf 01 38 fd d1 70 47
    38 b5 4b 46 00 24 0a 20  4d 46 c3 f8 90 40 c3 f8
    8c 40 00 f0 3d fe 4f f4  7a 71 38 f0 fd fc c5 f8
    88 00 20 46 38 bd 30 b5  52 ec 0e 1f 4b 46 c3 f8
    90 10 c3 f8 8c 20 00 22  d3 f8 8c 10 d3 f8 90 00
    0d 46 42 ea 00 04 20 46  30 bd 37 b5 05 46 ff f7
    ea ff 0c 46 4b 46 d3 f8  88 10 22 46 00 23 8d e8
    11 00 52 ea 03 04 03 d1  38 f0 d6 fc 00 90 02 e0
    68 46 34 f0 9b fb 00 98  40 1b 3e bd 4b 46 37 b5
    d3 f8 88 30 00 25 a0 fb  03 01 0c 46 cd e9 00 01
    54 ea 05 03 06 d1 4f f4  7a 71 38 f0 bd fc 8d e8
    21 00 04 e0 68 46 4f f4  7a 71 34 f0 7f fb dd e9
    00 45 ff f7 b8 ff 24 18  45 eb 01 05 ff f7 b3 ff
    a9 42 08 bf a0 42 f9 d3  3e bd 4b 46 d3 f8 88 00
    70 47 00 00 88 d0 9f e5  07 d0 cd e3 0d 20 a0 e1
    a8 d0 4d e2 07 d0 cd e3  0d 90 a0 e1 0d 10 a0 e1
    00 00 a0 e3 02 00 51 e1  00 00 81 35 04 10 81 32
    fb ff ff 3a e1 0c 00 fa  3c d0 99 e5 07 d0 cd e3
    00 90 99 e5 a8 90 49 e2  0c e0 8f e2 40 00 99 e5
    00 e0 8e e0 2c 00 99 e5  14 00 00 ea 10 00 00 eb
    7e ff ff eb 2c 00 9f e5  2c 10 9f e5 00 20 a0 e3
    01 00 50 e1 00 20 80 35  04 00 80 32 fb ff ff 3a
    a3 0c 00 fb a3 0c 00 fa  09 00 a0 e1 2c 10 99 e5
    08 f0 9f e5 50 ff 1f 0c  c0 4b 05 0c 8c 4a 0b 0c
    b1 49 00 0c 2c 00 99 e5  10 0f 0c ee 1e ff 2f e1
    4c 10 9f e5 01 40 50 e0  10 00 00 0a 44 20 9f e5
    00 0c b1 e8 00 0c a0 e8  02 00 51 e1 fb ff ff 3a
    34 20 9f e5 34 30 9f e5  03 00 b2 e8 ff 10 01 e2
    17 00 51 e3 03 00 00 1a  04 00 80 e0 00 10 90 e5
    04 10 81 e0 00 10 80 e5  03 00 52 e1 f5 ff ff 3a
    1e ff 2f e1 00 10 00 0c  c0 4b 05 0c c0 4b 05 0c
    20 dc 05 0c 4b 46 00 b5  1a 68 89 b0 00 23 05 93
    91 6c 03 93 07 93 8d e8  0a 00 02 23 d1 6c 04 91
    11 6d 52 6d 02 91 69 46  06 92 04 aa 05 f0 9a fe
    09 b0 00 bd 4b 46 73 b5  1b 68 05 46 01 f4 00 74
    06 6e 1b 6c 14 48 01 93  10 f0 62 fa 38 b1 10 21
    01 aa 35 f0 41 fd 11 48  01 99 10 f0 df fc 0f 20
    01 f0 da fb 0e 4b 0f 49  0f 48 00 2c 18 bf 19 46
    10 f0 d4 fc aa 20 01 f0  cf fb ff f7 cb fe 2b 6f
    0b b1 ea 6e 02 e0 4b 46  1b 68 5a 6c 14 b9 20 46
    01 99 b0 47 7c bd 00 bf  81 d6 03 0c 88 d6 03 0c
    6a d6 03 0c 05 a3 04 0c  ad d6 03 0c 4b 46 10 b5
    1c 68 69 46 1b 68 a1 f5  80 51 da 6c a3 6c d2 18
    52 1a bd e8 10 40 33 f0  0c b9 70 47 70 b5 05 46
    33 48 10 f0 1d fa 2b 6f  4b b1 28 46 11 f0 19 fe
    00 28 5b d0 2f 48 10 f0  99 fc 34 f0 b7 fa 4a 46
    2d 4e 11 68 4c 6c 05 21  a3 60 e3 60 23 61 2b 4b
    84 e8 42 00 04 f1 14 01  19 60 13 68 c8 b1 03 46
    1e 46 13 f8 01 2b 20 2a  fa d0 92 b1 24 4b 30 46
    a3 61 34 f0 1f ff 0d 30  31 46 80 08 60 61 1f 4c
    20 68 08 30 34 f0 ba fe  23 68 1a 68 03 eb 82 03
    23 60 4b 46 19 49 1a 68  04 20 1a 4c 0b 68 96 6c
    83 e8 11 00 de 60 d6 6c  5c 61 18 61 9e 60 14 6d
    dc 61 52 6d 9a 61 03 f1  20 02 0a 60 6a 6e 5a b1
    ac 6e 4c b1 4d 46 2d 68  0f 4d 9a 62 a2 1a 18 62
    5d 62 da 62 30 33 0b 60  08 4c 20 46 ff f7 9d ff
    4b 46 00 22 1b 68 23 68  5a 60 1a 60 70 bd 00 bf
    c6 d6 03 0c cf d6 03 0c  01 00 41 54 c0 4b 05 0c
    09 00 41 54 02 00 41 54  05 00 42 54 f8 b5 10 f0
    c0 06 04 46 1d 46 16 d1  14 f4 80 77 18 46 02 d0
    ff f7 7c ff 0d e0 14 f4  c0 66 04 d0 21 46 ff f7
    29 ff 38 46 f8 bd ff f7  71 ff 28 46 21 46 ff f7
    21 ff 30 46 f8 bd 4f f0  ff 30 f8 bd 38 b5 0d 46
    43 6a 04 46 09 49 8b 42  04 d0 09 48 10 f0 f2 fb
    OOB:
    ff ff ff ff ff ff a7 b7
    fe f3 7d a2 87 96 db 8e
    ff ff ff ff ff ff b7 47
    c9 6c 53 67 b5 d6 7d ee
    ff ff ff ff ff ff 56 aa
    7f 89 cf 8f 47 74 c3 be
    ff ff ff ff ff ff df e2
    4e f4 f9 1c ae 1c 12 a8
    U-Boot# nand erase 0 0x100000
    
    NAND erase: device 0 offset 0x0, size 0x100000
    
    Erasing at 0x0 --  12% complete.
    Erasing at 0x20000 --  25% complete.
    Erasing at 0x40000 --  37% complete.
    Erasing at 0x60000 --  50% complete.
    Erasing at 0x80000 --  62% complete.
    Erasing at 0xa0000 --  75% complete.
    Erasing at 0xc0000 --  87% complete.
    Erasing at 0xe0000 -- 100% complete.
    OK
    U-Boot# nand dump 0
    Page 00000000 dump:
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
    OOB:
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    U-Boot# nand write 0x82000000 0 0x100000
    
    NAND write: device 0 offset 0x0, size 0x100000
     1048576 bytes written: OK
    U-Boot# nand dump 0 
    Page 00000000 dump:
    00 05 cc 20 0c 00 10 00  be 00 00 ea 14 f0 9f e5
    14 f0 9f e5 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5
    14 f0 9f e5 14 f0 9f e5  60 10 00 0c c0 10 00 0c
    20 11 00 0c 80 11 00 0c  e0 11 00 0c 40 12 00 0c
    a0 12 00 0c ef be ad de  de c0 ad 0b 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  28 d0 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    50 20 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 3b 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  88 d0 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    b0 20 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 29 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  e8 d0 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    10 21 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 17 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  48 d1 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    70 21 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 05 02 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  a8 d1 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    d0 21 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 f3 01 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  08 d2 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    30 22 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 e7 01 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  68 d2 1f e5 00 e0 8d e5
    00 e0 4f e1 04 e0 8d e5  13 d0 a0 e3 0d f0 69 e1
    0f e0 a0 e1 0e f0 b0 e1  48 d0 4d e2 ff 1f 8d e8
    90 22 1f e5 0c 00 92 e8  48 00 8d e2 34 50 8d e2
    0e 10 a0 e1 0f 00 85 e8  0d 00 a0 e1 c9 01 00 fa
    00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
    00 f0 20 e3 00 f0 20 e3  10 00 00 ea 00 00 0f e1
    1f 10 00 e2 1a 00 31 e3  1f 00 c0 13 13 00 80 13
    c0 00 80 e3 00 f0 29 e1  10 0f 11 ee 02 0a c0 e3
    10 0f 01 ee 6c 00 9f e5  10 0f 0c ee 68 00 00 eb
    15 0f 07 ee 9a 0f 07 ee  95 0f 07 ee 1e ff 2f e1
    ed ff ff ea 00 00 a0 e3  17 0f 08 ee 15 0f 07 ee
    d5 0f 07 ee 9a 0f 07 ee  95 0f 07 ee 10 0f 11 ee
    02 0a c0 e3 07 00 c0 e3  02 00 80 e3 02 0b 80 e3
    01 0a 80 e3 10 0f 01 ee  0e 50 a0 e1 10 1f 10 ee
    21 3a a0 e1 0f 30 03 e2  0f 40 01 e2 03 22 a0 e1
    02 20 84 e1 05 f0 a0 e1  00 10 00 0c 70 47 70 47
    70 47 70 47 70 47 00 23  07 ee 15 3f 07 ee d5 3f
    bf f3 4f 8f bf f3 6f 8f  70 47 70 47 70 47 10 b5
    04 46 00 f0 5a fa 00 f0  63 fb ff f7 ec ff e3 07
    06 d5 00 f0 69 fb ff f7  f0 ff ff f7 df ff 05 e0
    ff f7 dd ff ff f7 df ff  00 f0 48 fb ff f7 e6 ff
    00 20 10 bd 03 20 ff f7  e2 bf 01 38 fd d1 70 47
    38 b5 4b 46 00 24 0a 20  4d 46 c3 f8 90 40 c3 f8
    8c 40 00 f0 3d fe 4f f4  7a 71 38 f0 fd fc c5 f8
    88 00 20 46 38 bd 30 b5  52 ec 0e 1f 4b 46 c3 f8
    90 10 c3 f8 8c 20 00 22  d3 f8 8c 10 d3 f8 90 00
    0d 46 42 ea 00 04 20 46  30 bd 37 b5 05 46 ff f7
    ea ff 0c 46 4b 46 d3 f8  88 10 22 46 00 23 8d e8
    11 00 52 ea 03 04 03 d1  38 f0 d6 fc 00 90 02 e0
    68 46 34 f0 9b fb 00 98  40 1b 3e bd 4b 46 37 b5
    d3 f8 88 30 00 25 a0 fb  03 01 0c 46 cd e9 00 01
    54 ea 05 03 06 d1 4f f4  7a 71 38 f0 bd fc 8d e8
    21 00 04 e0 68 46 4f f4  7a 71 34 f0 7f fb dd e9
    00 45 ff f7 b8 ff 24 18  45 eb 01 05 ff f7 b3 ff
    a9 42 08 bf a0 42 f9 d3  3e bd 4b 46 d3 f8 88 00
    70 47 00 00 88 d0 9f e5  07 d0 cd e3 0d 20 a0 e1
    a8 d0 4d e2 07 d0 cd e3  0d 90 a0 e1 0d 10 a0 e1
    00 00 a0 e3 02 00 51 e1  00 00 81 35 04 10 81 32
    fb ff ff 3a e1 0c 00 fa  3c d0 99 e5 07 d0 cd e3
    00 90 99 e5 a8 90 49 e2  0c e0 8f e2 40 00 99 e5
    00 e0 8e e0 2c 00 99 e5  14 00 00 ea 10 00 00 eb
    7e ff ff eb 2c 00 9f e5  2c 10 9f e5 00 20 a0 e3
    01 00 50 e1 00 20 80 35  04 00 80 32 fb ff ff 3a
    a3 0c 00 fb a3 0c 00 fa  09 00 a0 e1 2c 10 99 e5
    08 f0 9f e5 50 ff 1f 0c  c0 4b 05 0c 8c 4a 0b 0c
    b1 49 00 0c 2c 00 99 e5  10 0f 0c ee 1e ff 2f e1
    4c 10 9f e5 01 40 50 e0  10 00 00 0a 44 20 9f e5
    00 0c b1 e8 00 0c a0 e8  02 00 51 e1 fb ff ff 3a
    34 20 9f e5 34 30 9f e5  03 00 b2 e8 ff 10 01 e2
    17 00 51 e3 03 00 00 1a  04 00 80 e0 00 10 90 e5
    04 10 81 e0 00 10 80 e5  03 00 52 e1 f5 ff ff 3a
    1e ff 2f e1 00 10 00 0c  c0 4b 05 0c c0 4b 05 0c
    20 dc 05 0c 4b 46 00 b5  1a 68 89 b0 00 23 05 93
    91 6c 03 93 07 93 8d e8  0a 00 02 23 d1 6c 04 91
    11 6d 52 6d 02 91 69 46  06 92 04 aa 05 f0 9a fe
    09 b0 00 bd 4b 46 73 b5  1b 68 05 46 01 f4 00 74
    06 6e 1b 6c 14 48 01 93  10 f0 62 fa 38 b1 10 21
    01 aa 35 f0 41 fd 11 48  01 99 10 f0 df fc 0f 20
    01 f0 da fb 0e 4b 0f 49  0f 48 00 2c 18 bf 19 46
    10 f0 d4 fc aa 20 01 f0  cf fb ff f7 cb fe 2b 6f
    0b b1 ea 6e 02 e0 4b 46  1b 68 5a 6c 14 b9 20 46
    01 99 b0 47 7c bd 00 bf  81 d6 03 0c 88 d6 03 0c
    6a d6 03 0c 05 a3 04 0c  ad d6 03 0c 4b 46 10 b5
    1c 68 69 46 1b 68 a1 f5  80 51 da 6c a3 6c d2 18
    52 1a bd e8 10 40 33 f0  0c b9 70 47 70 b5 05 46
    33 48 10 f0 1d fa 2b 6f  4b b1 28 46 11 f0 19 fe
    00 28 5b d0 2f 48 10 f0  99 fc 34 f0 b7 fa 4a 46
    2d 4e 11 68 4c 6c 05 21  a3 60 e3 60 23 61 2b 4b
    84 e8 42 00 04 f1 14 01  19 60 13 68 c8 b1 03 46
    1e 46 13 f8 01 2b 20 2a  fa d0 92 b1 24 4b 30 46
    a3 61 34 f0 1f ff 0d 30  31 46 80 08 60 61 1f 4c
    20 68 08 30 34 f0 ba fe  23 68 1a 68 03 eb 82 03
    23 60 4b 46 19 49 1a 68  04 20 1a 4c 0b 68 96 6c
    83 e8 11 00 de 60 d6 6c  5c 61 18 61 9e 60 14 6d
    dc 61 52 6d 9a 61 03 f1  20 02 0a 60 6a 6e 5a b1
    ac 6e 4c b1 4d 46 2d 68  0f 4d 9a 62 a2 1a 18 62
    5d 62 da 62 30 33 0b 60  08 4c 20 46 ff f7 9d ff
    4b 46 00 22 1b 68 23 68  5a 60 1a 60 70 bd 00 bf
    c6 d6 03 0c cf d6 03 0c  01 00 41 54 c0 4b 05 0c
    09 00 41 54 02 00 41 54  05 00 42 54 f8 b5 10 f0
    c0 06 04 46 1d 46 16 d1  14 f4 80 77 18 46 02 d0
    ff f7 7c ff 0d e0 14 f4  c0 66 04 d0 21 46 ff f7
    29 ff 38 46 f8 bd ff f7  71 ff 28 46 21 46 ff f7
    21 ff 30 46 f8 bd 4f f0  ff 30 f8 bd 38 b5 0d 46
    43 6a 04 46 09 49 8b 42  04 d0 09 48 10 f0 f2 fb
    OOB:
    ff ff ff ff ff ff a7 b7
    fe f3 7d a2 87 96 db 8e
    ff ff ff ff ff ff b7 47
    c9 6c 53 67 b5 d6 7d ee
    ff ff ff ff ff ff 56 aa
    7f 89 cf 8f 47 74 c3 be
    ff ff ff ff ff ff df e2
    4e f4 f9 1c ae 1c 12 a8
    U-Boot#  
    U-Boot# 
    U-Boot# 
    U-Boot# 
    
    U-Boot 2015.07-00080-g68db1b0-dirty (Mar 04 2016 - 10:55:28 +0530)
    
    CPU: 66AK2Hx SR2.0
    I2C:   ready
    DRAM:  DDR3 PLL (PLL2) Setup ... 
    DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
    DDR3A initialization complete 
    2 GiB
    NAND:  
    *maf_id 2c *dev_id ac512 MiB
    Net:   
     link_type_name sgmii0_link_type
     Mdio clkdiv 188 3a980000 2625a0
     @@@ address 15 reg 2 bus->priv feefef80
     @@@ address 15 reg 3 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 1 bus->priv feefef80
     @@@ address 15 reg 4 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     address 15 reg 0 bus->priv feefef80K2HK_EMAC
    Hit any key to stop autoboot:  1  0 
    U-Boot# 
    U-Boot# 

  • Also please make sure that you are not flashing the same uboot which is already booted up, so may not get any difference right.
    You can erase the NAND flash and try to boot, see whether you able to get uboot prompt or not.

    u-boot# nand erase 0 0x100000
    u-boot# reset

    Check now, whether you are getting uboot ??
    If yes, then we need to increase the size of erasing area.
    If not, surely you are flashing the same uboot again and again :-)
  • I have tried this also,

    nand erase 0 0x100000

    Nothing boots up. So confirmed  flash is erased correctly.

    Even i tried below commands and loaded the u boot , but still only old one boots,

    nand erase.chip

    nand scrub.chip

    If not, surely you are flashing the same uboot again and again :-)

    Surely i am not flashing the same u boot. I confirmed by loading u boot.bin of newly compiled uboot source through CCS and executed ,

    It booted with latest changes, you can see the below log,

    CPU: 66AK2Hx SR2.0
    I2C:   ready
    DRAM:  DDR3 PLL (PLL2) Setup ... 
    DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
    DDR3A initialization complete 
    1 GiB
    NAND:  512 MiB
    *** Warning - bad CRC, using default environment
    
    Net:   
     link_type_name sgmii0_link_typeK2HK_EMAC
    Warning: K2HK_EMAC using MAC address from net device
    
    Hit any key to stop autoboot:  1  0 

    This uboot (u-boot-2015.07+gitAUTOINC+5922e09363  ) souce doesnt have NAND built command in MAKEFILE,

    You gave us script to be included in Makifile to generate nand boot image.

    u-boot-nand.gph:        u-boot.bin
                    $(objtree)/tools/mkimage -A $(ARCH) -T gpimage -C none \
                            -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
                            -n U-Boot -d u-boot.bin gph-u-boot.bin
                    @dd if=/dev/zero of=$(obj)zero.bin bs=8 count=1 2>/dev/null
                    @cat $(obj)gph-u-boot.bin $(obj)zero.bin > $@
                    @rm $(obj)zero.bin

    Does this create any issue,


  • nand erase 0 0x100000

    Nothing boots up. So confirmed flash is erased correctly.

    Its very clear that you are flashing the same image.
    Can you please attach the logs of both uboot (old&new) ?
    Please attach the logs as files, don't paste the logs.

    That change won't create any problem.

    Attach the u-boot logs for both new and old u-boot, will see the time stamp.

    u-boot-nand-k2hk-evm_old.gph
    u-boot-nand-k2hk-evm_new.gph

    nand dump 0
    nand erase 0 0x100000
    nand dump 0 (Here you should see 0xFFs)
    tftpboot 0x82000000 $tftp_root/u-boot-nand-k2hk-evm_old.gph
    nand write 0x82000000 0 0x100000
    nand dump 0 (you should see non FFs)
    Get the logs:
    reset



    nand dump 0
    nand erase 0 0x100000
    nand dump 0 (Here you should see 0xFFs)
    tftpboot 0x82000000 $tftp_root/u-boot-nand-k2hk-evm_new.gph
    nand write 0x82000000 0 0x100000
    nand dump 0 (you should see non FFs)
    Get the logs:
    reset
  • U-Boot# H�H�UI��&�LM7-00080-g68db1b0-dirty (May 10 2016 - 20:33:06 +0530)
    
    CPU: 66AK2Hx SR2.0
    I2C:   ready
    DRAM:  DDR3 PLL (PLL2) Setup ...
    DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
    DDR3A initialization complete
    1 GiB
    NAND:  512 MiB
    Net:
     link_type_name sgmii0_link_typeK2HK_EMAC
    Hit any key to stop autoboot:  0
    U-Boot#
    U-Boot#
    U-Boot#
    
    U-Boot 2015.07-00080-g68db1b0-dirty (Mar 04 2016 - 10:55:28 +0530)
    
    CPU: 66AK2Hx SR2.0
    I2C:   ready
    DRAM:  DDR3 PLL (PLL2) Setup ...
    DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
    DDR3A initialization complete
    2 GiB
    NAND:
    *maf_id 2c *dev_id ac512 MiB
    Net:
     link_type_name sgmii0_link_type
     Mdio clkdiv 188 3a980000 2625a0
     @@@ address 15 reg 2 bus->priv feefef80
     @@@ address 15 reg 3 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 1 bus->priv feefef80
     @@@ address 15 reg 4 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     @@@ address 15 reg 0 bus->priv feefef80
     address 15 reg 0 bus->priv feefef80K2HK_EMAC
    Hit any key to stop autoboot:  0
    U-Boot#
    U-Boot#
    

    Please find the attachment,


    New image (u-boot-nand-k2hk-evm_new.txt) in screen shot is the  uboot that is loaded through CCS.

  • Seems, you have difference logs in both uboot binaries with different time stamp.
    The only way is, you need to make sure that you are loading the correct new u-boot binary to RAM to write the image.

    tftpboot 0x82000000 $tftp_root/u-boot-nand-k2hk-evm_new.gph
    nand write 0x82000000 0 0x100000


    I don't have any other suggestions on this problem.
  • Can you build the source  u-boot-2015.07+gitAUTOINC+5922e09363 for nand boot and check it once.

  • You can also use the MLO image for NAND boot.
    I've tried earlier with this MLO image to boot the u-boot from NAND flash.
    Can you please try to flash the MLO (instead of NAND gph image) image into NAND to boot the uboot ?
  • Hi,

    Problem with Makefile,

    obj            :=
    export srctree objtree obj VPATH
    
    
    
    $(obj)u-boot-nand.gph:  $(obj)u-boot.bin
            $(obj)tools/mkimage -A $(ARCH) -T gpimage -C none \
                            -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
                            -n U-Boot -d $(obj)u-boot.bin $(obj)gph-u-boot.bin
            @dd if=/dev/zero of=$(obj)zero.bin bs=8 count=1 2>/dev/null
            @cat $(obj)gph-u-boot.bin $(obj)zero.bin > $@
            @rm $(obj)zero.bin

    After these changes, uboot loaded correctly,

    U-Boot 2015.07-00080-g68db1b0-dirty (May 11 2016 - 17:56:56 +0530)
    
    CPU: 66AK2Hx SR2.0
    I2C:   ready
    DRAM:  DDR3 PLL (PLL2) Setup ...
    DDR3 PLL Setup complete, DDR3A clock now running at 400MHz.
    DDR3A initialization complete
    1 GiB
    NAND:  512 MiB
    Net:
     link_type_name sgmii0_link_typeK2HK_EMAC
    Hit any key to stop autoboot:  0
    

    $(obj)u-boot-nand.gph:  $(obj)u-boot.bin
            $(obj)tools/mkimage -A $(ARCH) -T gpimage -C none \
                            -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
                            -n U-Boot -d $(obj)u-boot.bin $(obj)gph-u-boot.bin
            @dd if=/dev/zero of=$(obj)zero.bin bs=8 count=1 2>/dev/null
            @cat $(obj)gph-u-boot.bin $(obj)zero.bin > $@
            @rm $(obj)zero.bin

  • Problem got solved now ?
    Can you please try to confirm the MLO image for NAND flash ?
  • Please tel me procedure to flash MLO
  • Same steps but with MLO.

    nand erase 0 0x100000
    tftpboot 0x82000000 $tftp_root/MLO
    nand write 0x82000000 0 0x100000
    reset