[OpenWrt-Devel] [PATCH] ath79: Add missing read-only properties

David Bauer mail at david-bauer.net
Fri May 10 05:01:08 EDT 2019


Hello Adrian,

On 09.05.19 13:50, Adrian Schmutzler wrote:
> The read-only properties for non-firmware partitions seem to have
> been assigned rather randomly.
> I went through the DTS files in ath79 and assigned the read-only
> to all partitions that seem to require protection.
> diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
> index 0875c319b9..c5b4775167 100644
> --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
> +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
> @@ -100,6 +100,7 @@
>  			partition at 40000 {
>  				label = "u-boot-env";
>  				reg = <0x040000 0x010000>;
> +				read-only;
>  			};
>  
>  			partition at 50000 {
> diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts
> index 23835492a3..2b861ec8c0 100644
> --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts
> +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts
> @@ -95,6 +95,7 @@
>  			partition at 40000 {
>  				label = "u-boot-env";
>  				reg = <0x040000 0x010000>;
> +				read-only;
>  			};
>  
>  			partition at 50000 {
> diff --git a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
> index 1a92da3946..926cc70e4d 100644
> --- a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
> +++ b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
> @@ -68,6 +68,7 @@
>  			partition at 40000 {
>  				label = "u-boot-env";
>  				reg = <0x040000 0x010000>;
> +				read-only;
>  			};
>  
>  			partition at 50000 {


This would break the current flashing instructions, which require to set
the correct partition to boot from the initramfs. [0]

I would prefer not to add read-only flags on uboot-environment without a
real reason. However, I'm fine with adding read-only on ART partitions.

[0]
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c4931713df8ffb3c4e5c1be7d0b6d4aa96a7dd4c

Best wishes
David

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list