Nas542 dead + spi_flash_dead + barebox_dead + Uloader_dead

124»

All Replies

  • stein_990
    stein_990 Posts: 33  Freshman Member
    First Comment Friend Collector
    Screenshot_2025-08-25-09-14-08-592_com.android.chrome_1.jpg

    If this is spi, can you share the dump? Please!!)

  • Mijzelf
    Mijzelf Posts: 2,961  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    I used the command you gave me for recording: "dd if=/mnt/partnerkey/nas540.mtd2 of=/dev/mtd2 bs=64k" and the command that helped another person on the forum recover "cat nas540.mtd2.gz | gzip -d | nandwrite /dev/mtd2" is different. Could this have caused the problem?

    Theoretically, yes. But in this case I think it worked out the same. For (among others) this reason:

    Barebox-C2K >/ printenv
    <snip>
    MODEL_ID=B103

    A B103 is a NAS540. So this is the mtd2 from myNAS540. If it had returned to defaults for your NAS542, this would have been B403. I think. On the other hand, it is possible that the bootloader for NAS542 is identical to that of the NAS540 (which is the oldest in the NAS5xx series), in which case it could return to NAS540 defaults, when the environment was corrupted. However, in that case I don't know how you could execute the UpgradeKey after flashing mtd2.

    The NAND chip is correctly located. About SPI, I don't know. Maybe you can ask @lesik1988, who seemed to have reprogrammed his SPI.

    I send you dumps of mtd0 and mtd1. (mtd0..2) are together the spi contents.

  • stein_990
    stein_990 Posts: 33  Freshman Member
    First Comment Friend Collector

    Thank you!!! And another question, "uImage.520ABAG1C0.bin" - isn't this the dump that is contained in spi?

  • Mijzelf
    Mijzelf Posts: 2,961  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    And another question, "uImage.520ABAG1C0.bin" - isn't this the dump that is contained in spi?

    No. In SPI there are the blocks mtd0, mtd1 and mtd2, containing uloader, barebox and env, Low level pre-loader, bootloader and bootloader environment.

    uImage is in kernel1 or kernel2, in NAND.

  • stein_990
    stein_990 Posts: 33  Freshman Member
    First Comment Friend Collector

    I finished him off and finally raised him up) I'll write down later what I did.)

  • stein_990
    stein_990 Posts: 33  Freshman Member
    First Comment Friend Collector
    edited August 25 Answer ✓

    I fixed it!
    I collected information from the entire forum.
    So.

    1. A new problem arose in that the bootloader and borebox broke. The power button lit up and went out.
    2. Took 3 files: nas520_mtd0 + nas520_mtd1 + nas540.mtd2 kindly provided by Mr. Mijzelf.
    3. Combined them in a Hex editor. Got firmware for the Spi _Flash_542.bin chip
    4. Unsoldered the chip "mx25l8006e" (It is located on the back side of the board and is 1 MB) and installed it on the Chinese ch341 programmer.
    5. In spi there was data only from nas540.mtd2. Cleared and filled Spi _Flash_542.bin. Soldered it back onto the board.
    6. Connected the board via UART. Paused in borebox.
    7. Immediately enable TFTP on the PC (the PC has a static IP).
    8. Open the file "edit /env/config".
    9. Change line 11: eth0.serverip="192.168.2.50" - this is the address on the PC.
    10. Change line 31: mfg_kernel_img=uImage.520ABAG1C0.bin - I have this file in the main folder of the TFTP server. I renamed it to "uImage_MFG".
    11. Change MODEL_ID=B403
    12. Change the serial number and MAC address.
    13. Exit by pressing Ctrl+D to save the configuration file.
    14. Enter "saveenv" to save the changes on the next boot. You can immediately press printenv to check all the data.
    15. Type "boot" and the system will download the uImage from your TFTP server directly to the NAND twice, once for each core.
    16. The LED will blink.
    17. Prepare a flash drive in fat16 with the Rescue Stick, RAS.bin firmware. Fat16 in Windows will only be formatted with a volume of less than 4 GB. I created a separate partition.
    18. Turn off the power on the device, insert the flash drive and flash the firmware. The entire process can be seen via UART. I installed the ABAG_7 firmware, but after turning off and starting I updated it from the Abag_15 web interface.
      Something like that)
      I've only been on this forum for 4 days, but I've learned a lot, and it seems like I've been here my whole life)
      Thank you all very much, I had to put it together piece by piece!
  • Mijzelf
    Mijzelf Posts: 2,961  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    Glad you sorted it, and thanks for the tutorial.

    With your new knowledge, do you have any idea what went wrong after replacing mtd2 and flashing firmware using the UpgradeKey?

  • stein_990
    stein_990 Posts: 33  Freshman Member
    First Comment Friend Collector

    Yes. After flashing md2, I followed the article "https://community.zyxel.com/en/discussion/10235/nas542-stuck-in-a-boot-loop/p3". And it was a mistake. Apart from changing MODEL_ID, nothing else needed to be changed. But I changed "fw_version" and "next and curr_bootfrom" and "modelid_1 and modelid_2". There was no need to do that. It was only necessary to change model_id, flash from a flash drive and then change either in telnet or in barebox the serial number and mac addresses.

Consumer Product Help Center