This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trying to unbrick my APX120

I am using the instructions to unbrick my APX120 from this post, but I have run into issues below:

community.sophos.com/.../unbrick-apx120-break-bootdelay-0-recover-apx120

I can't seem to save the environment variables. When I run the "saveenv"

It says:

Saving Environment to NAND...
Erasing Nand...
Attempt to erase non page aligned data



This thread was automatically locked due to age.
Parents
  • I have exactly the same error

    (APX120) # saveenv
    Saving Environment to NAND...
    Erasing Nand...
    Attempt to erase non page aligned data
    

    This is the system initialization prompts (short U26 pin 8)

    U-Boot 2012.07 [Chaos Calmer unknown,unknown] (Nov 02 2018 - 08:13:09)
    
    smem ram ptable found: ver: 1 len: 3
    DRAM:  256 MiB
    @machid : 0x8010100
    NAND:  SF NAND unsupported id:0:0:0:0SF NAND unsupported id:0:0:0:0SF: Unsupported manufacturer 00
    spi_nand: Id could not be mapped
    SF NAND unsupported id:0:0:0:0SF NAND unsupported id:0:0:0:0SF: Unsupported manufacturer 00
    ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
    0 MiB
    MMC:
    *** Warning - readenv() failed, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    machid: 8010100
    flash_type: 0
    Hit any key to stop autoboot:  0
    No such device
    nand - NAND sub-system
    
    
    (APX120) # printenv
    baudrate=115200
    bootargs=ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait
    bootcmd=bootipq
    bootdelay=2
    fdt_high=0x87000000
    flash_type=0
    fsbootargs=ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs
    ipaddr=192.168.1.11
    machid=8010100
    stderr=serial
    stdin=serial
    stdout=serial
    

    Bricked version of system initialization:

    Format: Log Type - Time(microsec) - Message - Optional Info
    Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
    S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.1-00120
    S - IMAGE_VARIANT_STRING=DAABANAZA
    S - OEM_IMAGE_VERSION_STRING=CRM
    S - Boot Config, 0x00000021
    S - Reset status Config, 0x00000010
    S - Core 0 Frequency, 0 MHz
    B -       261 - PBL, Start
    B -      1338 - bootable_media_detect_entry, Start
    B -      1678 - bootable_media_detect_success, Start
    B -      1692 - elf_loader_entry, Start
    B -      5068 - auth_hash_seg_entry, Start
    B -      7210 - auth_hash_seg_exit, Start
    B -    577089 - elf_segs_hash_verify_entry, Start
    B -    694418 - PBL, End
    B -    694442 - SBL1, Start
    B -    785453 - pm_device_init, Start
    D -         7 - pm_device_init, Delta
    B -    786898 - boot_flash_init, Start
    D -     52811 - boot_flash_init, Delta
    B -    843849 - boot_config_data_table_init, Start
    D -      3838 - boot_config_data_table_init, Delta - (419 Bytes)
    B -    851055 - clock_init, Start
    D -      7569 - clock_init, Delta
    B -    863098 - CDT version:2,Platform ID:8,Major ID:1,Minor ID:1,Subtype:0
    B -    866511 - sbl1_ddr_set_params, Start
    B -    871608 - cpr_init, Start
    D -         2 - cpr_init, Delta
    B -    875989 - Pre_DDR_clock_init, Start
    D -         4 - Pre_DDR_clock_init, Delta
    D -     13174 - sbl1_ddr_set_params, Delta
    B -    889728 - pm_driver_init, Start
    D -         2 - pm_driver_init, Delta
    B -    959701 - sbl1_wait_for_ddr_training, Start
    D -        27 - sbl1_wait_for_ddr_training, Delta
    B -    975303 - Image Load, Start
    D -    152200 - QSEE Image Loaded, Delta - (297752 Bytes)
    B -   1127929 - Image Load, Start
    D -      1444 - SEC Image Loaded, Delta - (2048 Bytes)
    B -   1138329 - Image Load, Start
    D -    223905 - APPSBL Image Loaded, Delta - (458523 Bytes)
    B -   1362631 - QSEE Execution, Start
    D -        60 - QSEE Execution, Delta
    B -   1368853 - SBL1, End
    D -    676517 - SBL1, Delta
    S - Flash Throughput, 2010 KB/s  (758742 Bytes,  377357 us)
    S - DDR Frequency, 537 MHz
    
    
    U-Boot 2012.07 [Chaos Calmer unknown,unknown] (Nov 02 2018 - 08:13:09)
    
    smem ram ptable found: ver: 1 len: 3
    DRAM:  256 MiB
    @machid : 0x8010100
    NAND:  spi_nand: spi_nand_flash_probe SF NAND ID 0:ef:ab:21
    SF: Detected W25M02GV with page size 2 KiB, total 256 MiB
    SF: Detected MX25L1605D with page size 4 KiB, total 2 MiB
    ipq_spi: page_size: 0x100, sector_size: 0x1000, size: 0x200000
    258 MiB
    MMC:
    In:    serial
    Out:   serial
    Err:   serial
    machid: 8010100
    flash_type: 0
    Hit any key to stop autoboot:  0
    Creating 1 MTD partitions on "nand1":
    0x000000000000-0x000010000000 : "mtd=0"
    UBI: attaching mtd2 to ubi0
    UBI: physical eraseblock size:   131072 bytes (128 KiB)
    UBI: logical eraseblock size:    126976 bytes
    UBI: smallest flash I/O unit:    2048
    UBI: VID header offset:          2048 (aligned 2048)
    UBI: data offset:                4096
    UBI error: ubi_read_volume_table: the layout volume was not found
    UBI error: ubi_init: cannot attach mtd2
    UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
    UBI init error 22
    Error, no UBI device/partition selected!
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    Creating 1 MTD partitions on "nand1":
    0x000000000000-0x000010000000 : "mtd=0"
    UBI: attaching mtd2 to ubi0
    UBI: physical eraseblock size:   131072 bytes (128 KiB)
    UBI: logical eraseblock size:    126976 bytes
    UBI: smallest flash I/O unit:    2048
    UBI: VID header offset:          2048 (aligned 2048)
    UBI: data offset:                4096
    UBI error: ubi_read_volume_table: the layout volume was not found
    UBI error: ubi_init: cannot attach mtd2
    UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
    UBI init error 22
    Error, no UBI device/partition selected!
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    resetting ...

  • You need to retry to break autoboot.
    sometimes you need a few attemps.

    i prefer to read the nor with in circuit flash.

    if you can save the environment you must rebuild all env vars before loading the image file.

  • I second this. I had to retry it again a few times until I was able to save the environment variables. 

  • Tried four times, and finally!

    But I got this:

    Starting kernel ...
    
    Press the [f] key and hit [enter] to enter failsafe mode
    Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
    f
    - failsafe -
    /etc/preinit: line 1: telnetd: not found
    (none) login: Please reboot system when done with failsafe network logins
    

    and then

    Starting kernel ...
    
    Press the [f] key and hit [enter] to enter failsafe mode
    Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
    fPlease press Enter to activate this console.
    
    Warning: Bad CRC, using default environment
    (none) login: Booting. (Version: 11.0.021-1)
    Checking The AP model
    Starting network configuration for ethernet interface over DHCP.
    Cloud certificate validation pending.
    dnsserver entries are missing
    [
    

    This model (APX120) really needs more QA!

Reply
  • Tried four times, and finally!

    But I got this:

    Starting kernel ...
    
    Press the [f] key and hit [enter] to enter failsafe mode
    Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
    f
    - failsafe -
    /etc/preinit: line 1: telnetd: not found
    (none) login: Please reboot system when done with failsafe network logins
    

    and then

    Starting kernel ...
    
    Press the [f] key and hit [enter] to enter failsafe mode
    Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
    fPlease press Enter to activate this console.
    
    Warning: Bad CRC, using default environment
    (none) login: Booting. (Version: 11.0.021-1)
    Checking The AP model
    Starting network configuration for ethernet interface over DHCP.
    Cloud certificate validation pending.
    dnsserver entries are missing
    [
    

    This model (APX120) really needs more QA!

Children