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



Added TAGs
[edited by: Raphael Alganes at 2:18 PM (GMT -8) on 12 Jan 2024]
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.

  • Hi,

    I am already in the uBoot CLI, but I cannot input any kind of text in Putty.

    I am using the red USB RS232 Adapter with 3,3V (the one, which work for other users), directly plugged into the notebook.
    Are there any Putty options, which I need to set ?

  • No (115200,8N1)

    Only use pin 2,3,4 (TX,GND,RX, may be switch TX/RX).

  • of course I am using already these pins and settings, but i cannot type any text

  • If this doesn´t work, you need to get a different USB<->RS232 Adapter.

    I had some cheap from ebay, these worked fine with a lot of devices, but not with APX120.

  • I have a few with PL2303HX Chipset, but with Windows 11 i switched to PL2303HXD.

    But, yes most of the PL2303HX are some cheap, pink models.

  • Thank you!!

    works with a CP2102 ;-) but now I have the reboot problem as mentioned above.
    Do you have also any ideas ?

  • Hi,

    i had a few solutions, but the best was still to setup a XG firewall with a setup for AP.

    Next you need to enter APX120 uboot and use these 3 steps.

    (APX120) # nand erase.chip clean
    (APX120) # tftpboot APX120.v11.0.019-2.uimage
    (APX120) # bootm 0x84000000#config@4

    After that, the APX120 boots and connects to the XG.
    You need to add the APX to the XG and the XG will send a new firmware.
    The APX will upgrade by itself.

  • Thanks to all for your help, only the following steps worked. I had to update to V 2.3.4-5 (maybe because my XG is already on SFOS 20):

    1. get into uboot emergency console, change bootdelay, save, reboot
    2. enter uboot console, set all env variables, save, reboot, enter uboot
    3. erase nand chip, tftpboot APX.uimage (2.1.1.1)

    Boot into failsafe (some tries neccessary, hit enter until root) and update with shell script (V 2.3.4-5)

    cd bin
    wget https://d2apih4urmzzdu.cloudfront.net/v2.3.4-5/APX.uimage
    ./update_image.sh APX.uimage

    reboot

    1. APX120 will boot and register with XG, enable APX and wait for final F/W upgrade
  • Hi,

    could you write the correct commands step-by-step, please?

    And here my help for the autoboot loop:

    .

    .

    .

    S - Flash Throughput, 2008 KB/s  (758742 Bytes,  377680 us)
    S - DDR Frequency, 537 MHz

    ----> here you must bridge GND (J1) and Pin 8 (U26, the first PIN on the left side, under J1)

    -----> press any key on the keyboard

    U-Boot 2012.07 [Chaos Calmer unknown,unknown] (Nov 02 2018 - 08:13:09)

    .

    .

    Now use the following commands:

    setenv autoboot 10

    saveenv

    Reboot (plug out and plug in)

    Best regards,

    Stefan

Reply
  • Hi,

    could you write the correct commands step-by-step, please?

    And here my help for the autoboot loop:

    .

    .

    .

    S - Flash Throughput, 2008 KB/s  (758742 Bytes,  377680 us)
    S - DDR Frequency, 537 MHz

    ----> here you must bridge GND (J1) and Pin 8 (U26, the first PIN on the left side, under J1)

    -----> press any key on the keyboard

    U-Boot 2012.07 [Chaos Calmer unknown,unknown] (Nov 02 2018 - 08:13:09)

    .

    .

    Now use the following commands:

    setenv autoboot 10

    saveenv

    Reboot (plug out and plug in)

    Best regards,

    Stefan

Children
No Data