HiWiFi/Gee HC5962 Flash Layout Patch

The following flash layout for this specific hardware was obtained by modifying the original flash layout for the official firmware, in a way that satisfies the hardware requirements and maximizes user customizability. Personally I have been using this new flash layout on my customized builds over a year now and tested it with users using the same model within the OpenWrt community in my country of origin.

I've seen improved stability over the current layout which has been in place few years now (hasn't been patched since the support of this model) and hopefully it would be really helpful if someone can submit the changes on the master branch since I don't have easy access to it due to the Chinese firewall.

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0 0x80000>;
		read-only;
	};

	partition@80000 {
		label = "debug";
		reg = <0x80000 0x80000>;
		read-only;
	};

	factory: partition@100000 {
		label = "factory";
		reg = <0x100000 0x40000>;
		read-only;
	};

	partition@140000 {
		label = "kernel";
		reg = <0x140000 0x200000>;
	};

	partition@340000 {
		label = "ubi";
		reg = <0x340000 0x7C40000>;
	};
};

I have placed the revised DTS file and an excel sheet for all possible partition layouts on this device in the Google Drive links below. After flashing with this new DTS file, the nand chip inside this model can get better utilized with a total of more than 100 megabytes of free space as opposed to the 20ish megabytes with the old layout. Definitely check those files out if you're intersted.

DTS file:


Flash layout in a human readable form:

Thanks in advance!

More info about this device:

https://openwrt.org/toh/hwdata/hiwifi_gee/hiwifi_gee_hc5962
1 Like

Thanks a lot.

Yep. I briefly skimmed through the commit just now and that should solve my issue. However, I do notice they opted for a slightly different approach for flash layout, which largely seems fine. Just to confirm I’ll try and compile an image with their updated DTS file when I’m free and see how it goes.