HomeHub 5A: Clean NAND Flash and Custom Flash Layout

I have a HomeHub 5A and I mistakenly erased the whole NAND Flash. As I understand it had some Volumes/Partitions that I dont remember. I dont have a copy of the flash layout either and cant find one in wiki or on the internet. I have a separate router so in case HH doesnt wake up anymore I can live with that. But I see this as an opportunity to learn something and try to revive it as far as I can go.

  1. So the first question, to developers here, is that if I create a custom flash layout will it work?
    I have already read the wiki and found some interesting information about flash layouts. So I understand that I need a U-boot partition to basically turn on the router and then it needs to load data from some other partition (which I dont know). It also needs some calibration data for Wi-Fi to work but I dont have it yet (maybe someone else can provide it?).

  2. What kind of U-boot would I need? Can I just pick one from Openwrt downloads? Or do I need a custom U-boot from someone else?
    Maybe this one? This U-boot is quite big, more than 10 MBs, but it should not be a problem since we have 128 MBs of flash available. But I would still like to know any pros and cons.

  3. I can basically turn on this router through CFG 04 prompt and load a ram-uboot-image and then tftpboot the install image and it pretty much works. But it doesnt change anything since there are no partitions defined. Also I found in the U-boot that HH5A has a UBI filesystem so the default partition is just a ubi at 0. Furthermore it needs volumes to define how to store various data, like U-boot, kernel, rootfs etc. I think mtd command should be the way to go but I am not sure because ubi commands are also available. So I need a little help here determining what to do.

Lastly, I would probably need the dump data from those partitions/volumes from some other HH5A but I am not sure if that would work properly. If someone has a HH5A lying around can you please dump the partitions and upload somewhere? That would be really helpful but I am also open to any other suggestions. I do have the backup of mtd4 which is around 126 or 127 MBs maybe.

So please take a look here and help me to understand how to proceed further. Thank you.

Within the install system, run restore with your mtd4 dump.
If it succeeds, you can then redo the OpenWrt installation.

1 Like

Alright but as I said, I erased the NAND flash and there are no partitions in it now. No U-boot, kernel, calibration data or anything. Will it still succeed?

While looking at the serial output I see that the install-image creates 5 mtd partitions within the ram image. Can I use this flash table layout for the HH5A and write it to the router through U-boot? The flash table is as:

Creating 5 MTD partitions on "14000000.nand-parts":
[   10.295773] 0x000000000000-0x0000000a0000 : "u-boot"
[   10.385882] 0x0000000a0000-0x0000000c0000 : "uboot-env"
[   10.487943] 0x0000000c0000-0x000000100000 : "unused"
[   10.589382] 0x000000100000-0x000007f80000 : "ubi"
[   10.722801] 0x000000000000-0x000008000000 : "nand_chip"

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.