Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

STUCK UBOOT ON NAND PARTITION LOAD

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    STUCK UBOOT ON NAND PARTITION LOAD

    Hello
    I have been working on AML8726 device that runs LINUX OS and runs KODI. This device is used to watch media over TV set using HDMI cable.
    So I had to change this device firmware, but the device OS was locked. I was trying to run a kernel build with buildroot from SDCARD to mount the original OS file system. I had trouble to get working NAND drivers to find and read the existing partitions. When I managed to find and modify drivers that will work, on the kernel boot it has change the Partitioning of the device and the u boot get stuck.
    Code:
    HHH
    Boot From SPI
    0x12345678
    Boot from internal device 1st SPI
    
    System Started
    
    
    
    U-boot-00000-ga66573c-dirty(m6_mbx_th1@jb-mr1-timehold-new) (Feb 20 2014 - 10:43:31)
    
    aml_rtc_init
    aml rtc init first time!
    Clear HDMI KSV RAM
    DRAM:  1 GiB
    relocation Offset is: 105e8000
    NAND:  Amlogic nand flash uboot driver, Version U1.06.017 (c) 2010 Amlogic Inc.
    SPI BOOT : continue i 0
    No NAND device found!!!
    NAND device id: ad d7 94 91 60 44
    aml_chip->hynix_new_nand_type =: 4
    NAND device: Manufacturer ID: 0xad, Chip ID: 0xad (Hynix C revision 20nm NAND 4GiB H27UBG8T2C)
    1 NAND chips detected
    #####aml_nand_init, with RB pins and chip->chip_delay:20
    bus_cycle=5, bus_timing=6, start_cycle=6, end_cycle=7,system=5.0ns
    oob size is not enough for selected bch mode: NAND_BCH60_1K_MODE force bch to mode: NAND_BCH40_1K_MODE
    aml_chip->oob_fill_cnt =64,aml_chip->oob_size =640,bch_bytes =70
    multi plane error for selected plane mode: NAND_TWO_PLANE_MODE force plane to : NAND_SINGLE_PLANE_MODE
    aml_nand_init:oobmul =1,chip->ecc.layout->oobfree[0].length=16,aml_chip->oob_size=640
    aml_nand_get_read_default_value_hynix 980 get default reg value at blk:0, page:7
    aml nand env valid addr: 420000
    key start_blk=2040,end_blk=2047,aml_nand_key_init:684
    aml nand key valid addr: ff000000
    aml nand key valid addr: ff200000
    aml nand key valid addr: ff400000
    aml nand key valid addr: ff600000
    CONFIG_KEYSIZE=0x10000; KEYSIZE=0xfffc; bbt=0x1330; default_keyironment_size=0xeccc
    i=0,register --- nand_key
    Creating 9 MTD partitions on "nandnormal":
    0x000000c00000-0x000001400000 : "data"
    0x000001400000-0x000021400000 : "cache"
    0x000021400000-0x000041400000 : "systemXbmc"
    0x000041400000-0x000061400000 : "systemAds"
    0x000061400000-0x000063400000 : "bootXbmc"
    0x000063400000-0x000065400000 : "bootAds"
    0x000065400000-0x000067400000 : "recovery"
    0x000067400000-0x000067c00000 : "aml_logo"
    0x000067c00000-0x000067400000 : "logo"
     NAND bbt detect factory Bad block at 8cc00000
     NAND bbt detect factory Bad block at 8ce00000
     NAND bbt detect factory Bad block at 91800000
     NAND bbt detect factory Bad block at 91a00000
     NAND bbt detect factory Bad block at 9e800000
     NAND bbt detect factory Bad block at 9ea00000
     NAND bbt detect factory Bad block at b5400000
     NAND bbt detect factory Bad block at b5600000
     NAND bbt detect factory Bad block at bd000000
     NAND bbt detect factory Bad block at bd200000
     NAND bbt detect factory Bad block at bec00000
     NAND bbt detect factory Bad block at bee00000
     NAND bbt detect factory Bad block at ce800000
     NAND bbt detect factory Bad block at cea00000
     NAND bbt detect factory Bad block at d1000000
     NAND bbt detect factory Bad block at d1200000
     NAND bbt detect factory Bad block at d2400000
     NAND bbt detect factory Bad block at d2600000
     NAND bbt detect factory Bad block at d3000000
     NAND bbt detect factory Bad block at d3200000
     NAND bbt detect factory Bad block at e8000000
     NAND bbt detect factory Bad block at e8200000
    Now it reaches up to here. After it was like this and as you see the partitions are different.


    Code:
     
    TE : 77155
    
    DDR lock is 516MHz with Low Power & 1T mode
    
    DDR training :
    DX0DLLCR:40000000
    DX0DQTR:ffffffff
    DX0DQSTR:3db05001
    DX1DLLCR:40000000
    DX1DQTR:ffffffff
    DX1DQSTR:3db05001
    DX2DLLCR:40000000
    DX2DQTR:ffffffff
    DX2DQSTR:3db05001
    DX3DLLCR:40000000
    DX3DQTR:ffffffff
    DX3DQSTR:3db05001
    Stage 00 Result 00000000
    Stage 01 Result 00000000
    Stage 02 Result 00000000
    Stage 03 Result 00000000
    
    HHH
    Boot From SPI
    0x12345678
    Boot from internal device 1st SPI
    
    System Started
    
    
    
    U-boot-00000-ga66573c-dirty(m6_mbx_th1@jb-mr1-timehold-new) (Feb 20 2014 - 10:43:31)
    
    aml_rtc_init
    aml rtc init first time!
    Clear HDMI KSV RAM
    DRAM:  1 GiB
    relocation Offset is: 105e8000
    NAND:  Amlogic nand flash uboot driver, Version U1.06.017 (c) 2010 Amlogic Inc.
    SPI BOOT : continue i 0
    No NAND device found!!!
    NAND device id: ad d7 94 91 60 44  
    aml_chip->hynix_new_nand_type =: 4  
    NAND device: Manufacturer ID: 0xad, Chip ID: 0xad (Hynix C revision 20nm NAND 4GiB H27UBG8T2C)
    1 NAND chips detected
    #####aml_nand_init, with RB pins and chip->chip_delay:20
    bus_cycle=5, bus_timing=6, start_cycle=6, end_cycle=7,system=5.0ns
    oob size is not enough for selected bch mode: NAND_BCH60_1K_MODE force bch to mode: NAND_BCH40_1K_MODE
    aml_chip->oob_fill_cnt =64,aml_chip->oob_size =640,bch_bytes =70
    multi plane error for selected plane mode: NAND_TWO_PLANE_MODE force plane to : NAND_SINGLE_PLANE_MODE
    aml_nand_init:oobmul =1,chip->ecc.layout->oobfree[0].length=16,aml_chip->oob_size=640
    aml_nand_get_read_default_value_hynix 980 get default reg value at blk:0, page:7
    aml nand env valid addr: 410000  
    key start_blk=2040,end_blk=2047,aml_nand_key_init:684
    aml nand key valid addr: ff010000  
    aml nand key valid addr: ff210000  
    aml nand key valid addr: ff410000  
    aml nand key valid addr: ff610000  
    CONFIG_KEYSIZE=0x10000; KEYSIZE=0xfffc; bbt=0x1330; default_keyironment_size=0xeccc
    i=0,register --- nand_key
    Creating 9 MTD partitions on "nandnormal":
    0x000000c00000-0x000001400000 : "logo"
    0x000001400000-0x000001c00000 : "aml_logo"
    0x000001c00000-0x000003c00000 : "recovery"
    0x000003c00000-0x000005c00000 : "bootAds"
    0x000005c00000-0x000007c00000 : "bootXbmc"
    0x000007c00000-0x000027c00000 : "systemAds"
    0x000027c00000-0x000047c00000 : "systemXbmc"
    0x000047c00000-0x000067c00000 : "cache"
    0x000067c00000-0x0000ff000000 : "data"
     NAND bbt detect factory Bad block at 8cc00000  
     NAND bbt detect factory Bad block at 8ce00000  
     NAND bbt detect factory Bad block at 91800000  
     NAND bbt detect factory Bad block at 91a00000  
     NAND bbt detect factory Bad block at 9e800000  
     NAND bbt detect factory Bad block at 9ea00000  
     NAND bbt detect factory Bad block at b5400000  
     NAND bbt detect factory Bad block at b5600000  
     NAND bbt detect factory Bad block at bd000000  
     NAND bbt detect factory Bad block at bd200000  
     NAND bbt detect factory Bad block at bec00000  
     NAND bbt detect factory Bad block at bee00000  
     NAND bbt detect factory Bad block at ce800000  
     NAND bbt detect factory Bad block at cea00000  
     NAND bbt detect factory Bad block at d1000000  
     NAND bbt detect factory Bad block at d1200000  
     NAND bbt detect factory Bad block at d2400000  
     NAND bbt detect factory Bad block at d2600000  
     NAND bbt detect factory Bad block at d3000000  
     NAND bbt detect factory Bad block at d3200000  
     NAND bbt detect factory Bad block at e8000000  
     NAND bbt detect factory Bad block at e8200000  
    nandnormal initialized ok
    detect mx chiprevD :1 and nand_type: 4
    nand_curr_device =1
    MMC:   SDIO Port B: 0, SDIO Port C: 1
    SPI BOOT,spi_env_relocate_spec : env_relocate_spec 53  
    SF: Detected MX25L3205D with page size 256, total 4 MiB
    
    SPI NOR Flash have write protect!!!
    In:    serial
    Out:   serial
    Err:   serial
    aml_i2c_init
    register usb cfg[0] = 9fe82898
    Net:   Meson_Ethernet
    init suspend firmware done. (ret:0)
    reboot_mode(0xc8100004)=0x0  
    reboot_mode=charging
    switch_boot_mode
    upgrade_step = 2
     sdio_detect return 1
    Device: SDIO Port B
    Manufacturer ID: 0
    OEM: 0
    Name: Tran Speed: 40000000
    Rd Block Len: 512
    SD version 2.0
    High Capacity: Yes
    Capacity: 7744782336
    Boot Part Size: 0
    Bus Width: 4-bit
        aml_autoscript is exist
    reading aml_autoscript
    
    104 bytes read
    ## Executing script at 82000000
    Script execuded
    adsargs=setenv bootargs console=ttyS0,115200n8 rootwait nohlt a9_clk_min=200M a9_clk_max=1000M root=/dev/mtdblock7 rootfstype=yaffs2 rw init=/sbin/init hdmitx=true
    adsboot=run adsargs;nand read bootAds ${loadaddr};hdcp prefetch nand;bootm;run recovery
    batfull_threshold=98
    batlow_threshold=10
    baudrate=115200
    bootargs=root=/dev/cardblksd2 rw rootfstype=ext3 rootwait init=/init console=ttyS0,115200n8 nohlt vmalloc=256m mem=1024m logo=osd1,0x84100000,720p
    bootcmd=run disp_logo; run upgrade_check; if itest ${must_recover} != 0; then run recovery; fi; if itest ${run_xbmc} != 0; then run xbmcboot; else run adsboot; fi
    bootdelay=1
    cdc_connect_timeout=9999999999
    chipname=8726m6
    cvbsenable=false
    cvbsmode=480cvbs
    disp_logo=echo "-"
    display_bpp=24
    display_color_bg=0
    display_color_fg=0xffff
    display_color_format_index=24
    display_height=480
    display_layer=osd1
    display_width=720
    ethact=Meson_Ethernet
    ethaddr=00:00:00:00:00:00
    fb_addr=0x84900000
    filesize=68
    gatewayip=10.18.9.1
    hdmimode=480p
    hostname=arm_m6
    ipaddr=10.18.9.97
    loadaddr=0x82000000
    loadaddr_misc=0x83000000
    machid=4e27
    must_recover=0
    netmask=255.255.255.0
    outputmode=720p
    outputtemp=480p
    preboot=get_rebootmode; clear_rebootmode; echo reboot_mode=${reboot_mode}; if test ${reboot_mode} = usb_burning; then tiny_usbtool 20000; fi;
    reboot_mode=charging
    recovery=if mmcinfo; then if fatload mmc 0 ${loadaddr} recovery.img; then bootm;fi;fi;nand read recovery ${loadaddr}; bootm
    recovery_name=recovery
    recovery_path=recovery.img
    run_xbmc=1
    serverip=10.18.9.113
    sleep_threshold=20
    testaddr=0x82400000
    updatekey_or_not=saradc open 4;if saradc get_in_range 0x0 0x50 ;then msleep 500;if saradc get_in_range 0x0 0x50; then setenv must_recover 1; fi; fi
    upgrade_check=setenv must_recover 0; run updatekey_or_not; if itest ${upgrade_step} != 2; then setenv must_recover 1; fi; if mmcinfo; then if fatexist mmc 0:1 factory_upgrade.img; then setenv must_recover 1; fi; fi;
    upgrade_step=2
    usbnet_devaddr=00:15:18:01:81:31
    usbnet_hostddr=00:15:18:01:a1:3b
    usbtty=cdc_acm
    vdacswitchmode=cvbs
    video_dev=tvout
    xbmcargs=setenv bootargs console=ttyS0,115200n8 rootwait nohlt a9_clk_min=200M a9_clk_max=1000M root=/dev/mtdblock8 rootfstype=yaffs2 rw init=/sbin/init hdmitx=true
    xbmcboot=run xbmcargs;nand read bootXbmc ${loadaddr};hdcp prefetch nand;bootm;run recovery
    
    Environment size: 2417/32764 bytes
    Upgrade step 2...
    name=nand_key nand_key
    read:addr:0xff010000,phy_blk_addr:2040,phy_page_addr:8,aml_nand_get_key:125
    device:nand, init key ok!!
    key save in nand
    nand 2 ret:12
    Hit any key to stop autoboot:  1  0  
    -
    SARADC open channel(4).
    Device: SDIO Port B
    Manufacturer ID: 0
    OEM: 0
    Name: Tran Speed: 40000000
    Rd Block Len: 512
    SD version 2.0
    High Capacity: Yes
    Capacity: 7744782336
    Boot Part Size: 0
    Bus Width: 4-bit
    
    ** Unable to open "factory_upgrade.img" from mmc 0:1 --- file not exist**
    
    NAND read: bootXbmc  33554432 bytes read: OK
    pre-clear hdmi ram
    hdcp get form storage medium: nand
    don't found keyname,uboot_key_read:1502
    prefetch hdcp keys from nand failed
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   Linux-3.10.33
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3296552 Bytes = 3.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK
    machid from environment: 0x4e27  
    EFUSE machid is not set.
    Using machid 0x4e27 from environment
    
    Starting kernel ...
    My question is: Are there ways to start uboot from sdcard? or to fix this problem some how, to be able to boot linux kernel or even write commands for uboot. Because right now neither kernel boots , not from nand or sdcard. And it does not run aml_autoscript or anything from sdcard.
    Attached Files

    #2
    Hi, I have same problem with MX v1.1. Please have somebody any advice?

    Comment

    Working...
    X