[PATCH] mediatek: add support for TOTOLINK A8000RU

Daniel Golle daniel at makrotopia.org
Sat Aug 28 02:51:14 PDT 2021


Hi,

On Sat, Aug 28, 2021 at 04:15:05PM +0800, Chuanhong Guo wrote:
> ...
> +&snand {
> +	mediatek,quad-spi;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&serial_nand_pins>;
> +	status = "okay";
> +	mediatek,bmt-v2;
> +
> +	partitions {
> +		compatible = "fixed-partitions";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +
> +		partition at 0 {
> +			label = "Preloader";
> +			reg = <0x0 0x80000>;
> +			read-only;
> +		};
> +
> +		partition at 80000 {
> +			label = "ATF";
> +			reg = <0x80000 0x40000>;
> +			read-only;
> +		};
> +
> +		partition at c0000 {
> +			label = "u-boot";
> +			reg = <0xc0000 0x80000>;
> +			read-only;
> +		};
> +
> +		partition at 140000 {
> +			label = "u-boot-env";
> +			reg = <0x140000 0x80000>;
> +			read-only;
> +		};
> +
> +		factory: partition at 1c0000 {
> +			label = "factory";
> +			reg = <0x1c0000 0x40000>;
> +			read-only;
> +		};
> +
> +		partition at 200000 {
> +			label = "ubi";
> +			reg = <0x200000 0x6400000>;
> +		};

Using UBI on top of BMT will result in UBI becoming entirely unusable
in case of a single bad-block being added/detected by BMT:
As BMT then just excludes the block and all follow-up addresses shift
to the left by one erase block that shifting will result in all
subsequent erase blocks being corrupted from UBI's point of view.

I understand that it's not easy to replace bootloader to get rid of
BMT on every single board. As an acceptable compromise, Felix suggested
to further patch the NAND driver so it would allow excluding areas from
BMT treatment (ie. to not have it mess-up UBI).


Cheers


Daniel



More information about the openwrt-devel mailing list